/* =========================================
   Pustaka Nusantara — Global Stylesheet
   ========================================= */

:root {
  --cream: #F9F5EE;
  --warm-brown: #5C3317;
  --gold: #C8963E;
  --dark: #1A1210;
  --muted: #6B6259;
  --border: #E8E0D4;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: #FFFFFF;
  color: var(--dark);
  margin: 0;
}

em { font-style: italic; color: var(--gold); }

/* ---- NAVBAR ---- */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.brand-icon { font-size: 1.4rem; }

.nav-link {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted) !important;
  padding: 6px 14px !important;
  border-radius: 100px;
  transition: all .2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--dark) !important;
  background: var(--cream);
}

.btn-login {
  border: 1.5px solid var(--warm-brown) !important;
  color: var(--warm-brown) !important;
  font-weight: 500 !important;
}

.btn-login:hover {
  background: var(--warm-brown) !important;
  color: #fff !important;
}

/* ---- HERO ---- */
.hero-section {
  position: relative;
  background: linear-gradient(160deg, #2C1810 0%, #4A2C1A 40%, #6B3A22 100%);
  overflow: hidden;
  padding: 100px 0 80px;
}

.hero-overlay {
  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='%23ffffff' fill-opacity='0.03'%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");
}

.min-vh-75 { min-height: 75vh; }

.hero-tag {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.btn-hero-primary {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 13px 30px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all .25s;
  text-decoration: none;
  display: inline-block;
}

.btn-hero-primary:hover {
  background: #A57930;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,150,62,0.4);
}

.btn-hero-outline {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.35);
  padding: 13px 30px;
  border-radius: 100px;
  font-size: 0.95rem;
  transition: all .25s;
  text-decoration: none;
  display: inline-block;
}

.btn-hero-outline:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Hero floating books */
.hero-books {
  position: relative;
  width: 320px;
  height: 300px;
}

.book-card-hero {
  position: absolute;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.15);
}

.b1 { top: 0; left: 0; background: rgba(255,255,255,0.08); width: 140px; height: 80px; }
.b2 { top: 30px; right: 0; background: rgba(200,150,62,0.25); width: 160px; height: 90px; }
.b3 { top: 140px; left: 20px; background: rgba(255,255,255,0.06); width: 150px; height: 80px; }
.b4 { bottom: 0; right: 20px; background: rgba(200,150,62,0.15); width: 140px; height: 80px; }

/* ---- STATS ---- */
.stats-section {
  background: var(--dark);
}

.stats-row {
  display: flex;
}

.stat-item {
  padding: 36px 24px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 6px;
}

/* ---- SECTIONS ---- */
.section-pad { padding: 80px 0; }
.bg-warm { background: var(--cream); }

.section-header { max-width: 480px; }

.section-tag {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 0;
}

/* ---- CATEGORIES ---- */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: all .2s;
  text-align: center;
}

