/* ============================================================
   PROF. JONAS AKUNG — MAIN STYLESHEET
   ============================================================ */

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
  --navy:        #003d5b;
  --navy-dark:   #002440;
  --blue:        #0077b6;
  --blue-light:  #0096d6;
  --gold:        #c9a84c;
  --gold-light:  #e5c36a;
  --white:       #ffffff;
  --off-white:   #f4f6f9;
  --text:        #1e2a35;
  --text-muted:  #4a5568;
  --border:      rgba(0,0,0,0.10);
  --card-bg:     #ffffff;
  --alt-bg:      #f0f4f8;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:   0 6px 24px rgba(0,0,0,0.12);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.16);
  --radius:      14px;
  --transition:  0.3s ease;
  --font-body:   'Inter', sans-serif;
  --font-display:'Playfair Display', serif;
}

/* Dark Mode Variables */
body.dark-mode {
  --text:       #e8edf2;
  --text-muted: #94a3b8;
  --card-bg:    #1e2a35;
  --alt-bg:     #162030;
  --border:     rgba(255,255,255,0.08);
  --off-white:  #1a2535;
  background:   #111b26;
  color:        var(--text);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
}

img { display: block; max-width: 100%; }

a { text-decoration: none; color: inherit; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
#site-header {
  position: sticky;
  top: 0; z-index: 999;
  background: var(--navy);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.navbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

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

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

.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%; height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-link:hover::after, .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Dark Mode Toggle */
.dark-toggle {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.1rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}

.dark-toggle:hover { background: rgba(255,255,255,0.22); transform: rotate(20deg); }

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

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

.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); }

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.hero {
  position: relative;
  height: calc(100vh - 70px);
  min-height: 500px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.77,0,0.18,1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 29, 55, 0.82) 0%,
    rgba(0, 60, 100, 0.55) 60%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.slide-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 2rem 3rem;
  text-align: left;
}

.slide-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}

.slide-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: white;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.slide-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Carousel Buttons */
.carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 1.4rem;
  width: 50px; height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}

.carousel-btn.prev { left: 1.5rem; }
.carousel-btn.next { right: 1.5rem; }
.carousel-btn:hover { background: rgba(255,255,255,0.28); transform: translateY(-50%) scale(1.08); }

/* Carousel Dots */
.carousel-dots {
  position: absolute;
  bottom: 1.8rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.6rem; z-index: 10;
}

.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.section-padding { padding: 5rem 1.5rem; }
.alt-bg { background: var(--alt-bg); }

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--navy);
  position: relative;
  display: inline-block;
}

body.dark-mode .section-title { color: var(--white); }

.section-title::after {
  content: '';
  display: block;
  width: 60px; height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin: 0.7rem auto 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-hero {
  background: var(--gold);
  color: var(--navy-dark);
}

.btn-hero:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.4);
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,119,182,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: white;
}

body.dark-mode .btn-outline { color: var(--white); border-color: var(--white); }
body.dark-mode .btn-outline:hover { background: var(--blue); border-color: var(--blue); }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 4rem;
  align-items: start;
}

.profile-img-wrap {
  position: relative;
  width: 280px;
  margin: 0 auto;
}

.profile-img {
  width: 280px; height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--gold);
}

.profile-badge {
  position: absolute;
  bottom: -14px; right: -14px;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--gold);
}

.about-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

body.dark-mode .about-bio { color: var(--text); }

.sub-heading {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

body.dark-mode .sub-heading { color: var(--gold); }

.qualifications-list {
  list-style: none;
  margin-bottom: 2.5rem;
}

.qualifications-list li {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--gold);
  margin-bottom: 0.6rem;
  background: var(--off-white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

body.dark-mode .qualifications-list li { background: rgba(255,255,255,0.05); }

.qual-degree {
  font-weight: 700;
  color: var(--blue);
  margin-right: 0.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   PUBLICATIONS SECTION
   ============================================================ */
.publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.publication-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.publication-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pub-img-wrap {
  height: 200px;
  overflow: hidden;
  background: var(--navy);
}

.pub-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.publication-card:hover .pub-img-wrap img { transform: scale(1.06); }

.pub-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pub-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

body.dark-mode .pub-body h3 { color: var(--white); }

.pub-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1.2rem;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-intro {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: -1.5rem auto 3rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.contact-icon { font-size: 2rem; }
.contact-label { font-weight: 700; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.contact-value { font-size: 0.9rem; color: var(--blue); font-weight: 500; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1.5rem;
  text-align: center;
}

.footer-inner { max-width: 800px; margin: 0 auto; }

.footer-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: white;
  margin-bottom: 0.25rem;
}

.footer-affil { font-size: 0.85rem; margin-bottom: 1.5rem; color: var(--gold); }

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  transition: var(--transition);
}

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

.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--blue) 100%);
  padding: 4rem 1.5rem;
  text-align: center;
  color: white;
}

.gallery-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.75rem;
}

.gallery-hero p { font-size: 1.05rem; opacity: 0.85; }

.gallery-section { padding: 4rem 1.5rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--navy);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,29,55,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-caption {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.6rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}

