/* Wasif Khayal Sangat — v5 */

:root {
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --gold-dim: #8A6E32;
  --bg: #0D0F14;
  --bg2: #13161E;
  --bg3: #1A1E28;
  --bg4: #212638;
  --border: rgba(201,168,76,0.15);
  --border2: rgba(201,168,76,0.30);
  --text: #E8E4D9;
  --text2: #A09884;
  --text3: #5C5848;
  --font-head: 'Cinzel', serif;
  --font-body: 'Lora', serif;
  --font-ui: 'DM Sans', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-gold: 0 4px 24px rgba(201,168,76,0.12);
  --trans: all .3s cubic-bezier(.4,0,.2,1);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; overflow-x: hidden; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.7; overflow-x: hidden; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* TYPOGRAPHY */
h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p { font-family: var(--font-body); }
a { color: var(--gold); text-decoration: none; transition: var(--trans); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }

/* UTILITIES */
.container  { width: 90%; max-width: 1200px; margin: 0 auto; }
.section    { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.text-gold  { color: var(--gold); }
.text-muted { color: var(--text2); font-family: var(--font-ui); }
.font-ui    { font-family: var(--font-ui); }
.hidden     { display: none !important; }

.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { color: var(--text); letter-spacing: .04em; }
.section-title .underline { width: 48px; height: 2px; background: var(--gold); margin: 12px auto 0; }
.section-title p { color: var(--text2); margin-top: 12px; font-size: .95rem; font-family: var(--font-ui); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 6px; font-family: var(--font-ui); font-size: .9rem; font-weight: 500; cursor: pointer; transition: var(--trans); border: none; letter-spacing: .04em; text-transform: uppercase; }
.btn-gold    { background: var(--gold); color: #0D0F14; }
.btn-gold:hover { background: var(--gold-light); color: #0D0F14; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost   { background: rgba(201,168,76,.08); color: var(--gold); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(201,168,76,.18); }

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 1000;
  background: transparent;
  transition: background .3s;
}
#navbar.scrolled { background: rgba(13,15,20,.96); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }

.nav-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--text); text-decoration: none; flex-shrink: 0; }

/* Desktop nav links — always flex on large screens */
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-family: var(--font-ui); font-size: .82rem; font-weight: 500; color: var(--text2); letter-spacing: .07em; text-transform: uppercase; }
.nav-links a:hover { color: var(--gold); }
.nav-cta { background: var(--gold) !important; color: #0D0F14 !important; padding: 8px 18px; border-radius: 4px; }
.nav-cta:hover { background: var(--gold-light) !important; }

/* Hamburger — hidden on desktop */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px 4px; background: none; border: none; flex-shrink: 0; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--trans); }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer — JS sets display:flex/none via inline style */
#nav-mobile {
  /* NOTE: display controlled by JS inline style, not CSS */
  position: fixed; inset: 0;
  background: rgba(13,15,20,.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 9999;
  padding: 60px 20px 40px;
}
#nav-mobile a { font-family: var(--font-head); font-size: 1.3rem; color: var(--text2); letter-spacing: .06em; text-decoration: none; transition: var(--trans); }
#nav-mobile a:hover { color: var(--gold); }

.mobile-close-btn {
  position: absolute; top: 20px; right: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg4); border: 1px solid var(--border2);
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; color: var(--text2); transition: var(--trans);
}
.mobile-close-btn:hover { color: var(--gold); border-color: var(--gold); }

/* =============================================
   HERO
   ============================================= */
#hero { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 100px 5% 60px; position: relative; overflow: hidden; }
#hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 70% 50%, rgba(201,168,76,.06) 0%, transparent 70%), radial-gradient(ellipse 40% 50% at 20% 80%, rgba(201,168,76,.04) 0%, transparent 60%); pointer-events: none; }

