/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ANTI-FLASH FIX - Prevents white background on page load */
#heroMedia {
  background-color: #173ca8 !important;
  background-image: linear-gradient(135deg, #173ca8 0%, #1e40af 100%) !important;
  min-height: 200px !important;
}

#heroMedia iframe, #heroMedia video {
  background-color: #000 !important;
}

#heroMedia img {
  background-color: #173ca8 !important;
}

/* ============================================
   CSS CUSTOM PROPERTIES (CSS VARIABLES)
   ============================================ */
:root {
  /* Primary brand colors - matching your existing CSS */
  --color-primary: #f59e0b;     /* Amber - Main brand color */
  --color-secondary: #ef4444;   /* Red - Secondary brand color */
  --color-accent: #FF4500;      /* Orange-red - Hover accent color */
  
  /* Background and neutral colors */
  --color-dark: #173ca8;        /* Main background blue */
  --color-light: #f3f4f6;       /* Light gray text */
  
  /* Gradient backgrounds */
  --gradient-primary: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-dark: #173ca8;     /* Solid blue background */
  
  /* Glass effect */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--color-light);
  background-color: var(--color-dark);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* ============================================
   THEME CLASSES
   ============================================ */
.dark-theme {
  background-color: var(--color-dark);
  color: var(--color-light);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* Fallback for browsers that don't support background-clip */
}

.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
}

/* Remove bullets from lists */
ul.no-bullets {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.check-list {
  list-style: none;
  padding: 0;
}

.check-list li::before {
  content: "✓";
  color: var(--color-primary);
  font-weight: bold;
  margin-right: 8px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.6);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.6);
  }
}

@keyframes slideIn {
  from { 
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation utility classes */
.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

.animate-pulse-gentle {
  animation: pulse 2s infinite;
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
nav a {
  color: white !important;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--color-accent) !important; /* #FF4500 */
}

.link a {
  color: white !important;
}

.link a:hover {
  color: var(--color-accent) !important; /* #FF4500 */
}

/* ============================================
   HERO MEDIA STYLES (UPDATED - FIXES VIDEO FLASH & WHITE EDGES)
   ============================================ */
   #heroMedia {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background-color: var(--color-dark); /* Match theme background instead of white */
  }
  
  #heroMedia img,
  #heroMedia video,
  #heroMedia iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    border: none;
    display: block; /* Prevent inline spacing issues */
  }
  
  #heroMedia iframe {
    border: none;
    background-color: var(--color-dark); /* Match theme background */
  }
  
  /* Hide fallback image when video is loading */
  #heroMedia.loading img {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  /* Loading state for smooth transitions */
  #heroMedia.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    animation: pulse 1.5s ease-in-out infinite;
  }
  
  #heroMedia.loading::before {
    content: '🎬';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    z-index: 2;
    opacity: 0.6;
    animation: bounce 1s ease-in-out infinite;
  }
  
  /* Bounce animation for loading icon */
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
      transform: translate(-50%, -50%) translateY(0);
    }
    40% {
      transform: translate(-50%, -50%) translateY(-10px);
    }
    60% {
      transform: translate(-50%, -50%) translateY(-5px);
    }
  }
  
  /* Ensure video iframes have proper background */
  #heroMedia iframe[src*="youtube"],
  #heroMedia iframe[src*="vimeo"] {
    background-color: #000; /* Black background for video players */
  }

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-glow:hover {
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
  transition: box-shadow 0.3s ease;
}

.funnel-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.funnel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

/* ============================================
   QUIZ STYLES
   ============================================ */
.quiz-option {
  transition: all 0.3s ease;
  cursor: pointer;
}

.quiz-option:hover {
  transform: translateX(5px);
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--color-primary);
}

.progress-bar {
  transition: width 0.3s ease;
}

/* ============================================
   SOCIAL PROOF STYLES
   ============================================ */
.social-proof-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.social-proof-avatars {
  display: flex;
  margin-left: -0.5rem;
  flex-shrink: 0;
}

.social-proof-avatars img {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 2px solid white;
  margin-left: -0.5rem;
  transition: transform 0.2s;
}

.social-proof-avatars img:hover {
  transform: scale(1.1);
  z-index: 10;
  position: relative;
}

.social-proof-avatars > div {
  margin-left: -0.5rem;
  z-index: 5;
}

.social-proof-text {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #4b5563;
  text-align: center;
  min-width: 0;
}

/* ============================================
   MODAL STYLES
   ============================================ */
