/* ============================================
   RETROTRAVEL CLUB - MOBILE-FIRST RESPONSIVE FIXES
   ============================================ */

/* ============================================
   1. BASE & RESET
   ============================================ */

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html {
  /* Prevent text size adjustment on mobile */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ============================================
   2. FLUID TYPOGRAPHY (Mobile-first)
   ============================================ */

/* Hero headings - Fluid from 1.75rem (28px) to 3rem (48px) */
h1, .hero-title {
  font-size: clamp(1.75rem, 5vw, 3rem) !important;
  line-height: 1.2 !important;
  word-wrap: break-word;
  hyphens: auto;
}

/* Pricing card titles - Fluid from 1.25rem (20px) to 1.5rem (24px) */
h2, .pricing-title {
  font-size: clamp(1.25rem, 3vw, 1.5rem) !important;
  line-height: 1.3 !important;
}

/* Body text - Fluid from 0.9rem (14.4px) to 1rem (16px) */
p, .card-description {
  font-size: clamp(0.9rem, 2vw, 1rem) !important;
  line-height: 1.6 !important;
}

/* ============================================
   3. HEADER & NAVIGATION FIXES
   ============================================ */

/* Header logo - Reduce size on mobile */
header .w-10.h-10 {
  width: 2rem !important;
  height: 2rem !important;
}

header .w-8.h-8 {
  width: 1.75rem !important;
  height: 1.75rem !important;
}

/* Header title - Responsive sizing */
header h1 {
  font-size: clamp(0.95rem, 4vw, 1.25rem) !important;
}

header .text-xs {
  font-size: clamp(0.65rem, 2vw, 0.75rem) !important;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 4rem; /* Below header */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 4rem;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: calc(100vh - 4rem);
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 50;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu nav {
  padding: 1.5rem;
}

.mobile-menu a {
  display: block;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  color: hsl(222, 15%, 50%);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 1.1rem;
  min-height: 48px; /* Touch target */
}

.mobile-menu a:hover,
.mobile-menu a:active {
  background: hsl(45, 20%, 95%);
  color: hsl(195, 45%, 35%);
}

/* ============================================
   4. PRICING CARDS - MOBILE STACKING
   ============================================ */

/* Force single column on mobile, regardless of Tailwind classes */
@media (max-width: 767px) {
  /* Pricing grid */
  .grid.md\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  /* Home page cards */
  .grid.md\\:grid-cols-2.lg\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Disable hover scale on mobile to prevent layout issues */
  .hover\\:scale-105:hover {
    transform: none !important;
  }
  
  /* Badge positioning */
  .absolute.-top-4 {
    top: -0.75rem !important;
  }
}

/* Improve card readability on mobile */
.card {
  max-width: 100%;
}

/* ============================================
   5. TAP TARGETS & BUTTONS
   ============================================ */

/* Ensure all interactive elements meet 48px minimum touch target */
button, 
a[href], 
[role="button"],
input[type="submit"],
input[type="button"] {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Exception: Carousel indicators - thin progress bars with adequate touch targets */
[data-testid*="carousel-dot"] {
  min-height: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  width: 2rem !important;
  padding: 0 !important;
  background: transparent !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Thin visual indicator using pseudo-element */
[data-testid*="carousel-dot"]::before {
  content: '' !important;
  display: block !important;
  width: 2rem !important;
  height: 0.125rem !important;
  border-radius: 9999px !important;
  transition: background-color 0.3s ease !important;
}

/* Active state styling */
[data-testid*="carousel-dot"][aria-current="true"]::before {
  background-color: hsl(195, 45%, 35%) !important; /* vintage-teal */
}

/* Inactive state styling */
[data-testid*="carousel-dot"][aria-current="false"]::before {
  background-color: rgba(209, 213, 219, 0.6) !important;
}

/* Hover state */
[data-testid*="carousel-dot"][aria-current="false"]:hover::before {
  background-color: rgba(156, 163, 175, 0.8) !important;
}

/* Increase padding for better touch targets */
.btn, 
button {
  padding: 0.75rem 1.5rem !important;
}

/* Small buttons on mobile header - ensure readable size */
button.p-2 {
  padding: 0.625rem !important;
  min-width: 44px !important;
  min-height: 44px !important;
}

/* ============================================
   6. SPACING & LAYOUT FIXES
   ============================================ */

/* Reduce excessive padding on mobile */
@media (max-width: 640px) {
  .p-8 {
    padding: 1rem !important;
  }
  
  .px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .py-8 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  .space-y-8 > * + * {
    margin-top: 1.5rem !important;
  }
  
  .gap-8 {
    gap: 1rem !important;
  }
  
  .gap-6 {
    gap: 0.75rem !important;
  }
  
  /* Reduce margins on hero */
  .mt-12 {
    margin-top: 2rem !important;
  }
  
  .mt-16 {
    margin-top: 2.5rem !important;
  }
  
  .mb-12 {
    margin-bottom: 2rem !important;
  }
}

/* ============================================
   7. MODAL / DIALOG MOBILE FIXES (CRITICAL)
   ============================================ */

/* Fix dialogs being cropped on mobile */
[role="dialog"],
[data-radix-dialog-content],
[data-state="open"][role="dialog"] {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  max-height: 95vh !important;
  max-height: 95dvh !important; /* Dynamic viewport height for mobile browsers */
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important; /* Smooth scrolling on iOS */
  width: calc(100vw - 2rem) !important;
  margin: 0 !important;
}

@media (max-width: 640px) {
  [role="dialog"],
  [data-radix-dialog-content] {
    max-height: 90vh !important;
    max-height: 90dvh !important;
    width: calc(100vw - 1rem) !important;
    padding: 1rem !important;
    border-radius: 0.75rem !important;
  }
  
  /* Reduce dialog padding on mobile */
  [role="dialog"] .p-6,
  [data-radix-dialog-content] .p-6 {
    padding: 1rem !important;
  }
  
  /* Ensure close button is accessible */
  [role="dialog"] button[aria-label="Close"],
  [data-radix-dialog-content] button[aria-label="Close"] {
    position: sticky !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    z-index: 10 !important;
    background: white !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  }
}

/* Dialog overlay - prevent body scroll when modal is open */
body:has([data-state="open"][role="dialog"]) {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* Specific fixes for signup/auth modals */
.sm\\:max-w-md,
.max-w-xl {
  max-width: calc(100vw - 2rem) !important;
}

@media (min-width: 640px) {
  .sm\\:max-w-md {
    max-width: 28rem !important;
  }
  
  .max-w-xl {
    max-width: 36rem !important;
  }
}

/* ============================================
   8. CONTAINER & OVERFLOW FIXES
   ============================================ */

/* Prevent horizontal overflow */
.max-w-7xl,
.max-w-4xl,
.max-w-2xl {
  max-width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .max-w-7xl,
  .max-w-4xl,
  .max-w-2xl {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Images responsive */
img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   9. HERO SECTION MOBILE FIXES
   ============================================ */

/* Hero main content area */
@media (max-width: 640px) {
  /* Reduce hero height on small screens */
  .h-\[calc\(100vh-4rem\)\] {
    min-height: 500px !important;
    height: auto !important;
  }
  
  /* Hero background */
  main[style*="backgroundImage"] {
    background-position: center !important;
    background-attachment: scroll !important;
  }
}

/* ============================================
   10. FORM & INPUT IMPROVEMENTS
   ============================================ */

input, 
textarea, 
select {
  font-size: 16px !important; /* Prevent zoom on iOS */
  min-height: 44px;
}

/* Select dropdowns on mobile */
@media (max-width: 640px) {
  select,
  [role="combobox"],
  [role="listbox"] {
    max-width: 100% !important;
  }
  
  /* Form spacing on mobile */
  form .space-y-4 > * + * {
    margin-top: 0.75rem !important;
  }
  
  form .space-y-6 > * + * {
    margin-top: 1rem !important;
  }
  
  /* Grid forms to single column */
  form .grid.grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  form .grid.grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
}

/* Card forms inside dialogs - mobile fix */
@media (max-width: 640px) {
  [role="dialog"] .card,
  [data-radix-dialog-content] .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  
  [role="dialog"] .card-header,
  [data-radix-dialog-content] .card-header {
    padding: 0 0 1rem 0 !important;
  }
  
  [role="dialog"] .card-content,
  [data-radix-dialog-content] .card-content {
    padding: 0 !important;
  }
}

/* ============================================
   11. ACCESSIBILITY & PERFORMANCE
   ============================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid hsl(195, 45%, 35%);
  outline-offset: 2px;
}

/* ============================================
   12. TABLET & DESKTOP BREAKPOINTS
   ============================================ */

@media (min-width: 768px) {
  /* Restore normal spacing on tablets+ */
  .p-8 {
    padding: 2rem !important;
  }
  
  h1 {
    font-size: clamp(2.5rem, 4vw, 3rem) !important;
  }
}

@media (min-width: 1024px) {
  /* Desktop optimizations */
  .max-w-7xl {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   12. MOBILE TEXT & CONTENT CENTERING
   ============================================ */

/* Center text and content on mobile for better UX */
@media (max-width: 767px) {
  /* Scope centering to carousel items only - prevent breaking other layouts */
  [role="group"][aria-roledescription="slide"] {
    text-align: center !important;
  }
  
  /* Center carousel card content specifically */
  [role="group"][aria-roledescription="slide"] h1,
  [role="group"][aria-roledescription="slide"] h2,
  [role="group"][aria-roledescription="slide"] h3,
  [role="group"][aria-roledescription="slide"] h4 {
    text-align: center !important;
  }
  
  [role="group"][aria-roledescription="slide"] p,
  [role="group"][aria-roledescription="slide"] span {
    text-align: center !important;
  }
  
  /* Center carousel card feature lists */
  [role="group"][aria-roledescription="slide"] [class*="space-y"] {
    text-align: center !important;
  }
  
  /* Center flex items within carousel cards only */
  [role="group"][aria-roledescription="slide"] .flex.items-start {
    justify-content: center !important;
  }
  
  /* Center hero and main headings (non-carousel) */
  main h1, 
  main h2 {
    text-align: center !important;
  }
}

/* ============================================
   13. SAFARI & iOS SPECIFIC FIXES
   ============================================ */

/* Fix iOS Safari bottom bar overlap */
@supports (-webkit-touch-callout: none) {
  .h-\[calc\(100vh-4rem\)\] {
    height: -webkit-fill-available !important;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* ============================================
   14. ELEGANT MOBILE UX ENHANCEMENTS
   ============================================ */

/* Smooth animations for all transitions */
@media (max-width: 767px) {
  /* Smooth page transitions */
  * {
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  }
  
  /* Elegant card hover/touch feedback */
  [class*="card"],
  [class*="Card"] {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  [class*="card"]:active,
  [class*="Card"]:active {
    transform: scale(0.98);
  }
  
  /* Smooth button interactions with visual feedback */
  button,
  [role="button"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  button:active,
  [role="button"]:active {
    transform: scale(0.97);
  }
  
  /* Smooth carousel transitions */
  [role="region"][aria-roledescription="carousel"] {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Ensure carousel items fit within mobile viewport */
  [role="group"][aria-roledescription="slide"] {
    max-width: 280px !important;
    margin: 0 auto !important;
  }
  
  [role="group"][aria-roledescription="slide"] > * {
    max-width: 100% !important;
  }
  
  /* Carousel dots smooth animation - applied to pseudo-element */
  [data-testid*="carousel-dot"]::before {
    transition: background-color 0.3s ease,
                opacity 0.2s ease;
  }
  
  [data-testid*="carousel-dot"]:active::before {
    opacity: 0.8;
  }
  
  /* Enhanced shadow depth for cards */
  [class*="card"]:hover,
  [class*="Card"]:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 
                0 8px 10px -6px rgba(0, 0, 0, 0.1);
  }
  
  /* Smooth link transitions */
  a {
    transition: color 0.2s ease, opacity 0.2s ease;
  }
  
  a:active {
    opacity: 0.7;
  }
  
  /* Elegant input focus states */
  input:focus,
  textarea:focus,
  select:focus {
    outline: 2px solid hsl(195, 45%, 35%);
    outline-offset: 2px;
    transition: outline 0.2s ease;
  }
  
  /* Smooth dialog animations */
  [role="dialog"],
  [data-radix-dialog-content] {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translate(-50%, -48%) scale(0.96);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
  }
  
  /* Smooth mobile menu slide */
  [data-testid="mobile-menu-overlay"] > div {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Elegant badge animations */
  [class*="badge"],
  [class*="Badge"] {
    transition: transform 0.2s ease;
  }
  
  /* Breathing animation for important CTAs */
  [class*="bg-vintage-gold"],
  [class*="bg-vintage-teal"] {
    transition: all 0.3s ease;
  }
  
  button[class*="bg-vintage-gold"]:active,
  button[class*="bg-vintage-teal"]:active {
    filter: brightness(0.95);
  }
  
  /* Smooth icon transitions */
  svg {
    transition: transform 0.2s ease, color 0.2s ease;
  }
  
  button:active svg,
  [role="button"]:active svg {
    transform: scale(0.95);
  }
  
  /* Subtle pulse for loading states */
  @keyframes pulse {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }
  
  /* Enhanced scroll snap for carousels */
  [class*="overflow-hidden"] {
    scroll-snap-type: x mandatory;
    scroll-padding: 0 1rem;
  }
  
  [role="group"][aria-roledescription="slide"] {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  
  /* Smooth spacing transitions */
  [class*="space-y"] > * {
    transition: margin 0.2s ease;
  }
  
  /* Better touch target feedback */
  button:active::before,
  [role="button"]:active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
  }
  
  @keyframes ripple {
    to {
      transform: translate(-50%, -50%) scale(2);
      opacity: 0;
    }
  }
  
  /* Elegant section transitions */
  section,
  main > div {
    animation: fadeIn 0.4s ease-in;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Smooth header interactions */
  header button:active {
    background: rgba(0, 0, 0, 0.05);
  }
  
  /* Enhanced visual depth */
  [class*="shadow"] {
    transition: box-shadow 0.3s ease;
  }
  
  /* Smooth price toggle animation */
  [role="switch"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Accessibility: Respect reduced motion preference */
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   15. VISUAL HIERARCHY & SPACING POLISH
   ============================================ */

@media (max-width: 767px) {
  /* Enhanced breathing room around content */
  [class*="card"] {
    margin-bottom: 1.25rem;
  }
  
  /* Better visual separation between sections */
  section + section,
  div[class*="space-y"] > div + div {
    margin-top: 2rem;
  }
  
  /* Elegant card elevation hierarchy */
  [class*="card"],
  [class*="Card"],
  [role="group"][aria-roledescription="slide"] > * {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 
                0 1px 2px -1px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.75rem !important;
  }
  
  [class*="card"]:active,
  [class*="Card"]:active {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0) !important;
  }
  
  /* Enhanced focus ring for accessibility - high specificity */
  *:focus-visible,
  button:focus-visible,
  [role="button"]:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid hsl(195, 45%, 35%) !important;
    outline-offset: 3px !important;
    border-radius: 0.25rem;
  }
  
  /* Also style regular focus for maximum accessibility */
  button:focus,
  [role="button"]:focus,
  a:focus,
  [data-testid*="button"]:focus {
    box-shadow: 0 0 0 3px hsla(195, 45%, 35%, 0.3) !important;
  }
  
  /* Smooth gradient overlays for depth */
  [class*="gradient"] {
    background-size: 100% 100%;
    transition: background-size 0.3s ease;
  }
  
  /* Better visual weight for headings */
  h1 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
  }
  
  h2 {
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
  }
  
  /* Enhanced paragraph readability */
  p {
    line-height: 1.7;
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Improved button visual hierarchy */
  button[class*="bg-vintage"] {
    font-weight: 600;
    letter-spacing: 0.015em;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  }
  
  button[class*="bg-vintage"]:active {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
  
  /* Elegant list spacing */
  ul, ol {
    padding-left: 1.5rem;
  }
  
  li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
  }
  
  /* Better visual balance for icons */
  [class*="lucide"] {
    vertical-align: middle;
  }
  
  /* Enhanced badge visual presence */
  [class*="badge"],
  [class*="Badge"] {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    letter-spacing: 0.025em;
  }
}

/* ============================================
   16. SKELETON LOADING STATES
   ============================================ */

@media (max-width: 767px) {
  /* Skeleton loader animation */
  @keyframes skeleton {
    0% {
      background-position: 200% 0;
    }
    100% {
      background-position: -200% 0;
    }
  }
  
  /* Skeleton card styles */
  .skeleton {
    background: linear-gradient(
      90deg,
      hsl(0, 0%, 95%) 25%,
      hsl(0, 0%, 90%) 50%,
      hsl(0, 0%, 95%) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
  }
  
  /* Loading state for images */
  img[loading="lazy"] {
    background: linear-gradient(
      90deg,
      hsl(0, 0%, 95%) 25%,
      hsl(0, 0%, 90%) 50%,
      hsl(0, 0%, 95%) 75%
    );
    background-size: 200% 100%;
  }
  
  /* Smooth image fade-in */
  img {
    opacity: 0;
    transition: opacity 0.3s ease-in;
  }
  
  img.loaded,
  img[complete] {
    opacity: 1;
  }
}

/* ============================================
   17. ENHANCED MICRO-INTERACTIONS
   ============================================ */

@media (max-width: 767px) {
  /* Subtle scale on card press */
  [class*="cursor-pointer"]:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  /* Icon bounce on tap */
  button:active [class*="lucide"] {
    animation: iconBounce 0.3s ease;
  }
  
  @keyframes iconBounce {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.1);
    }
  }
  
  /* Progress dots grow on interaction */
  [data-testid*="carousel-dot"]:hover,
  [data-testid*="carousel-dot"]:focus {
    transform: scale(1.2);
  }
  
  /* Smooth badge pulse for "Coming Soon" */
  [class*="badge"]:has-text("Coming Soon"),
  .bg-vintage-gold {
    animation: subtlePulse 2s ease-in-out infinite;
  }
  
  @keyframes subtlePulse {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.9;
    }
  }
  
  /* Enhanced dropdown/select interactions */
  select:active,
  [role="combobox"]:active {
    transform: translateY(1px);
  }
  
  /* Smooth toggle switch animation */
  [role="switch"][aria-checked="true"] {
    background-color: hsl(195, 45%, 35%);
  }
  
  /* Link tap feedback */
  a:active {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }
}

/* ============================================
   18. MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================ */

@media (max-width: 767px) {
  /* GPU acceleration for smooth animations */
  [class*="card"],
  button,
  [role="dialog"],
  [data-testid*="carousel-dot"] {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  /* Optimize font rendering */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
  
  /* Prevent layout shifts */
  img,
  video {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  /* Smooth scroll for anchor links */
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
  }
  
  /* Better tap highlighting */
  * {
    -webkit-tap-highlight-color: rgba(195, 45%, 35%, 0.1);
  }
}

/* ============================================
   END OF MOBILE FIXES
   ============================================ */