.hero-eyebrow { display: inline-block; font-family: var(--font-ui); font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--border2); padding: 5px 14px; border-radius: 20px; margin-bottom: 20px; }
.hero-title span { color: var(--gold); display: block; }
.hero-subtitle { color: var(--text2); font-size: .95rem; max-width: 440px; margin: 16px 0 24px; }
.hero-quote { background: rgba(201,168,76,.06); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; padding: 20px 24px 18px 28px; margin: 24px 0; max-width: 460px; position: relative; }
.hero-quote .quote-icon { font-family: var(--font-head); font-size: 3.5rem; color: var(--gold); line-height: 1; position: absolute; top: 6px; left: 16px; opacity: .2; }
.hero-quote blockquote { font-style: italic; color: var(--gold); font-size: 1.15rem; font-weight: 500; line-height: 1.7; padding-left: 10px; }
.hero-quote .quote-attr { font-family: var(--font-ui); font-size: .75rem; color: var(--gold); margin-top: 8px; letter-spacing: .08em; text-transform: uppercase; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-visual { display: flex; align-items: flex-end; justify-content: flex-end; overflow: visible; }
.hero-visual img { width: 100%; max-width: 700px; border: none; border-radius: 0; box-shadow: none; background: transparent; object-fit: contain; }



.hero-badge { position: absolute; bottom: 20px; left: -20px; background: var(--bg3); border: 1px solid var(--border2); border-radius: 10px; padding: 10px 16px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); z-index: 2; }
.hero-badge-avatars { display: flex; }
.hero-badge-avatars span { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-dim), var(--gold)); border: 2px solid var(--bg3); margin-left: -8px; display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-size: .6rem; color: var(--bg); }
.hero-badge-avatars span:first-child { margin-left: 0; }
.hero-badge-text strong { font-family: var(--font-head); font-size: .95rem; color: var(--gold); display: block; }
.hero-badge-text small  { font-family: var(--font-ui); font-size: .7rem; color: var(--text2); }

/* =============================================
   LIBRARY
   ============================================= */