.lightbox-close:hover { background: rgba(255,255,255,0.3); }

.lightbox-caption {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1rem;
  text-align: center;
  max-width: 600px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  font-size: 1.5rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav.lb-prev { left: 1.5rem; }
.lightbox-nav.lb-next { right: 1.5rem; }

/* ============================================================
   BOOK PAGE
   ============================================================ */
.book-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, #0a3d5f 100%);
  padding: 5rem 1.5rem;
  color: white;
}

.book-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: center;
}

.book-cover-wrap {
  position: relative;
  flex-shrink: 0;
}

.book-cover {
  width: 240px;
  height: 340px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 20px 20px 60px rgba(0,0,0,0.5), -4px -4px 0 var(--gold);
}

.book-info .book-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.book-info h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.book-author {
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.book-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}

.book-price span { font-size: 1rem; font-weight: 400; color: rgba(255,255,255,0.6); margin-left: 0.5rem; }

.book-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Bank Transfer Section */
.bank-transfer-section {
  padding: 4rem 1.5rem;
  background: var(--alt-bg);
}

.bank-transfer-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.bank-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  margin-top: 2rem;
  text-align: left;
}

.bank-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.75rem;
}

body.dark-mode .bank-card h3 { color: var(--gold); }

.bank-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.bank-detail:last-of-type { border-bottom: none; }
.bank-detail-label { color: var(--text-muted); font-weight: 500; }
.bank-detail-value { font-weight: 700; color: var(--navy); font-size: 1rem; }
body.dark-mode .bank-detail-value { color: var(--white); }

.bank-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(0,119,182,0.08);
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

body.dark-mode .bank-note { background: rgba(0,119,182,0.15); }

/* Foreword Section */
.foreword-section { padding: 5rem 1.5rem; }

.foreword-body {
  max-width: 780px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-muted);
}

body.dark-mode .foreword-body { color: var(--text); }

.foreword-body p { margin-bottom: 1.2rem; }

.foreword-sig {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  text-align: right;
}

body.dark-mode .foreword-sig { color: var(--gold); }

/* ============================================================
   ADMIN LOGIN PAGE
   ============================================================ */
.admin-login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--navy-dark) 0%, #0a3d5f 60%, var(--blue) 100%);
}

.admin-login-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.login-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .logo-ring {
  width: 72px; height: 72px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.login-card h2 {
  color: white;
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 0.4rem;
}

.login-card .login-sub {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-group label {
  display: block;
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
}

.form-group input::placeholder { color: rgba(255,255,255,0.4); }

.form-group input:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.14);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.2);
}

.login-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 1rem;
  display: none;
}

.login-error.show { display: block; }

.btn-login {
  width: 100%;
  padding: 0.95rem;
  background: var(--gold);
  color: var(--navy-dark);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.btn-login:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.35);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
}

.login-card.shake { animation: shake 0.4s ease; }

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */
.admin-body {
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.dark-mode.admin-body { background: #0e1923; }

.admin-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 70px);
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--navy-dark);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
}

.sidebar-profile {
  padding: 0 1.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

.sidebar-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.8rem;
  overflow: hidden;
  border: 2px solid var(--gold);
}

.sidebar-profile h3 { color: white; font-size: 1rem; font-weight: 600; }
.sidebar-profile p { color: rgba(255,255,255,0.5); font-size: 0.78rem; }

.sidebar-nav { flex: 1; }

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.5rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  background: none;
  border-top: none; border-right: none; border-bottom: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover { color: white; background: rgba(255,255,255,0.05); }
.sidebar-nav-item.active { color: white; background: rgba(201,168,76,0.12); border-left-color: var(--gold); }

.sidebar-nav-item .nav-icon { font-size: 1.1rem; }

.sidebar-logout {
  padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
}

.btn-logout {
  width: 100%;
  padding: 0.7rem;
  background: rgba(255,80,80,0.15);
  border: 1px solid rgba(255,80,80,0.3);
  color: #ff8080;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-logout:hover { background: rgba(255,80,80,0.25); }

/* Admin Main */
.admin-main {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-panel-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

body.dark-mode .admin-panel-title { color: var(--white); }

.admin-panel-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

/* Admin Cards */
.admin-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.admin-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--alt-bg);
}

body.dark-mode .admin-card h3 { color: var(--gold); border-bottom-color: rgba(255,255,255,0.08); }

/* Admin form controls */
.admin-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  margin-bottom: 0.45rem;
}

.admin-input, .admin-textarea, .admin-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--off-white);
  outline: none;
  transition: var(--transition);
  margin-bottom: 1rem;
}

.admin-input:focus, .admin-textarea:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(0,119,182,0.1);
}

body.dark-mode .admin-input,
body.dark-mode .admin-textarea,
body.dark-mode .admin-select {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--white);
}

body.dark-mode .admin-input:focus,
body.dark-mode .admin-textarea:focus {
  background: rgba(255,255,255,0.1);
}