.custom-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-content {
  background-color: #ffffff;
  margin: 2% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideIn 0.4s ease-out;
  overflow: hidden;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 25px;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8em;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.modal-header .emoji {
  font-size: 2.5em;
  margin-bottom: 10px;
  display: block;
}

.modal-body {
  padding: 20px 20px;
  text-align: center;
  line-height: 1.6;
  overflow-y: auto;
  flex: 1;
}

.modal-body h3 {
  color: #333;
  font-size: 1.3em;
  margin-bottom: 15px;
  font-weight: 600;
}

.modal-body p {
  color: #666;
  font-size: 1em;
  margin-bottom: 15px;
}

.discount-highlight {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 1.2em;
  font-weight: bold;
  display: inline-block;
  margin: 15px 0;
  box-shadow: 0 8px 25px rgba(238, 90, 36, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 0 25px 25px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.btn {
  padding: 15px 25px;
  border: none;
  border-radius: 50px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 180px;
  min-height: 48px;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(45deg, #4ecdc4, #2dd4bf);
  color: white;
  box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
  transform: translateY(-2px);
}

.btn-primary:hover, .btn-primary:focus {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(78, 205, 196, 0.6);
  outline: none;
}

.btn-secondary {
  background: transparent;
  color: #666;
  border: 2px solid #ddd;
}

.btn-secondary:hover, .btn-secondary:focus {
  background: #f8f9fa;
  border-color: #bbb;
  color: #444;
  outline: none;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  color: white;
  font-size: 2em;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.8;
  transition: opacity 0.3s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-btn:hover, .close-btn:focus {
  opacity: 1;
  background: rgba(255,255,255,0.1);
  outline: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile Social Proof */
@media (max-width: 640px) {
  .social-proof-container {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 0.5rem;
  }
  
  .social-proof-avatars {
    margin-left: -0.25rem;
  }
  
  .social-proof-avatars img,
  .social-proof-avatars > div {
    margin-left: -0.25rem;
  }
  
  .social-proof-avatars img {
    width: 1.75rem;
    height: 1.75rem;
  }
  
  .social-proof-avatars > div {
    font-size: 0.6rem;
    width: 1.75rem !important;
    height: 1.75rem !important;
  }
  
  .social-proof-text {
    font-size: 0.8rem;
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .social-proof-avatars img {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .social-proof-avatars > div {
    width: 1.5rem !important;
    height: 1.5rem !important;
    font-size: 0.5rem;
  }
  
  .social-proof-text {
    font-size: 0.75rem;
  }
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
  .modal-content {
    margin: 1% auto;
    width: 95%;
    max-height: 98vh;
    border-radius: 15px;
  }

  .modal-header {
    padding: 20px 15px;
  }

  .modal-header h2 {
    font-size: 1.6em;
  }

  .modal-header .emoji {
    font-size: 2.2em;
  }

  .modal-body {
    padding: 25px 20px;
  }

  .modal-buttons {
    flex-direction: column;
    padding: 0 20px 20px;
    gap: 12px;
  }

  .btn {
    width: 100%;
    margin-bottom: 0;
    min-height: 52px;
    font-size: 1.1em;
  }

  .discount-highlight {
    font-size: 1.1em;
    padding: 10px 15px;
    margin: 12px 0;
  }
}

@media (max-width: 480px) {
  .custom-modal {
    padding: 0;
  }

  .modal-content {
    margin: 0;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    padding: 20px 15px;
    border-radius: 0;
  }

  .modal-header h2 {
    font-size: 1.4em;
    line-height: 1.3;
  }

  .modal-header .emoji {
    font-size: 2em;
    margin-bottom: 8px;
  }

  .modal-body {
    padding: 20px 15px;
    font-size: 0.95em;
    overflow-y: auto;
    flex: 1;
  }

  .modal-body h3 {
    font-size: 1.2em;
    margin-bottom: 12px;
  }

  .modal-body p {
    font-size: 0.95em;
    margin-bottom: 12px;
    line-height: 1.5;
  }

  .modal-buttons {
    padding: 15px;
    gap: 15px;
    border-top: 1px solid #eee;
    background: #fafafa;
  }

  .btn {
    min-height: 56px;
    font-size: 1em;
    padding: 18px 20px;
    border-radius: 12px;
  }

  .discount-highlight {
    font-size: 1em;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 25px;
  }

  .close-btn {
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    min-width: 40px;
    min-height: 40px;
  }
}

/* Very Small Screens */
@media (max-width: 320px) {
  .modal-header h2 {
    font-size: 1.2em;
  }

  .modal-body {
    padding: 15px 12px;
  }

  .btn {
    font-size: 0.9em;
    padding: 16px 15px;
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-content {
    margin: 1% auto;
    max-height: 95vh;
    width: 85%;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-header .emoji {
    font-size: 1.5em;
    margin-bottom: 5px;
  }

  .modal-header h2 {
    font-size: 1.3em;
  }

  .modal-body {
    padding: 15px 20px;
  }

  .modal-buttons {
    flex-direction: row;
    padding: 10px 20px;
  }

  .btn {
    min-height: 44px;
    flex: 1;
  }
}

/* ============================================
   ACCESSIBILITY & TOUCH IMPROVEMENTS
   ============================================ */

/* Touch-friendly improvements */
.btn:active {
  transform: scale(0.98);
}

.close-btn:active {
  transform: scale(0.9);
}

/* Prevent zoom on input focus (iOS) */
@media (max-width: 768px) {
  input, button, select, textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Focus styles for keyboard navigation */
*:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

button:focus,
.btn:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* ============================================
   UTILITY CLASSES FOR SCROLLBARS
   ============================================ */
.scroll-hidden {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.scroll-hidden::-webkit-scrollbar {
  display: none; /* WebKit browsers */
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-fadeIn, 
  .animate-pulse-gentle, 
  .pulse-glow {
    animation: none !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .no-print, 
  .pulse-glow, 
  .animate-fadeIn {
    display: none !important;
    animation: none !important;
  }
  
  * {
    background: white !important;
    color: black !important;
  }
}

/* ============================================
   HIGH CONTRAST MODE SUPPORT
   ============================================ */
@media (prefers-contrast: high) {
  .glass-effect {
    background-color: white !important;
    backdrop-filter: none !important;
  }
}

/* ============================================
   DARK MODE SUPPORT (SYSTEM PREFERENCE)
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #f59e0b;
    --color-secondary: #ef4444;
    --color-accent: #FF4500;
    --color-dark: #173ca8;
  }
}

/* --- Custom Mobile Column Reversal --- */
@media (max-width: 1023px) {
  .right-column {
    order: 2 !important;
  }

  .order-2 {
    order: 1 !important;
  }

  .order-1 {
    order: 2 !important;
  }
}