#library { background: var(--bg2); }
.library-grid { display: grid; grid-template-columns: 420px 1fr; gap: 32px; align-items: start; }
.wisdom-search-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; position: sticky; top: 88px; }
.wisdom-search-card h3 { font-size: 1rem; color: var(--gold); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wisdom-search-card p  { font-family: var(--font-ui); font-size: .8rem; color: var(--text2); margin-bottom: 16px; }
.search-input-wrap { position: relative; }
.search-input-wrap input { width: 100%; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; padding: 10px 40px 10px 14px; color: var(--text); font-family: var(--font-ui); font-size: .85rem; outline: none; }
.search-input-wrap input::placeholder { color: var(--text3); }
.search-input-wrap input:focus { border-color: var(--gold); }
.search-input-wrap button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gold); }
.popular-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.popular-tags span { font-family: var(--font-ui); font-size: .7rem; color: var(--text3); }
.tag-pill { background: var(--bg4); border: 1px solid var(--border); border-radius: 20px; padding: 3px 12px; font-family: var(--font-ui); font-size: .75rem; color: var(--text2); cursor: pointer; transition: var(--trans); }
.tag-pill:hover { border-color: var(--gold); color: var(--gold); }
.books-scroll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.book-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: var(--trans); }
.book-card:hover { border-color: var(--border2); transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.book-cover { aspect-ratio: 3/4; overflow: hidden; background: var(--bg4); display: flex; align-items: center; justify-content: center; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, var(--bg4), var(--bg3)); }
.book-cover-placeholder svg { color: var(--gold); opacity: .4; }
.book-info { padding: 14px; }
.book-category { font-family: var(--font-ui); font-size: .65rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.book-title    { font-family: var(--font-head); font-size: .85rem; color: var(--text); line-height: 1.3; }
.book-actions  { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.book-read-btn { display: flex; align-items: center; gap: 5px; font-family: var(--font-ui); font-size: .75rem; font-weight: 500; color: var(--gold); text-transform: uppercase; background: none; border: none; cursor: pointer; }

/* =============================================
   VOICES
   ============================================= */
#voices { background: var(--bg); }
.voices-filters { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.filter-btn { padding: 6px 18px; border-radius: 20px; font-family: var(--font-ui); font-size: .8rem; font-weight: 500; cursor: pointer; transition: var(--trans); border: 1px solid var(--border); background: transparent; color: var(--text2); }
.filter-btn.active, .filter-btn:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.voices-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 20px; }
.voice-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--trans); }
.voice-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.voice-video { position: relative; aspect-ratio: 16/9; overflow: hidden; cursor: pointer; background: var(--bg4); }
.voice-video img { width: 100%; height: 100%; object-fit: cover; }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.4); }
.play-btn svg { width: 52px; height: 52px; color: white; }
.video-badge { position: absolute; top: 8px; left: 8px; background: #E53E3E; padding: 2px 8px; border-radius: 4px; font-family: var(--font-ui); font-size: .65rem; font-weight: 700; color: white; text-transform: uppercase; display: flex; align-items: center; gap: 4px; }
.voice-body  { padding: 16px; }
.voice-type  { font-family: var(--font-ui); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.voice-title { font-family: var(--font-head); font-size: .9rem; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.voice-meta  { font-family: var(--font-ui); font-size: .75rem; color: var(--text3); display: flex; gap: 12px; }
.social-card { background: white; border-radius: var(--radius); overflow: hidden; color: #1a1a1a; }
.social-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.social-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #f09433,#e6683c,#dc2743,#cc2366,#bc1888); display: flex; align-items: center; justify-content: center; color: white; font-size: .7rem; font-weight: 700; font-family: var(--font-ui); }
.social-name { font-family: var(--font-ui); font-size: .8rem; font-weight: 700; color: #1a1a1a; }
.social-time { font-family: var(--font-ui); font-size: .7rem; color: #888; }
.social-icon { margin-left: auto; }
.social-text { font-family: var(--font-ui); font-size: .78rem; color: #333; padding: 0 14px 10px; line-height: 1.5; }
.social-media-thumb { width: 100%; aspect-ratio: 1; overflow: hidden; cursor: pointer; position: relative; }
.social-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.social-media-thumb .play-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; }
.social-media-thumb .play-overlay svg { width: 40px; height: 40px; color: white; }
.social-actions { display: flex; gap: 16px; padding: 8px 14px 12px; font-family: var(--font-ui); font-size: .75rem; color: #555; }
.social-actions span { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.article-tag { display: inline-block; background: var(--gold); color: var(--bg); padding: 2px 8px; border-radius: 3px; font-family: var(--font-ui); font-size: .65rem; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.read-more { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-ui); font-size: .78rem; color: var(--gold); cursor: pointer; background: none; border: none; padding: 0; margin-top: 8px; }

/* =============================================
   EVENTS + GALLERY
   ============================================= */
#gather-gallery { background: var(--bg2); }
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.col-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.2rem; color: var(--text); margin-bottom: 20px; }
.col-title svg { color: var(--gold); flex-shrink: 0; }
.event-item { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; padding: 16px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; cursor: pointer; transition: var(--trans); }
.event-item:hover { border-color: var(--border2); transform: translateX(4px); }
.event-date-box { text-align: center; background: var(--bg4); border-radius: 8px; padding: 6px; border: 1px solid var(--border); }
.event-date-box .month { font-family: var(--font-ui); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.event-date-box .day   { font-family: var(--font-head); font-size: 1.4rem; color: var(--text); line-height: 1; }
.event-info h4 { font-family: var(--font-head); font-size: .9rem; color: var(--text); margin-bottom: 3px; }
.event-info p  { font-family: var(--font-ui); font-size: .75rem; color: var(--text2); display: flex; align-items: center; gap: 4px; }
.event-arrow   { color: var(--text3); flex-shrink: 0; transition: var(--trans); }
.event-item:hover .event-arrow { color: var(--gold); transform: translateX(3px); }
.gallery-grid  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery-item  { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; cursor: pointer; background: var(--bg4); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-overlay { position: absolute; inset: 0; background: rgba(13,15,20,0); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: var(--trans); }
.gallery-item:hover .gallery-overlay { background: rgba(13,15,20,.65); }
.gallery-overlay svg  { color: white; opacity: 0; transition: var(--trans); width: 28px; height: 28px; }
.gallery-item:hover .gallery-overlay svg { opacity: 1; }
.gallery-overlay span { font-family: var(--font-ui); font-size: .7rem; color: white; opacity: 0; transition: var(--trans); text-align: center; padding: 0 8px; }
.gallery-item:hover .gallery-overlay span { opacity: 1; }

/* =============================================
   FOOTER
   ============================================= */
#footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-family: var(--font-ui); font-size: .85rem; color: var(--text2); margin: 14px 0 20px; line-height: 1.8; }
.social-links   { display: flex; gap: 10px; }
.social-link    { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text2); transition: var(--trans); }
.social-link:hover { border-color: var(--gold); color: var(--gold); }
.footer-col h4  { font-family: var(--font-ui); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text2); margin-bottom: 16px; }
.footer-col ul  { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-family: var(--font-ui); font-size: .85rem; color: var(--text2); }
.footer-col ul li a:hover { color: var(--gold); }
.newsletter-form { display: flex; gap: 8px; margin-top: 14px; }
.newsletter-form input { flex: 1; min-width: 0; background: var(--bg4); border: 1px solid var(--border); border-radius: 6px; padding: 9px 12px; color: var(--text); font-family: var(--font-ui); font-size: .82rem; outline: none; }
.newsletter-form input:focus { border-color: var(--gold); }
.newsletter-form button { background: var(--gold); color: var(--bg); border: none; border-radius: 6px; padding: 9px 16px; font-family: var(--font-ui); font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.footer-bottom  { border-top: 1px solid var(--border); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-family: var(--font-ui); font-size: .78rem; color: var(--text3); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-family: var(--font-ui); font-size: .78rem; color: var(--text3); }

/* =============================================
   MODALS + TOAST
   ============================================= */
.modal-backdrop { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.85); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: var(--trans); }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius-lg); width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto; transform: scale(.95) translateY(20px); transition: var(--trans); position: relative; }
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--bg4); border: 1px solid var(--border); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text2); transition: var(--trans); z-index: 1; }
.modal-close:hover { color: var(--gold); border-color: var(--gold); }
.book-modal-inner { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 32px; }
.book-modal-cover { border-radius: 8px; overflow: hidden; }
.book-modal-cover img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.book-modal-info h2 { font-size: 1.4rem; color: var(--text); margin-bottom: 6px; }
.book-modal-info .category-badge { display: inline-block; background: rgba(201,168,76,.1); border: 1px solid var(--border2); color: var(--gold); padding: 3px 12px; border-radius: 20px; font-family: var(--font-ui); font-size: .72rem; font-weight: 500; margin-bottom: 14px; }
.book-modal-info p { font-size: .88rem; color: var(--text2); line-height: 1.8; margin-bottom: 20px; }
.book-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-modal-inner { padding: 0; }
.gallery-modal-img   { width: 100%; max-height: 70vh; object-fit: contain; }
.gallery-modal-caption { padding: 16px 24px; font-family: var(--font-ui); font-size: .85rem; color: var(--text2); text-align: center; }
.gallery-nav-prev:hover, .gallery-nav-next:hover { background: rgba(201,168,76,.3) !important; border-color: var(--gold) !important; }
.video-modal-inner iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.video-modal-body { padding: 20px 24px; }

#toast { position: fixed; bottom: 24px; right: 24px; z-index: 99999; background: var(--bg3); border: 1px solid var(--border2); border-radius: 10px; padding: 12px 20px; font-family: var(--font-ui); font-size: .85rem; color: var(--text); transform: translateY(80px); opacity: 0; transition: var(--trans); box-shadow: var(--shadow); }
#toast.show    { transform: translateY(0); opacity: 1; }
#toast.success { border-color: rgba(72,187,120,.4); color: #68D391; }
#toast.error   { border-color: rgba(245,101,101,.4); color: #FC8181; }

.skeleton { background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
@keyframes spin    { to{transform:rotate(360deg)} }
.fade-up   { animation: fadeUp .6s ease forwards; }
.fade-up-2 { animation: fadeUp .6s .15s ease both; }

/* =============================================
   PAGE HERO + SUBPAGES
   ============================================= */
.page-hero { padding: 120px 5% 60px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,.06) 0%, transparent 60%), var(--bg); text-align: center; border-bottom: 1px solid var(--border); }
.page-hero h1 { margin-bottom: 10px; }
.page-hero p  { color: var(--text2); font-family: var(--font-ui); max-width: 500px; margin: 0 auto; }
.breadcrumb   { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-ui); font-size: .78rem; color: var(--text3); margin-bottom: 16px; }
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }

