/* ==========================================================================
   MoneyCresta — CORE STYLESHEET
   Professional Financial Intelligence & Analytics Design System
   Mobile-First, Pure CSS, Dark-Mode First Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Default Dark Mode (Per Rule 3) */
  --bg-primary: #070a12;
  --bg-secondary: #0c1220;
  --bg-card: #111a2e;
  --bg-card-hover: #16233d;
  --bg-input: #0a0f1c;
  --border-color: #1a2740;
  --border-color-light: #25385c;
  --border-focus: #10b981;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-gold: #f59e0b;
  --accent-gold-bg: rgba(245, 158, 11, 0.12);
  --accent-blue: #38bdf8;
  --accent-blue-bg: rgba(56, 189, 248, 0.12);
  --danger-color: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.12);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.15);

  --nav-height: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-color-light: #cbd5e1;
  --border-focus: #059669;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #8292a7;

  --accent-emerald: #059669;
  --accent-emerald-light: #10b981;
  --accent-emerald-bg: rgba(5, 150, 105, 0.1);
  --accent-gold: #d97706;
  --accent-gold-bg: rgba(217, 119, 6, 0.1);
  --accent-blue: #0284c7;
  --accent-blue-bg: rgba(2, 132, 199, 0.1);
  --danger-color: #e11d48;
  --danger-bg: rgba(225, 29, 72, 0.1);

  --shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 18px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 14px 30px -4px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Body scroll lock when mobile navigation drawer is active */
html.menu-open,
body.menu-open {
  overflow: hidden !important;
  height: 100% !important;
  touch-action: none;
}

/* Mobile Navigation Backdrop */
.mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

[data-theme="light"] .mobile-backdrop {
  background-color: rgba(15, 23, 42, 0.45);
}

main {
  flex: 1;
}

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* ==========================================================================
   LAYOUT CONTAINERS & TYPOGRAPHY
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

.section {
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

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

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  margin-bottom: 0.875rem;
}

.section-tag.gold {
  color: var(--accent-gold);
  background-color: var(--accent-gold-bg);
  border-color: rgba(245, 158, 11, 0.25);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw + 0.5rem, 3.75rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.65rem, 3.5vw + 0.3rem, 2.65rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw + 0.2rem, 1.65rem);
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.lead-text {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.65;
}

.illustrative-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-left: 0.35rem;
}

/* ==========================================================================
   HEADER & NAVBAR (100% IDENTICAL ACROSS ALL PAGES)
   Sticky fixed with blur/shadow on scroll, pixel-perfect alignment
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background-color: rgba(11, 15, 25, 0.96);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* When mobile menu drawer is open, disable backdrop-filter to eliminate containing-block clipping and painting bugs */
.site-header.menu-open {
  background-color: var(--bg-primary) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] .site-header {
  background-color: rgba(248, 250, 252, 0.9);
}

[data-theme="light"] .site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .site-header.menu-open {
  background-color: var(--bg-primary) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  border-bottom-color: var(--border-color) !important;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  position: relative;
  width: 100%;
}

/* Brand Logo (Identical spelling, styling, position) */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 3.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  min-height: 44px;
  flex-shrink: 0;
}

.brand-symbol {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.brand-symbol svg {
  width: 20px;
  height: 20px;
}

.brand-text {
  display: inline-block;
  white-space: nowrap;
}

/* Semantic Desktop Nav Menu */
.nav-menu {
  display: none;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
  color: var(--accent-emerald);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background-color: var(--accent-emerald);
  border-radius: 2px;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Standout Book Consultation CTA Button */
.nav-cta-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  min-height: 44px;
  white-space: nowrap;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
  transition: all var(--transition-fast);
}

.nav-cta-btn:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.nav-cta-btn svg {
  width: 16px;
  height: 16px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-light);
  background-color: var(--bg-card);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.theme-toggle-btn .sun-icon {
  display: none;
}

.theme-toggle-btn .moon-icon {
  display: block;
}

[data-theme="light"] .theme-toggle-btn .sun-icon {
  display: block;
}

[data-theme="light"] .theme-toggle-btn .moon-icon {
  display: none;
}

/* Hamburger Button with CSS Animated Transform */
.mobile-menu-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background-color: var(--bg-card);
  border-color: var(--border-color-light);
}

.mobile-menu-btn:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: 2px;
}

.hamburger-box {
  width: 20px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color var(--transition-fast);
  transform-origin: center;
  pointer-events: none;
}

