/*
 * Mobile Hardening Override Sheet
 * Wigley Studios Website - Mobile Optimization (≤768px)
 * Maintains desktop layouts unchanged while fixing mobile issues
 */

/* Global CSS Variables */
:root {
  --header-h: 100px; /* matches styles.css header height on desktop */
}

/* ===== DESKTOP BANNER STYLES (no marquee) ===== */
@media (min-width: 769px) {
  /* Desktop: Normal centered banner, no marquee */
  .coming-soon-banner {
    text-align: center !important;
    justify-content: center !important;
    padding: 0.75rem 1rem !important;
  }

  .coming-soon-banner .banner-content-wrapper {
    display: block !important;
    animation: none !important;
    padding: 0 !important;
  }

  .coming-soon-banner .banner-content {
    display: inline !important;
    white-space: normal !important;
  }

  /* Better centering for close button on desktop */
  .coming-soon-banner .banner-close-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding: 0 !important;
  }
}

/* ===== TABLET & SMALL LAPTOP FIXES (768px - 1366px) ===== */
/* These screens need special attention as they're between mobile and desktop */
@media (min-width: 769px) and (max-width: 1366px) {
  /* Adjust pricing cards for tablets */
  .pricing .centered-grid,
  .pricing-section .centered-grid,
  .gui-toolkit-section .centered-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
    max-width: 95vw !important;
  }

  .pricing-card {
    max-width: 400px !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .pricing-card.featured {
    max-width: 420px !important;
  }

  /* Hero section adjustments for tablets */
  .hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    grid-template-columns: none !important;
    text-align: center !important;
    gap: 2rem !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .hero-image {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
  }

  .hero-text {
    max-width: 700px !important;
    margin: 0 auto !important;
  }

  .hero-text h1 {
    font-size: 2.5rem !important;
  }

  .hero-buttons {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
  }

  /* Section spacing for tablets */
  .scroll-section {
    padding: 3rem 1.5rem !important;
  }

  /* Feature cards stack better on tablets */
  .features .centered-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }

  .feature-card {
    max-width: 100% !important;
  }

  /* Container widths for tablets */
  .container {
    max-width: 95vw !important;
    padding: 0 1.5rem !important;
  }

  /* Music scroll rows on tablets */
  .music-scroll-row .pricing-card {
    flex: 0 0 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
  }

  .music-scroll-row .pricing-card.featured {
    flex: 0 0 360px !important;
    min-width: 360px !important;
    max-width: 360px !important;
  }
}

/* ===== SMALL TABLETS (768px - 992px) ===== */
@media (min-width: 769px) and (max-width: 992px) {
  /* Stack pricing cards to single column on small tablets */
  .pricing .centered-grid,
  .pricing-section .centered-grid,
  .gui-toolkit-section .centered-grid {
    grid-template-columns: 1fr !important;
    max-width: 600px !important;
    margin: 0 auto !important;
  }

  .pricing-card {
    max-width: 100% !important;
  }

  /* Adjust header spacing */
  header {
    height: 80px !important;
  }

  body {
    padding-top: 130px !important;
  }

  .coming-soon-banner {
    top: 80px !important;
  }
}

/* Hide mobile nav on desktop by default */
.mobile-nav-toggle {
  display: none;
}

.mobile-nav-overlay {
  display: none;
}

