/*
Theme Name: Bachelor Notes
Theme URI: https://bachelornotes.com/
Author: Bachelor Notes
Author URI: https://bachelornotes.com/
Description: A Nepal bachelor-level notes portal theme with university, faculty, course, semester, syllabus, and subject-note browsing.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bachelornotes
Tags: education, blog, custom-logo, custom-menu, featured-images, grid-layout, one-column, right-sidebar, translation-ready
*/

:root {
  --bn-bg: #f6f8fb;
  --bn-surface: #ffffff;
  --bn-ink: #172033;
  --bn-muted: #667085;
  --bn-line: #dde4ee;
  --bn-primary: #0d6b67;
  --bn-primary-dark: #084c4a;
  --bn-accent: #d89216;
  --bn-accent-soft: #fff4dc;
  --bn-blue-soft: #eaf2ff;
  --bn-green-soft: #e8f7f2;
  --bn-radius: 8px;
  --bn-shadow: 0 16px 44px rgba(23, 32, 51, 0.08);
  --bn-container: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bn-bg);
  color: var(--bn-ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--bn-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--bn-primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bn-container {
  width: min(100% - 32px, var(--bn-container));
  margin: 0 auto;
}

.bn-skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--bn-ink);
  color: #fff;
  border-radius: 4px;
}

.bn-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--bn-line);
  backdrop-filter: blur(14px);
}

.bn-header-inner {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.bn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bn-ink);
  font-weight: 800;
  font-size: 1.18rem;
}

.bn-brand:hover {
  text-decoration: none;
}

.bn-logo-fallback {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--bn-primary);
  color: #fff;
  font-weight: 900;
}

.bn-brand img {
  width: auto;
  max-height: 48px;
}

.bn-primary-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.bn-primary-menu a {
  display: block;
  padding: 9px 11px;
  border-radius: 6px;
  color: var(--bn-ink);
  font-size: 0.94rem;
  font-weight: 650;
}

.bn-primary-menu a:hover,
.bn-primary-menu .current-menu-item > a,
.bn-primary-menu .current_page_item > a {
  background: var(--bn-green-soft);
  color: var(--bn-primary-dark);
  text-decoration: none;
}

.bn-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--bn-line);
  border-radius: 8px;
  background: var(--bn-surface);
  color: var(--bn-ink);
}

.bn-search {
  position: relative;
  min-width: 220px;
}

.bn-search form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bn-search input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 0 44px 0 14px;
  border: 1px solid var(--bn-line);
  border-radius: 8px;
  background: #f9fbfd;
  color: var(--bn-ink);
  font: inherit;
}

.bn-search button {
  position: absolute;
  right: 4px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: var(--bn-primary);
  color: #fff;
  cursor: pointer;
}

.bn-hero {
  padding: 48px 0 34px;
  background:
    linear-gradient(110deg, rgba(13, 107, 103, 0.95), rgba(20, 75, 124, 0.84)),
    linear-gradient(45deg, #0d6b67, #1b5f8f);
  color: #fff;
}

.bn-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: center;
  gap: 34px;
}

.bn-kicker {
  margin: 0 0 10px;
  color: #d8f6ee;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bn-hero h1,
.bn-page-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.65rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.bn-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  color: #e8f7f7;
  font-size: 1.08rem;
}

.bn-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.bn-button,
.bn-button-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
}

.bn-button {
  background: #fff;
  color: var(--bn-primary-dark);
}

.bn-button-alt {
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #fff;
}

.bn-button:hover,
.bn-button-alt:hover {
  text-decoration: none;
}

.bn-hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--bn-radius);
  background: rgba(255, 255, 255, 0.11);
}

.bn-program-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-program-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 750;
}

.bn-section {
  padding: 34px 0;
}

.bn-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.bn-section-head h2,
.bn-section-head h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  line-height: 1.12;
}

.bn-section-head p {
  max-width: 700px;
  margin: 6px 0 0;
  color: var(--bn-muted);
}

.bn-category-grid,
.bn-post-grid,
.bn-syllabus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.bn-category-tile,
.bn-post-card,
.bn-syllabus-card,
.bn-sidebar-widget,
.bn-article,
.bn-comment-area,
.bn-empty-state {
  border: 1px solid var(--bn-line);
  border-radius: var(--bn-radius);
  background: var(--bn-surface);
  box-shadow: var(--bn-shadow);
}

.bn-category-tile {
  display: block;
  padding: 20px;
  color: var(--bn-ink);
}

.bn-category-tile:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.bn-category-tile strong {
  display: block;
  font-size: 1.16rem;
}

.bn-category-tile span {
  color: var(--bn-muted);
}

.bn-child-category-grid {
  margin-bottom: 22px;
}

.bn-university-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.bn-directory-card {
  padding: 22px;
  border: 1px solid var(--bn-line);
  border-radius: var(--bn-radius);
  background: var(--bn-surface);
  box-shadow: var(--bn-shadow);
}