.books-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.books-page-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; padding: 16px 20px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); }
.category-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-pill { padding: 5px 14px; border-radius: 20px; font-family: var(--font-ui); font-size: .78rem; border: 1px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; transition: var(--trans); text-decoration: none; }
.cat-pill:hover, .cat-pill.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.page-btn { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-family: var(--font-ui); font-size: .85rem; border: 1px solid var(--border); color: var(--text2); background: transparent; cursor: pointer; transition: var(--trans); padding: 0 10px; text-decoration: none; }
.page-btn:hover, .page-btn.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }

.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; align-items: start; }
.contact-info-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; position: sticky; top: 88px; }
.contact-info-card h3 { color: var(--gold); margin-bottom: 16px; font-size: 1rem; }
.contact-detail { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; font-family: var(--font-ui); font-size: .85rem; color: var(--text2); }
.contact-detail svg { color: var(--gold); margin-top: 2px; flex-shrink: 0; }
.contact-form-wrap { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-family: var(--font-ui); font-size: .78rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text2); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-family: var(--font-ui); font-size: .88rem; outline: none; transition: var(--trans); appearance: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select option { background: var(--bg3); }

.event-card-full { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 20px; padding: 20px 24px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); transition: var(--trans); }
.event-card-full:hover { border-color: var(--border2); transform: translateX(4px); }
.event-date-block { text-align: center; background: var(--bg4); border: 1px solid var(--border); border-radius: 10px; padding: 10px 8px; }
.event-date-block .e-month { font-family: var(--font-ui); font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.event-date-block .e-day   { font-family: var(--font-head); font-size: 2rem; color: var(--text); line-height: 1; }
.event-date-block .e-year  { font-family: var(--font-ui); font-size: .7rem; color: var(--text3); }
.event-badge          { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 20px; font-family: var(--font-ui); font-size: .68rem; font-weight: 600; text-transform: uppercase; }
.event-badge-online   { background: rgba(201,168,76,.1); color: var(--gold); border: 1px solid var(--border2); }
.event-badge-physical { background: rgba(29,158,117,.1); color: #1D9E75; border: 1px solid rgba(29,158,117,.3); }

.blog-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; text-decoration: none; transition: var(--trans); }
.blog-card:hover { border-color: var(--border2); transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.blog-card-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg4); display: flex; align-items: center; justify-content: center; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body    { padding: 18px; }
.blog-card-cat     { font-family: var(--font-ui); font-size: .65rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.blog-card-title   { font-family: var(--font-head); font-size: .95rem; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.blog-card-excerpt { font-family: var(--font-ui); font-size: .82rem; color: var(--text2); line-height: 1.6; margin-bottom: 14px; }
.blog-card-meta    { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-ui); font-size: .75rem; color: var(--text3); }
.blog-card-read    { color: var(--gold); display: flex; align-items: center; gap: 4px; }

/* =============================================
   ADMIN PANEL
   ============================================= */
.admin-wrap {
  display: flex;
  min-height: 100vh;
}

/* Fixed sidebar */
.admin-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 240px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 500;
  padding: 24px 0;
  /* No transition here — will be added in mobile MQ */
}
.admin-logo { padding: 0 20px 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px; font-family: var(--font-head); font-size: .95rem; color: var(--text); display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; }
.admin-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-family: var(--font-ui); font-size: .85rem; color: var(--text2); cursor: pointer; transition: var(--trans); border: none; background: none; width: 100%; text-align: left; text-decoration: none; white-space: nowrap; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(201,168,76,.08); color: var(--gold); border-right: 2px solid var(--gold); }
.admin-nav-item svg { flex-shrink: 0; }

