/* ============================================================
   BiblioHub — Main Stylesheet
   Color scheme: Dark Blue #1a2e4a | Gold #c9a84c | White #fff
   Fonts: Playfair Display (headings) + Lato (body)
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
  --blue:       #1a2e4a;
  --blue-light: #223a5e;
  --blue-dark:  #111e30;
  --gold:       #c9a84c;
  --gold-light: #e0c06a;
  --gold-dark:  #a8883a;
  --white:      #ffffff;
  --off-white:  #f8f6f1;
  --text:       #2d2d2d;
  --text-light: #666666;
  --border:     #e0ddd5;
  --shadow:     0 4px 24px rgba(26,46,74,0.10);
  --radius:     10px;
  --transition: 0.3s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── Utility ── */
.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

.section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--blue);
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.gold-line {
  width: 56px;
  height: 3px;
  background: var(--gold);
  margin: 12px auto 0;
  border-radius: 2px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-available  { background: #d4edda; color: #155724; }
.badge-reserved   { background: #fff3cd; color: #856404; }
.badge-unavailable{ background: #f8d7da; color: #721c24; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--gold);
  color: var(--blue);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--blue);
  transform: translateY(-2px);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--blue);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--white);
}

.nav-logo .logo-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.nav-logo span { color: var(--gold); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.93rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: rgba(201,168,76,0.10);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Hamburger open state */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   PAGE HEADER BANNER (inner pages)
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--blue) 60%, var(--blue-light) 100%);
  padding: 70px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
  font-size: 2.6rem;
  color: var(--white);
  position: relative;
}

.page-header p {
  color: rgba(255,255,255,0.70);
  margin-top: 10px;
  font-size: 1.05rem;
  position: relative;
}

.page-header .gold-line { margin: 14px auto 0; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-light) 100%);
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(201,168,76,0.06);
  top: -150px;
  right: -150px;
}

.hero::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(201,168,76,0.04);
  bottom: -80px;
  left: -60px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-block;
  background: rgba(201,168,76,0.15);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.30);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-content h1 {
  font-size: 3.4rem;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-content h1 span { color: var(--gold); }

.hero-content p {
  color: rgba(255,255,255,0.72);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Floating book illustration */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-float {
  font-size: 9rem;
  animation: float 3.5s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(201,168,76,0.25));
  line-height: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-22px) rotate(3deg); }
}

/* ============================================================
   STATS SECTION
   ============================================================ */
.stats { background: var(--off-white); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 38px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  border-top: 4px solid var(--gold);
}

.stat-card:hover { transform: translateY(-6px); }

.stat-icon { font-size: 2.4rem; margin-bottom: 14px; }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.88rem;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ============================================================
   BOOK SLIDER / CAROUSEL
   ============================================================ */
.slider-section { background: var(--white); }

.slider-wrapper { position: relative; }

.slider {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
  min-width: 100%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 60px 70px;
  color: var(--white);
}

.slide-emoji { font-size: 7rem; flex-shrink: 0; }

.slide-content { flex: 1; }

.slide-category {
  display: inline-block;
  background: rgba(201,168,76,0.18);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.30);
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.slide-content h3 {
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.slide-author { color: var(--gold); font-weight: 600; margin-bottom: 14px; }

.slide-desc { color: rgba(255,255,255,0.72); font-size: 0.97rem; line-height: 1.65; }

/* Slider controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gold);
  color: var(--blue);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover { background: var(--gold-dark); transform: translateY(-50%) scale(1.08); }
.slider-btn.prev { left: -22px; }
.slider-btn.next { right: -22px; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.dot.active { background: var(--gold); transform: scale(1.3); }

/* ============================================================
   NEW ARRIVALS (Book Cards)
   ============================================================ */
.arrivals { background: var(--off-white); }

.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.book-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 12px 36px rgba(26,46,74,0.15);
}

.book-cover {
  padding: 0;
  width: 100%;
  position: relative;
}

.book-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.book-category {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.book-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--blue);
  margin-bottom: 4px;
  line-height: 1.3;
}

.book-author { color: var(--text-light); font-size: 0.87rem; margin-bottom: 14px; }

