/* ============================================================
   BASE & VARIABLES
   ============================================================ */
:root {
  --navy:  #1B2A4A;
  --royal: #2D4A7A;
  --gold:  #C8922A;
  --gold-hover: #b8913f;
  --cream: #F8F6F2;
  --dark:  #0D1B2A;
  --white: #ffffff;
  --gray:  #6b7280;
  --font-playfair: 'Playfair Display', serif;
  --font-cormorant: 'Cormorant Garamond', serif;
  --font-garamond: 'EB Garamond', serif;
}

/* *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-garamond);
  color: var(--dark);
  background: var(--cream);
  overflow-x: hidden;
} */


/* RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ROOT */

html {
    font-size: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* BODY */

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;

    font-family: var(--font-garamond);
    color: var(--dark);
    background: var(--cream);

    -webkit-text-size-adjust: 100%;
}

.row {
    display: flex;
    flex-wrap: wrap;
}



@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    section {
        width: 100%;
        overflow: hidden;
    }
}

a { text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   HEADINGS — thin, light weight
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 300 !important;
  letter-spacing: 0.04em;
}

.font-playfair { font-family: var(--font-playfair) !important; }
.font-cormorant { font-family: var(--font-cormorant) !important; }
.text-gold  { color: var(--gold) !important; }
.text-navy  { color: var(--navy) !important; }
.text-white { color: #fff !important; }
.italic { font-style: italic; }

/* ============================================================
   MARQUEE BANNER
   ============================================================ */
.marquee-container {
  width: 100%;
  overflow: hidden;
  background: var(--gold);
  padding: 5px 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  white-space: nowrap;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 80s linear infinite;
}
.marquee-content {
  display: flex;
  align-items: center;
  font-family: var(--font-garamond);
  font-style: italic;
}
.marquee-content span {
  font-size: 17px;
  font-weight: 500;
  color: #070a15;
  margin-right: 50px;
  white-space: nowrap;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 28px; /* below marquee */
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.4s, box-shadow 0.4s;
}
#navbar.scrolled {
  background: rgba(27, 42, 74, 0.97) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
}
.nav-link-custom {
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-link-custom:hover,
.nav-link-custom.active { color: var(--gold); }

/* Mobile toggle */
#mobile-toggle {
  background: none;
  border: 0;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}
#mobile-menu {
  background: rgba(27,42,74,0.97);
  backdrop-filter: blur(12px);
}

/* Desktop vs Mobile account sections */
.desktop-account { display: block; }
.mobile-right-section { display: none; align-items: center; gap: 10px; }
@media (max-width: 991px) {
  .desktop-account    { display: none; }
  .mobile-right-section { display: flex; }
}

/* Account / user button */
.copy-btn {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-garamond);
  font-style: italic;
  cursor: pointer;
  transition: background 0.3s;
}
.copy-btn:hover { background: var(--gold-hover); }

/* User dropdown */
.user-dropdown { position: relative; }
.custom-dropdown {
  min-width: 260px;
  border: none;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  margin-top: 12px;
}
.dropdown-user-header {
  background: var(--dark);
  color: #fff;
  padding: 20px;
  text-align: center;
}
.dropdown-user-name  { font-size: 17px; font-weight: 400; margin-bottom: 4px; }
.dropdown-user-email { font-size: 17px; opacity: .8; word-break: break-word; }
.custom-dropdown .dropdown-item {
  padding: 13px 18px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s, padding-left 0.2s;
}
.custom-dropdown .dropdown-item:hover { background: #f5f5f5; padding-left: 24px; }
.custom-dropdown .dropdown-item i { width: 18px; text-align: center; }

/* ============================================================
   STICKY LEFT BUTTON GROUP
   ============================================================ */
.button-group {
  font-family: var(--font-garamond);
  font-style: italic;
  position: fixed;
  top: 50%;
  left: -8px;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.button-group a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 56px;
  height: 56px;
  padding: 0 18px;
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  border-radius: 0 50px 50px 0;
  border: 1px solid var(--gold-hover);
  overflow: hidden;
  transition: width 0.4s ease, background 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.22);
}
.button-group a i { min-width: 20px; font-size: 19px; text-align: center; color: #fff; }
.button-group a span {
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
  font-size: 17px;
}
.button-group a:hover { width: 210px; }
.button-group a:hover span { opacity: 1; visibility: visible; }

@media (max-width: 768px) {
  .button-group { gap: 9px; }
  .button-group a { width: 50px; height: 50px; }
  .button-group a:hover { width: 185px; }
}
@media (max-width: 480px) {
  .button-group { top: auto; bottom: 18px; transform: none; }
  .button-group a { width: 46px; height: 46px; }
  .button-group a:hover { width: 170px; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(13,27,42,.92) 0%, rgba(13,27,42,.68) 55%, rgba(13,27,42,.45) 100%);
}
.hero-title {
  font-family: var(--font-playfair) !important;
  font-size: clamp(2rem, 4vw, 3.2rem) !important;
  font-weight: 300 !important;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  margin-left: 1.9rem;
}
.hero-title span.gold { color: var(--gold); font-style: italic; }
.book-cover {
  width: 22rem;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transition: transform 0.5s;
}
.book-cover:hover { transform: scale(1.04); }

/* ============================================================
   SECTION HEADING (d4 ornamental style)
   ============================================================ */
.demo-block { padding: 0 20px 10px; }
.d4-heading {
  text-align: center;
  margin-bottom: 14px;
  position: relative;
}
.d4-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.d4-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold), transparent);
}
.d4-diamond {
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(201,162,84,0.6);
  flex-shrink: 0;
}
.d4-heading h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.1rem, 2vw, 1.7rem) !important;
  font-weight: 300 !important;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ============================================================
   VISIT / STATS BOXES
   ============================================================ */
