/* Mobile Improvements for Gasolina Website */

/* Floating Buttons Positioning */
.whatsapp-float {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    top: auto !important;
    z-index: 999 !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: #25D366 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4) !important;
    transition: all 0.3s ease !important;
}

.whatsapp-float:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6) !important;
}

.whatsapp-float svg {
    width: 32px !important;
    height: 32px !important;
    color: white !important;
    fill: white !important;
}

/* Position accessibility widget on the left bottom */
#userway,
[id*="userway"],
.userway,
.uwy,
[class*="userway"],
[class*="accessibility"],
div[style*="z-index: 2147483647"] {
    left: 20px !important;
    right: auto !important;
    bottom: 20px !important;
    top: auto !important;
}

/* Force accessibility widget positioning */
body > div[style*="position: fixed"][style*="z-index"] {
    left: 20px !important;
    right: auto !important;
    bottom: 20px !important;
    top: auto !important;
}

/* Mobile Menu Button Styling */
#mobile-menu-btn {
    background: rgba(255, 69, 0, 0.2);
    border: 2px solid var(--fire-1);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-menu-btn:hover {
    background: rgba(255, 69, 0, 0.4);
}

#mobile-menu-btn:focus {
    outline: 2px solid var(--fire-3);
    outline-offset: 2px;
}

/* Mobile Menu Styling */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 80vh;
    overflow-y: auto;
}

#mobile-menu a {
    transition: all 0.2s ease-in-out;
}

/* Ensure nav is always visible and on top */
#main-nav {
    background: rgba(11, 11, 16, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Gradient heading text: force the clip-to-text so the gradient shows as the
   letters (not as a solid rectangle). .fire-gradient uses the `background`
   shorthand which resets background-clip, so we enforce it here with !important
   regardless of Tailwind's load order. */
.fire-gradient.bg-clip-text,
.fire-gradient.text-transparent {
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    /* Fix all sections */
    section, main, div {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Fix hero section specifically */
    .hero-video {
        max-width: 100vw !important;
        width: 100vw !important;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
        max-width: 90vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        max-width: 90vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Keep WhatsApp button at bottom on mobile too */
    .whatsapp-float {
        width: 56px !important;
        height: 56px !important;
        bottom: 20px !important;
    }
    
    .whatsapp-float svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Ensure accessibility widget stays at bottom on mobile */
    #userway,
    [id*="userway"],
    .userway,
    .uwy,
    [class*="userway"] {
        bottom: 20px !important;
    }
    
    .glass-card {
        padding: 1.5rem !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    /* Make sure mobile menu button is always visible */
    #mobile-menu-btn {
        display: flex !important;
        z-index: 50;
    }
    
    /* Improve touch targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Adjust font sizes */
    h1 {
        font-size: 2rem !important;
        max-width: 100% !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        max-width: 100% !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
        max-width: 100% !important;
    }
    
    /* Better card layout on mobile */
    .grid {
        gap: 1rem !important;
        max-width: 100% !important;
    }
    
    /* Fix images and videos */
    img, video {
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }
    
    /* Fix swiper */
    .swiper, .swiper-wrapper, .swiper-slide {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

@media (max-width: 430px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    /* Keep WhatsApp button at bottom even on small screens */
    .whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        bottom: 20px !important;
    }
    
    .whatsapp-float svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
}

/* Landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    #mobile-menu {
        max-height: 60vh;
    }
}

/* Ensure proper spacing with floating buttons */
body {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Better scrolling on mobile */
html {
    -webkit-overflow-scrolling: touch;
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Better tap highlighting */
* {
    -webkit-tap-highlight-color: rgba(255, 69, 0, 0.2);
}

/* Box sizing for all elements */
* {
    box-sizing: border-box;
}
