:root {
    --primary-color: #007e84;
    --secondary-color: #343a40;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: white; color: var(--text-dark); line-height: 1.6; }

/* Layout */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
section { padding: 60px 0; }

/* Navigation */
header { border-bottom: 1px solid #eee; padding: 15px 0; position: sticky; top: 0; background: white; z-index: 100; position: relative; }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 800; color: var(--primary-color); text-decoration: none; }
.logo img { height: 36px; width: auto; display: block; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--primary-color); }
.btn-results-nav { background: var(--primary-color); color: white !important; padding: 10px 18px; border-radius: 8px; }

/* Hero */
.hero { background: var(--bg-light); border-radius: var(--radius); padding: 80px 40px; margin-top: 20px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 700; margin-bottom: 15px; color: var(--secondary-color); }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-block; padding: 14px 28px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: 0.2s; font-size: 16px; border: none; cursor: pointer; }
.btn-primary { background: var(--primary-color); color: white; box-shadow: var(--shadow); }
.btn-primary:hover { background: #005c60; transform: translateY(-1px); }
.btn-outline { border: 1px solid #ddd; color: var(--text-dark); }
.btn-outline:hover { background: #f0f0f0; }

/* Sections */
.section-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.card { padding: 30px; border: 1px solid #eee; border-radius: var(--radius); transition: 0.3s; }
.card:hover { border-color: var(--primary-color); }
.card h3 { margin-bottom: 12px; font-size: 20px; }
.card p { font-size: 14px; color: var(--text-muted); }

footer { border-top: 1px solid #eee; padding: 40px 0; margin-top: 60px; color: var(--text-muted); font-size: 13px; text-align: center; }
footer p { margin: 5px 0; }
footer a { color: var(--primary-color); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Certificación IRAM ISO 9001 */
.cert-section { padding: 50px 0; text-align: center; border-top: 1px solid #eee; }
.cert-logo { max-height: 40mm; border-radius: 2.7mm; display: block; margin: 0 auto 20px; }
.cert-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 700px; margin: 0 auto; }
.cert-text strong { color: var(--text-dark); }
.cert-text em { font-style: italic; }

/* WhatsApp Flotante */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-float img {
    width: 36px;
    height: 36px;
}
.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

/* =============================================================================
   Mobile menu — accesibilidad y UX
   Implementado por: frontend developer
   ============================================================================= */

/* --- Estilos base del toggle --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
}

/* Foco accesible */
.nav-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación a X */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Menú móvil --- */
.nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 99;
    /* Animación de entrada */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Menú abierto */
.nav-mobile.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    border-radius: 0 0 12px 12px;
}

.nav-mobile a {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 500;
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Foco accesible en enlaces */
.nav-mobile a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    background-color: var(--bg-light);
}

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

.nav-mobile a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Link de Resultados Online en menú mobile con fondo verde */
.nav-mobile .btn-results-nav {
    background: var(--primary-color);
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 14px 12px;
    border-bottom: none;
    margin-bottom: 4px;
}
.nav-mobile .btn-results-nav:hover {
    background: #005c60;
    color: white;
}

/* --- Bloqueo de scroll cuando menú abierto --- */
body.menu-open {
    overflow: hidden;
    touch-action: none;
}

/* Fallback para iOS */
@supports (-webkit-touch-callout: none) {
    body.menu-open {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
}

/* --- Media query para mobile --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-toggle {
        display: flex;
    }
    .hero {
        padding: 40px 20px;
    }
    .hero-actions .btn {
        width: 100%;
    }
}