/* Morph Hamburger to "X" Icon When Menu is Open */
.mobile-menu-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Nav Drawer with Smooth Slide/Fade Transition */
.mobile-drawer {
  position: fixed;
  top: var(--header-actual-height, var(--nav-height));
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100vh - var(--header-actual-height, var(--nav-height)));
  height: calc(100dvh - var(--header-actual-height, var(--nav-height)));
  max-height: calc(100dvh - var(--header-actual-height, var(--nav-height)));
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem clamp(1rem, 4vw, 2rem) 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.28s ease;
  z-index: 999;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  box-sizing: border-box;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  gap: 1.5rem;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-nav-link {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px; /* Strict >= 44px tap target */
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.mobile-nav-link:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.mobile-nav-link:hover svg {
  transform: translateX(3px);
  color: var(--text-primary);
}

.mobile-nav-link.active {
  background-color: var(--bg-secondary);
  color: var(--accent-emerald);
  border-left-color: var(--accent-emerald);
}

.mobile-nav-link.active svg {
  color: var(--accent-emerald);
}

.mobile-drawer-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==========================================================================
   BUTTONS (Rule 2: Minimum 44px touch targets on mobile)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--accent-emerald);
  color: #042f1a;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-emerald-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--border-color-light);
  background-color: var(--bg-card-hover);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #451a03;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   RULE 2: COMPACT 2-COLUMN GRID ON MOBILE FOR MULTI-CARD SECTIONS
   ========================================================================== */
.compact-grid-mobile {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Stat Card */
.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--border-color-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-trend {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-bg);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Feature & Service Card */
.service-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-emerald), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.service-card:hover {
  border-color: var(--border-color-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-top: auto;
}

.service-link:hover {
  gap: 0.65rem;
}

/* Process Steps (Rule 2: Compact 2-col on mobile) */
.process-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.step-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-emerald);
  line-height: 1;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.step-title {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.step-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  font-size: 0.8125rem;
  font-weight: 600;
  width: fit-content;
}

.hero-title {
  line-height: 1.15;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.hero-trust-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-trust-item svg {
  color: var(--accent-emerald);
  width: 16px;
  height: 16px;
}

/* Hero Media / Preview Visual */
.hero-visual-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.market-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.live-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 1.25rem;
}