/* Main area offset by sidebar */
.admin-main {
  margin-left: 240px;
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  background: var(--bg);
  overflow-x: hidden;
}

.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 8px; }
.admin-topbar h1 { font-size: 1.3rem; color: var(--text); font-family: var(--font-head); }
.admin-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; overflow: hidden; }
.admin-card h3 { font-family: var(--font-ui); font-size: .82rem; font-weight: 600; color: var(--text2); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-card .stat-num   { font-family: var(--font-head); font-size: 1.8rem; color: var(--gold); }
.stat-card .stat-label { font-family: var(--font-ui); font-size: .78rem; color: var(--text2); margin-top: 4px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { font-family: var(--font-ui); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text3); padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table td { font-family: var(--font-ui); font-size: .83rem; color: var(--text2); padding: 12px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg4); }
.badge       { display: inline-block; padding: 2px 10px; border-radius: 20px; font-family: var(--font-ui); font-size: .7rem; font-weight: 500; }
.badge-green { background: rgba(72,187,120,.1); color: #68D391; }
.badge-gold  { background: rgba(201,168,76,.1); color: var(--gold); }
.badge-gray  { background: rgba(255,255,255,.05); color: var(--text2); }
.action-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-family: var(--font-ui); font-size: .75rem; color: var(--text2); cursor: pointer; transition: var(--trans); margin-right: 4px; }
.action-btn:hover { border-color: var(--gold); color: var(--gold); }
.action-btn.danger:hover { border-color: #FC8181; color: #FC8181; }
.panel        { display: none; }
.panel.active { display: block; }
.admin-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 490; }
.admin-sidebar-overlay.open { display: block; }

/* Mobile hamburger toggle for admin — always renders, hidden on desktop */
.admin-mobile-toggle {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 600;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  width: 42px; height: 42px;
  cursor: pointer;
  color: var(--text);
  align-items: center;
  justify-content: center;
  /* hidden on desktop */
  display: none;
}

/* =============================================
   RESPONSIVE — TABLET 769–1024px
   ============================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .library-grid { grid-template-columns: 340px 1fr; }
  .voices-grid  { grid-template-columns: 1fr 1fr; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
  .stats-row    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =============================================
   RESPONSIVE — MOBILE ≤768px
   ============================================= */
@media (max-width: 768px) {

  /* Show hamburger, hide desktop links */
  .nav-links  { display: none; }
  .hamburger  { display: flex; }

  /* Hero */
  #hero { grid-template-columns: 1fr; text-align: center; padding: 90px 5% 40px; gap: 20px; }
  .hero-subtitle  { margin: 12px auto; }
  .hero-quote     { margin: 16px auto; }
  .hero-actions   { justify-content: center; }
  .hero-visual    { justify-content: center; margin-top: 20px; }
  
  .hero-badge     { left: 0; bottom: -8px; }

  /* Layout */
  .library-grid       { grid-template-columns: 1fr; }
  .wisdom-search-card { position: static; }
  .books-scroll       { grid-template-columns: repeat(2, 1fr); }
  .voices-grid        { grid-template-columns: 1fr; }
  .two-col-grid       { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid        { grid-template-columns: 1fr; }
  .blog-grid-4        { grid-template-columns: repeat(2,1fr) !important; }
  .contact-grid       { grid-template-columns: 1fr; }
  .contact-info-card  { position: static; }
  .form-row           { grid-template-columns: 1fr; }
  .book-modal-inner   { grid-template-columns: 1fr; }
  .event-card-full    { grid-template-columns: 64px 1fr; }
  .event-card-full > *:last-child { grid-column: 1 / -1; }

  /* Admin mobile — show hamburger, slide sidebar in */
  .admin-mobile-toggle {
    display: flex;
  }
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
    padding: 16px;
    padding-top: 64px;
  }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =============================================
   RESPONSIVE — SMALL MOBILE ≤480px
   ============================================= */
@media (max-width: 480px) {
  .hero-visual { display: flex; justify-content: center; margin-top: 24px; }
  .hero-visual img { max-width: 90%; }
  .books-scroll    { grid-template-columns: 1fr; }
  .gallery-grid    { grid-template-columns: repeat(2, 1fr); }
  .stats-row       { grid-template-columns: minmax(0, 1fr); }
  .books-page-grid { grid-template-columns: repeat(2, 1fr); }
}