.visit-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  margin: 30px auto;
  flex-wrap: wrap;
  padding: 0 16px;
}
.visit-box {
  background: rgba(13,27,42,.96);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 18px;
  width: 270px;
  min-height: 170px;
  padding: 24px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.visit-box:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0,0,0,0.25); }
.visit-icon { color: var(--gold); font-size: 26px; margin-bottom: 12px; }
.visit-text { color: #cfcfcf; font-size: 15px; font-weight: 400; margin-bottom: 6px; }
.visit-count { color: var(--gold); font-size: 32px; font-weight: 600; line-height: 1.2; }
.rating-number { color: var(--gold); font-size: 32px; font-weight: 600; }
.rating-stars { display: flex; gap: 3px; }
.rating-stars i { color: #d1d5db; font-size: 15px; }
.rating-stars i.active { color: #f4b400; }

@media (max-width: 768px) {
  .visit-container { flex-direction: column; align-items: center; }
  .visit-box { width: 100%; max-width: 340px; }
}

/* ============================================================
   PROFESSOR REVIEWS CAROUSEL
   ============================================================ */
.professor-review-section { padding: 20px 0; overflow: hidden; }
.review-heading { text-align: center; margin-bottom: 30px; }
.review-heading p { font-size: 18px; color: #485260; }
.review-wrapper { width: 100%; overflow: hidden; position: relative; }
.review-track {
  display: flex;
  gap: 22px;
  width: max-content;
  animation: scrollReview 30s linear infinite;
}
.review-wrapper:hover .review-track { animation-play-state: paused; }
@keyframes scrollReview {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.review-card {
  width: 340px;
  min-width: 340px;
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  transition: transform 0.3s;
  position: relative;
}
.review-card:hover { transform: translateY(-5px); }
.top-profile { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.professor-name { font-size: 20px; font-weight: 400; color: var(--navy); margin-bottom: 3px; }
.professor-info { font-size: 16px; color: #000000; line-height: 1.5; }
.review-comment {
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: 16px;
  color: #000000;
  line-height: 1.9;
  margin-top: 10px;
}
.quote-icon { position: absolute; top: 18px; right: 18px; font-size: 30px; color: #e2e8f0; }

@media (max-width: 768px) {
  .review-card { width: 280px; min-width: 280px; padding: 18px; }
}
@media (max-width: 576px) {
  .review-card { width: 240px; min-width: 240px; }
}

/* ============================================================
   SECTIONS — About Author, About Book
   ============================================================ */
#about-author, #about-book { padding: 80px 0; overflow: hidden; }
#about-author { background: #fff; }
#about-book   { background: var(--cream); }

.section-quote {
  font-family: var(--font-cormorant);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,.88);
  line-height: 1.8;
}

/* ============================================================
   GALLERY GRID
   ============================================================ */
.custom-gallery-img {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  object-fit: cover;
}
.custom-gallery-img:hover { transform: scale(1.03); }
.ultra-gallery-img {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s;
  object-fit: cover;
}
.ultra-gallery-img:hover { transform: scale(1.03); }
@media (max-width: 768px) {
  .custom-gallery-img, .ultra-gallery-img { height: 160px; }
}

/* Gallery Modals */
.custom-gallery-modal, .ultra-gallery-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.96);
  z-index: 99999;
  overflow: auto;
}
.custom-full-image {
  display: block;
  margin: 80px auto;
  max-width: 90%;
  transition: transform 0.3s;
  transform-origin: center center;
}
.custom-close-btn, .ultra-close-btn {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  z-index: 10;
}
.custom-prev-btn, .custom-next-btn,
.ultra-prev-btn, .ultra-next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 36px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}
.custom-prev-btn, .ultra-prev-btn { left: 18px; }
.custom-next-btn, .ultra-next-btn { right: 18px; }
.custom-zoom-in, .custom-zoom-out {
  position: absolute;
  right: 26px;
  background: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
}
.custom-zoom-in  { top: 80px; }
.custom-zoom-out { top: 132px; }
.ultra-image-wrapper {
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}
.ultra-popup-image { max-width: 90%; border-radius: 12px; transition: transform 0.3s; }
.ultra-top-controls {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 10px;
  z-index: 20;
}
.ultra-zoom-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* ============================================================
   BOOK GALLERY SLIDER
   ============================================================ */
.book-gallery-area { padding: 70px 0; background: #fff; overflow: hidden; }
.gallery-slider-box { width: 100%; overflow: hidden; }
.gallery-slider-track {
  display: flex;
  gap: 22px;
  width: max-content;
  animation: galleryMove 45s linear infinite;
}
.gallery-slider-box:hover .gallery-slider-track { animation-play-state: paused; }
@keyframes galleryMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.gallery-item-card {
  width: 400px;
  min-width: 400px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}
.gallery-item-card:hover { transform: translateY(-5px); }
.gallery-item-card img { width: 100%; height: 280px; object-fit: cover; }
.gallery-text-box {
  padding: 16px;
  flex-grow: 1;
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: 18px;
  color: #444;
  line-height: 1.7;
}

@media (max-width: 991px) {
  .gallery-item-card { width: 320px; min-width: 320px; }
  .gallery-item-card img { height: 220px; }
}
@media (max-width: 768px) {
  .gallery-item-card { width: 250px; min-width: 250px; }
  .gallery-item-card img { height: 180px; }
  .book-gallery-area { padding: 50px 0; }
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
#contact { padding: 80px 0; background: #fff; }

/* ============================================================
   POPUP OVERLAYS (generic)
   ============================================================ */
.popup-box {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.popup-content {
  width: 100%;
  max-width: 420px;
  background: #fff;
  padding: 32px;
  border-radius: 14px;
  position: relative;
  animation: popIn 0.35s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.popup-content h2 {
  text-align: center;
  margin-bottom: 20px;
  font-family: var(--font-playfair);
  font-size: 1.5rem !important;
  font-weight: 300 !important;
  color: var(--navy);
}
.popup-content input,
.popup-content select {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 14px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 17px;
  outline: none;
  font-family: var(--font-garamond);
}
.popup-content input:focus { border-color: var(--gold); }
.submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  background: var(--gold);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.3s;
}
.submit-btn:hover { background: var(--gold-hover); }
.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 26px;
  cursor: pointer;
  background: none;
  border: none;
  color: #888;
  line-height: 1;
}
.close-btn:hover { color: #000; }
.switch-text { margin-top: 14px; text-align: center; font-size: 14px; }
.switch-text a { color: var(--gold); font-weight: 600; }

/* CEO Says popup */
.ceo-popup-content {
  max-width: 620px;
  padding: 40px 36px;
}
.ceo-popup-content p {
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.9;
  color: #374151;
}

/* Change-password popup */
#changePasswordPopup .popup-content { max-width: 400px; }

/* Buy popup */
#buyPopup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 12px;
}
#buyPopup .popup-inner {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 720px;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  padding: 32px;
}
.form-label { margin-bottom: 2px !important; font-size: 15px; font-weight: 500; }

/* ============================================================
   REVIEW STAR RATING
   ============================================================ */
.rating-wrap { direction: rtl; display: inline-flex; gap: 5px; }
.rating-wrap input { display: none; }
.rating-wrap label { font-size: 32px; color: #ccc; cursor: pointer; transition: color 0.2s; }
.rating-wrap input:checked ~ label,
.rating-wrap label:hover,
.rating-wrap label:hover ~ label { color: #ffc107; }

/* ============================================================
   NEWSLETTER SECTION
   ============================================================ */
.newsletter-section { padding: 64px 0; background: linear-gradient(135deg, var(--navy), var(--royal)); }
.newsletter-section input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}
.newsletter-section input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-section input:focus { border-color: var(--gold); }
.newsletter-section .sub-btn {
  background: var(--gold);
  color: var(--dark);
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s;
}
.newsletter-section .sub-btn:hover { background: var(--gold-hover); }

/* ============================================================
   FOOTER
   ============================================================ */
footer { background: var(--dark); padding: 64px 0 24px; }
footer h4 { font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; }
footer a  { font-size: 0.85rem; color: rgba(255,255,255,.45); transition: color 0.3s; }
footer a:hover { color: var(--gold); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
#back-to-top.show { opacity: 1; visibility: visible; }
#back-to-top:hover { background: var(--gold-hover); transform: translateY(-3px); }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-justify { text-align: justify; }
.italic-garamond { font-family: var(--font-garamond); font-style: italic; }