.metric-box {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.metric-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-number {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.2rem 0;
}

.metric-change {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.metric-change.up { color: var(--accent-emerald); }
.metric-change.neutral { color: var(--accent-blue); }

.mini-chart-container {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.mini-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.chart-svg {
  width: 100%;
  height: 90px;
  overflow: visible;
}

/* ==========================================================================
   RULE 2: TWO-ITEM COMPARISONS
   (Equal width/height only inside min-width: 768px media query)
   ========================================================================== */
.two-item-compare {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.compare-item {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.compare-image-wrap {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
}

.compare-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.compare-item:hover .compare-image-wrap img {
  transform: scale(1.03);
}

.compare-body {
  padding: clamp(1.25rem, 3vw, 2rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==========================================================================
   ARTICLE & INSIGHT CARDS
   ========================================================================== */
.insight-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.insight-card:hover {
  border-color: var(--border-color-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.insight-thumb {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.insight-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.insight-card:hover .insight-thumb img {
  transform: scale(1.04);
}

.insight-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.25rem 0.65rem;
  background-color: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-emerald);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.insight-content {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.insight-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.insight-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.insight-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.insight-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}

.insight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  font-size: 0.8125rem;
}

.insight-read-time {
  color: var(--text-muted);
}

/* ==========================================================================
   FILTER & SEARCH CONTROLS (RULE 8: INSIGHTS FILTER)
   ========================================================================== */
.filter-search-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  height: 46px;
  padding-left: 44px;
  padding-right: 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-emerald);
}

.category-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  min-height: 38px;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover, .filter-pill.active {
  background-color: var(--accent-emerald);
  color: #042f1a;
  border-color: var(--accent-emerald);
}

/* ==========================================================================
   FINANCIAL CALCULATORS (RULE 8: SIP, EMI, INFLATION TOOLS)
   ========================================================================== */
.calc-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-lg);
}

.calc-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calc-tab-btn {
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.calc-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-light);
}

.calc-tab-btn.active {
  background-color: var(--accent-emerald-bg);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.calc-panel {
  display: none;
}

.calc-panel.active {
  display: block;
}

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

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.calc-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calc-value-display {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.calc-range {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-emerald);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  transition: transform 0.1s ease;
}

.calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-results-card {
  background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-input) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-summary-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.calc-summary-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.calc-summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.calc-summary-val {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calc-total-box {
  background-color: var(--accent-emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.calc-total-label {
  font-size: 0.8125rem;
  color: var(--accent-emerald);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.calc-total-amount {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
}

.calc-visual-bar {
  display: flex;
  height: 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--border-color);
  margin-bottom: 0.85rem;
}

.calc-bar-invested {
  background-color: var(--accent-blue);
  transition: width 0.3s ease;
}

.calc-bar-returns {
  background-color: var(--accent-emerald);
  transition: width 0.3s ease;
}

.calc-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.calc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.blue { background-color: var(--accent-blue); }
.legend-dot.green { background-color: var(--accent-emerald); }

/* ==========================================================================
   TESTIMONIALS (RULE 1: HONEST TREATMENT - "(Sample Testimonial)")
   ========================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.testimonial-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.testimonial-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  background-color: var(--accent-gold-bg);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 1rem;
}

.testimonial-quote {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-style: italic;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-emerald);
}

.author-info h4 {
  font-size: 0.9375rem;
  margin-bottom: 0.15rem;
}

.author-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FAQ ACCORDION (RULE 8)
   ========================================================================== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--border-color-light);
}

.faq-trigger {
  width: 100%;
  min-height: 54px;
  padding: 1.1rem 1.25rem;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.faq-trigger svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item.active .faq-trigger svg {
  transform: rotate(180deg);
  color: var(--accent-emerald);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-item.active .faq-content {
  max-height: 800px;
  transition: max-height 0.35s ease-in-out;
}

.faq-body {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   FORMS & INPUTS (RULE 8: WORKING CONTACT & NEWSLETTER)
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--danger-color);
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 1rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-control.error {
  border-color: var(--danger-color);
}

.form-error-msg {
  font-size: 0.75rem;
  color: var(--danger-color);
  display: none;
}

.form-control.error + .form-error-msg {
  display: block;
}

.form-feedback {
  display: none;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.form-feedback.success {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--accent-emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald-light);
}

.form-feedback.error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--danger-bg);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--danger-color);
}

/* Newsletter Box */
.newsletter-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 520px;
  margin: 1.5rem auto 0;
}

/* ==========================================================================
   SCROLL TO TOP BUTTON (RULE 8)
   ========================================================================== */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  color: #042f1a;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition-fast);
  z-index: 90;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background-color: var(--accent-emerald-light);
  transform: translateY(-2px);
}

.scroll-top-btn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   FOOTER (RULE 4: 100% IDENTICAL ACROSS EVERY SINGLE PAGE)
   ========================================================================== */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: 2rem;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-tagline {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 380px;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.footer-social-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.footer-social-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-emerald);
  background-color: var(--accent-emerald-bg);
}

.footer-social-btn svg {
  width: 18px;
  height: 18px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
}

/* Grid columns must never be forced wider than their own track by long
   unbreakable content (e.g. the contact email address) — prevents the
   footer from bleeding past the viewport edge. */
.footer-links-grid > div {
  min-width: 0;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-list a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  display: inline-block;
  min-height: 24px;
}

.footer-links-list a:hover {
  color: var(--accent-emerald);
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Contact values (longest one is an unbreakable email string) must wrap
   instead of being clipped at narrow footer column widths. */
.footer-contact-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Mandatory Risk Disclaimer (Rule 1 & Rule 4) */
.footer-disclaimer-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-disclaimer-box strong {
  color: var(--text-secondary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.footer-legal-links a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   404 ERROR PAGE STYLING
   ========================================================================== */
.error-page-container {
  min-height: calc(100vh - var(--nav-height) - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}

.error-card {
  max-width: 600px;
  text-align: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-lg);
}

.error-code {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 800;
  color: var(--accent-emerald);
  line-height: 1;
  margin-bottom: 1rem;
}

/* ==========================================================================
   RULE 2 / FIX: SERVICES & INSIGHTS CARD GRIDS
   Base (mobile-first) definition added so these grids work below 1024px
   too — previously display:grid only existed inside the 1024px query,
   so these sections stacked as a single column on phones/tablets.
   ========================================================================== */
.section-services-grid,
.section-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* ==========================================================================
   MEDIA QUERIES (DESKTOP & TABLET SCALING)
   Explicit widths supported: 320px, 375px, 425px, 768px, 1024px, 1440px, 1920px
   ========================================================================== */

/* Ultra-compact mobile (width < 375px e.g. 320px iPhone SE) */
@media (max-width: 374px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .brand-logo {
    gap: 0.35rem;
    min-width: 0;
  }

  .brand-symbol {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .brand-symbol svg {
    width: 18px;
    height: 18px;
  }

  .brand-text {
    font-size: 0.95rem;
  }

  /* CRITICAL: Touch targets MUST remain at least 44px tall for tap accuracy */
  .theme-toggle-btn,
  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
  }

  .nav-actions {
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .stat-card {
    padding: 0.75rem 0.6rem;
  }

  .stat-number {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }
}

/* --------------------------------------------------------------------------
   PHONE-ONLY REFINEMENTS (max-width: 767px)
   Scope: FOOTER stacking/touch targets + CALCULATORS (tabs, sliders, results)
   Tablet (min-width: 768px) and desktop rules below are untouched.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  /* ---------- FOOTER: clean single-column stack, nothing clipped ---------- */
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-social-links {
    flex-wrap: wrap;
  }

  /* 44px minimum touch target for every footer navigation link */
  .footer-links-list {
    gap: 0.25rem;
  }

  .footer-links-list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.25rem 0;
  }

  /* 44px minimum touch target for every contact & desk row */
  .footer-contact-info {
    gap: 0.25rem;
  }

  .footer-contact-item {
    align-items: center;
    min-height: 44px;
    padding: 0.25rem 0;
  }

  .footer-contact-item svg {
    margin-top: 0;
  }

  /* 44px minimum touch target for every legal link */
  .footer-bottom {
    gap: 0.75rem;
  }

  .footer-legal-links {
    gap: 0.5rem 1.25rem;
  }

  .footer-legal-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.25rem 0;
  }

  /* Scroll-to-top: guaranteed 44px+ tap target, stays clear of the edges */
  .scroll-top-btn {
    width: 48px;
    height: 48px;
    min-width: 44px;
    min-height: 44px;
    bottom: 20px;
    right: 20px;
  }

  /* ---------- CALCULATORS ---------- */
  /* Tabs wrap into a full-width stack: every tab fully visible, never
     clipped at the screen edge, no hidden horizontal scroll strip */
  .calc-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .calc-tab-btn {
    flex: 1 1 100%;
    justify-content: center;
    min-height: 48px;
    white-space: normal;
    text-align: center;
  }

  .calc-grid {
    gap: 1.5rem;
  }

  .calc-controls {
    gap: 1.25rem;
  }

  .calc-grid > * {
    min-width: 0;
  }

  /* Label + value rows wrap onto two lines instead of overlapping/clipping */
  .calc-field-header {
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
  }

  .calc-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
  }

  .calc-value-display {
    flex: 0 0 auto;
  }

  /* Sliders: full width with a 44px tall touch area.
     The visible track stays exactly as slim as the desktop design by
     clipping the background to the 6px content box. */
  .calc-range {
    width: 100%;
    height: 44px;
    padding: 19px 0;
    background-clip: content-box;
  }

  /* Result cards stack in a single column with readable spacing */
  .calc-summary-row {
    grid-template-columns: 1fr;
  }

  .calc-summary-item {
    min-width: 0;
  }

  .calc-total-label {
    line-height: 1.45;
  }

  /* Legend + formula note wrap cleanly without breaking the layout */
  .calc-legend {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem 1.25rem;
  }

  .calc-results-card > div:last-child {
    overflow-wrap: break-word;
  }

  /* Services & Insights grids: keep it to a single column on very
     narrow phones so cards don't get squeezed uncomfortably tight */
  .section-services-grid,
  .section-insights-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Tablet (min-width: 768px) */
@media (min-width: 768px) {
  .nav-cta-btn {
    display: inline-flex;
  }

  .hero-cta-group {
    flex-direction: row;
    align-items: center;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }

  /* Multi-card sections expand from compact 2-col to 4-col */
  .compact-grid-mobile {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }

  .process-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }

  /* Two-Item Comparisons (Equal width/height inside min-width: 768px) */
  .two-item-compare {
    flex-direction: row;
    gap: 2rem;
  }

  .compare-item {
    flex: 1;
  }

  .compare-image-wrap {
    height: 320px;
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .filter-search-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .search-input-wrapper {
    max-width: 320px;
  }

  .newsletter-form {
    flex-direction: row;
  }

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

  .footer-top {
    grid-template-columns: 1.4fr 2fr;
    gap: 4rem;
  }

  .footer-links-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  /* Services & Insights grids: 2 columns at tablet width */
  .section-services-grid,
  .section-insights-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Laptop / Desktop (min-width: 1024px) */
@media (min-width: 1024px) {
  .nav-menu {
    display: flex;
  }

  .mobile-menu-btn {
    display: none !important;
  }

  .mobile-drawer {
    display: none !important;
  }

  .mobile-backdrop {
    display: none !important;
  }

  .section-services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }

  .section-insights-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

/* Large Displays (min-width: 1440px) */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
}

/* Ultra-Wide (min-width: 1920px) */
@media (min-width: 1920px) {
  .container {
    max-width: 1440px;
  }
}
/* Insight Cards Full Width (Mobile View) */
@media screen and (max-width: 768px) {

  /* Container ko 1-Column Layout me force karein */
  .compact-grid-mobile,
  div.compact-grid-mobile {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* Har Card/Article ko Horizontally 100% Width */
  .insight-card,
  article.insight-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Card ke andar ki Images ko bhi Full Width */
  .insight-card img,
  .insight-card .card-image {
    width: 100% !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: cover !important;
  }
}

/* Only Target #service-offerings Cards for 2-Column Horizontal Grid in Mobile View */
@media screen and (max-width: 768px) {

  /* Specific Parent Container inside #service-offerings */
  #service-offerings .compact-grid-mobile {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Forces 2 cards side-by-side */
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Specific Service Cards inside #service-offerings */
  #service-offerings .service-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  /* Icon Scaling for 2-column fit */
  #service-offerings .service-icon {
    width: 30px !important;
    height: 30px !important;
    margin-bottom: 6px !important;
  }

  #service-offerings .service-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* Text size adjustments for 2-column fit */
  #service-offerings .service-title {
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
  }

  #service-offerings .service-desc {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
  }

  #service-offerings .service-link {
    font-size: 0.7rem !important;
  }
}

/* Stats Section Mobile 2-Column Horizontal Grid Fix */
@media screen and (max-width: 768px) {

  /* Stats Container ko 2 Columns me Force Karein */
  #stats-grid,
  div#stats-grid,
  div.compact-grid-mobile#stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 2-Up Layout */
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Stat Card Styling */
  .stat-card,
  div.stat-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  /* Stat Header Flex layout (Icon & Badge) */
  .stat-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: 8px !important;
  }

  /* Stat Number / Value Size Fix */
  .stat-card h3,
  .stat-card .stat-value,
  div.stat-card > div {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  /* Stat Subtitle / Label */
  .stat-card p,
  .stat-card .stat-label {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
  }
}
/* Hero Grid / Contact Section Cards Override */
.hero-grid > div[style*="flex-direction:column"],
div[style*="flex-direction:column"]:has(> .service-card) {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important; /* Large screens par 3 per line */
  gap: 1.5rem !important;
  width: 100% !important;
}

/* Tablet Screens */
@media screen and (max-width: 992px) {
  .hero-grid > div[style*="flex-direction:column"],
  div[style*="flex-direction:column"]:has(> .service-card) {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile Screens */
@media screen and (max-width: 768px) {
  .hero-grid > div[style*="flex-direction:column"],
  div[style*="flex-direction:column"]:has(> .service-card) {
    grid-template-columns: 1fr !important;
  }
}


/* Section Alt Background Fix */
section.section-alt,
.section-alt {
  background-color: #0c1220 !important; /* Main Dark Theme Background */
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important; /* Optional subtle divider */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
/* Section Background ko Main Website Background Se Replace Karein */
section.section-alt,
.section-alt,
#stats-section {
  background-color: var(--bg-primary, #090d16) !important;
  background: transparent !important;
  border-top: none !important;
  border-bottom: none !important;
}
/* Sirf services section wale compact grid ko horizontal rotate karne ke liye */
@media screen and (max-width: 768px) {
  #services-section > .container > div.compact-grid-mobile {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    padding-bottom: 12px;
  }

  #services-section > .container > div.compact-grid-mobile > .service-card {
    flex: 0 0 85% !important;
    width: 85% !important;
    min-width: 270px !important;
    max-width: 85% !important;
    scroll-snap-align: start;
    box-sizing: border-box;
  }
}
/* Sirf testimonials section ko mobile me horizontal scroll karne ke liye */
@media screen and (max-width: 768px) {
  #testimonials div.testimonials-grid {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    padding-bottom: 12px;
  }

  #testimonials div.testimonials-grid > .testimonial-card {
    flex: 0 0 85% !important;
    width: 85% !important;
    min-width: 270px !important;
    max-width: 85% !important;
    scroll-snap-align: start;
    box-sizing: border-box;
  }
}