.bn-directory-card h2 {
  margin: 0 0 8px;
  font-size: 1.28rem;
  line-height: 1.25;
}

.bn-directory-card p {
  margin: 0 0 14px;
  color: var(--bn-muted);
}

.bn-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bn-mini-links a {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid var(--bn-line);
  border-radius: 999px;
  background: #f9fbfd;
  color: var(--bn-ink);
  font-size: 0.86rem;
  font-weight: 750;
}

.bn-mini-links a:hover {
  background: var(--bn-green-soft);
  color: var(--bn-primary-dark);
  text-decoration: none;
}

.bn-post-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.bn-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bn-blue-soft);
}

.bn-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bn-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.bn-card-title {
  margin: 8px 0 8px;
  font-size: 1.18rem;
  line-height: 1.28;
}

.bn-card-title a {
  color: var(--bn-ink);
}

.bn-card-excerpt {
  margin: 0;
  color: var(--bn-muted);
}

.bn-card-meta,
.bn-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--bn-muted);
  font-size: 0.9rem;
}

.bn-category-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bn-accent-soft);
  color: #8b5700;
  font-size: 0.78rem;
  font-weight: 850;
}

.bn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  padding: 34px 0;
}

.bn-article {
  overflow: hidden;
}

.bn-article-header {
  padding: 30px 30px 18px;
}

.bn-article-title {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.bn-featured-image {
  margin: 0;
}

.bn-featured-image img {
  width: 100%;
  display: block;
}

.bn-entry-content {
  padding: 24px 30px 34px;
}

.bn-entry-content h2,
.bn-entry-content h3,
.bn-entry-content h4 {
  line-height: 1.25;
}

.bn-entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.bn-entry-content th,
.bn-entry-content td {
  padding: 10px;
  border: 1px solid var(--bn-line);
  text-align: left;
  vertical-align: top;
}

.bn-entry-content blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--bn-primary);
  color: var(--bn-muted);
}

.bn-entry-content .wp-block-image,
.bn-entry-content figure {
  margin-left: 0;
  margin-right: 0;
}

.bn-post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 30px 30px;
}

.bn-post-nav a {
  display: block;
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--bn-line);
  border-radius: 8px;
  background: #f9fbfd;
  color: var(--bn-ink);
  font-weight: 750;
}

.bn-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
}

.bn-sidebar-widget {
  padding: 18px;
}

.bn-sidebar-widget h2,
.bn-sidebar-widget h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.bn-sidebar-widget ul {
  padding-left: 18px;
}

.bn-syllabus-card {
  padding: 20px;
}

.bn-syllabus-card h3 {
  margin: 0 0 8px;
}

.bn-syllabus-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--bn-muted);
}

.bn-pagination {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.bn-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bn-pagination a,
.bn-pagination span {
  min-width: 38px;
  padding: 7px 12px;
  border: 1px solid var(--bn-line);
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.bn-pagination .current {
  background: var(--bn-primary);
  color: #fff;
}

.bn-comment-area {
  margin-top: 22px;
  padding: 24px 30px;
}

.bn-empty-state {
  padding: 28px;
  text-align: center;
}

.bn-site-footer {
  margin-top: 38px;
  padding: 34px 0;
  background: #121a2a;
  color: #dce5f2;
}

.bn-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 28px;
}

.bn-site-footer a {
  color: #fff;
}

.bn-footer-menu {
  padding: 0;
  margin: 0;
  list-style: none;
}

.bn-footer-menu a {
  display: block;
  padding: 4px 0;
}

.bn-copyright {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #aebbd0;
  font-size: 0.92rem;
}

@media (max-width: 920px) {
  .bn-header-inner,
  .bn-hero-grid,
  .bn-layout,
  .bn-footer-grid {
    grid-template-columns: 1fr;
  }

  .bn-menu-toggle {
    display: inline-flex;
    justify-self: end;
    grid-column: 2;
    grid-row: 1;
  }

  .bn-header-inner {
    grid-template-columns: 1fr auto;
  }

  .bn-navigation {
    display: none;
    grid-column: 1 / -1;
  }

  .bn-navigation.is-open {
    display: block;
  }

  .bn-primary-menu {
    display: grid;
    gap: 4px;
    padding: 0 0 14px;
  }

  .bn-search {
    grid-column: 1 / -1;
    padding-bottom: 14px;
  }

  .bn-category-grid,
  .bn-post-grid,
  .bn-syllabus-grid,
  .bn-university-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bn-category-grid,
  .bn-post-grid,
  .bn-syllabus-grid,
  .bn-university-directory,
  .bn-post-nav {
    grid-template-columns: 1fr;
  }

  .bn-section-head {
    display: block;
  }

  .bn-article-header,
  .bn-entry-content,
  .bn-comment-area {
    padding-left: 18px;
    padding-right: 18px;
  }
}
