/* ===================================
   Distribuidora San José - Estilos custom
   Complementan Tailwind CSS v4 CDN
   =================================== */

/* Offset para navbar fija */
html {
    scroll-padding-top: 5rem;
}

/* ----------
   ANIMACIONES
   ---------- */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fade-in-up 0.7s ease-out both;
}

.animate-fade-in-down {
    animation: fade-in-down 0.6s ease-out both;
}

.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }

/* ----------
   NAVBAR
   ---------- */
#navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

/* ----------
   SCROLL REVEAL - Service Cards
   ---------- */
.service-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out,
                box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----------
   SECCIONES: reveal general
   ---------- */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----------
   FORMULARIO
   ---------- */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* ----------
   WHATSAPP FLOTANTE
   ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 40;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 32px rgba(37, 211, 102, 0.5);
}

/* ----------
   SELECT: placeholder styling (Firefox)
   ---------- */
@-moz-document url-prefix() {
    select:invalid { color: #94a3b8; }
    select:valid   { color: #1e293b; }
}

/* ----------
   VIDEO HERO
   ---------- */
#hero video {
    z-index: 0;
}

#hero .relative.z-10 {
    z-index: 10;
}

/* Fallback: si el video no carga, el fondo blanco del section actúa */
@supports not (object-fit: cover) {
    #hero video { display: none; }
}

/* ----------
   PRINT
   ---------- */
@media print {
    #navbar,
    .whatsapp-float,
    .cotizar-btn { display: none !important; }
}