.book-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.72);
  padding: 70px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 50px;
  padding-bottom: 50px;
}

.footer-brand .nav-logo { font-size: 1.4rem; margin-bottom: 14px; }

.footer-brand p { font-size: 0.92rem; line-height: 1.7; max-width: 280px; }

.footer h4 {
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.footer ul li { margin-bottom: 9px; }

.footer ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 0.92rem;
  transition: color var(--transition);
}

.footer ul li a:hover { color: var(--gold); }

.footer-contact li {
  display: flex;
  gap: 10px;
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.footer-contact .icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}

/* ============================================================
   SCROLL-TO-TOP BUTTON
   ============================================================ */
#scrollTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--gold);
  color: var(--blue);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201,168,76,0.40);
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scrollTop.visible { opacity: 1; visibility: visible; }
#scrollTop:hover { background: var(--gold-dark); transform: translateY(-3px); }

/* ============================================================
   CATALOGUE PAGE
   ============================================================ */
.catalogue-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.search-box {
  position: relative;
  max-width: 520px;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--border);
  border-radius: 30px;
  font-family: 'Lato', sans-serif;
  font-size: 0.97rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}

.search-box input:focus { border-color: var(--gold); }

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-light);
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* Catalogue grid */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* ============================================================
   SERVICES PAGE
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 70px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border-bottom: 4px solid transparent;

}

.service-card:hover {
  transform: translateY(-7px);
  border-bottom-color: var(--gold);
  box-shadow: 0 14px 40px rgba(26,46,74,0.12);
}

.service-image img {
  width: 100%;
  height: 200px;
  object-fit: cover; 
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.service-content {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service-content h3 {
  font-size: 1.2rem;
  color: var(--blue);
}

/* Hours table */
.hours-section { background: var(--off-white); border-radius: var(--radius); padding: 50px; }

.hours-section h2 {
  font-size: 1.9rem;
  color: var(--blue);
  margin-bottom: 24px;
  text-align: center;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.hours-table th {
  background: var(--blue);
  color: var(--white);
  padding: 14px 20px;
  text-align: center;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
}

.hours-table th:first-child {
  border-radius: 8px 0 0 0;
  text-align: left;
}
.hours-table th:last-child  { border-radius: 0 8px 0 0; }

.hours-table th:first-child {
  text-align: left;
}

.hours-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: center;
}
.hours-table td:first-child {
  text-align: left;
}

.hours-table tr:last-child td { border-bottom: none; }

.hours-table tr:nth-child(even) td { background: var(--white); }

.hours-open  { color: #155724; font-weight: 700; }
.hours-closed { color: #721c24; font-weight: 700; }

/* ============================================================
   RESERVATION PAGE
   ============================================================ */

.reservation-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 50px;
  align-items: start;
  margin: 10px 34px;
}

.reservation-form-card {
  background-color: var(--off-white);
  padding: 24px 28px;
  border-radius: var(--radius);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.reservation-form-card h2 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}
.reservation-form-card > p {
  color: rgba(45,45,45,0.65);
  font-size: 0.93rem;
  margin-bottom: 32px;
}
.zones-card {
  background: var(--blue);
  border-radius: var(--radius);
  padding: 44px 36px;
  color: var(--white);
}

.zones-card h3 {
  margin-bottom: 20px;
  color: var(--gold-dark);
}

/* LIST */
.zones-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--gold);
}

/* ITEM */
.zones-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
  padding-left: 15px;
}

/* DOT */
.dot {
  width: 10px;
  height: 10px;
  background: var(--gold-light);
  border-radius: 50%;
  position: absolute;
  left: -6px;
  top: 10px;
}

/* HEADER */
.zones-list strong {
  margin-left: -2px;
  color: var(--white);
  font-family: 'Times New Roman', Times, serif;
}

/* TEXT */
.zones-list p {
  margin: 5px 5px;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ============================================================
   EVENTS PAGE
   ============================================================ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.event-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(26,46,74,0.14);
}

.event-header {
  display: flex;
  align-items: stretch;
}

.event-date {
  background: var(--blue);
  color: var(--white);
  padding: 18px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-width: 80px;
}

