/* 
   Site-Wide UI Consistency Enhancements
   Target: Secondary pages (Services, Contact, Pathways, etc.)
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --spacing-section: 2rem;
  --spacing-element: 2rem;
  --gap-grid: 2rem;

  --color-gold: #d4af37;
  --color-gold-hover: #f2e8c4;
  --color-dark-bg: #020c1b;
  --color-glass: rgba(255, 255, 255, 0.05);
  --radius-std: 1rem;
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.5);
  --font-heading: 'Inter', sans-serif;
}

@media (min-width: 992px) {
  :root {
    --spacing-section: 6rem;
  }
}



/* --- Layout & Spacing --- */

.section-std {
  padding: var(--spacing-section) 0;
  position: relative;
}

.section-std-sm {
  padding: 4rem 0;
}

.container-std {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--gap-grid);
  align-items: stretch;
}

.grid-2-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-element);
}

@media (min-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-3-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-element);
}

@media (min-width: 768px) {
  .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3-col {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-element);
}

@media (min-width: 768px) {
  .grid-4-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .grid-4-col {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Components --- */

/* Glass Card - Standardized */
.card-glass {
  background: rgba(255, 255, 255, 0.03);
  /* backdrop-filter: blur(10px); REMOVED for clarity */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-std);
  padding: 2.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-glass:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: var(--shadow-hover);
}

/* Buttons - Consistent Sizing */
.btn-std {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn-primary-std {
  background: var(--color-gold);
  color: #000;
  border: 1px solid var(--color-gold);
}

.btn-primary-std:hover {
  background: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
  transform: translateY(-2px);
}

.btn-outline-std {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-std:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: rgba(212, 175, 55, 0.05);
}

/* --- Typography Helpers --- */
.heading-xl {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.text-muted-std {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --- Animations --- */

/* Keyframes */
@keyframes fadeInUpStd {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInStd {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Utilities */
.animate-fade-up {
  opacity: 0;
  animation: fadeInUpStd 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger delays extended */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

/* --- Header Global Fixes --- */
.Header-module__gycZQW__nav {
  display: none;
}

.Header-module__gycZQW__mobileMenuBtn {
  display: block;
  border: none;
  background: transparent;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Global Interactivity Fix - Restore pointer events */
a,
button,
.btn,
.btn-std,
.btn-primary,
.btn-primary-std {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Ensure mobile menu container is definitively hidden and non-blocking when closed */
.Header-module__gycZQW__mobileMenu {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Body and HTML safety */
html,
body {
  pointer-events: auto !important;
}

@media (min-width: 1024px) {
  .Header-module__gycZQW__nav {
    display: flex !important;
    gap: 2rem !important;
    align-items: center;
    pointer-events: auto !important;
  }

  .Header-module__gycZQW__mobileMenuBtn {
    display: none !important;
  }

  .Header-module__gycZQW__navLink {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: auto !important;
  }
}

/* Header Constraints */
.Header-module__gycZQW__header {
  height: 80px !important;
  /* Force standard height */
  position: fixed !important;
  /* Fixed is more reliable than sticky for this layout */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  background-color: #ffffff !important;
  backdrop-filter: blur(10px);
  pointer-events: auto !important;
  transition: background-color 0.3s ease;
}

/* Scrolled State: Glass Effect */
.Header-module__gycZQW__header.scrolled {
  background: rgba(255, 255, 255, 0.7) !important;
  /* Semi-transparent white */
  backdrop-filter: blur(12px) !important;
  /* Glass effect */
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Nav Text Colors (Always Dark for this white/light-glass theme) */
.Header-module__gycZQW__navLink {
  color: #1e293b !important;
  /* Slate-800 */
}

.Header-module__gycZQW__navLink:hover {
  color: var(--color-gold) !important;
}

/* Update SVG chevron colors */
.Header-module__gycZQW__navLink svg path {
  stroke: #1e293b !important;
}

/* Mobile Menu Button */
.Header-module__gycZQW__mobileMenuBtn {
  color: #1e293b !important;
}

/* Header Logo Styling */
.header-logo-container {
  display: flex;
  align-items: center;
  height: 100%;
}

.header-logo-img {
  height: 32px;
  /* Mobile Default */
  width: auto;
  display: block;
  object-fit: contain;
  transition: height 0.3s ease;
}

@media (min-width: 1024px) {
  .header-logo-img {
    height: 52px;
    /* Desktop */
  }
}

/* Special override for glass padding when applied to the header */
.Header-module__gycZQW__header.glass {
  padding: 0 !important;
}

/* --- Pathways Specific Card Styles --- */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.card-badge {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: var(--color-gold);
  color: #000;
  border-radius: 50px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.card-badge.incentivized {
  background: #006C35;
  color: white;
  box-shadow: 0 2px 10px rgba(0, 108, 53, 0.3);
}

.card-subpanel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  margin-top: auto;
  /* Pushes to bottom if flex column */
}

.card-subpanel-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.card-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-weight: bold;
}

/* --- Added Utilities for Contact Page (Tailwind Emulation) --- */
.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

/* Spacing */
.gap-sm {
  gap: 0.75rem;
}

.gap-md {
  gap: 1.5rem;
}

.gap-lg {
  gap: 2.5rem;
}

.gap-xl {
  gap: 4rem;
}

/* Grid System */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Forms */
.input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: var(--color-gold);
}

.caption {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* Fix for dropdown visibility (reset color for options) */
.input-field option {
  color: initial;
  /* Resets to browser default (usually black) */
  background: white;
  /* Ensures high contrast */
}

/* --- Entrepreneur License Page Fixes --- */
/* Fix for crisp text rendering */
body {
  background-color: var(--color-dark-bg) !important;
  color: white !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Entrepreneur License Page Fixes --- */
.glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-std);
  padding: 2rem;
  transition: all 0.3s ease;
  pointer-events: auto !important;
  /* Ensure content inside glass is clickable */
}

.glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-5px);
}

/* NEW: Glass Interactive for Cards (Matches glass but with pointer signal) */
.glass-interactive {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-std);
  padding: 2rem;
  transition: all 0.3s ease;
  pointer-events: auto !important;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.glass-interactive:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-5px);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
}

/* Additional Grid Utilities */
.grid-cols-2 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Support for md:grid-cols-3 specifically if used */
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Spacing Utilities */
.margin-top-lg {
  margin-top: 3rem;
}

.margin-bottom-lg {
  margin-bottom: 3rem;
}

/* --- Premium Redesign Styles --- */

/* Hero Gradient */
.hero-gradient {
  background: radial-gradient(circle at 50% 0%, rgba(20, 40, 80, 0.8) 0%, rgba(2, 12, 27, 1) 70%);
  position: relative;
  overflow: hidden;
}

/* Hero Gradient - Simplified */
.hero-gradient {
  background: radial-gradient(circle at 50% 30%, #0a192f 0%, #020c1b 70%);
  position: relative;
  /* Removed large rotating pseudo-element to prevent rendering issues */
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Feature Icons */
.feature-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-gold);
  font-size: 1.5rem;
}

/* Process Timeline */
.process-step {
  position: relative;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-std);
  transition: all 0.3s ease;
}

.process-step:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.2);
}

.process-number {
  position: absolute;
  top: -15px;
  left: 20px;
  width: 40px;
  height: 40px;
  background: var(--color-gold);
  color: #000;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  font-size: 1.1rem;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-std);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-table th {
  text-align: left;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.comparison-table td {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Highlight Text */
.highlight-gold {
  color: var(--color-gold);
}

/* Enable Hover Dropdowns for Static Pages */
@media (min-width: 1024px) {
  .Header-module__gycZQW__dropdown {
    position: relative;
  }

  .Header-module__gycZQW__dropdownContent {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    /* Match home page centering */
    transform: translateX(-50%);
    min-width: 200px;
    background: rgba(1, 2, 4, 0.95);
    /* Deep dark blue */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    /* Above header if needed */
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
  }

  .Header-module__gycZQW__dropdown:hover .Header-module__gycZQW__dropdownContent {
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
    animation: fadeInStd 0.2s ease forwards;
  }

  .Header-module__gycZQW__dropdownItem {
    display: block;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 6px;
    font-size: 0.9rem;
  }

  .Header-module__gycZQW__dropdownItem:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-gold, #d4af37);
    transform: translateX(5px);
  }
}

/* ==========================================================================
   RESPONSIVE OVERRIDES (MOBILE & TABLET)
   Strictly preserving desktop (>1024px) while fixing smaller screens.
   ========================================================================== */

/* --- Explicit Desktop Layout Preservation ( > 1024px ) --- */
@media (min-width: 1025px) {

  .pathways-grid,
  .grid-3-col,
  .ecosystem-grid,
  .ind-grid,
  .pkg-grid,
  .qol-grid,
  .success-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .snapshot-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* --- Tweak Breakpoints --- */
@media (max-width: 1024px) {

  /* --- GLOBAL LAYOUT FIXES --- */
  html,
  body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Force all major grids to single column by default (Mobile First approach for <1024px) */
  .ind-grid,
  .pkg-grid,
  .qol-grid,
  .success-grid,
  .snapshot-grid,
  .pathways-grid,
  .ecosystem-grid,
  .ai-planner-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }

  /* --- HEADER AND MENU --- */
  .Header-module__gycZQW__header .container {
    gap: 0 !important;
    /* Remove large gap on mobile/tablet */
    justify-content: space-between !important;
    padding-left: 1rem !important;
    /* Smaller padding for header */
    padding-right: 1rem !important;
  }

  /* Force Hamburger Button to be Above Menu */
  .Header-module__gycZQW__mobileMenuBtn {
    position: relative;
    z-index: 20002 !important;
    /* Extremely high Z-index */
    cursor: pointer !important;
  }

  /* Mobile Menu Container - Base State */
  .Header-module__gycZQW__mobileMenu {
    display: block !important;
    /* Always display to avoid toggle issues */
    position: fixed !important;
    top: 80px !important;
    /* Below fixed header */
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 80px) !important;
    background: rgba(2, 12, 27, 0.98) !important;
    /* Dark opaque background */
    backdrop-filter: blur(15px) !important;
    z-index: 20000 !important;
    /* High Z-index */
    padding: 2rem 1.5rem !important;
    overflow-y: auto !important;

    /* Hiding Logic */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;

    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  /* Mobile Menu - Active State (Toggled by JS) */
  .Header-module__gycZQW__mobileMenu.active {
    /* Visible State */
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  /* Menu Links Styling */
  .Header-module__gycZQW__mobileLink {
    display: block !important;
    padding: 1.25rem 0 !important;
    font-size: 1.15rem !important;
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    font-weight: 500 !important;
  }

  .Header-module__gycZQW__mobileLink:hover {
    color: var(--color-gold) !important;
    transform: translateX(5px);
  }

  /* --- TYPOGRAPHY SCALING --- */
  h1 {
    font-size: clamp(2.5rem, 8vw, 3.5rem) !important;
    /* Smaller H1 */
    line-height: 1.15 !important;
  }

  h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  p,
  li {
    font-size: 1rem !important;
  }

  /* --- HERO SECTION TWEAKS --- */
  .hero-btn-container {
    flex-direction: column !important;
    width: 100% !important;
    gap: 1rem !important;
  }

  .hero-btn-container .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 1rem !important;
  }

  /* --- COMPONENT SPECIFIC FIXES --- */

  /* Investor Snapshot - Ensure cards aren't too squashed */
  .snapshot-grid>div {
    padding: 1.5rem !important;
  }

  /* AI Planner Form */
  .ai-planner-grid .form-group {
    width: 100% !important;
  }

  .checkbox-group {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  .form-submit-btn {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Why Choose Analytix - Convert to Stack */
  .grid.gap-xl {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
}

/* --- TABLET SPECIFIC (768px - 1024px) --- */
@media (min-width: 768px) and (max-width: 1024px) {

  /* 2 Columns for most grids */
  .ind-grid,
  .pkg-grid,
  .qol-grid,
  .ecosystem-grid,
  .ind-grid,
  .pkg-grid,
  .qol-grid,
  .ecosystem-grid,
  .snapshot-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Regulatory grid 3x3 on Tablet */
  .grid-3-col {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Pathways grid - User requested 3 columns on tablet */
  .pathways-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .ai-planner-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hero buttons can be side-by-side on tablet */
  .hero-btn-container {
    flex-direction: row !important;
    width: auto !important;
  }

  .hero-btn-container .btn {
    width: auto !important;
  }
}

/* --- MOBILE SPECIFIC (Under 767px) --- */
@media (max-width: 767px) {
  .hide-on-mobile {
    display: none !important;
  }

  /* Home Page Pathways: Keep 2x2 on Mobile */
  .pathways-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  /* Regulatory Page: Force 1x1 on Mobile */
  .grid-3-col {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Ensure glass cards have padding tailored for small screens */
  .glass,
  .glass-interactive {
    padding: 1.5rem !important;
  }

  /* --- GLOBAL FIXES FOR ALL PAGES --- */
  /* Ensure content below fixed header isn't hidden on mobile */
  main {
    padding-top: 80px !important;
    /* Default safe area for fixed header */
  }

  /* Specific Home Page Hero Fix: 
     Target the first container inside the main hero section to force extra spacing.
  */
  main>section:first-of-type>.container {
    margin-top: 1rem !important;
    /* Reduced margin to avoid large gap on mobile */
  }

  /* Fix for pages with .main-content wrapper causing double padding */
  .main-content {
    padding-top: 0 !important;
  }

  /* Ensure the "#1 SAUDI MARKET ENTRY PLATFORM" badge wraps on mobile */
  div.animate-fade-in-up>span {
    white-space: normal !important;
    display: inline-block !important;
    line-height: 1.5 !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.8rem !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  /* Fix for Why Invest Now grid in Pathways page */
  .invest-now-grid {
    grid-template-columns: 1fr !important;
  }

  .invest-now-grid>div {
    grid-column: auto !important;
  }

  /* Fix for Partners grid mobile layout */
  .partners-grid {
    grid-template-columns: 1fr !important;
  }

  /* Fix for Industries grid mobile layout */
  .industries-grid {
    grid-template-columns: 1fr !important;
  }

  /* Fix for Detailed Sector Reports buttons on mobile */
  .sector-reports-btns {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .sector-reports-btns button {
    width: 100% !important;
  }
}

/* --- Trusted Investors Section Fixes --- */
.trusted-list {
  gap: 1rem;
  /* Default gap matches gap-4 */
}

.trusted-item {
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .trusted-list {
    gap: 0.5rem !important;
  }

  .trusted-item {
    padding: 0.35rem 0.8rem !important;
    font-size: 0.75rem !important;
  }
}


/* --- DESKTOP TYPOGRAPHY ENHANCEMENTS ( > 1024px ) --- */
@media (min-width: 1025px) {

  /* 
       Force specificity to override inline styles and generic selectors 
       without using !important globally.
       Targetting: sections, cards, articles, and main content areas.
    */
  body p,
  .main-content p,
  section p:not(.caption):not(.text-sm):not(.footer-link),
  article p,
  .card-glass p,
  .benefit-card p,
  .process-step p,
  .glass p,
  .glass-interactive p,
  .text-muted-std,
  .lead,
  .card-list li,
  .accordion-body div,
  li:not(.Header-module__gycZQW__navLink):not(.footer-link):not(.breadcrumb-item) {
    font-size: 1.125rem !important;
    /* 18px */
    line-height: 1.6 !important;
  }

  /* Specific Override for elements that might have inline font-size: 0.9rem */
  p[style*="font-size:0.9rem"],
  p[style*="font-size: 0.9rem"],
  p[style*="font-size:0.95rem"],
  p[style*="font-size: 0.95rem"] {
    font-size: 1.125rem !important;
  }

  /* 
     Target NON-paragraph text bodies (divs/spans) that function as descriptions 
     inside cards or interactive elements. 
     This catches the "fake paragraphs" identified in inspection.
  */
  .glass-interactive div,
  .benefit-card div,
  .content-block div,
  .process-step div,
  .reg-grid-container div,
  .trusted-item,
  span.glass {
    font-size: 1.125rem !important;
    /* 18px */
    line-height: 1.6 !important;
  }

  /* Ensure the "High Growth Industries" cards use the right size */
  .industry-card p,
  .industry-card div {
    font-size: 1.125rem !important;
  }

  /* --- FIX: Force Small Spans (Badges, Tags, Labels) to Min 18px --- */

  /* Hero Badges & Inline Styled Pills */
  main span[style*="font-size:0.85rem"],
  main span[style*="font-size: 0.85rem"],
  main span[style*="font-size:0.8rem"],
  main span[style*="font-size: 0.8rem"],
  main span[style*="font-size: 0.85rem"],
  main span[style*="font-size: 0.9rem"],
  main span[style*="font-size:0.9rem"] {
    font-size: 1.125rem !important;
    /* 18px */
    line-height: 1.6;
  }

  /* Form Labels & Checkboxes */
  label.checkbox-item span,
  .form-group label span,
  label span {
    font-size: 1.125rem !important;
    /* 18px */
  }

  /* Industry Card Tags & General Spans in Content Cards */
  .industry-card span,
  .benefit-card span,
  .glass-interactive span {
    font-size: 1.125rem !important;
  }

  /* Small badge fix: Keep actual badges small if needed, but text bodies large */
  /* Exclude specific small badges if found later, but currently user wants bigger text */

  /* Exceptions: Protect Navigation and Footer structure */
  nav p,
  nav li,
  header p,
  header li,
  footer p,
  footer li,
  .footer-list li,
  .footer-link,
  .sub-footer p,
  .copyright-text,
  .Header-module__gycZQW__dropdownItem,
  .Header-module__gycZQW__navLink {
    font-size: 0.95rem !important;
    /* Keep compact */
    line-height: initial !important;
  }

  /* Ensure .lead text is appropriately larger */
  .lead {
    font-size: 1.25rem !important;
    /* 20px */
  }
}

/* --- Mobile Hero CTA Fixes --- */
@media (max-width: 768px) {
  .hero-cta-container {
    flex-direction: column !important;
    gap: 1rem !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-cta-container .btn {
    width: 100% !important;
    display: flex;
    justify-content: center;
  }
}

/* --- Global Mobile Spacing Optimization --- */
@media (max-width: 768px) {

  /* Standardize Layout for Hero Sections */
  .section.hero-gradient,
  .why-hero,
  .hero-section,
  .hero-optimized {
    padding-top: 1rem !important;
    /* Compact spacing: 80px header + 1rem gap */
    padding-bottom: 3rem !important;
    /* Reduce excessive bottom space */
    min-height: auto !important;
    /* Disable forced full-height */
    height: auto !important;
  }

  /* Override inline styles for specific large paddings */
  section[style*="padding-top: 140px"],
  section[style*="padding-top:140px"] {
    padding-top: 10px !important;
  }

  /* Normalize Vertical Spacing in Hero */
  .heading-xl,
  h1 {
    margin-bottom: 1rem !important;
    line-height: 1.2 !important;
  }

  .card-badge,
  .why-hero span[style*="border-radius"] {
    margin-bottom: 1rem !important;
    display: inline-block !important;
  }

  .text-muted-std,
  .why-hero p {
    margin-bottom: 1.5rem !important;
  }

  /* Reset Negative Margins for Overlapping Cards on Mobile */
  /* This prevents content collision when hero height is reduced */
  section[style*="margin-top: -50px"],
  section[style*="margin-top:-50px"],
  .overlap-optimized {
    margin-top: 1rem !important;
  }

  /* Adjust container side padding for better readability */
  .container {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* CMA & Generic Footer CTA Fixes */
  .cma-footer-cta,
  .footer-cta-optimized {
    padding: 2rem !important;
  }

  .cma-footer-cta h2,
  .footer-cta-optimized h2 {
    font-size: 1.8rem !important;
  }

  .cma-footer-cta .btn,
  .footer-cta-optimized .btn {
    width: 100% !important;
    padding: 1rem !important;
    font-size: 1rem !important;
    white-space: normal !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
}

/* Helper for spacing below fixed header on Desktop */
@media (min-width: 1024px) {
  .header-spacer-force {
    margin-top: 40px !important;
  }
}

/* --- Footer Logo Mobile Size Fix --- */
@media (max-width: 768px) {

  footer img[alt="Saudi Market Entry"],
  .footer-logo-img {
    height: 40px !important;
    width: auto !important;
  }
}

/* === WhatsApp Widget === */
.whatsapp-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  text-decoration: none;
}

.whatsapp-widget:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  background-color: #20BA5C;
}

.whatsapp-widget svg {
  width: 35px;
  height: 35px;
  fill: white;
}

.whatsapp-widget-tooltip {
  position: absolute;
  right: 70px;
  background: white;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}

.whatsapp-widget:hover .whatsapp-widget-tooltip {
  opacity: 1;
  visibility: visible;
  right: 80px;
}


/* Pulse Animation */
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-widget.pulse {
  animation: whatsapp-pulse 2s infinite;
}

/* Validation Errors */
.error-msg {
  color: #ff6b6b;
  font-size: 0.8rem;
  margin-top: 5px;
  display: block;
}

.input-error {
  border-color: #ff6b6b !important;
}

/* ==========================================================================
   LANGUAGE SWITCHER STYLES
   ========================================================================== */
.lang-select,
.language-selector {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 1rem;
  font-size: 0.9rem;
  background-color: #0F172A;
  /* Force solid background */
  color: white;
  /* Ensure text is white */
  z-index: 105;
  position: relative;
  display: block;
}

.lang-select option,
.language-selector option {
  background: #0F172A;
  color: white;
  padding: 10px;
}

.language-selector-container {
  display: inline-block;
}

/* Ensure mobile menu behaves correctly when active */
.Header-module__gycZQW__mobileMenu.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 200000 !important;
}
/* ==========================================================================
   GLOBAL TYPOGRAPHY & SPACING FIXES
   ========================================================================== */
p:not([class*="mb-"]):not([class*="margin-bottom"]):not([style*="margin-bottom"]) {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0 !important;
}

/* Ensure list items have slight spacing so they don't blend together */
ul:not([class*="flex"]):not([class*="grid"]) li,
ol:not([class*="flex"]):not([class*="grid"]) li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

ul:not([class*="flex"]):not([class*="grid"]) li:last-child,
ol:not([class*="flex"]):not([class*="grid"]) li:last-child {
  margin-bottom: 0;
}

/* Header CTA - Desktop Only */
@media (min-width: 1024px) {
    .header-cta-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}
