/* ============================================================
   AIO Digital Library — Front Website Styles
   Central Library Theme (Dark Green + Gold)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  --green:       #1a3a2a;
  --green-mid:   #2d5a3f;
  --green-light: #3a7a52;
  --gold:        #c8a84b;
  --gold-light:  #e8c96a;
  --white:       #ffffff;
  --bg:          #f5f6f0;
  --text:        #222;
  --text-muted:  #666;
  --border:      #dde0d6;
  --radius:      10px;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --transition:  all 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ============================================================
   TOP INFO BAR
   ============================================================ */
.top-bar {
  background: var(--green);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  padding: 6px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.top-bar-left { display: flex; align-items: center; gap: 20px; }
.top-bar-right { display: flex; align-items: center; gap: 20px; }
.top-bar span { display: flex; align-items: center; gap: 5px; }

/* ============================================================
   MAIN NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 0 0;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
  padding: 0 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand-icon {
  width: 52px; height: 52px;
  background: var(--green);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.nav-brand-text .name {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: var(--green); line-height: 1.1;
}
.nav-brand-text .tagline {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: 0.5px;
}
.nav-search {
  flex: 1; max-width: 380px;
  display: flex; align-items: center;
  background: #f4f5f0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.nav-search input {
  flex: 1; border: none; background: transparent;
  padding: 10px 14px; font-size: 13px;
  outline: none; color: var(--text);
}
.nav-search button {
  background: var(--green); color: #fff;
  border: none; padding: 10px 16px;
  cursor: pointer; font-size: 15px;
}
.nav-login {
  display: flex; align-items: center; gap: 6px;
  background: var(--green); color: #fff;
  border-radius: 8px; padding: 9px 18px;
  font-size: 13px; font-weight: 600;
  transition: var(--transition);
}
.nav-login:hover { background: var(--green-mid); }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--green); }

/* NAV MENU BAR */
.nav-menu-bar {
  background: var(--green);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.nav-menu-bar .container {
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-menu-bar a {
  display: inline-block;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 16px;
  transition: var(--transition);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav-menu-bar a:hover,
.nav-menu-bar a.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
  background: rgba(255,255,255,0.06);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--green);
  z-index: 1000;
  flex-direction: column;
  padding: 24px;
  gap: 4px;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu-close {
  align-self: flex-end;
  background: none; border: none;
  color: #fff; font-size: 28px; cursor: pointer; margin-bottom: 16px;
}
.mobile-menu a {
  padding: 13px 16px;
  border-radius: 8px;
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-menu a:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}
.section-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.view-all {
  font-size: 13px; color: var(--green);
  font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.view-all:hover { color: var(--gold); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 520px;
  background: linear-gradient(to right, rgba(15,35,20,0.92) 45%, rgba(15,35,20,0.55) 100%),
    url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?w=1600&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  padding: 80px 0;
  overflow: hidden;
}
.hero-content { max-width: 600px; }
.hero-eyebrow {
  display: inline-block;
  color: var(--gold-light);
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero-tagline {
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  margin-bottom: 32px;
}
.hero-tagline span { display: flex; align-items: center; gap: 6px; }
.hero-tagline .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.hero-search-bar {
  display: flex;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  margin-bottom: 24px;
  max-width: 520px;
}
.hero-search-bar input {
  flex: 1; border: none; padding: 16px 20px;
  font-size: 14px; outline: none; color: var(--text);
}
.hero-search-bar button {
  background: var(--gold);
  color: var(--green);
  border: none;
  padding: 0 24px;
  font-size: 18px;
  cursor: pointer;
  font-weight: 700;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--gold);
  color: var(--green);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-hero-primary:hover { background: var(--gold-light); }
.btn-hero-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-hero-outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* ============================================================
   QUICK ACCESS STRIP
   ============================================================ */
.quick-strip {
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  padding: 32px 0;
}
.quick-strip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.quick-card {
  text-align: center;
  padding: 20px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.quick-card:hover {
  border-color: var(--green);
  background: #f0f5f0;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.quick-card-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #f0f5f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin: 0 auto 12px;
}
.quick-card-title { font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.quick-card-sub { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ============================================================
   STATS BAND
   ============================================================ */
.stats-band {
  background: var(--green);
  padding: 40px 0;
}
.stats-band-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  text-align: center;
  padding: 20px;
  border-right: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.stat-item:last-child { border-right: none; }
.stat-item-icon { font-size: 36px; opacity: 0.85; }
.stat-item-text .val {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
}
.stat-item-text .lbl {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

/* ============================================================
   BOOK CARDS
   ============================================================ */
.book-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.book-scroll::-webkit-scrollbar { height: 4px; }
.book-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.book-card {
  min-width: 150px;
  max-width: 150px;
  flex-shrink: 0;
}
.book-card-cover {
  width: 150px;
  height: 210px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.book-card-cover img { width: 100%; height: 100%; object-fit: contain; }
.book-card-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 3px; }
.book-card-author { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   DIGITAL RESOURCES GRID
   ============================================================ */
.resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.resource-item:hover { border-color: var(--green); background: #f0f5f0; }
.resource-item-left { display: flex; align-items: center; gap: 10px; }
.resource-item-icon { font-size: 22px; }
.resource-item-arrow { color: var(--text-muted); font-size: 16px; }

/* ============================================================
   NOTICES
   ============================================================ */
.notice-list { display: flex; flex-direction: column; gap: 12px; }
.notice-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  transition: var(--transition);
}
.notice-item:hover { border-color: var(--green); box-shadow: var(--shadow); }
.notice-date {
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}
.notice-date .day { font-size: 22px; font-weight: 800; color: var(--green); line-height: 1; }
.notice-date .mon { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.notice-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.notice-desc { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   STAFF / LIBRARY COMMITTEE
   ============================================================ */
.staff-list { display: flex; flex-direction: column; gap: 12px; }
.staff-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.staff-photo {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.staff-name { font-size: 14px; font-weight: 700; color: var(--text); }
.staff-role { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   WHY OUR LIBRARY
   ============================================================ */
.why-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.why-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text); }
.why-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.gallery-item {
  height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--green-mid);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.06); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--green);
  color: rgba(255,255,255,0.8);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: #fff;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  margin-bottom: 18px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--gold); color: var(--green); }
.footer h5 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; letter-spacing: 0.5px; text-transform: uppercase; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer ul li a:hover { color: var(--gold-light); }
.footer-contact-item { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 10px; }
.footer-hours-item { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.65); padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: 8px;
}
.btn-timetable {
  background: var(--gold);
  color: var(--green);
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  display: inline-block;
}

/* ============================================================
   SHARED UTILS
   ============================================================ */
.btn-primary { background: var(--green); color: #fff; border: none; padding: 10px 22px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 6px; }
.btn-primary:hover { background: var(--green-mid); }
.btn-outline { background: transparent; color: var(--green); border: 2px solid var(--green); padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-outline:hover { background: var(--green); color: #fff; }

.badge-new { background: var(--gold); color: var(--green); padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   RESPONSIVE — TABLET 1100px
   ============================================================ */
@media (max-width: 1100px) {
  .quick-strip-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap:28px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-band-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   RESPONSIVE — MOBILE LARGE 900px
   ============================================================ */
@media (max-width: 900px) {
  .nav-menu-bar { display: none; }
  .nav-toggle { display: block; }

  /* Navbar inner */
  .navbar-inner { padding: 0 16px; height: 64px; }
  .nav-search { display: none; }
  .nav-brand-text .name { font-size: 16px; }

  /* Hero */
  .hero { min-height: 380px; padding: 60px 0 36px; }
  .hero h1 { font-size: 30px; }
  .hero-tagline { font-size: 13px; }
  .hero-search-bar { max-width: 100%; }
  .hero-actions { flex-wrap: wrap; }
  .btn-hero-primary, .btn-hero-outline { width: 100%; justify-content: center; font-size: 13px; padding: 11px 20px; }

  /* Stats */
  .stats-band-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.12); }
  .stat-item:last-child, .stat-item:nth-last-child(-n+2):nth-child(odd) { border-bottom: none; }
}

/* ============================================================
   RESPONSIVE — MOBILE 768px
   ============================================================ */
@media (max-width: 768px) {
  .container { padding: 0 16px; }

  /* Top bar */
  .top-bar-right { display: none; }
  .top-bar-left { font-size: 11px; }

  /* Hero */
  .hero { min-height: 320px; padding: 50px 0 32px;
    background-position: center right; }
  .hero h1 { font-size: 26px; margin-bottom: 10px; }
  .hero-eyebrow { font-size: 10px; }
  .hero-search-bar { border-radius: 8px; }
  .hero-search-bar input { font-size: 13px; padding: 13px 14px; }
  .hero-search-bar button { padding: 0 18px; }

  /* Quick strip */
  .quick-strip { padding: 20px 0; }
  .quick-strip-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .quick-card { padding: 14px 8px; }
  .quick-card-icon { width: 48px; height: 48px; font-size: 20px; margin-bottom: 8px; }
  .quick-card-title { font-size: 11px; }
  .quick-card-sub { display: none; }

  /* Stats band */
  .stats-band { padding: 28px 0; }
  .stat-item-icon { font-size: 28px; }
  .stat-item-text .val { font-size: 22px; }
  .stat-item-text .lbl { font-size: 11px; }

  /* Sections */
  .section { padding: 36px 0; }
  .section-title { font-size: 20px; }

  /* New arrivals + digital resources — stack on mobile */
  .section div[style*="grid-template-columns:1.6fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Book scroll */
  .book-scroll { gap: 12px; }
  .book-card { min-width: 120px; max-width: 120px; }
  .book-card-cover { width: 120px; height: 168px; font-size: 32px; }
  .book-card-title { font-size: 11px; }
  .book-card-author { font-size: 10px; }

  /* Resource grid */
  .resource-grid { grid-template-columns: 1fr; }
  .resource-item { font-size: 12px; padding: 12px 14px; }

  /* Notices + Committee + Why — stack */
  .section div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Notice items */
  .notice-item { padding: 12px; }
  .notice-date .day { font-size: 18px; }
  .notice-title { font-size: 12px; }
  .notice-desc { font-size: 10px; }

  /* Staff */
  .staff-item { padding: 10px; }
  .staff-photo { width: 40px; height: 40px; }
  .staff-name { font-size: 13px; }
  .staff-role { font-size: 10px; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery-item { height: 110px; }

  /* Footer */
  .footer { padding: 36px 0 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand-name { font-size: 18px; }
  .footer-desc { font-size: 12px; }
  .footer h5 { font-size: 12px; margin-bottom: 10px; }
  .footer ul li a { font-size: 12px; }
  .footer-contact-item { font-size: 12px; }
  .footer-hours-item { font-size: 11px; }
  .footer-bottom { font-size: 11px; flex-direction: column; text-align: center; }

  /* Search page */
  .hero-search-wrap { flex-direction: column; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE 480px
   ============================================================ */
@media (max-width: 480px) {
  /* Navbar */
  .navbar-inner { height: 56px; }
  .nav-brand-icon { width: 40px; height: 40px; font-size: 18px; }
  .nav-brand-text .name { font-size: 14px; }
  .nav-brand-text .tagline { display: none; }
  .nav-login { padding: 7px 12px; font-size: 12px; }

  /* Hero */
  .hero { min-height: 280px; padding: 44px 0 28px; }
  .hero h1 { font-size: 22px; }
  .hero-tagline { display: none; }
  .hero-actions { gap: 8px; }
  .btn-hero-primary, .btn-hero-outline { font-size: 12px; padding: 9px 16px; }

  /* Quick strip — 2 cols on smallest screens */
  .quick-strip-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Stats — 1 col */
  .stats-band-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item-text .val { font-size: 20px; }

  /* Sections */
  .section { padding: 28px 0; }
  .section-title { font-size: 18px; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item { height: 90px; }

  /* Books page sidebar — hide on mobile, show filter inline */
  .books-sidebar { display: none; }
}
