/* ==========================================================
   QHATAI CHEMICALS — SISTEMA DE DISEÑO & ESTILOS A1
   Especializado para tratamiento químico de piscinas en Piura
   ========================================================== */

:root {
    --chem-primary: #0B2545;
    --chem-secondary: #134074;
    --chem-accent: #1BBFCB;
    --chem-accent-hover: #17A9B3;
    --chem-sky: #38BDF8;
    --chem-dark: #071E3D;
    --chem-text-main: #1E293B;
    --chem-text-muted: #64748B;
    --chem-bg-light: #F8FAFC;
    --chem-bg-soft: #F0F7FF;
    --chem-card-border: #E2E8F0;
    --chem-whatsapp: #25D366;
    --chem-whatsapp-hover: #1EBE5D;
    
    /* Accents de Diagnóstico */
    --chem-red-bg: #FEF2F2;
    --chem-red-text: #DC2626;
    --chem-red-border: #FECACA;
    
    --chem-amber-bg: #FFFBEB;
    --chem-amber-text: #D97706;
    --chem-amber-border: #FDE68A;
    
    --chem-purple-bg: #FAF5FF;
    --chem-purple-text: #9333EA;
    --chem-purple-border: #E9D5FF;
    
    --chem-teal-bg: #F0FDFA;
    --chem-teal-text: #0D9488;
    --chem-teal-border: #99F6E4;
}

/* Base resets & layout */
.chemicals-body {
    background-color: #FFFFFF;
    color: var(--chem-text-main);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

.chemicals-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Badges comunes (Eyebrows) */
.chem-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 9999px;
    margin-bottom: 16px;
}

.chem-badge-hero {
    background: rgba(0, 180, 216, 0.15);
    color: #E0F2FE;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.chem-badge-blue {
    background: #E0F2FE;
    color: #0369A1;
    border: 1px solid #BAE6FD;
}

/* Encabezados de sección */
.chem-section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 48px;
}

.chem-section-title {
    font-family: 'Helvetica Neue Thai Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    line-height: 1.2;
    color: var(--chem-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.chem-section-desc {
    font-size: 1.05rem;
    color: var(--chem-text-muted);
    line-height: 1.6;
    margin: 0 auto;
}

/* ==========================================================
   1. HERO SECTION
   ========================================================== */
.chem-hero {
    position: relative;
    background: 
        radial-gradient(circle at 85% 20%, rgba(0, 180, 216, 0.20) 0%, transparent 60%),
        linear-gradient(90deg, rgba(3, 16, 36, 0.72) 0%, rgba(5, 28, 58, 0.52) 55%, rgba(3, 16, 36, 0.32) 100%),
        url('../chemicals.webp?v=4.0') center center / cover no-repeat;
    color: #FFFFFF;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
}

.chem-hero .chemicals-container {
    width: 100%;
}

.chem-hero::before {
    display: none;
}

.chem-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.chem-hero-content {
    max-width: 640px;
}

.chem-hero-title {
    font-family: 'Helvetica Neue Thai Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(2.1rem, 4.2vw, 3.2rem);
    line-height: 1.12;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.chem-hero-title span {
    color: var(--chem-sky);
    display: inline;
}

.chem-hero-subtitle {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #93C5FD;
    text-transform: uppercase;
    margin-bottom: 16px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.chem-hero-desc {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.chem-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.chem-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--chem-accent);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.chem-btn-primary:hover {
    background: var(--chem-accent-hover);
    transform: translateY(-2px);
}

.chem-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.chem-btn-outline:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: #FFFFFF;
    transform: translateY(-2px);
}

/* Card flotante de Parámetros (Glassmorphism A1) */
.chem-params-card {
    background: rgba(2, 42, 84, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.chem-params-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.chem-params-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #38BDF8;
    background: rgba(0, 180, 216, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 4px 12px;
    border-radius: 9999px;
    letter-spacing: 0.04em;
}

.chem-params-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chem-param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.88rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.chem-param-row:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateX(4px);
}

.chem-param-name {
    color: #E2E8F0;
    font-weight: 600;
}

.chem-param-value {
    color: #38BDF8;
    font-weight: 700;
    text-align: right;
}

.chem-param-value.highlight-good {
    color: #34D399;
}

/* ==========================================================
   2. DIAGNÓSTICO PRÁCTICO
   ========================================================= */
.chem-section-diag {
    padding: 96px 0;
    background-color: #FFFFFF;
}

.chem-diag-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.chem-diag-card {
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid var(--chem-card-border);
    border-top: 3px solid var(--chem-card-border);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chem-diag-grid .chem-diag-card:nth-child(1) { border-top-color: var(--chem-red-text); }
.chem-diag-grid .chem-diag-card:nth-child(2) { border-top-color: var(--chem-amber-text); }
.chem-diag-grid .chem-diag-card:nth-child(3) { border-top-color: var(--chem-purple-text); }
.chem-diag-grid .chem-diag-card:nth-child(4) { border-top-color: var(--chem-teal-text); }

.chem-diag-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08);
}

.chem-diag-pill {
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 9999px;
    margin-bottom: 14px;
}

.chem-diag-pill.red { background: var(--chem-red-bg); color: var(--chem-red-text); border: 1px solid var(--chem-red-border); }
.chem-diag-pill.amber { background: var(--chem-amber-bg); color: var(--chem-amber-text); border: 1px solid var(--chem-amber-border); }
.chem-diag-pill.purple { background: var(--chem-purple-bg); color: var(--chem-purple-text); border: 1px solid var(--chem-purple-border); }
.chem-diag-pill.teal { background: var(--chem-teal-bg); color: var(--chem-teal-text); border: 1px solid var(--chem-teal-border); }

.chem-diag-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--chem-primary);
    line-height: 1.3;
    margin-bottom: 12px;
    min-height: 48px;
}

.chem-diag-desc {
    font-size: 0.88rem;
    color: var(--chem-text-muted);
    line-height: 1.55;
    margin-bottom: 20px;
    flex-grow: 1;
}

.chem-diag-solution-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.chem-solution-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #0369A1;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.chem-solution-text {
    font-size: 0.82rem;
    color: #334155;
    line-height: 1.5;
    margin: 0;
}

