/* ==========================================================================
   BRITISH BOOK WRITERS - ENHANCED LUXURY UI/UX DESIGN SYSTEM
   Domain: Britishbookwriters.co.uk
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
  /* Color Palette */
  --navy-deep: #0B132B;
  --navy-dark: #1C2541;
  --navy-mid: #253254;
  --navy-light: #3A4B7C;
  
  --gold-primary: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-dark: #AA820A;
  --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
  --gold-subtle: rgba(212, 175, 55, 0.12);

  --crimson-red: #8B0000;
  --crimson-light: #A62B2B;
  
  --parchment: #FDFBF7;
  --ivory-bg: #F8F6F0;
  --card-bg: #FFFFFF;

  --text-dark: #0D131E;
  --text-muted: #4B5563;
  --text-light: #9CA3AF;
  --text-gold: #D4AF37;

  --border-light: #E5E7EB;
  --border-gold: rgba(212, 175, 55, 0.35);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Elevation / Shadows */
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(11, 19, 43, 0.10);
  --shadow-lg: 0 18px 40px rgba(11, 19, 43, 0.16);
  --shadow-gold: 0 8px 25px rgba(212, 175, 55, 0.30);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--parchment);
  color: var(--text-dark);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-dark);
}

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

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy-deep);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.35rem, 2.6vw, 1.95rem);
}

h4 {
  font-size: 1.28rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.text-gold {
  color: var(--gold-primary) !important;
}

.gold-gradient-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
}

.section-dark {
  background-color: var(--navy-deep);
  color: #FFFFFF;
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: #FFFFFF;
}

.section-dark p {
  color: #D1D5DB;
}

.section-ivory {
  background-color: var(--ivory-bg);
}

.text-center {
  text-align: center;
}

.max-w-700 {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.max-w-900 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons & CTAs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background: var(--gold-gradient);
  color: var(--navy-deep);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--gold-dark);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-navy {
  background: var(--navy-dark);
  color: #FFFFFF;
}

.btn-navy:hover {
  background: var(--navy-deep);
  color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-outline-gold:hover {
  background: var(--gold-primary);
  color: var(--navy-deep);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.35);
  color: #FFFFFF;
  backdrop-filter: blur(4px);
}

.btn-outline-light:hover {
  background: #FFFFFF;
  color: var(--navy-deep);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.15rem 2.6rem;
  font-size: 1.12rem;
}

/* ENLARGED LUXURY HEADER (LOGO TOUCHES BASE & UPPER HEAD, 100% CRISP READABLE) */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(253, 251, 247, 0.98);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--border-gold);
  box-shadow: var(--shadow-md);
  padding: 0.35rem 0;
  transition: all var(--transition-normal);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Clean Prominent Cropped Logo Image Display */
.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px 0;
}

.brand-logo img, .header-logo-img {
  height: 88px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.18)) contrast(1.15);
  transition: transform var(--transition-fast);
}

.brand-logo:hover img, .brand-logo:hover .header-logo-img {
  transform: scale(1.04);
}

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

.nav-link {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--navy-deep);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover {
  color: var(--gold-dark);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold-primary);
  transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Dropdown Menu */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.8rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
}

.dropdown-item a:hover {
  background-color: var(--ivory-bg);
  color: var(--gold-dark);
  padding-left: 1.7rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--navy-deep);
  cursor: pointer;
}

/* VISUAL HERO SECTION WITH OPTIMIZED WEBP BACKGROUND PICTURE */
.hero {
  position: relative;
  background: url('../assets/images/hero_bg.webp') center/cover no-repeat, url('../assets/images/hero_bg.png') center/cover no-repeat;
  color: #FFFFFF;
  padding: 6.5rem 0 7.5rem;
  overflow: hidden;
}

/* Dark Navy Glassmorphism Overlay on Visual Picture */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(11, 19, 43, 0.88) 0%, rgba(28, 37, 65, 0.85) 60%, rgba(15, 23, 42, 0.90) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.8rem;
  align-items: center;
}

.badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.45rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(6px);
}

.hero h1 {
  color: #FFFFFF;
  margin-bottom: 1.3rem;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.hero p {
  color: #E2E8F0;
  font-size: 1.18rem;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.18);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-primary);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.8rem;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Hero Glassmorphism Book Showcase Card */
.hero-card {
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  position: relative;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.hero-card-header img {
  height: 95px;
  width: auto;
  object-fit: contain;
}

/* TRUST BAR WITH CONTENT LIGHT PICTURE BACKGROUNDS */
.trust-bar {
  background-color: var(--ivory-bg);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-light);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-item {
  background: #FFFFFF;
  padding: 1.8rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.trust-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md);
}

.trust-badge-img {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.8rem;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-deep);
  font-weight: 800;
  font-size: 1.2rem;
}

.trust-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-deep);
}