.category-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.cat-icon { font-size: 2rem; margin-bottom: 8px; }
.cat-name { font-size: 0.9rem; font-weight: 500; color: var(--dark); }
.cat-count { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

/* ---- BOOK CARDS ---- */
.book-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all .25s;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

.book-cover {
  height: 160px;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 12px;
  justify-content: space-between;
}

.book-genre {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.book-status {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
}

.status-ok { background: rgba(39,174,96,0.85); color: #fff; }
.status-borrowed { background: rgba(231,76,60,0.8); color: #fff; }

.book-info { padding: 16px; }

.book-author {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.book-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.book-rating {
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.book-rating span { color: var(--muted); }

.btn-borrow {
  width: 100%;
  background: var(--warm-brown);
  color: #fff;
  border: none;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all .2s;
}

.btn-borrow:hover:not(:disabled) {
  background: #3D1F08;
  color: #fff;
}

.disabled-btn { background: #ccc !important; cursor: not-allowed; }

/* ---- STEPS ---- */
.step-card {
  padding: 32px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  height: 100%;
  transition: all .2s;
}

.step-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
}

.step-card:hover .step-num { color: var(--gold); }
.step-card h5 { font-weight: 600; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---- CTA ---- */
.cta-section {
  background: linear-gradient(135deg, var(--warm-brown), #2C1810);
  padding: 80px 0;
  color: #fff;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.btn-cta {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 14px 36px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 500;
  transition: all .25s;
  text-decoration: none;
}

.btn-cta:hover {
  background: #A57930;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,150,62,0.45);
}

/* ---- PAGE HEADER ---- */
.page-header {
  background: linear-gradient(160deg, #2C1810, #4A2C1A);
  padding: 60px 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
}

/* ---- SEARCH ---- */
.search-bar-wrap {
  display: flex;
  gap: 10px;
  max-width: 600px;
}

.search-input {
  border-radius: 100px !important;
  border: 1.5px solid var(--border) !important;
  padding: 12px 24px !important;
  font-size: 0.95rem !important;
}

.search-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(200,150,62,0.15) !important;
}

.btn-search {
  background: var(--warm-brown);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-weight: 500;
  transition: all .2s;
}

.btn-search:hover { background: #3D1F08; color: #fff; }

/* ---- FILTER PILLS ---- */
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  padding: 7px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all .2s;
  color: var(--muted);
}

.pill:hover { border-color: var(--gold); color: var(--warm-brown); }
.pill.active { background: var(--warm-brown); color: #fff; border-color: var(--warm-brown); }

/* Pagination */
.page-link {
  color: var(--warm-brown);
  border-color: var(--border);
}

.page-item.active .page-link {
  background-color: var(--warm-brown);
  border-color: var(--warm-brown);
}

/* ---- AUTH ---- */
.auth-tabs .nav-link {
  color: var(--muted) !important;
  border-radius: 0;
  border-bottom: 2px solid transparent !important;
  background: none !important;
  font-weight: 500;
  font-size: 1rem;
  padding: 12px !important;
}

.auth-tabs .nav-link.active {
  color: var(--warm-brown) !important;
  border-bottom: 2px solid var(--warm-brown) !important;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}

.auth-title {
  font-family: var(--font-display);
  font-weight: 600;
}

.text-link {
  color: var(--warm-brown);
  text-decoration: none;
  font-size: 0.875rem;
}

.text-link:hover { text-decoration: underline; }

.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* Benefits */
.benefits-box {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
}

.benefits-title {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 20px;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.benefits-list li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--dark);
  border-bottom: 1px solid var(--border);
}

.benefits-list li:last-child { border-bottom: none; }

/* Tiers */
.tier-card {
  border-radius: 16px;
  padding: 20px;
  border: 1.5px solid var(--border);
  position: relative;
  transition: all .2s;
}

.tier-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.tier-pro { border-color: var(--gold); background: #FFFBF4; }
.tier-ultimate { background: var(--dark); }

.tier-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--gold);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tier-name { font-weight: 600; font-size: 1rem; }
.tier-price { font-weight: 700; font-size: 1.1rem; color: var(--warm-brown); }
.tier-price small { font-size: 0.75rem; font-weight: 400; }
.tier-desc { font-size: 0.82rem; color: var(--muted); margin: 0; }

.tier-ultimate .tier-name { color: #fff; }
.tier-ultimate .tier-price { color: var(--gold); }
.tier-ultimate .tier-desc { color: rgba(255,255,255,0.5); }

/* ---- ABOUT PAGE ---- */
.lead-para { font-size: 1.1rem; line-height: 1.7; }

.about-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.av-block {
  border-radius: 20px;
  padding: 28px;
  text-align: center;
}

.av-1 { background: linear-gradient(135deg,#2C1810,#6B3A22); }
.av-2 { background: var(--gold); }
.av-3 { background: var(--cream); border: 1px solid var(--border); }
.av-4 { background: var(--dark); }

.av-year {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.av-3 .av-year { color: var(--warm-brown); }

.av-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 6px;
}

.av-3 .av-label { color: var(--muted); }

/* Visi Misi */
.vm-card {
  border-radius: 20px;
  padding: 36px;
  height: 100%;
}

.vm-visi {
  background: linear-gradient(135deg,#2C1810,#5C3317);
  color: #fff;
}

.vm-misi {
  background: #fff;
  border: 1px solid var(--border);
}

.vm-icon { font-size: 2.5rem; margin-bottom: 16px; }
.vm-visi h4, .vm-misi h4 { font-family: var(--font-display); font-weight: 600; }
.vm-visi p { color: rgba(255,255,255,0.8); line-height: 1.7; }
.vm-misi ul { padding-left: 18px; }
.vm-misi li { color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }

/* Team */
.team-card { text-align: center; }

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 16px;
}

.team-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.team-role { font-size: 0.82rem; color: var(--gold); margin: 0; }

/* Facility */
.facility-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all .2s;
  height: 100%;
}

.facility-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.facility-icon { font-size: 2rem; margin-bottom: 14px; }
.facility-card h6 { font-weight: 600; margin-bottom: 8px; }
.facility-card p { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* Contact */
.contact-info-list { display: flex; flex-direction: column; gap: 20px; }

.ci-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ci-icon { font-size: 1.3rem; width: 30px; flex-shrink: 0; margin-top: 2px; }

.ci-item strong { font-size: 0.9rem; display: block; margin-bottom: 2px; }
.ci-item span { font-size: 0.88rem; }

.contact-form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--dark);
  padding: 60px 0 0;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

.footer-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}

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

.footer-links li {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  padding: 4px 0;
}

.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color .2s;
}

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

.footer-bottom {
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  margin: 0;
}

/* ---- FORM CONTROLS OVERRIDES ---- */
.form-control {
  border: 1.5px solid var(--border);
  border-radius: 10px !important;
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: all .2s;
}

.form-control:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(200,150,62,0.15) !important;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 6px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .stats-row { flex-wrap: wrap; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .hero-section { padding: 60px 0; }
  .section-pad { padding: 56px 0; }
  .auth-card { padding: 24px; }
}
