:root {
  --navy: #0a1628;
  --navy-mid: #132044;
  --green: #1a7a4a;
  --green-light: #22a05a;
  --green-accent: #2dce73;
  --gold: #c9a84c;
  --white: #ffffff;
  --off-white: #f7f9fc;
  --gray-light: #e8edf5;
  --gray-mid: #a0aec0;
  --text-dark: #1a202c;
  --text-mid: #4a5568;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f4f7fb;
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(245, 248, 252, 0.92);
  backdrop-filter: blur(14px);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
  box-shadow: 0 10px 30px rgba(10, 22, 40, 0.06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 42px;
  filter: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: #10264a;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #0a2a55;
  border-bottom: 2px solid #0a2a55;
  padding-bottom: 6px;
}

.nav-cta {
  background: #0a2a55;
  color: white !important;
  padding: 10px 22px;
  border-radius: 7px;
  font-weight: 700 !important;
  box-shadow: 0 10px 22px rgba(10, 42, 85, 0.22);
  transition: all 0.2s !important;
}

.nav-cta:hover {
  background: #123d76 !important;
  color: white !important;
  border-bottom: none !important;
  transform: translateY(-1px);
}

/* ===== HERO SECTION ===== */
.filter-tab {
  cursor: default;
  user-select: none;
  pointer-events: none;
}

.pub-hero {
  margin-top: 68px;
  background:
    radial-gradient(circle at 80% 20%, rgba(10, 42, 85, 0.08), transparent 35%),
    radial-gradient(circle at 15% 15%, rgba(201, 168, 76, 0.10), transparent 30%),
    linear-gradient(135deg, #f7f9fc 0%, #edf2f7 55%, #e5ebf3 100%);
  padding: 88px 5% 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pub-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -15%;
  width: 130%;
  height: 180%;
  background: radial-gradient(ellipse at 70% 30%, rgba(10, 42, 85, 0.08) 0%, transparent 62%);
  pointer-events: none;
}

.pub-hero-label {
  display: inline-block;
  background: #e1e7ef;
  border: 1px solid rgba(10, 42, 85, 0.08);
  color: #0a2a55;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 20px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.pub-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  color: #0a2a55;
  line-height: 1.2;
  margin-bottom: 16px;
}

.pub-hero p {
  color: #516078;
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ===== FILTER TABS ===== */
.filter-section {
  background: var(--navy);
  padding: 0 5% 50px;
  text-align: center;
}

.filter-question {
  color: #5b6b82;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-tab {
  padding: 10px 24px;
  border: 1.5px solid rgba(10, 42, 85, 0.14);
  background: rgba(255, 255, 255, 0.65);
  color: #0a2a55;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(10, 22, 40, 0.04);
}

.filter-tab:hover {
  border-color: #0a2a55;
  color: #0a2a55;
  background: #ffffff;
  transform: translateY(-2px);
}

.filter-tab.active {
  background: #0a2a55;
  border-color: #0a2a55;
  color: white;
  box-shadow: 0 10px 22px rgba(10, 42, 85, 0.20);
}

/* Discipline tags */
.discipline-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.disc-tag {
  padding: 6px 15px;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(10, 42, 85, 0.10);
  color: #5b6b82;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.disc-tag:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== SECTION WRAPPER ===== */
.section-wrapper {
  padding: 86px 5%;
  background:
    radial-gradient(circle at 88% 10%, rgba(10, 42, 85, 0.08), transparent 32%),
    radial-gradient(circle at 10% 80%, rgba(201, 168, 76, 0.10), transparent 28%),
    linear-gradient(135deg, #f7f9fc 0%, #eef3f8 52%, #e6edf5 100%);
}

.section-wrapper.bg-off {
  background: var(--off-white);
}

.section-header {
  margin-bottom: 40px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b08a3c;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.section-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: #b08a3c;
  display: inline-block;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  color: #0a2a55;
  margin-bottom: 12px;
}

.section-header p {
  color: #5b6b82;
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 720px;
}

/* ===== BOOK CARDS ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.book-card {
  background: linear-gradient(145deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(10, 42, 85, 0.12);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  min-height: 420px;
  box-shadow: 0 18px 38px rgba(10, 22, 40, 0.10);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.book-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.book-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(10, 42, 85, 0.25);
  box-shadow: 0 26px 60px rgba(10, 42, 85, 0.18);
}

.book-card.visible:hover {
  transform: translateY(-10px) scale(1.02);
}

.book-card:nth-child(2) {
  background: linear-gradient(145deg, #ffffff 0%, #eef5ff 100%);
  border-color: rgba(10, 42, 85, 0.16);
}

.book-card:nth-child(2):hover {
  box-shadow: 0 26px 60px rgba(10, 42, 85, 0.20);
}

.book-card:nth-child(3) {
  background: linear-gradient(145deg, #ffffff 0%, #fff8eb 100%);
  border-color: rgba(176, 138, 60, 0.28);
}

.book-card:nth-child(3):hover {
  box-shadow: 0 26px 60px rgba(176, 138, 60, 0.22);
}

.book-cover {
  width: 170px;
  min-width: 170px;
  height: 270px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.25));
  transition: transform 0.35s ease;
}

.book-card:hover .book-cover img {
  transform: scale(1.07) rotate(-2deg);
}

.book-info {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.book-badge {
  width: fit-content;
  background: #e1e7ef;
  color: #0a2a55;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(10, 42, 85, 0.08);
}

.book-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}

.book-meta {
  font-size: 0.86rem;
  color: var(--text-mid);
  line-height: 1.55;
}

.book-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-top: 4px;
}

.book-actions {
  margin-top: auto;
  padding-top: 6px;
}

.btn-view {
  display: inline-block;
  background: linear-gradient(135deg, #0a2a55, #123d76);
  color: white;
  padding: 12px 24px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(10, 42, 85, 0.24);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn-view:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #b08a3c, #0a2a55);
  box-shadow: 0 14px 26px rgba(10, 42, 85, 0.30);
}

/* ===== ANIMATED CATEGORY BUTTONS ===== */
.cat-section {
  background: linear-gradient(135deg, var(--navy) 0%, #0d2b1a 100%);
  padding: 80px 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cat-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(26, 122, 74, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.cat-section .section-eyebrow {
  justify-content: center;
  color: var(--green-accent);
}

.cat-section .section-eyebrow::before {
  background: var(--green-accent);
}

.cat-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  color: white;
  margin-bottom: 14px;
}

.cat-section>p {
  color: rgba(255, 255, 255, 0.55);
  max-width: 560px;
  margin: 0 auto 52px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.cat-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.cat-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 28px 36px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  min-width: 230px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cat-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 10px;
}

.cat-btn:hover::before {
  opacity: 1;
}

.cat-btn:hover {
  border-color: var(--green-accent);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 50px rgba(26, 122, 74, 0.3);
}

.cat-btn-icon {
  font-size: 2.2rem;
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

.cat-btn:hover .cat-btn-icon {
  transform: scale(1.15) rotate(-5deg);
}

.cat-btn-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.cat-btn-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

.cat-btn:hover .cat-btn-sub {
  color: rgba(255, 255, 255, 0.85);
}

.cat-btn-arrow {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s 0.05s;
  color: var(--green-accent);
}

.cat-btn:hover .cat-btn-arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FILTER HIDDEN ===== */
.book-card[data-type] {
  display: grid;
}

.book-card.hidden {
  display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
  }

  .book-cover {
    margin: 0 auto;
  }

  .book-info {
    align-items: center;
  }

  .book-badge {
    margin: 0 auto;
  }

  .book-actions {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .btn-view {
    width: 100%;
    text-align: center;
  }

  .cat-btn {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .pub-hero {
    padding: 60px 4% 40px;
  }
  .pub-hero h1 {
    font-size: 2rem;
  }
  .filter-tabs {
    gap: 8px;
  }
  .filter-tab {
    padding: 8px 16px;
    font-size: 0.8rem;
    width: 100%;
  }
}