.chem-solution-time {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #059669;
    margin-top: 10px;
}

/* ==========================================================
   3. PROTOCOLO DE RECUPERACIÓN 48 HORAS
   ========================================================== */
.chem-section-protocol {
    padding: 96px 0;
    background: var(--chem-bg-soft);
    border-top: 1px solid #E0F2FE;
    border-bottom: 1px solid #E0F2FE;
}

.chem-steps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.chem-step-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #BAE6FD;
    padding: 24px 18px;
    box-shadow: 0 4px 12px rgba(11, 37, 69, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chem-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 180, 216, 0.12);
}

.chem-step-badge {
    align-self: flex-start;
    background: transparent;
    color: #0284C7;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 0;
    border-radius: 9999px;
    margin-bottom: 14px;
    letter-spacing: 0.04em;
}

.chem-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--chem-primary);
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: 42px;
}

.chem-step-desc {
    font-size: 0.85rem;
    color: var(--chem-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ==========================================================
   4. LAS 3 FAMILIAS DE PRODUCTOS QUÍMICOS
   ========================================================== */
.chem-section-families {
    padding: 96px 0;
    background: #FFFFFF;
}

.chem-families-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.chem-family-card {
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid var(--chem-card-border);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chem-family-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.chem-family-img-wrap {
    height: 190px;
    overflow: hidden;
    position: relative;
    background: #E2E8F0;
}

.chem-family-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.chem-family-card:hover .chem-family-img-wrap img {
    transform: scale(1.05);
}

.chem-family-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.chem-family-tag {
    font-size: 0.72rem;
    font-weight: 800;
    color: #0284C7;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.chem-family-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--chem-primary);
    margin-bottom: 12px;
    line-height: 1.25;
}

.chem-family-desc {
    font-size: 0.9rem;
    color: var(--chem-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.chem-family-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #F1F5F9;
    padding-top: 16px;
}

.chem-family-checklist li {
    font-size: 0.84rem;
    color: #334155;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.chem-family-checklist li span.check {
    color: #059669;
    font-weight: 700;
}

/* ==========================================================
   5. TABLA DE DOSIFICACIÓN SUGERIDA
   ========================================================== */
.chem-section-dosis {
    padding: 96px 0;
    background: var(--chem-bg-light);
    border-top: 1px solid #E2E8F0;
}

.chem-table-wrapper {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--chem-card-border);
    margin-bottom: 20px;
}

.chem-dosis-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
}

.chem-dosis-table thead {
    background: var(--chem-primary);
    color: #FFFFFF;
}

.chem-dosis-table th {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.chem-dosis-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
    vertical-align: middle;
}

.chem-dosis-table tbody tr:hover {
    background-color: #F8FAFC;
}

.chem-dosis-table tr:last-child td {
    border-bottom: none;
}

.chem-td-product {
    font-weight: 700;
    color: var(--chem-primary);
}

.chem-td-dosis {
    font-weight: 700;
    color: #0284C7;
}

.chem-table-note {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.85rem;
    color: #64748B;
    line-height: 1.5;
}

.chem-table-note a {
    color: var(--chem-accent);
    font-weight: 700;
    text-decoration: underline;
}

/* ==========================================================
   6. CTA BANNER WHATSAPP
   ========================================================== */
.chem-section-cta {
    padding: 24px 0 64px;
    background: var(--chem-bg-light);
}

.chem-cta-box {
    background: linear-gradient(135deg, #033C6C 0%, #075C8F 100%);
    border-radius: 16px;
    padding: 40px 48px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    box-shadow: 0 16px 36px -8px rgba(3, 60, 108, 0.4);
}

.chem-cta-text h3 {
    font-family: 'Helvetica Neue Thai Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    margin-bottom: 8px;
    color: #FFFFFF;
    letter-spacing: -0.01em;
}

.chem-cta-text p {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    max-width: 650px;
    margin: 0;
}

.chem-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    background: var(--chem-whatsapp);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    flex-shrink: 0;
}

.chem-btn-whatsapp:hover {
    background: var(--chem-whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.5);
}

/* ==========================================================
   7. FORMULARIO DE ASESORÍA
   ========================================================== */
.chem-section-form {
    padding: 80px 0 96px;
    background: #FFFFFF;
}

.chem-form-card {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid var(--chem-card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    overflow: hidden;
}

.chem-form-sidebar {
    padding: 44px 36px;
    background: #F8FAFC;
    border-right: 1px solid var(--chem-card-border);
    display: flex;
    flex-direction: column;
}

.chem-form-sidebar h3 {
    font-family: 'Helvetica Neue Thai Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 1.85rem);
    line-height: 1.25;
    color: var(--chem-primary);
    margin-bottom: 12px;
}

.chem-form-sidebar p {
    font-size: 0.95rem;
    color: var(--chem-text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.chem-delivery-box {
    background: #FFFFFF;
    border: 1px solid #BAE6FD;
    border-left: 4px solid #0284C7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 32px;
}

.chem-delivery-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    color: #0369A1;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.chem-delivery-text {
    font-size: 0.88rem;
    color: #334155;
    margin: 0;
    line-height: 1.45;
}

.chem-contact-direct {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.88rem;
    color: #475569;
}

.chem-contact-direct strong {
    color: var(--chem-primary);
}

.chem-contact-direct a {
    color: #0284C7;
    text-decoration: none;
    font-weight: 600;
}

.chem-contact-direct a:hover {
    text-decoration: underline;
}

/* Lado del formulario */
.chem-form-body {
    padding: 44px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chem-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chem-form-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
}

.chem-form-input,
.chem-form-select,
.chem-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1.5px solid #CBD5E1;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--chem-text-main);
    background-color: #FFFFFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chem-form-input:focus,
.chem-form-select:focus,
.chem-form-textarea:focus {
    outline: none;
    border-color: #0284C7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.chem-form-textarea {
    resize: vertical;
    min-height: 90px;
}

.chem-form-submit {
    width: 100%;
    padding: 16px;
    background: #0284C7;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.chem-form-submit:hover {
    background: #0369A1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

/* ==========================================================
   RESPONSIVIDAD & MOBILE OPTIMIZATIONS
   ========================================================== */
@media (max-width: 1024px) {
    .chem-hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .chem-params-card {
        max-width: 520px;
        margin: 0 auto;
        width: 100%;
    }

    .chem-diag-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chem-steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chem-steps-grid .chem-step-card:last-child {
        grid-column: span 2;
    }

    .chem-families-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 0 auto;
    }

    .chem-form-card {
        grid-template-columns: 1fr;
    }

    .chem-form-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--chem-card-border);
    }
}

@media (max-width: 768px) {
    .chem-section-diag,
    .chem-section-protocol,
    .chem-section-families,
    .chem-section-dosis,
    .chem-section-form {
        padding: 64px 0;
    }

    .chem-diag-grid {
        grid-template-columns: 1fr;
    }

    .chem-steps-grid {
        grid-template-columns: 1fr;
    }

    .chem-steps-grid .chem-step-card:last-child {
        grid-column: span 1;
    }

    .chem-cta-box {
        flex-direction: column;
        padding: 32px 24px;
        text-align: center;
    }

    .chem-cta-text p {
        margin: 0 auto;
    }

    .chem-btn-whatsapp {
        width: 100%;
    }

    .chem-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .chem-dosis-table {
        min-width: 620px;
    }

    .chem-form-sidebar,
    .chem-form-body {
        padding: 28px 20px;
    }
}

/* ==========================================================
   8. SUITE DE ANIMACIONES Y SCROLL REVEAL (ESTILO LAGOONS)
   ========================================================== */

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

@keyframes chemHeroCardIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chemFloatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.chem-hero-content {
    animation: chemHeroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chem-params-card {
    animation: chemHeroCardIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

@media (min-width: 992px) {
    .chem-params-card {
        animation: chemHeroCardIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both,
                   chemFloatCard 6s ease-in-out 1.2s infinite alternate;
    }
    .chem-params-card:hover {
        animation-play-state: paused;
        transform: translateY(-8px) scale(1.01);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
        box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 180, 216, 0.2);
    }
}

/* Sistema Scroll Reveal */
.chem-has-animations .chem-reveal {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.chem-has-animations .chem-reveal-scale {
    transform: translateY(48px) scale(0.95);
}

.chem-has-animations .chem-reveal.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* Escalonamiento secuencial (Stagger) en grids */
.chem-has-animations .chem-diag-grid .chem-diag-card:nth-child(1) { transition-delay: 0.05s; }
.chem-has-animations .chem-diag-grid .chem-diag-card:nth-child(2) { transition-delay: 0.18s; }
.chem-has-animations .chem-diag-grid .chem-diag-card:nth-child(3) { transition-delay: 0.31s; }
.chem-has-animations .chem-diag-grid .chem-diag-card:nth-child(4) { transition-delay: 0.44s; }

.chem-has-animations .chem-steps-grid .chem-step-card:nth-child(1) { transition-delay: 0.05s; }
.chem-has-animations .chem-steps-grid .chem-step-card:nth-child(2) { transition-delay: 0.15s; }
.chem-has-animations .chem-steps-grid .chem-step-card:nth-child(3) { transition-delay: 0.25s; }
.chem-has-animations .chem-steps-grid .chem-step-card:nth-child(4) { transition-delay: 0.35s; }
.chem-has-animations .chem-steps-grid .chem-step-card:nth-child(5) { transition-delay: 0.45s; }

.chem-has-animations .chem-families-grid .chem-family-card:nth-child(1) { transition-delay: 0.06s; }
.chem-has-animations .chem-families-grid .chem-family-card:nth-child(2) { transition-delay: 0.20s; }
.chem-has-animations .chem-families-grid .chem-family-card:nth-child(3) { transition-delay: 0.34s; }
.chem-has-animations .chem-families-grid .chem-family-card:nth-child(4) { transition-delay: 0.48s; }

/* Micro-interacciones dinámicas en hover (tras revelarse) */
.chem-diag-card.is-revealed {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.3s ease;
}

.chem-diag-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px -8px rgba(7, 30, 61, 0.12), 0 0 1px rgba(7, 30, 61, 0.2);
    border-color: #38BDF8;
}

.chem-step-card.is-revealed {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.3s ease, 
                background-color 0.3s ease, 
                box-shadow 0.35s ease;
}

.chem-step-card:hover {
    transform: translateY(-6px) !important;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.chem-family-card.is-revealed {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.3s ease;
}

.chem-family-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px -8px rgba(7, 30, 61, 0.12);
    border-color: #38BDF8;
}

.chem-cta-box.is-revealed {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.chem-cta-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px -10px rgba(3, 60, 108, 0.45);
}

/* ==========================================================
   RESPONSIVE MOBILE — HERO 90VH (SOLO TÍTULO Y BOTONES)
   ========================================================== */
@media (max-width: 768px) {
    .chem-hero {
        background: 
            radial-gradient(circle at 50% 20%, rgba(0, 180, 216, 0.20) 0%, transparent 60%),
            linear-gradient(180deg, rgba(3, 16, 36, 0.65) 0%, rgba(5, 28, 58, 0.35) 45%, rgba(3, 16, 36, 0.95) 100%),
            url('../chemicals-mobile.webp?v=5.0') center center / cover no-repeat;
        height: 90vh;
        min-height: 90vh;
        height: 90dvh;
        min-height: 90dvh;
        padding: 88px 0 32px;
        display: flex;
        align-items: flex-end;
        box-sizing: border-box;
    }

    .chemicals-container {
        padding-left: 20px;
        padding-right: 20px;
        width: 100%;
    }

    .chem-hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
    }

    .chem-hero-content {
        max-width: 100%;
        width: 100%;
    }

    /* Solo Título y Botones en Mobile para Máxima Limpieza */
    .chem-badge-hero {
        display: none;
    }

    .chem-hero-title {
        font-size: clamp(1.85rem, 7vw, 2.45rem);
        line-height: 1.08;
        margin-bottom: 20px;
        letter-spacing: -0.01em;
        text-align: left;
    }

    .chem-hero-title br {
        display: inline;
        content: ' ';
    }

    .chem-hero-subtitle {
        display: none;
    }

    .chem-hero-desc {
        display: none;
    }

    .chem-hero-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-bottom: 0;
    }

    .chem-btn-primary,
    .chem-btn-outline {
        width: 100%;
        min-height: 48px;
        text-align: center;
        justify-content: center;
        padding: 13px 18px;
        font-size: 0.88rem;
        box-sizing: border-box;
    }

    /* Ocultar tarjeta lateral en mobile */
    .chem-hero-card-col {
        display: none;
    }
}