.trust-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* CORE SERVICE CARDS GRID WITH CONTENT PICTURE HIGHLIGHTS */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2.2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.4rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--navy-dark);
  transition: background var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.service-card:hover::before {
  background: var(--gold-gradient);
}

.service-visual-badge {
  display: inline-block;
  width: 45px;
  height: 4px;
  background: var(--gold-primary);
  border-radius: 2px;
  margin-bottom: 1.2rem;
}

.service-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.45rem;
}

.service-card p {
  flex-grow: 1;
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}

.service-link {
  font-weight: 700;
  color: var(--navy-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.service-card:hover .service-link {
  color: var(--gold-dark);
}

/* Interactive Calculator Container */
.calculator-box {
  background: #FFFFFF;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3.2rem;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.2rem;
}

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

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-deep);
  margin-bottom: 0.5rem;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: #FFFFFF;
  color: var(--text-dark);
  transition: border-color var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.calc-summary-card {
  background: var(--navy-deep);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-summary-card h3 {
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 0.8rem;
  margin-bottom: 1.5rem;
}

.calc-price-display {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--gold-primary);
  margin: 1rem 0;
}

.calc-checklist {
  list-style: none;
  margin-bottom: 2rem;
}

.calc-checklist li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: #E5E7EB;
  margin-bottom: 0.6rem;
}

/* Quiz Container */
.quiz-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  padding: 3rem;
  max-width: 850px;
  margin: 2.5rem auto 0;
}

.quiz-progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--gold-gradient);
  width: 25%;
  transition: width var(--transition-normal);
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 2rem 0;
}

.quiz-btn {
  background: var(--parchment);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.quiz-btn:hover, .quiz-btn.selected {
  border-color: var(--gold-primary);
  background: var(--gold-subtle);
  transform: translateY(-2px);
}

.quiz-btn-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-deep);
  display: block;
  margin-bottom: 0.3rem;
}

.quiz-btn-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: block;
}

/* Live Manuscript Previewer Widget */
.previewer-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-top: 2.5rem;
}

.previewer-tabs {
  display: flex;
  background: var(--navy-deep);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  overflow-x: auto;
}

.preview-tab {
  padding: 1.2rem 2rem;
  color: #D1D5DB;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.preview-tab:hover, .preview-tab.active {
  color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 3px solid var(--gold-primary);
}

.previewer-body {
  padding: 2.5rem 3rem;
  min-height: 380px;
}

.previewer-body.theme-sepia {
  background-color: #FBF0D9;
  color: #3B2E20;
}

.previewer-body.theme-dark {
  background-color: #1A1A1A;
  color: #E5E5E5;
}

.excerpt-heading {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.excerpt-sub {
  font-style: italic;
  color: var(--gold-dark);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.excerpt-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.12rem;
  line-height: 1.8;
}

.previewer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--ivory-bg);
  border-top: 1px solid var(--border-light);
  font-size: 0.9rem;
}

/* Process Timeline */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-top: 3rem;
  position: relative;
}

.process-step {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.process-step:hover, .process-step.active {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.step-num {
  width: 38px;
  height: 38px;
  background: var(--navy-deep);
  color: var(--gold-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 0.8rem;
}

.step-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-deep);
}

/* FAQ Accordion */
.faq-list {
  max-width: 900px;
  margin: 2.5rem auto 0;
}

.faq-item {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 1.4rem 1.8rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-question:hover {
  color: var(--gold-dark);
}

.faq-answer {
  padding: 0 1.8rem 1.4rem;
  color: var(--text-muted);
  display: none;
  font-size: 1rem;
  line-height: 1.65;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform var(--transition-fast);
}

/* Footer Section */
.main-footer {
  background-color: var(--navy-deep);
  color: #D1D5DB;
  padding: 5.5rem 0 2rem;
  border-top: 3px solid var(--gold-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: #9CA3AF;
  font-size: 0.95rem;
  margin-top: 1rem;
}

.footer-heading {
  font-family: var(--font-heading);
  color: #FFFFFF;
  font-size: 1.2rem;
  margin-bottom: 1.4rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--gold-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: #9CA3AF;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--gold-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: #9CA3AF;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-weight: 700;
}

.social-icon:hover {
  background: var(--gold-primary);
  color: var(--navy-deep);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-gold);
  width: 100%;
  max-width: 600px;
  padding: 2.6rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* RESPONSIVE MEDIA QUERIES FOR MOBILE OPTIMIZATION */
@media (max-width: 992px) {
  .brand-logo img, .header-logo-img {
    height: 75px;
  }

  .hero-grid, .calc-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 95px;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: none;
    border-bottom: 2px solid var(--border-gold);
  }

  .nav-menu.active {
    display: flex;
  }

  .process-timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .brand-logo img, .header-logo-img {
    height: 65px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-timeline {
    grid-template-columns: 1fr;
  }
  
  .previewer-controls {
    flex-direction: column;
    gap: 1rem;
  }
}