/* Mobile-Only Overrides */
@media (max-width: 768px) {

  /* === A) Single-Scroll Model (Kill Double Scrollbars) === */
  html, body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scroll-snap-type: none !important;
    scroll-behavior: smooth !important; /* Smooth scrolling on mobile for better UX */
    touch-action: manipulation !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* FORCE disable ALL scroll containers and snap behavior */
  .scroll-container,
  [class*="scroll-container"],
  [style*="scroll-snap"],
  [style*="height: 100vh"] {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    touch-action: auto !important;
  }

  /* FORCE disable ALL scroll sections - REMOVE FLEXBOX CENTERING */
  .scroll-section,
  [class*="scroll-section"],
  [style*="min-height: 100vh"],
  [style*="height: 100vh"] {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    scroll-snap-align: unset !important;
    scroll-snap-stop: unset !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    touch-action: auto !important;
    /* CRITICAL: Remove desktop flexbox centering */
    display: block !important;
    flex-direction: unset !important;
    justify-content: unset !important;
    align-items: unset !important;
  }

  /* Force any viewport-height elements to auto */
  *[style*="100vh"],
  *[style*="min-height: 100vh"],
  *[style*="height: 100vh"] {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }

  /* Hide the dot navigator on mobile */
  .section-indicator,
  [class*="section-indicator"],
  .section-dots,
  [class*="section-dots"] {
    display: none !important;
  }

  /* Kill any scroll hints or bounce animations */
  .scroll-hint,
  [class*="scroll-hint"],
  .bounce,
  [class*="bounce"],
  #hero .scroll-hint,
  .hero .scroll-hint,
  .hero-section .scroll-hint {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  /* === B) Header + Banner Stacking and Safe Padding === */
  :root {
    --header-h: 64px; /* slightly tighter on phones */
    --banner-h: 40px; /* banner height on mobile */
  }

  header {
    height: var(--header-h) !important;
    padding-block: 10px !important;
  }

  body {
    padding-top: calc(var(--header-h) + var(--banner-h)) !important; /* header + banner */
  }

  /* Convert the banner from fixed to sticky on phones */
  .coming-soon-banner {
    position: fixed !important;
    top: var(--header-h) !important;
    left: 0 !important;
    width: 100% !important;
    height: 40px !important; /* Reduced from var(--banner-h) for marquee */
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    padding: 0 !important; /* Remove all padding to prevent centering */
    padding-left: 0 !important;
    padding-right: 50px !important; /* Space for close button */
    z-index: 999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    text-align: left !important; /* Override inline center alignment */
  }

  /* Marquee wrapper for mobile */
  .coming-soon-banner .banner-content-wrapper {
    display: inline-block !important;
    animation: marquee-scroll 25s linear infinite !important;
    white-space: nowrap !important;
    will-change: transform !important;
  }

  /* Pause marquee on hover/touch */
  .coming-soon-banner:hover .banner-content-wrapper,
  .coming-soon-banner:active .banner-content-wrapper {
    animation-play-state: paused !important;
  }

  .coming-soon-banner .banner-content {
    display: inline-block !important;
    padding: 0 2rem 0 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  /* Scroll marquee animation - starts from right edge with pause at end */
  @keyframes marquee-scroll {
    0% {
      transform: translateX(100vw);
    }
    92% {
      transform: translateX(-100%);
    }
    100% {
      transform: translateX(-100%);
    }
  }

  /* Make close button smaller on mobile */
  .coming-soon-banner .banner-close-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 1.2rem !important;
    right: 0.5rem !important;
  }

  /* Fix intro section positioning on mobile - ensure it starts at the very top */
  /* Use maximum specificity to override inline styles and conflicting rules */
  section#intro.intro-section.scroll-section,
  section.intro-section.scroll-section,
  .intro-section.scroll-section,
  .intro-section {
    margin-top: 0 !important; /* NO negative margin on mobile - this was causing the scroll jump! */
    min-height: auto !important; /* Natural height on mobile */
    padding-top: 2rem !important; /* Normal padding instead of compensating for negative margin */
    padding-bottom: 2rem !important;
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Ensure intro section is visible and properly positioned - NO negative margins on mobile */
  [data-component="coming-soon-banner"] + section#intro.intro-section.scroll-section,
  [data-component="coming-soon-banner"] + section.intro-section.scroll-section,
  [data-component="coming-soon-banner"] + .intro-section {
    margin-top: 0 !important; /* NO negative margin - prevents scroll jump */
  }

  section#intro.intro-section.scroll-section:first-of-type,
  section.intro-section.scroll-section:first-of-type,
  .intro-section:first-of-type {
    margin-top: 0 !important; /* NO negative margin - prevents scroll jump */
  }

  /* === C) Prevent Horizontal Overflow and Clipped Cards === */
  /* Universal safety nets */
  img, svg, video, canvas {
    max-width: 100%;
    height: auto;
  }

  .container, .section-inner, .wrap {
    width: 100%;
    padding-inline: clamp(12px, 4vw, 20px);
    margin-inline: auto;
  }

  * {
    max-inline-size: 100vw;
  }

  /* Product cards - not pricing cards in horizontal scrollers */
  .product-card, .feature-card {
    width: 100% !important;
    max-width: 95vw !important;
    margin-inline: auto;
    border-radius: 12px;
    padding: 1.2rem !important;
  }

  /* Stack pricing columns ONLY for non-scrolling grids */
  .pricing-grid:not(.centered-grid) {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Improve card readability on small screens */
  .pricing-card {
    font-size: 0.9rem !important;
  }

  .pricing-card .pricing-name {
    font-size: 1.3rem !important;
  }

  .pricing-card .pricing-price {
    font-size: 1.8rem !important;
  }

  .pricing-card .pricing-features li {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    padding: 0.4rem 0 !important;
  }

  /* === D) Carousel Hardening (Music Packs) === */
  .music-pack-carousel {
    padding: 1rem 0 !important;
  }

  .music-scroll-container {
    overflow: visible !important;
    margin: 0;
    padding: 0 12px !important; /* tighter gutters */
  }

  .music-scroll-row {
    display: flex;
    gap: 12px !important;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 12px 0 !important;
    touch-action: pan-x pan-y pinch-zoom !important;
    pointer-events: auto !important;
    cursor: grab !important;
  }

  .music-scroll-row:active {
    cursor: grabbing !important;
  }

  .music-scroll-row .pricing-card {
    flex: 0 0 88vw !important;
    min-width: 88vw !important;
    max-width: 88vw !important;
    scroll-snap-align: start;
  }

  .music-scroll-row .pricing-card.featured {
    flex: 0 0 92vw !important;
    min-width: 92vw !important;
    max-width: 92vw !important;
  }

  /* === E) Fluid Typography + Buttons (Mobile Only) === */
  h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 1rem !important;
  }

  h2 {
    font-size: clamp(1.2rem, 5.5vw, 1.7rem);
    margin-bottom: 0.8rem !important;
  }

  h3 {
    font-size: clamp(1rem, 4.5vw, 1.4rem);
  }

  p, li {
    font-size: clamp(0.9rem, 3.8vw, 1.05rem);
    line-height: 1.5;
  }

  .btn, .pricing-button, .purchase-button {
    min-height: 48px !important;
    padding: 14px 18px !important;
    border-radius: 12px;
    font-size: 1rem !important;
    font-weight: 600 !important;
  }

  /* Hero buttons need special treatment */
  .hero-buttons .btn,
  .hero-buttons .cta-button {
    width: 100% !important;
    max-width: 300px !important;
    margin: 0 auto 0.8rem !important;
  }

  /* === F) Hero Sections & Images === */
  .hero, .hero-section, .hero-container,
  [class*="hero"], section[class*="hero"],
  .section[style*="height: 100vh"],
  .section[style*="min-height: 100vh"] {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    margin-bottom: 0 !important;
    scroll-snap-align: unset !important;
    display: block !important;
  }

  /* Specifically target hero section to prevent overlap */
  #hero.hero.scroll-section,
  section#hero.hero.scroll-section {
    min-height: auto !important;
    height: auto !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    display: block !important;
  }

  /* Any sections with viewport height classes */
  .vh-100, .min-vh-100,
  [class*="vh-100"],
  [class*="min-vh-100"] {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }

  .hero-image {
    display: none !important; /* keep copy above the fold on phones */
  }

  .hero-text, .hero-content {
    text-align: center !important;
    margin-inline: auto;
  }

  /* Force section spacing consistency */
  section, .section, .content-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
    margin-bottom: 0 !important;
    min-height: auto !important;
    height: auto !important;
  }

  /* Extra spacing for important sections */
  .pricing, .features, .hero {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Prevent ALL sections from having viewport heights */
  .pricing, .features, .testimonials, .customer-testimonials-section,
  .cta-section, section[class*="section"] {
    min-height: auto !important;
    height: auto !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    display: block !important;
  }

  /* GUI Toolkit section specific fix - override inline styles */
  #gui-toolkit.pricing.scroll-section.gui-toolkit-section,
  section#gui-toolkit,
  section#gui-toolkit.pricing.scroll-section,
  section[id="gui-toolkit"],
  .gui-toolkit-section {
    min-height: auto !important;
    height: auto !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Fix testimonial grid - stack on mobile */
  .testimonial-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 1rem !important;
  }

  .testimonial-card {
    width: 100% !important;
    max-width: 95vw !important;
    margin: 0 auto !important;
  }

  /* Fix "Get Started" section 3-column grid - stack on mobile */
  #get-started [style*="grid-template-columns: repeat(3, 1fr)"],
  .cta-section [style*="grid-template-columns: repeat(3, 1fr)"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    max-width: 95vw !important;
  }

  /* Override inline style min-height on pricing sections */
  section[style*="min-height: 100vh"],
  .scroll-section[style*="min-height: 100vh"],
  .pricing[style*="min-height: 100vh"] {
    min-height: auto !important;
    height: auto !important;
  }

  /* NUCLEAR OPTION: Override ANY element with viewport height inline styles */
  *[style*="min-height: 100vh"],
  *[style*="height: 100vh"],
  *[style*="min-height:100vh"],
  *[style*="height:100vh"] {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
  }

  /* Force proper spacing between ALL sections */
  section + section,
  .scroll-section + .scroll-section,
  .section + .section {
    margin-top: 0 !important;
    padding-top: 2rem !important;
  }

  /* Ensure no negative margins that could cause overlap */
  section, .section, .scroll-section,
  div[class*="section"], div[id*="section"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* === G) Header/Nav Touch Targets, Overflow, and Cart === */
  /* Hide nav links in header - they'll be in mobile menu instead */
  .nav-links {
    display: none !important;
  }

  /* Ensure header elements are visible and properly sized */
  header, .header, nav, .navbar, .animated-header {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    overflow-x: hidden !important;
  }

  nav a[href="cart.html"], .cart-icon, .header-actions > * {
    min-width: 44px;
    min-height: 44px;
  }

  /* Ensure Wigley Studios logo is fully visible */
  .logo,
  header .logo,
  .animated-header .logo,
  nav .logo {
    max-width: 100% !important;
    font-size: 1rem !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    opacity: 1 !important;
    visibility: visible !important;
    flex-shrink: 0 !important;
    color: white !important;
  }

  .logo i,
  header .logo i,
  .animated-header .logo i {
    display: inline-block !important;
    opacity: 1 !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
  }

  .logo-text,
  header .logo-text,
  .animated-header .logo-text {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Ensure header actions are visible */
  .header-actions {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    flex-shrink: 0 !important;
    gap: 0.5rem !important;
  }

  /* === Mobile Navigation Button (Bottom Right FAB) === */
  .mobile-nav-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--teal), #18b1a5);
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(32, 198, 183, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 9998;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: 24px;
  }

  .mobile-nav-toggle:active {
    transform: scale(0.95);
  }

  .mobile-nav-toggle:hover {
    background: linear-gradient(135deg, #18b1a5, var(--teal));
    box-shadow: 0 6px 16px rgba(32, 198, 183, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
  }

  /* Mobile Navigation Overlay */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-nav-overlay.active {
    display: flex !important;
    opacity: 1;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-menu {
    background: linear-gradient(135deg, #1a2332 0%, #2d3748 100%);
    border-radius: 20px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s ease;
  }

  .mobile-nav-overlay.active .mobile-nav-menu {
    transform: scale(1);
  }

  .mobile-nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }

  .mobile-nav-menu a:last-child {
    border-bottom: none;
  }

  .mobile-nav-menu a:hover,
  .mobile-nav-menu a:active {
    background: linear-gradient(90deg, rgba(32, 198, 183, 0.2), rgba(246, 182, 69, 0.2));
    transform: translateX(5px);
    border-left: 3px solid var(--teal);
  }

  .mobile-nav-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding: 0 !important;
  }

  .mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
  }

  /* === H) Additional Mobile Optimizations === */

  /* COMPREHENSIVE LAYOUT FIXES */
  /* Force any flex containers with viewport heights to auto */
  .d-flex[style*="height: 100vh"],
  .flex[style*="height: 100vh"],
  .flex-container[style*="height: 100vh"],
  [class*="flex"][style*="height: 100vh"] {
    height: auto !important;
    min-height: auto !important;
  }

  /* Grid layouts that might break - but preserve horizontal scroll grids */
  .grid-container:not(.music-scroll-container),
  .feature-grid,
  .product-grid:not([class*="scroll"]) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  /* Force any multi-column layouts to single column - but preserve horizontal scrollers */
  .row:not(.music-scroll-row):not([class*="scroll"]),
  .d-flex:not(.music-scroll-row):not([class*="scroll"]),
  .flex-row:not(.music-scroll-row):not([class*="scroll"]) {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  /* But preserve some specific flex layouts that should stay horizontal */
  .header-actions, .btn-group, .pagination, .breadcrumb,
  .music-scroll-row, .pricing-grid[class*="scroll"], .carousel-row {
    flex-direction: row !important;
  }

  /* Ensure horizontal scroll containers work properly */
  .music-scroll-row, .pricing-scroll, .carousel-inner,
  [class*="scroll-row"], [class*="carousel"] {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-direction: row !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x !important;
  }

  /* Ensure pricing grids can scroll horizontally when needed */
  .pricing-grid[class*="scroll"], .pricing-container[class*="scroll"],
  .music-scroll-container {
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
    touch-action: pan-x pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch !important;
    pointer-events: auto !important;
    width: 100% !important;
  }

  /* PRICING sections: centered-grid scrolls horizontally */
  /* Use maximum specificity to override conflicting rules */
  section#pricing.pricing-section.scroll-section .centered-grid,
  section#pricing .centered-grid,
  .pricing-section .centered-grid,
  .gui-toolkit-section .centered-grid,
  section.pricing .centered-grid,
  section[class*="pricing"] .centered-grid,
  #pricing .centered-grid,
  .pricing .centered-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important; /* Changed from scroll to auto for better UX */
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1rem 0.5rem !important;
    gap: 1rem !important;
    grid-template-columns: none !important;
    touch-action: pan-x pan-y !important;
    pointer-events: auto !important;
    cursor: grab !important;
    scrollbar-width: thin !important;
    width: 100% !important;
    max-width: 100vw !important;
    /* Ensure horizontal scrollbar is visible */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent !important;
  }

  /* Ensure horizontal scrollbar is visible on mobile */
  .pricing .centered-grid::-webkit-scrollbar,
  .pricing-section .centered-grid::-webkit-scrollbar,
  #pricing .centered-grid::-webkit-scrollbar {
    height: 8px !important;
  }

  .pricing .centered-grid::-webkit-scrollbar-track,
  .pricing-section .centered-grid::-webkit-scrollbar-track,
  #pricing .centered-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 4px !important;
  }

  .pricing .centered-grid::-webkit-scrollbar-thumb,
  .pricing-section .centered-grid::-webkit-scrollbar-thumb,
  #pricing .centered-grid::-webkit-scrollbar-thumb {
    background: rgba(32, 198, 183, 0.6) !important;
    border-radius: 4px !important;
  }

  .pricing .centered-grid::-webkit-scrollbar-thumb:hover,
  .pricing-section .centered-grid::-webkit-scrollbar-thumb:hover,
  #pricing .centered-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(32, 198, 183, 0.8) !important;
  }

  .pricing .centered-grid:active,
  .pricing-section .centered-grid:active,
  .gui-toolkit-section .centered-grid:active,
  section.pricing .centered-grid:active {
    cursor: grabbing !important;
  }

  /* Use maximum specificity for pricing cards */
  section#pricing.pricing-section.scroll-section .centered-grid .pricing-card,
  section#pricing .centered-grid .pricing-card,
  .pricing-section .centered-grid .pricing-card,
  .gui-toolkit-section .centered-grid .pricing-card,
  section.pricing .centered-grid .pricing-card,
  section[class*="pricing"] .centered-grid .pricing-card,
  #pricing .centered-grid .pricing-card,
  .pricing .centered-grid .pricing-card {
    flex: 0 0 85vw !important; /* Slightly larger cards for better visibility */
    min-width: 85vw !important;
    max-width: 85vw !important;
    width: 85vw !important;
    scroll-snap-align: start !important; /* Changed from center to start for better scrolling */
    margin: 0 !important;
    pointer-events: auto !important;
    touch-action: pan-x pan-y !important;
    padding: 1.2rem !important; /* Slightly more padding for readability */
    /* Ensure cards don't shrink */
    flex-shrink: 0 !important;
  }

  .pricing .centered-grid .pricing-card.featured,
  .pricing-section .centered-grid .pricing-card.featured,
  .gui-toolkit-section .centered-grid .pricing-card.featured,
  section.pricing .centered-grid .pricing-card.featured,
  #pricing .centered-grid .pricing-card.featured {
    flex: 0 0 83vw !important; /* Slightly larger featured card, but still smaller */
    min-width: 83vw !important;
    max-width: 83vw !important;
    width: 83vw !important;
  }

  /* FEATURES sections: centered-grid stacks vertically */
  .features .centered-grid,
  section.features .centered-grid,
  section[class*="features"] .centered-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 1rem 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    cursor: default !important;
  }

  .features .centered-grid .feature-card,
  section.features .centered-grid .feature-card,
  section[class*="features"] .centered-grid .feature-card {
    width: 100% !important;
    max-width: 95vw !important;
    margin: 0 auto !important;
    padding: 1.5rem !important;
  }

  /* Force consistent container widths */
  .container, .container-fluid, .main-content, .content-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* But remove padding for scroll containers to allow full-width scrolling */
  .pricing-section .container,
  .music-pack-carousel .container,
  .gui-toolkit-section .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Pricing view containers should be full width */
  .pricing-view, #plans-view, #comparison-view {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Pricing section containers */
  .pricing-section, .pricing-container-with-toggle {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    display: block !important;
  }

  /* Add visual hint for horizontal scrolling on mobile */
  .pricing-section::after,
  #pricing::after {
    content: "← Swipe to see all plans →" !important;
    display: block !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.8rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
    opacity: 0.8 !important;
  }

  /* Hide the pricing toggle on mobile to simplify interface */
  .pricing-toggle-fixed, .pricing-subnav-vertical {
    display: none !important;
  }

  /* Comparison table should stack on mobile */
  .comparison-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
  }

  /* App Showcase Section & Template Carousel - Mobile Fix for Image Display */
  .app-showcase-section,
  .template-carousel-section {
    padding: 3rem 0 !important;
    overflow: visible !important;
  }

  .app-carousel-container,
  .template-carousel-container,
  .admin-carousel-container {
    overflow: visible !important;
    margin: 2rem 0 !important;
    padding: 0 !important;
    cursor: grab !important;
    touch-action: pan-y !important;
  }

  .app-carousel-container:active,
  .template-carousel-container:active,
  .admin-carousel-container:active {
    cursor: grabbing !important;
  }

  .app-carousel-track,
  .template-carousel-track,
  .admin-carousel-track {
    display: flex !important;
    gap: 1rem !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1rem 0 !important;
    touch-action: pan-x pan-y !important;
    will-change: transform !important;
  }

  .app-showcase-card,
  .template-carousel-card,
  .admin-carousel-card {
    flex: 0 0 280px !important;
    min-width: 280px !important;
    scroll-snap-align: start !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  .app-showcase-card:hover,
  .template-carousel-card:hover,
  .admin-carousel-card:hover {
    transform: none !important;
  }

  .app-preview,
  .template-preview,
  .admin-preview {
    position: relative !important;
    width: 100% !important;
    height: 200px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .app-preview img,
  .template-preview img,
  .admin-preview img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .app-info,
  .template-content,
  .admin-content {
    padding: 1rem !important;
  }

  .app-info h3,
  .template-content h3,
  .admin-content h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
    color: var(--teal) !important;
  }

  .app-info p,
  .template-content p,
  .admin-content p,
  .app-description,
  .template-description,
  .admin-description {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  .app-badge,
  .template-badge,
  .admin-badge {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    background: linear-gradient(135deg, var(--gold), var(--teal)) !important;
    color: white !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 4px !important;
    font-size: 0.7rem !important;
    font-weight: bold !important;
    z-index: 10 !important;
  }

  /* MOBILE FIX: Admin Pro hero section spacing to prevent button overlap */
  .hero-content {
    padding: 1.5rem 1rem 5rem 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .hero-section {
    padding-bottom: 4rem !important;
  }

  /* MOBILE FIX: Admin Pro title - moderate size */
  .hero-title {
    font-size: 2.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  /* MOBILE FIX: Admin Pro subtitle - minimal spacing around animated text */
  .hero-subtitle {
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  /* MOBILE FIX: Admin Pro buttons - proper spacing to prevent overlap */
  .hero-cta {
    margin: 1rem 0 1.5rem 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: center !important;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-learn-more {
    margin: 0 !important;
  }

  .deploy-cta-box {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    padding: 1.5rem 1rem !important;
  }

  /* MOBILE FIX: Admin Pro scroll indicator - absolute positioning fix */
  .scroll-indicator {
    position: relative !important;
    margin-top: 2rem !important;
    padding-top: 0 !important;
  }

  /* Bravura Page Hero Section - Fix visibility and flex boxes */
  .hero-section {
    min-height: auto !important;
    height: auto !important;
    padding: 2rem 0 !important;
    margin-top: 0 !important;
    scroll-margin-top: 0 !important;
    scroll-snap-align: start !important;
  }

  /* Ensure hero is always visible at top */
  .hero-section:first-of-type {
    padding-top: 2rem !important;
    margin-top: 0 !important;
  }

  .hero-section .hero-text {
    padding: 0 1rem !important;
    max-width: 100% !important;
  }

  .hero-section .hero-text h1 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    margin-bottom: 1rem !important;
  }

  /* MOBILE FIX: Bravura page hero title - optimal mobile size */
  .hero-section .hero-text h1.hero-gradient-text {
    font-size: 2.75rem !important;
  }

  .hero-section .hero-text p.lead {
    font-size: clamp(0.9rem, 4vw, 1.2rem) !important;
    margin-bottom: 1rem !important;
  }

  /* Fix bravura page flex boxes with emojis */
  .hero-section .hero-text div[style*="display: flex"][style*="flex-wrap: wrap"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    padding: 0.75rem !important;
    margin: 1rem 0 !important;
  }

  .hero-section .hero-text div[style*="display: flex"][style*="flex-wrap: wrap"] > div {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    padding: 0.25rem !important;
  }

  /* Bravura page buttons */
  .hero-section .hero-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 0 1rem !important;
    align-items: center !important;
  }

  .hero-section .hero-buttons a {
    width: 100% !important;
    max-width: 300px !important;
    text-align: center !important;
  }

  /* Micro benefits and sale timer */
  .hero-section .micro-benefits,
  .hero-section .sale-timer {
    font-size: 0.8rem !important;
    padding: 0 1rem !important;
    text-align: center !important;
  }

  /* Ensure all sections on bravura page allow normal scrolling */
  .hero-section.scroll-section,
  .template-carousel-section.scroll-section,
  .components-section.scroll-section,
  .showcase-content-area {
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
  }

  /* Form elements */
  input, select, textarea {
    font-size: 16px; /* prevent zoom on iOS */
    min-height: 44px;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Button groups */
  .button-group, .btn-group {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  /* Force buttons to be full width on mobile */
  .btn, .button, .purchase-button, .pricing-button,
  .cta-button, .action-button {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0.5rem !important;
  }

  /* Modal and popup adjustments */
  .modal, .popup {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 0 auto;
  }

  /* Table responsiveness */
  table {
    width: 100%;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
  }

  /* Footer adjustments */
  footer {
    padding: 2rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  /* Cart and checkout specific */
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-controls {
    width: 100%;
    justify-content: space-between;
    margin-top: 12px;
  }

  /* Product grid adjustments */
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Feature sections */
  .feature-section {
    padding: 2rem 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  /* Testimonials */
  .testimonial-grid {
    grid-template-columns: 1fr !important;
  }

  /* FAQ sections */
  .faq-item {
    margin-bottom: 1rem;
  }

  /* Stats and metrics */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  /* Call-to-action sections */
  .cta-section {
    padding: 2rem 1rem;
    text-align: center;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  /* Navigation improvements */
  .mobile-menu-toggle {
    display: block !important;
  }

  /* Accessibility improvements */
  .skip-link {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
  }

  /* Performance optimizations */
  /* Note: lazy loading should be implemented via HTML loading="lazy" attribute on img/iframe elements */

  /* Animation adjustments for mobile */
  .animate-on-scroll {
    animation-duration: 0.3s;
  }

  /* 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;
    }
  }

  /* === FINAL COMPREHENSIVE MOBILE SAFETY NETS === */

  /* NUCLEAR OPTION: Override ALL conflicting inline styles for intro section */
  section#intro.intro-section.scroll-section[style*="margin-top"],
  section.intro-section.scroll-section[style*="margin-top"],
  .intro-section[style*="margin-top"] {
    margin-top: calc(-1 * (var(--header-h) + var(--banner-h))) !important;
  }

  section#intro.intro-section.scroll-section[style*="min-height"],
  section.intro-section.scroll-section[style*="min-height"],
  .intro-section[style*="min-height"] {
    min-height: calc(100vh - var(--header-h) - var(--banner-h)) !important;
  }

  /* Override the specific -130px and -150px values from bravura.html */
  section#intro.intro-section.scroll-section,
  section.intro-section.scroll-section,
  .intro-section {
    margin-top: calc(-1 * (var(--header-h) + var(--banner-h))) !important;
  }

  [data-component="coming-soon-banner"] + section#intro.intro-section.scroll-section,
  [data-component="coming-soon-banner"] + section.intro-section.scroll-section,
  [data-component="coming-soon-banner"] + .intro-section {
    margin-top: calc(-1 * (var(--header-h) + var(--banner-h))) !important;
  }

  section#intro.intro-section.scroll-section:first-of-type,
  section.intro-section.scroll-section:first-of-type,
  .intro-section:first-of-type {
    margin-top: calc(-1 * (var(--header-h) + var(--banner-h))) !important;
  }

  /* NUCLEAR OPTION: Override ALL conflicting inline styles for pricing grid */
  section#pricing.pricing-section.scroll-section .centered-grid[style*="grid-template-columns"],
  section#pricing .centered-grid[style*="grid-template-columns"],
  .pricing-section .centered-grid[style*="grid-template-columns"],
  #pricing .centered-grid[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    grid-template-columns: none !important;
  }

  /* Prevent horizontal overflow on content - but not header or scroll containers */
  main *:not(.music-scroll-row):not(.music-scroll-container):not(.pricing-grid):not(.centered-grid):not([class*="scroll"]):not([class*="carousel"]),
  section *:not(.music-scroll-row):not(.music-scroll-container):not(.pricing-grid):not(.centered-grid):not([class*="scroll"]):not([class*="carousel"]) {
    max-width: 100vw !important;
  }

  /* Ensure scroll container parents don't block scrolling */
  .pricing-section, .gui-toolkit-section, .music-pack-carousel {
    overflow: visible !important;
    width: 100% !important;
  }

  /* Force the main container to not clip horizontal scrollers */
  .pricing-section .container,
  .gui-toolkit-section .container,
  section[class*="pricing"] .container {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Force images, videos, and media to be responsive */
  img, video, svg, canvas, iframe, embed, object {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* Tables - force responsive behavior */
  table {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    display: block !important;
    white-space: nowrap !important;
  }

  /* REMOVED: Overly aggressive width/position rules that break header */
  /* These rules were forcing ALL elements to be full-width and breaking layout */

  /* Force text elements to wrap properly */
  h1, h2, h3, h4, h5, h6, p, span, div, a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    white-space: normal !important;
  }

  /* Force any large font sizes to be smaller on mobile */
  h1 { font-size: clamp(1.6rem, 7vw, 2.5rem) !important; }
  h2 { font-size: clamp(1.3rem, 6vw, 2rem) !important; }
  h3 { font-size: clamp(1.1rem, 5vw, 1.5rem) !important; }
  h4 { font-size: clamp(1rem, 4vw, 1.25rem) !important; }

  /* Ensure adequate touch targets - but don't break header */
  a:not(header a):not(.logo),
  button,
  input,
  select,
  textarea,
  [onclick],
  [role="button"] {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 12px !important;
  }

  /* Header links need smaller padding */
  header a, .header a, nav a {
    padding: 0.5rem 1rem !important;
    min-height: auto !important;
    min-width: auto !important;
  }

  /* Fix card layouts - but NOT for horizontal scrolling cards */
  .card:not(.centered-grid .pricing-card):not(.music-scroll-row .pricing-card),
  .feature-card,
  .product-card {
    width: 100% !important;
    max-width: 95vw !important; /* Wider cards for better mobile use */
    margin: 1rem auto !important;
    padding: 1rem !important;
  }

  /* Stack pricing cards ONLY when not in horizontal scroll containers */
  .pricing-grid:not(.centered-grid) .pricing-card {
    width: 100% !important;
    max-width: 95vw !important; /* Wider cards for better mobile use */
    margin: 1rem auto !important;
  }

  /* ===== GUI TOOLKIT PRICING PAGE ONLY FIXES ===== */
  /* Target only pricing page by using #pricing section or .pricing-section context */

  /* Fix hero button overlap - ONLY on pricing page with #pricing section */
  /* Override inline styles with maximum specificity */
  body:has(#pricing) .hero-buttons[style],
  body:has(#pricing) .hero-section .hero-buttons[style],
  body:has(#pricing) #hero .hero-buttons[style],
  body:has(#pricing) .hero-buttons,
  body:has(#pricing) .hero-section .hero-buttons,
  body:has(#pricing) #hero .hero-buttons {
    display: flex !important;
    flex-direction: column !important; /* Stack buttons vertically to prevent overlap */
    flex-wrap: nowrap !important; /* Override inline flex-wrap */
    align-items: center !important;
    justify-content: center !important;
    margin-top: 2rem !important;
    margin-bottom: 1.5rem !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Ensure buttons stack and take full width - override inline styles */
  body:has(#pricing) .hero-buttons a[style],
  body:has(#pricing) .hero-buttons .btn-purchase[style],
  body:has(#pricing) .hero-buttons .btn-secondary[style],
  body:has(#pricing) .hero-buttons a,
  body:has(#pricing) .hero-buttons .btn-purchase,
  body:has(#pricing) .hero-buttons .btn-secondary,
  body:has(#pricing) #hero .hero-buttons a {
    width: 100% !important;
    min-width: auto !important; /* Override inline min-width */
    max-width: 320px !important;
    margin: 0 auto !important;
    display: block !important;
    text-align: center !important;
    padding: 0.85rem 1.5rem !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
  }

  body:has(#pricing) .micro-benefits,
  section#hero:has(~ #pricing) .micro-benefits {
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  body:has(#pricing) .sale-timer,
  section#hero:has(~ #pricing) .sale-timer {
    margin-top: 0.5rem !important;
    margin-bottom: 2rem !important; /* More space before next section */
  }

  /* Fix pricing section header visibility - ensure it's in view */
  body:has(#pricing) #pricing,
  body:has(#pricing) .pricing-section {
    padding-top: 4rem !important; /* More top padding to ensure header is visible */
    margin-top: 2rem !important;
  }

  body:has(#pricing) #pricing .section-header,
  body:has(#pricing) .pricing-section .section-header {
    margin-bottom: 2rem !important;
    padding-top: 1rem !important; /* Additional padding for visibility */
  }

  body:has(#pricing) #pricing .section-header h2,
  body:has(#pricing) .pricing-section .section-header h2 {
    margin-bottom: 1rem !important;
    font-size: 1.8rem !important; /* Slightly smaller for mobile */
  }

  body:has(#pricing) #pricing .section-header p,
  body:has(#pricing) .pricing-section .section-header p {
    margin-bottom: 1.5rem !important;
    font-size: 0.95rem !important;
  }

  /* Fix footer/countdown spacing - ONLY on pricing page */
  body:has(#pricing) #sticky-buy {
    margin-bottom: 1rem !important;
    padding: 1rem !important;
  }

  body:has(#pricing) footer#footer,
  body:has(#pricing) footer.scroll-section {
    padding-top: 3rem !important;
    margin-top: 2rem !important;
  }

  /* Make pricing card text smaller - ONLY in pricing section */
  #pricing .pricing-card .pricing-header,
  .pricing-section .pricing-card .pricing-header {
    font-size: 0.95rem !important;
  }

  #pricing .pricing-card .price-sale,
  .pricing-section .pricing-card .price-sale {
    font-size: 2rem !important; /* Reduced from 2.5rem */
  }

  #pricing .pricing-card .price-original,
  .pricing-section .pricing-card .price-original {
    font-size: 1rem !important; /* Reduced from 1.2rem */
  }

  #pricing .pricing-card .pricing-features li,
  .pricing-section .pricing-card .pricing-features li {
    font-size: 0.8rem !important; /* Reduced from 0.85rem */
    padding: 0.35rem 0 !important;
  }

  #pricing .pricing-card .card-header h3,
  .pricing-section .pricing-card .card-header h3 {
    font-size: 1.2rem !important; /* Reduced from 1.4rem */
  }

  #pricing .pricing-card .card-header p,
  .pricing-section .pricing-card .card-header p {
    font-size: 0.85rem !important;
  }

  #pricing .pricing-card .btn-purchase,
  .pricing-section .pricing-card .btn-purchase {
    font-size: 0.9rem !important;
    padding: 0.7rem 1.5rem !important;
  }

  #pricing .pricing-card .meta-chips span,
  .pricing-section .pricing-card .meta-chips span {
    font-size: 0.65rem !important;
    padding: 0.25rem 0.5rem !important;
  }
}

/* ===== TABLET HOME PAGE HERO ENHANCEMENTS (640px - 1024px) ===== */
@media (min-width: 641px) and (max-width: 1024px) {
  /* Center logo - slightly larger on tablet */
  .hero-container .center-logo {
    width: 145px !important;
    height: 145px !important;
  }

  /* Logo outline adjustments for larger center logo */
  .hero-container .logo-outline-left,
  .hero-container .logo-outline-right {
    width: 6px !important;
    height: 190px !important;
  }

  .hero-container .logo-outline-left {
    left: calc(50% - 96px) !important;
  }

  .hero-container .logo-outline-right {
    right: calc(50% - 96px) !important;
  }

  .hero-container .logo-outline-left::before,
  .hero-container .logo-outline-left::after {
    width: 192px !important;
    height: 6px !important;
  }

  /* Diagonal line adjustments */
  .hero-container .diagonal-line::before {
    width: calc(50% - 98px) !important;
  }

  .hero-container .diagonal-line::after {
    width: calc(50% - 98px) !important;
  }

  /* Bravura and Admin Pro text */
  .hero-container .split-half h2 {
    font-size: 3.1rem !important;
  }

  /* Icon size */
  .hero-container .split-half .logo-icon {
    font-size: 4rem !important;
  }
}

/* Landscape orientation specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  /* Reduce header height in landscape to save space */
  :root {
    --header-h: 50px !important;
    --banner-h: 35px !important;
  }

  /* Adjust header elements for landscape */
  header, .animated-header {
    height: var(--header-h) !important;
    min-height: var(--header-h) !important;
    padding-block: 5px !important;
  }

  /* Adjust body padding for landscape */
  body {
    padding-top: calc(var(--header-h) + var(--banner-h)) !important;
  }

  /* Adjust banner positioning */
  .coming-soon-banner {
    top: var(--header-h) !important;
    height: var(--banner-h) !important;
    font-size: 0.7rem !important;
    padding: 6px 10px !important;
  }

  /* Adjust intro section for landscape */
  .intro-section {
    margin-top: calc(-1 * (var(--header-h) + var(--banner-h))) !important;
    min-height: calc(100vh - var(--header-h) - var(--banner-h)) !important;
    padding-top: calc(var(--header-h) + var(--banner-h)) !important;
  }

  /* Make header text smaller in landscape */
  .logo {
    font-size: 0.9rem !important;
  }

  .logo i {
    font-size: 1rem !important;
  }

  /* Adjust header actions for landscape */
  .header-actions {
    gap: 6px !important;
  }

  #auth-btn, .btn-outline-light.btn-sm, #auth-section .btn {
    font-size: 0.7rem !important;
    padding: 6px 8px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 70px !important;
  }

  /* Adjust hero sections for landscape */
  .hero, .hero-section {
    min-height: 60vh;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  /* Modal adjustments for landscape */
  .modal {
    max-height: 80vh;
    overflow-y: auto;
  }

  /* Ensure intro content is properly centered in landscape */
  .intro-content {
    transform: translateY(2vh) !important;
  }
}

/* Portrait orientation specific adjustments */
@media (max-width: 768px) and (orientation: portrait) {
  /* Ensure intro section is fully visible in portrait */
  section#intro.intro-section.scroll-section,
  section.intro-section.scroll-section,
  .intro-section {
    margin-top: calc(-1 * (var(--header-h) + var(--banner-h))) !important;
    min-height: calc(100vh - var(--header-h) - var(--banner-h)) !important;
    padding-top: calc(var(--header-h) + var(--banner-h) + 20px) !important; /* Extra padding for portrait */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Ensure intro content is properly positioned in portrait */
  .intro-content {
    transform: translateY(0) !important; /* No vertical offset in portrait */
    text-align: center !important;
  }

  /* Make sure the intro text is visible with desktop opacity (60%) */
  .intro-company {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    margin-bottom: 0.5rem !important;
    color: rgba(255, 255, 255, 0.6) !important; /* Match desktop 60% opacity */
    opacity: 1 !important; /* Keep animation opacity */
  }

  .intro-presents {
    font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
    color: var(--teal) !important;
    opacity: 1 !important; /* Keep animation opacity */
  }

  .intro-content {
    opacity: 1 !important; /* Keep animation opacity */
  }

  /* Override any conflicting styles for intro section in portrait */
  section#intro.intro-section.scroll-section[style*="margin-top"],
  section.intro-section.scroll-section[style*="margin-top"],
  .intro-section[style*="margin-top"] {
    margin-top: calc(-1 * (var(--header-h) + var(--banner-h))) !important;
  }
}

/* JavaScript-powered mobile fixes - Applied after page load */
@media (max-width: 768px) {
  /* Force intro section positioning with JavaScript override */
  .intro-section {
    margin-top: calc(-1 * (var(--header-h) + var(--banner-h))) !important;
    min-height: calc(100vh - var(--header-h) - var(--banner-h)) !important;
    padding-top: calc(var(--header-h) + var(--banner-h)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Force pricing grid to horizontal scroll */
  section#pricing .centered-grid,
  .pricing-section .centered-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    grid-template-columns: none !important;
  }

  /* Force pricing cards to proper size */
  section#pricing .centered-grid .pricing-card,
  .pricing-section .centered-grid .pricing-card {
    flex: 0 0 85vw !important;
    min-width: 85vw !important;
    max-width: 85vw !important;
    scroll-snap-align: start !important;
  }

  /* Ensure pricing grid starts at the beginning (Standard card) */
  section#pricing .centered-grid,
  .pricing-section .centered-grid {
    scroll-behavior: smooth !important;
    scroll-snap-type: x mandatory !important;
  }

  /* Ensure first card (Standard) is visible and positioned correctly */
  section#pricing .centered-grid .pricing-card:first-child,
  .pricing-section .centered-grid .pricing-card:first-child {
    scroll-snap-align: start !important;
    margin-left: 0 !important;
  }

  /* Force the pricing grid to start at the beginning */
  section#pricing .centered-grid,
  .pricing-section .centered-grid {
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }
}

/* ===== INDEX.HTML HERO SECTION MOBILE FIXES ===== */
/* Force mobile fixes to load last and override everything */
@media (max-width: 768px) {
  /* Ensure body and main don't interfere with content */
  body.index-page {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative !important;
    height: auto !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.index-page main#page {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    height: auto !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Remove any flex centering from main container */
    display: block !important;
    flex-direction: unset !important;
    justify-content: unset !important;
    align-items: unset !important;
  }

  /* Fix hero section layout for index.html - SIMPLE APPROACH */
  body.index-page #hero.hero.scroll-section,
  body.index-page main#page section#hero.hero.scroll-section,
  #hero.hero.scroll-section,
  .hero.scroll-section {
    min-height: auto !important;
    padding: 3rem 0 2rem 0 !important;
    margin: 0 auto !important;
    height: auto !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    /* CRITICAL: Remove flexbox vertical centering that cuts off content */
    display: block !important;
    flex-direction: unset !important;
    justify-content: unset !important;
    box-sizing: border-box !important;
  }

  /* Hero content - MAXIMUM SPECIFICITY */
  body.index-page #hero.hero.scroll-section .hero-content,
  #hero.hero.scroll-section .hero-content,
  .hero.scroll-section .hero-content,
  .hero-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
    text-align: center !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0 !important;
    right: 0 !important;
    position: relative !important;
  }

  /* Hero text - MAXIMUM SPECIFICITY */
  body.index-page #hero.hero.scroll-section .hero-text,
  #hero.hero.scroll-section .hero-text,
  .hero.scroll-section .hero-text,
  .hero-text {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    transform: translateX(0) !important;
  }

  /* Fix hero title sizing and prevent overflow */
  body.index-page #hero.hero.scroll-section .hero-text h1,
  #hero.hero.scroll-section .hero-text h1,
  .hero.scroll-section .hero-text h1,
  .hero-text h1 {
    font-size: clamp(1.3rem, 5.5vw, 1.8rem) !important;
    line-height: 1.2 !important;
    margin: 0 auto 1rem auto !important;
    padding: 0 1.5rem !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: visible !important;
    text-align: center !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
    transform: translateX(0) !important;
  }

  /* Fix hero description */
  body.index-page #hero.hero.scroll-section .hero-text p,
  #hero.hero.scroll-section .hero-text p,
  .hero.scroll-section .hero-text p,
  .hero-text p {
    font-size: clamp(0.85rem, 3.8vw, 1rem) !important;
    margin: 0 auto 1.5rem auto !important;
    line-height: 1.4 !important;
    padding: 0 1.5rem !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: visible !important;
    text-align: center !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
    transform: translateX(0) !important;
  }

  /* Fix hero stats grid for mobile - STACK VERTICALLY with proper sizing */
  body.index-page #hero.hero.scroll-section .hero-text div[style*="display: grid"],
  body.index-page #hero.hero.scroll-section .hero-text div[style*="grid-template-columns"],
  body.index-page #hero .hero-text div[style*="grid-template-columns: repeat(4, 1fr)"],
  #hero.hero.scroll-section .hero-text div[style*="display: grid"],
  .hero-text div[style*="display: grid"],
  .hero-text div[style*="grid-template-columns: repeat(4, 1fr)"],
  .hero-text div[style*="max-width: 800px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin: 1.5rem auto !important;
    max-width: calc(100vw - 2rem) !important;
    width: 100% !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: translateX(0) !important;
    grid-template-columns: none !important;
  }

  .hero-text div[style*="display: grid"] > div {
    padding: 0.875rem 0.75rem !important;
    min-height: auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    max-width: 100% !important;
    width: 100% !important;
    transform: translateX(0) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.35rem !important;
    text-align: center !important;
  }

  /* Fix the stat values - make them responsive */
  .hero-text div[style*="display: grid"] > div > div:first-child,
  .hero-text div[style*="display: grid"] > div > div[style*="font-size: 2.2rem"] {
    font-size: clamp(1.6rem, 5.5vw, 2rem) !important;
    line-height: 1.1 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: center !important;
    margin: 0 !important;
    font-weight: 900 !important;
  }

  /* Fix the stat labels */
  .hero-text div[style*="display: grid"] > div > div:last-child,
  .hero-text div[style*="display: grid"] > div > div[style*="font-size: 0.75rem"],
  .hero-text div[style*="display: grid"] > div > div[style*="font-size: 0.8rem"] {
    font-size: clamp(0.7rem, 2.8vw, 0.8rem) !important;
    line-height: 1.3 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    text-align: center !important;
    margin: 0 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    opacity: 0.9 !important;
    letter-spacing: 0.3px !important;
  }

  /* Hero buttons styling moved to @media queries - desktop vs mobile */

  /* Hide "See All Products" button on mobile - it has display:none inline but might be overridden */
  body.index-page #hero.hero.scroll-section .hero-buttons a[href="#features"],
  #hero.hero.scroll-section .hero-buttons a[href="#features"],
  .hero.scroll-section .hero-buttons a[href="#features"],
  .hero-buttons a[href="#features"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  body.index-page #hero.hero.scroll-section .hero-buttons a,
  #hero.hero.scroll-section .hero-buttons a,
  .hero.scroll-section .hero-buttons a,
  .hero-buttons a {
    width: 100% !important;
    max-width: 280px !important;
    text-align: center !important;
    padding: 0.85rem 1.5rem !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
  }

  /* Hide hero image on mobile */
  .hero-image {
    display: none !important;
  }

  /* Ensure container doesn't overflow - MAXIMUM SPECIFICITY */
  body.index-page #hero.hero.scroll-section .container,
  #hero.hero.scroll-section .container,
  .hero.scroll-section .container,
  .hero .container {
    max-width: 100vw !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    overflow: visible !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  /* Fix any remaining overflow issues */
  .hero * {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  /* Ensure hero section can expand to show all content */
  .hero {
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Fix main page container */
  main#page {
    overflow: visible !important;
    height: auto !important;
  }

  /* Fix body overflow */
  body.index-page {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  /* NUCLEAR OPTION: Override ALL inline styles for hero section */
  .hero-text div[style*="display: grid"][style*="grid-template-columns: repeat(4, 1fr)"],
  .hero-text div[style*="max-width: 800px"][style*="display: grid"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    margin: 1.5rem 0 !important;
    max-width: 100% !important;
    padding: 0 1rem !important;
  }

  /* Override Bootstrap classes that might interfere */
  .hero .display-3 {
    font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }

  .hero .lead {
    font-size: clamp(0.85rem, 3.5vw, 1rem) !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }

  /* Fix Bootstrap margin classes */
  .hero .mb-4 {
    margin-bottom: 1rem !important;
  }

  .hero .fw-bold {
    font-weight: 700 !important;
  }

  /* Force text wrapping */
  .hero-text h1,
  .hero-text p,
  .hero-text div {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Force all hero content to be centered */
  .hero-scroll-section * {
    text-align: center !important;
  }

  /* Override any Bootstrap or other CSS that might be causing left alignment */
  .hero h1,
  .hero p,
  .hero div {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* JavaScript injection for mobile fixes */
/* This will be injected into the page to override conflicting styles */

/* FINAL OVERRIDE - Inject CSS directly into page */
@media (max-width: 768px) {
  /* Force inject styles with maximum specificity */
  body.index-page #hero.hero.scroll-section .hero-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
    text-align: center !important;
    grid-template-columns: none !important;
  }

  body.index-page #hero.hero.scroll-section .hero-text {
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.index-page #hero.hero.scroll-section .hero-text h1 {
    font-size: clamp(1.4rem, 6vw, 2rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
    padding: 0 1rem !important;
    max-width: 100% !important;
    overflow: visible !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
  }

  body.index-page #hero.hero.scroll-section .hero-text p {
    font-size: clamp(0.9rem, 4vw, 1.1rem) !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.4 !important;
    padding: 0 1rem !important;
    max-width: 100% !important;
    overflow: visible !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
  }

  /* Override the inline grid styles */
  body.index-page #hero.hero.scroll-section .hero-text div[style*="display: grid"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    margin: 1.5rem 0 !important;
    max-width: 100% !important;
    padding: 0 1rem !important;
  }

  body.index-page #hero.hero.scroll-section .hero-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 1rem !important;
  }

  body.index-page #hero.hero.scroll-section .hero-buttons a {
    width: 100% !important;
    max-width: 300px !important;
    text-align: center !important;
    padding: 0.85rem 1.5rem !important;
    font-size: 1rem !important;
  }

  body.index-page #hero.hero.scroll-section .hero-image {
    display: none !important;
  }

  body.index-page #hero.hero.scroll-section .container {
    max-width: 100% !important;
    padding: 0 1rem !important;
    overflow: hidden !important;
  }
}

/* Very small screens (≤320px) */
@media (max-width: 320px) {
  .music-scroll-row .pricing-card {
    flex: 0 0 92vw !important;
    min-width: 92vw !important;
    max-width: 92vw !important;
  }

  .container, .section-inner, .wrap {
    padding-inline: 12px;
  }

  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  /* Even smaller Sign In button for very small screens */
  #auth-btn, .btn-outline-light.btn-sm, #auth-section .btn{
    font-size: 0.7rem !important;
    padding: 6px 8px !important;
    max-width: 60px !important;
  }

  /* Make banner text even smaller */
  .coming-soon-banner {
    font-size: 0.7rem !important;
    padding: 6px 8px !important;
  }
}

/* High DPI screen adjustments */
@media (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
  .hero-image,
  .product-image {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ===== MOBILE FIXES ONLY (DESKTOP UNCHANGED) ===== */

/* ===== Mobile: global header + banner sizing ===== */
@media (max-width: 768px){
  /* Variables already defined above in main mobile section - no need to redefine */

  /* Header must not clip the banner */
  header, .animated-header{
    overflow: visible !important;
    min-height: var(--header-h) !important;
    height: var(--header-h) !important;
  }

  /* Banner already styled above - no duplicate needed */

  /* Page content starts below header + banner on phones */
  body{
    padding-top: calc(var(--header-h) + var(--banner-h)) !important;
  }

  /* Extra safety for the index page specifically */
  .index-page body, body.index-page{
    padding-top: calc(var(--header-h) + var(--banner-h)) !important;
  }

  /* ===== Right-size the Sign In button on mobile ===== */
  .header-actions{
    gap: 8px !important;
  }

  /* Target the actual sign-in button classes */
  #auth-btn, .btn-outline-light.btn-sm, #auth-section .btn{
    font-size: 0.75rem !important;
    padding: 8px 10px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 80px !important;
  }

  /* ===== Give "Wigley Studios" more space in the header ===== */
  .animated-header nav{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  /* Logo/brand - FULL visibility on mobile */
  .animated-header .logo{
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    font-size: 1rem !important;
    max-width: 100% !important; /* Full logo visible */
    overflow: visible !important; /* Don't clip */
    text-overflow: clip !important; /* No ellipsis */
    white-space: nowrap !important;
    opacity: 1 !important;
    visibility: visible !important;
    flex-shrink: 0 !important;
  }

  .animated-header .logo i {
    display: inline-block !important;
    opacity: 1 !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
  }

  .animated-header .logo-text {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Actions keep their size but don't expand - Override component gap */
  .animated-header .header-actions{
    flex: 0 0 auto !important;
    gap: 8px !important; /* Override the 0.5rem from component */
  }

  /* Nav links should be hidden on mobile anyway */
  .nav-links{
    display: none !important;
  }

  /* FIX PRICING TOGGLE BUTTONS - STACK VERTICALLY ON ALL MOBILE */
  .pricing-type-toggle {
    font-size: 0.85rem !important;
    padding: 0.75rem 1rem !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.2 !important;
    width: 100% !important;
  }

  /* Container for toggle buttons - stack vertically */
  div[style*="display: inline-flex"][style*="border-radius: 30px"] {
    flex-direction: column !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    width: calc(100% - 2rem) !important;
    max-width: 350px !important;
    margin: 0 auto !important;
  }

  /* ========================================
     SIMPLE HOME PAGE HERO CENTERING
     ======================================== */
  /* MOBILE HERO CENTERING - HIGHEST SPECIFICITY */
  body.index-page #hero .hero-content,
  body.index-page #hero.hero .hero-content,
  body.index-page #hero.hero.scroll-section .hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    grid-template-columns: none !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
  }

  /* FORCE hero-image to not take up any space */
  body.index-page #hero .hero-image,
  body.index-page #hero.hero .hero-image,
  body.index-page #hero.hero.scroll-section .hero-image {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    visibility: hidden !important;
    grid-column: unset !important;
  }

  body.index-page #hero .hero-text,
  body.index-page #hero.hero .hero-text,
  body.index-page #hero.hero.scroll-section .hero-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    transform: none !important;
  }

  body.index-page #hero .hero-text h1,
  body.index-page #hero .hero-text h2,
  body.index-page #hero .hero-text p {
    text-align: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.index-page #hero .hero-text > div[style*="grid"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    margin: 1.5rem auto !important;
    width: calc(100% - 2rem) !important;
    max-width: 100% !important;
  }

  body.index-page #hero .hero-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  body.index-page #hero .hero-buttons a {
    width: 100% !important;
    max-width: 300px !important;
    text-align: center !important;
    padding: 0.85rem 1.5rem !important;
    line-height: 1.4 !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    box-sizing: border-box !important;
  }

  /* Hide desktop divider, show mobile divider */
  body.index-page #hero .hero-buttons .desktop-divider {
    display: none !important;
  }

  body.index-page #hero .hero-buttons .mobile-divider {
    display: block !important;
    width: 100% !important;
    max-width: 300px !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.5) !important;
    margin: 0.75rem auto !important;
  }

  /* Fix code panels on Bravura pages to prevent text squishing */
  .code-split {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .code-panel {
    padding: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .code-panel pre {
    overflow-x: auto !important;
    overflow-y: visible !important;
    white-space: pre !important;
    word-wrap: normal !important;
    padding: 0.75rem !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .code-panel code {
    font-size: 0.7rem !important;
    line-height: 1.4 !important;
    white-space: pre !important;
    display: block !important;
  }

  .code-label {
    font-size: 0.85rem !important;
  }

  .code-lines {
    font-size: 0.75rem !important;
  }

  .code-header {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  /* ===== HOME PAGE HERO MOBILE ENHANCEMENTS ===== */
  /* Increase logo and text sizes on mobile home page */

  /* Center logo - make it larger on mobile */
  .hero-container .center-logo {
    width: 120px !important;
    height: 120px !important;
  }

  /* Logo outline adjustments for larger center logo */
  .hero-container .logo-outline-left,
  .hero-container .logo-outline-right {
    width: 5px !important;
    height: 160px !important;
  }

  .hero-container .logo-outline-left {
    left: calc(50% - 83px) !important;
  }

  .hero-container .logo-outline-right {
    right: calc(50% - 83px) !important;
  }

  .hero-container .logo-outline-left::before,
  .hero-container .logo-outline-left::after {
    width: 166px !important;
    height: 5px !important;
  }

  /* Diagonal line adjustments */
  .hero-container .diagonal-line::before {
    width: calc(50% - 85px) !important;
  }

  .hero-container .diagonal-line::after {
    width: calc(50% - 85px) !important;
  }

  /* Bravura and Admin Pro text - slightly larger but not too big */
  .hero-container .split-half h2 {
    font-size: 3rem !important;
  }

  /* Icon size - slightly larger but not too big */
  .hero-container .split-half .logo-icon {
    font-size: 3.4rem !important;
  }

  /* Tagline text */
  .hero-container .split-half .tagline {
    font-size: 1.05rem !important;
  }
}