.event-date .day {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.event-date .month {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: 5px;
}

/* Color variants for event cards */
.event-card:nth-child(2) .event-date { background: #2a5298; }
.event-card:nth-child(3) .event-date { background: #1a6b4a; }
.event-card:nth-child(4) .event-date { background: #7b3fa0; }
.event-card:nth-child(5) .event-date { background: #c0392b; }
.event-card:nth-child(6) .event-date { background: #d35400; }

.event-title-block {
  padding: 16px 20px;
  background: var(--off-white);
  display: flex;
  align-items: center;
  flex: 1;
}

.event-title-block h3 {
  font-size: 1.05rem;
  color: var(--blue);
}

.event-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-body p { color: var(--text-light); font-size: 0.9rem; line-height: 1.6; flex: 1; }

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.event-meta span {
  font-size: 0.83rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 50px;
  align-items: start;
}

.contact-info-card {
  background: var(--blue);
  border-radius: var(--radius);
  padding: 44px 36px;
  color: var(--white);
}

.contact-info-card h2 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.contact-info-card > p {
  color: rgba(255,255,255,0.65);
  font-size: 0.93rem;
  margin-bottom: 32px;
  line-height: 1.6;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.contact-item .ci-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item h4 {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}

.contact-item p { color: rgba(255,255,255,0.78); font-size: 0.92rem; line-height: 1.5; }

.contact-hours {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.contact-hours h4 {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.contact-hours p { font-size: 0.88rem; color: rgba(255,255,255,0.72); margin-bottom: 5px; }

/* Contact form */
.contact-form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px 40px;
  box-shadow: var(--shadow);
}

.contact-form-card h2 {
  font-size: 1.7rem;
  color: var(--blue);
  margin-bottom: 8px;
}

.contact-form-card > p {
  color: var(--text-light);
  font-size: 0.93rem;
  margin-bottom: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.form-group label span { color: var(--gold-dark); margin-left: 2px; }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error { border-color: #dc3545; }

.form-group textarea { resize: vertical; min-height: 130px; }

.field-error {
  font-size: 0.80rem;
  color: #dc3545;
  margin-top: 3px;
  display: none;
}

.field-error.visible { display: block; }

.form-submit { margin-top: 6px; }

/* Success message */
.success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 18px 22px;
  text-align: center;
  font-weight: 600;
  font-size: 0.97rem;
  display: none;
  margin-top: 20px;
}

.success-message.visible { display: block; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 2.7rem; }
  .book-float { font-size: 7rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .catalogue-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  .section { padding: 56px 0; }

  /* Navbar */
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: var(--blue-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 30px 40px;
    gap: 4px;
    transition: right var(--transition);
    box-shadow: -4px 0 20px rgba(0,0,0,0.25);
  }

  .nav-links.open { right: 0; }
  .nav-links a { width: 100%; padding: 12px 16px; font-size: 1rem; }

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
    padding: 60px 0;
  }

  .hero-content h1 { font-size: 2.1rem; }
  .hero-content p { margin: 0 auto 30px; }
  .hero-cta { justify-content: center; }
  .book-float { font-size: 5.5rem; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Slider */
  .slide { flex-direction: column; padding: 40px 30px; gap: 24px; text-align: center; }
  .slide-emoji { font-size: 4.5rem; }
  .slide-content h3 { font-size: 1.5rem; }
  .slider-btn.prev { left: 8px; }
  .slider-btn.next { right: 8px; }

  /* Books */
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .catalogue-grid { grid-template-columns: repeat(2, 1fr); }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }
  .hours-section { padding: 30px 20px; }

  /* Events */
  .events-grid { grid-template-columns: 1fr; }

  /* Contact */
  .form-row { grid-template-columns: 1fr; }
  .contact-form-card { padding: 30px 22px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }

  /* Page header */
  .page-header h1 { font-size: 2rem; }
}

/* ── Small Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .books-grid { grid-template-columns: 1fr; }
  .catalogue-grid { grid-template-columns: 1fr; }
  .section-header h2 { font-size: 1.75rem; }
  .slider-btn { width: 36px; height: 36px; font-size: 0.9rem; }
}