.admin-textarea { resize: vertical; min-height: 100px; }

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Save Button */
.btn-save {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 2rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.btn-save:hover { background: var(--blue-light); transform: translateY(-1px); }

.btn-add-pub {
  background: var(--gold);
  color: var(--navy-dark);
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.btn-add-pub:hover { background: var(--gold-light); }

.save-toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: #22c55e;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transform: translateY(100px);
  opacity: 0;
  transition: 0.4s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 9999;
}

.save-toast.show { transform: translateY(0); opacity: 1; }

/* Publication editor item */
.pub-editor-item {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

body.dark-mode .pub-editor-item { background: rgba(255,255,255,0.04); }

.pub-editor-item .btn-delete-pub {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.3);
  color: #ef4444;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

.pub-editor-item .btn-delete-pub:hover { background: rgba(255,80,80,0.2); }

/* Image upload */
.img-upload-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.img-preview {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border);
}

.btn-upload-img {
  background: var(--alt-bg);
  border: 1.5px dashed var(--blue);
  color: var(--blue);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-upload-img:hover { background: rgba(0,119,182,0.08); }

/* Gallery admin grid */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gallery-admin-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
}

.gallery-admin-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.gallery-admin-item .btn-rm-img {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   FADE-IN ANIMATION (general)
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.8s ease forwards; }
.fade-in-delay-1 { animation: fadeInUp 0.8s 0.2s ease forwards; opacity: 0; }
.fade-in-delay-2 { animation: fadeInUp 0.8s 0.4s ease forwards; opacity: 0; }
.fade-in-delay-3 { animation: fadeInUp 0.8s 0.6s ease forwards; opacity: 0; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .profile-img-wrap { margin-bottom: 2rem; }
  .about-stats { grid-template-columns: repeat(3,1fr); }
  .book-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .book-cover { margin: 0 auto 2rem; }
  .book-cta-group { justify-content: center; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 1rem; }
  .admin-sidebar .sidebar-profile { display: none; }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .sidebar-nav-item { border-left: none; border-bottom: 3px solid transparent; padding: 0.5rem 0.9rem; font-size: 0.82rem; }
  .sidebar-nav-item.active { border-bottom-color: var(--gold); border-left: none; }
  .sidebar-logout { padding: 1rem; }
  .admin-main { padding: 1.5rem; }
  .admin-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.3rem;
    transform: translateY(-110%);
    transition: transform var(--transition);
    z-index: 998;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }

  .nav-links.open { transform: translateY(0); }
  .nav-link { display: block; width: 100%; padding: 0.85rem 1rem; }

  .slide-content { padding: 1.5rem; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .bank-detail { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .foreword-body { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr; }
  .carousel-btn { width: 38px; height: 38px; font-size: 1rem; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .book-cover { width: 180px; height: 260px; }
}
/* Publication cards: with descriptions optional, keep the action button
   pinned to the bottom so a row of cards stays visually aligned. */
.pub-body h3 { margin-bottom: 1.2rem; }
.pub-body .btn { margin-top: auto; align-self: flex-start; }

/* ===================================================================
   PHP BUILD ADDITIONS
   =================================================================== */

/* Placeholder shown when no book cover has been uploaded yet. */
.book-cover-placeholder {
  display: flex; flex-direction: column; justify-content: center; gap: 1rem;
  padding: 2rem 1.5rem; text-align: center;
  background: linear-gradient(150deg, #002b52, #001d37);
  border: 1px solid rgba(229, 169, 60, 0.4);
  border-radius: 6px;
}
.book-cover-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.05rem; line-height: 1.4; color: #f3be5d;
}
.book-cover-author { font-size: 0.8rem; letter-spacing: 2px; color: #94a3b8; }

.book-short-desc {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.order-intro { color: var(--text-muted); font-size: 0.97rem; margin: -1rem 0 0; }
.bank-note-link { color: var(--blue, #00386b); font-weight: 600; }

.order-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.order-step {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
  box-shadow: var(--shadow-sm);
}
.order-step h4 { font-size: 0.95rem; margin-bottom: 0.4rem; color: var(--navy); }
.order-step p  { font-size: 0.82rem; color: var(--text-muted); }
body.dark-mode .order-step h4 { color: var(--white, #fff); }

.foreword-body p { margin-bottom: 1.2rem; line-height: 1.85; }

/* Pause control for the hero carousel. */
.carousel-pause {
  position: absolute; bottom: 1.5rem; right: 1.5rem; z-index: 6;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0, 29, 55, 0.6); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer; font-size: 0.8rem; line-height: 1;
}
.carousel-pause:hover { background: rgba(0, 29, 55, 0.85); }
.carousel-pause:focus-visible { outline: 2px solid #e5a93c; outline-offset: 2px; }

.empty-note { color: var(--text-muted); font-style: italic; }

/* The lightbox is hidden via the [hidden] attribute now, so it must not be
   forced back to display:flex by an earlier rule. */
.lightbox[hidden] { display: none; }

/* Everyone gets a visible focus ring when navigating by keyboard. */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, .gallery-item:focus-visible {
  outline: 2px solid #e5a93c;
  outline-offset: 2px;
}

/* Honour a system-level request for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.gallery-hero-tag { color: var(--gold, #e5a93c); margin-bottom: 0.8rem; display: block; }
