/* =========================================
   FuelDist — styles.css
   ========================================= */

/* TICKER - idéntico al original */
@keyframes scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 4)); }
}

.slider {
    height: 100px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: auto;
}

.slider .slide-track {
    animation: scroll 20s linear infinite;
    display: flex;
    width: calc(250px * 8);
}

.slider .slide {
    height: 100px;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HERO GRADIENT */
.hero-gradient {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.9) 0%, rgba(15, 118, 110, 0.4) 100%);
    z-index: 3;
}

/* HERO SLIDESHOW */
.hero-slide {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

/* Imagen saliente: queda encima de las inactivas mientras desvanece */
.hero-slide.prev {
    opacity: 0;
    z-index: 1;
}

/* Imagen entrante: siempre encima de la saliente */
.hero-slide.active {
    opacity: 1;
    z-index: 2;
}


/* WHATSAPP */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    height: 56px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 0 14px;
    font-size: 28px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: 0.3s;
    text-decoration: none;
}

.whatsapp-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.whatsapp-float:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(37, 211, 102, 0.5);
}

/* PRODUCTOS GRID - se ajusta automáticamente según cantidad de tarjetas */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

/* NOSOTROS ROTATOR */
.nosotros-bloque {
    display: none;
}

.nosotros-bloque.active {
    display: block;
    animation: fadeInBloque 0.6s ease-in-out;
}

@keyframes fadeInBloque {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* FORM FEEDBACK */
.form-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================
   MOBILE FIXES — no depender de Tailwind CDN
   ========================================= */

/* Evitar scroll horizontal en toda la página */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Hero: evitar que el texto se salga del viewport */
#inicio {
    overflow: hidden;
}

#inicio .text-white {
    width: 100%;
    min-width: 0;
}

/* Título hero — escalonado por breakpoints */
@media (max-width: 479px) {
    #inicio h1 {
        font-size: 1.6rem !important;
        line-height: 1.15 !important;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

@media (min-width: 480px) and (max-width: 639px) {
    #inicio h1 {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    #inicio h1 {
        font-size: 2.8rem !important;
        line-height: 1.1 !important;
    }
}

/* Navbar logo: que no desborde en móvil */
@media (max-width: 639px) {
    nav .flex.items-center img {
        max-width: 100px;
        height: auto;
    }
}

/* Botones del hero en móvil pequeño */
@media (max-width: 479px) {
    #inicio .hero-btns {
        flex-direction: column;
        gap: 12px;
    }
    #inicio .hero-btns a {
        text-align: center;
        font-size: 0.85rem;
        padding: 12px 20px;
    }
}

/* WhatsApp flotante: en móvil solo ícono */
@media (max-width: 639px) {
    .whatsapp-label {
        display: none;
    }
    .whatsapp-float {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }
}
