:root {
    /* Refined Premium Palette */
    --primary: #0F172A;
    /* Deep Midnight Navy */
    --primary-alt: #F97316;
    --primary-alt-text: #C2410C;  /* naranja para TEXTO sobre fondo claro: 5.18:1 en blanco. El de marca da 2.8:1 y no pasa AA */
    /* Vibrant but clean construction orange */
    --accent: #E2E8F0;
    --dark: #1E293B;
    /* Slate for text and cards */
    --light: #F8FAFC;
    --white: #FFFFFF;
    --gray: #64748B;
    --success: #10B981;

    /* Elegant Transitions & Shadows */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}


/* Reset & Base UI */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--primary);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.text-center {
    text-align: center;
}

/* Unified Typography Scale */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 1px;
}

h3 {
    font-size: 1.5rem;
}

p {
    font-size: 1.1rem;
    color: var(--gray);
}

/* Global Section Style */
section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-alt);
}

/* Buttons - Professional & Clean */
.btn-primary,
.btn-primary-large,
.btn-primary-sm {
    /* Naranja accesible: blanco sobre #C2410C da 5.2:1; el de marca #F97316 daba 2.8:1 */
    background: var(--primary-alt-text);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    /* Square/Subtle industrial look */
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: 2px solid var(--primary-alt-text);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary:hover,
.btn-primary-large:hover,
.btn-primary-sm:hover {
    background: #9a3412;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: 2px solid white;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-primary-large {
    padding: 1.2rem 3rem;
    font-size: 1rem;
}

.btn-primary-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.15rem 0;
    border-bottom: 1px solid var(--accent);
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Redesign */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.logo-img { height: 60px; width: auto; display: block; object-fit: contain; }
@media (max-width: 480px) { .logo-img { height: 48px; } }




nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary-alt-text);
}

/* Hero Section */
.hero {
    height: 100vh;
    /* La parada inferior a 0.6 (antes 0.4) sostiene el contraste del texto
       sobre las bovedillas casi blancas de la parte baja de la foto */
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.6)), url('assets/images/hero-foto.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
    margin-top: -80px;
}

.hero-content {
    max-width: 900px;
}

.hero h1 span {
    color: var(--primary-alt);
}

.hero p {
    font-size: 1.2rem;
    margin: 2rem 0 3rem;
    opacity: 0.9;
    color: white;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

/* Products Section */
.products {
    background: var(--light);
    position: relative;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 15px 45px 0 rgba(31, 38, 135, 0.15);
}

.product-image {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.4), transparent);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
}

.category-tag {
    color: var(--primary-alt-text);
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    display: block;
}

.product-info h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.product-cta {
    margin-top: 1.5rem;
    display: block;
    text-align: center;
    /* Boton primario solido: es la accion #1 de la tarjeta, no un secundario */
    background: var(--primary-alt-text);
    border: 2px solid var(--primary-alt-text);
    color: #ffffff;
    text-decoration: none;
    padding: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: var(--transition);
}

.product-cta:hover {
    background: #9a3412;
    border-color: #9a3412;
    color: white;
}





/* Guarantees Section: el descanso oscuro del tramo medio de la pagina */
.guarantees-section {
    background: var(--primary);
}

.section-header.light .section-title { color: #fff; }
.section-header.light p { color: rgba(255, 255, 255, 0.75); }

.guarantees-section .guarantee-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.guarantees-section .guarantee-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-alt);
}

.guarantees-section .guarantee-card h3 { color: #fff; }
.guarantees-section .guarantee-card p { color: rgba(255, 255, 255, 0.75); }
.guarantees-section .guarantee-icon { color: var(--primary-alt); }

.garantias-cta { text-align: center; margin-top: 2.8rem; }
.garantias-cta p { color: rgba(255, 255, 255, 0.85); margin: 0 0 1.1rem; font-size: 1.05rem; }

.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.guarantee-card {
    background: var(--light);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid var(--accent);
    transition: var(--transition);
    text-align: center;
}

.guarantee-card:hover {
    background: white;
    border-color: var(--primary-alt);
    box-shadow: var(--shadow-lg);
}

.guarantee-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-alt);
}

/* Footer */
footer {
    background: var(--light);
    color: var(--primary);
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    margin-top: 1.5rem;
    color: var(--gray);
}

@media (max-width: 968px) {
    .footer-brand .logo-img { display: none; }
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 2rem;
    color: var(--primary-alt-text);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-alt-text);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--accent);
    padding-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #25D366;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Se oculta cuando la seccion visible ya ofrece la misma accion en grande
   (tarjeta de contacto y banner final): evita taps errados sobre "Llamar ahora" */
.whatsapp-float.oculto { opacity: 0; pointer-events: none; transform: scale(0.6); }


/* CTA Banner */
.cta-banner {
    background: var(--primary-alt-text);
    color: white;
    padding: 6rem 0;
}

.cta-banner h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.cta-banner p {
    color: #ffffff;
    margin-bottom: 2.5rem;
    font-size: 1.25rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adaptations */
@media (max-width: 968px) {
    section {
        padding: 5rem 0;
    }

    .grid-2,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero {
        height: auto;
        padding: 420px 0 80px;
        text-align: center;
    }

    header {
        padding: 0.5rem 0;
    }

    header .container {
        flex-direction: column;
        gap: 0.8rem;
    }

    nav ul {
        gap: 1.2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li .btn-primary-sm {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns .btn-primary,
    .hero-btns .btn-primary-large,
    .hero-btns .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

}

@media (max-width: 480px) {
    h1 {
        font-size: 2.2rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }
}

/* ===== ESTILOS REINGENIERIA: Vigueta, Bovedilla y Caseton ===== */
.hero-eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--primary-alt); margin-bottom: 1rem; display: block; }
/* El eyebrow es un <p> dentro del hero, asi que hereda el max-width de `.hero p`
   (600px) y parte "QUERETARO" a un segundo renglon. Se le da su propio ancho. */
.hero p.hero-eyebrow { max-width: none; margin-top: 0; }
.hero-stats { display: flex; gap: 3rem; margin-top: 3.2rem; width: 100%; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 2.5rem; font-weight: 800; color: var(--primary-alt); font-family: "Outfit", sans-serif; line-height: 1; }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.8); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 1px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.product-features { list-style: none; margin: 1rem 0 1.5rem; padding: 0; }
.product-features li { padding: 0.4rem 0; font-size: 0.9rem; color: var(--primary); border-bottom: 1px solid var(--accent); }
.product-features li:last-child { border-bottom: none; }
.product-card--featured { position: relative; border: 2px solid var(--primary-alt); }
.product-badge { position: absolute; top: 16px; right: 16px; background: var(--primary-alt-text); color: white; font-size: 0.75rem; font-weight: 800; letter-spacing: 2px; padding: 0.3rem 0.8rem; border-radius: 2px; z-index: 10; }
.why-section { background: white; padding: 8rem 0; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
.why-list { display: flex; flex-direction: column; gap: 1.5rem; }
.why-item { display: flex; gap: 1.5rem; align-items: flex-start; padding: 1.5rem; background: var(--light); border-radius: 12px; transition: var(--transition); }
.why-item:hover { transform: translateX(8px); box-shadow: var(--shadow-md); }
.why-icon { font-size: 1.5rem; width: 48px; height: 48px; background: var(--primary-alt); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.why-item h4 { font-size: 1rem; margin-bottom: 0.3rem; color: var(--primary); }
.why-item p { font-size: 0.9rem; margin: 0; }
.whatsapp-float { background: #25D366; color: white; font-weight: 800; font-size: 0.9rem; letter-spacing: 1px; }
@media (max-width: 968px) { .why-grid { grid-template-columns: 1fr; gap: 3rem; } .hero-stats { gap: 1.5rem; flex-wrap: wrap; } .stat-num { font-size: 1.8rem; } }
@media (max-width: 420px) { .hero-stats { gap: 1rem; justify-content: space-around; } .stat-item { min-width: 0; flex: 1; } }
/* ===== FIN ESTILOS REINGENIERIA ===== */

/* ===== Iconos SVG profesionales ===== */
.why-icon { color: #ffffff; }
.why-icon svg { width: 24px; height: 24px; }
.guarantee-icon { display: inline-flex; align-items: center; justify-content: center; }
.guarantee-icon svg { width: 42px; height: 42px; }

/* ===== Why-section sin diagrama: 2 columnas ===== */
.why-grid { grid-template-columns: 1fr; gap: 2.5rem; }
.why-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .why-list { grid-template-columns: 1fr; } }

/* ===== Tarjeta impar en tablet: que cierre la fila centrada, sin hueco =====
   Rangos medidos con container 1280 - padding 4rem: productos pasa a 2 columnas
   en viewport 656-967 y garantias en 704-1043. */
@media (min-width: 656px) and (max-width: 967px) {
    .product-grid .product-card:last-child { grid-column: 1 / -1; width: 100%; max-width: 520px; justify-self: center; }
}
@media (min-width: 704px) and (max-width: 1043px) {
    .guarantees-grid .guarantee-card:last-child { grid-column: 1 / -1; width: 100%; max-width: 560px; justify-self: center; }
}

/* ===== Alinear los botones de las 3 tarjetas de producto ===== */
.product-card { display: flex; flex-direction: column; }
.product-info { display: flex; flex-direction: column; flex: 1; }
.product-info .spec-btn { margin-top: auto; }

/* ===== Iconos del footer en el mismo sistema SVG del resto de la pagina ===== */
.footer-contact p svg { width: 15px; height: 15px; color: var(--primary-alt-text); vertical-align: -2px; margin-right: 4px; flex-shrink: 0; }

/* ===== Slogan del hero ===== */
.hero-slogan { font-family: 'Outfit', sans-serif; font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 600; color: var(--primary-alt); margin: 0.5rem 0 1.25rem; letter-spacing: 0.3px; }
.hero-note { font-size: 0.85rem; color: rgba(255,255,255,0.88); margin: 1rem 0 0; letter-spacing: 0.2px; text-shadow: 0 1px 3px rgba(15,23,42,0.8); }
/* El text-shadow estabiliza la lectura donde la foto se aclara */
.hero p, .hero-stats { text-shadow: 0 1px 3px rgba(15,23,42,0.6); }
@media (max-width: 600px) { .hero-detalle { display: none; } }

/* ===== Enlace de ayuda del FAQ ===== */
.comparison-note { text-align: center; margin: 2.5rem auto 0; color: var(--gray); font-size: 1.05rem; }
.comparison-note a { color: var(--primary-alt-text); font-weight: 700; text-decoration: none; border-bottom: 2px solid transparent; transition: var(--transition); }
.comparison-note a:hover { border-bottom-color: var(--primary-alt-text); }

/* ===== Pulido general premium ===== */
section[id] { scroll-margin-top: 90px; }
.section-header p { line-height: 1.7; }
::selection { background: var(--primary-alt); color: #fff; }
html { scroll-behavior: smooth; }

/* ===== Fix de botones: contraste y hover visible ===== */
/* Hover solido mas oscuro que el fondo #C2410C base */
.btn-primary:hover, .btn-primary-large:hover, .btn-primary-sm:hover {
    background: #9a3412; color: #ffffff; border-color: #9a3412;
    transform: translateY(-2px); box-shadow: var(--shadow-lg);
}
/* Boton sobre banner naranja: invertir a blanco */
.cta-banner .btn-primary-large { background: #ffffff; color: var(--primary-alt-text); border-color: #ffffff; }
.cta-banner .btn-primary-large:hover { background: var(--primary); color: #ffffff; border-color: var(--primary); }
/* Boton secundario hero: hover claro y legible */
.btn-secondary:hover { background: #ffffff; color: var(--primary); border-color: #ffffff; }
/* CTA de producto (ahora solido): hover mas oscuro */
.product-cta:hover { background: #9a3412; color: #ffffff; border-color: #9a3412; }

/* ===== BARRIDO FINAL: menu movil, hero responsive, pulido ===== */
header .container { position: relative; }
header.scrolled { box-shadow: 0 6px 24px rgba(15,23,42,0.08); }
/* Boton hamburguesa (oculto en desktop) */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 46px; background: transparent; border: none; cursor: pointer; padding: 10px; z-index: 1100; }
.nav-toggle span { display: block; height: 3px; width: 100%; background: var(--primary); border-radius: 3px; transition: var(--transition); }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
/* WhatsApp float: icono centrado */
.whatsapp-float svg { width: 30px; height: 30px; }

@media (max-width: 968px) {
    header .container { flex-direction: row; gap: 0; }
    .nav-toggle { display: flex; }
    /* Fondo solido: rgba+backdrop-filter se transparenta en WebViews viejos */
    #mainnav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--accent); box-shadow: var(--shadow-lg); max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
    #mainnav.open { max-height: 460px; }
    #mainnav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 0; }
    #mainnav ul li { width: 100%; }
    #mainnav ul li a { display: block; padding: 1rem 2rem; font-size: 1rem; border-bottom: 1px solid #f1f5f9; }
    #mainnav ul li:last-child { padding: 0.8rem 2rem 1rem; }
    #mainnav ul li .btn-primary-sm { display: flex; justify-content: center; width: 100%; padding: 0.9rem; font-size: 0.9rem; }
    .hero { height: auto; min-height: auto; padding: 130px 0 70px; text-align: center; margin-top: 0; }
    .hero-content { max-width: 100%; }
    .hero-eyebrow { font-size: 0.7rem; letter-spacing: 2px; }
    .hero-btns { flex-direction: column; }
    .hero-stats { justify-content: center; gap: 2rem; margin-top: 2.2rem; }
}

@media (max-width: 420px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.05rem; }
    .section-title { font-size: 1.6rem; }
}

/* Las tres cifras del hero caben en una sola fila hasta pantallas chicas */
@media (max-width: 560px) {
    .hero-stats { gap: 1rem; justify-content: space-around; flex-wrap: nowrap; }
    .stat-item { min-width: 0; flex: 1; }
    .stat-num { font-size: 1.5rem; }
    .stat-label { font-size: 0.75rem; letter-spacing: 0.2px; }
}

/* Pulido: foco accesible en formularios y links */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--primary-alt-text); outline-offset: 2px; }
/* Sobre fondos naranjas u oscuros el anillo naranja se pierde: doble anillo navy+blanco */
.btn-primary:focus-visible, .btn-primary-large:focus-visible, .btn-primary-sm:focus-visible, .product-cta:focus-visible, .whatsapp-float:focus-visible, .cta-banner a:focus-visible { outline: 3px solid var(--primary); box-shadow: 0 0 0 6px #ffffff; }
/* Imagenes de producto sin salto de layout */
.product-image img { display: block; }
img { max-width: 100%; }

@media (max-width: 968px) {
    .hero-content, .hero h1, .hero p, .hero-eyebrow { text-align: center; }
    .hero p { margin-left: auto; margin-right: auto; }
}
@media (max-width: 420px) {
    .hero h1 { font-size: 1.85rem; line-height: 1.15; }
}

/* ===== Sección técnica: tabla de claros + calculadora ===== */
.technical-section { background: linear-gradient(to bottom, #f8fafc, #eff6ff); }
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.claros-card, .calc-card { background: white; border-radius: 16px; padding: 2.2rem; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07); }
.claros-card h3, .calc-card h3 { font-size: 1.2rem; color: var(--primary); margin-bottom: 0.5rem; letter-spacing: -0.2px; }
.claros-card > p, .calc-card > p { font-size: 0.92rem; color: var(--gray); margin-bottom: 1.4rem; }
.claros-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; border-radius: 10px; overflow: hidden; }
.claros-table th { background: var(--primary); color: white; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.9rem 1.1rem; text-align: left; }
.claros-table td { padding: 1rem 1.1rem; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; color: var(--primary); vertical-align: middle; }
.claros-table tr:last-child td { border-bottom: none; }
.peralte-badge { background: var(--primary-alt); color: white; font-size: 0.78rem; font-weight: 800; letter-spacing: 1px; padding: 0.3rem 0.75rem; border-radius: 4px; display: inline-block;  white-space: nowrap; }
.peralte-badge.p20 { background: var(--primary); }
.claro-value { font-size: 1.3rem; font-weight: 800; color: var(--primary-alt-text); font-family: 'Outfit', sans-serif; }
.carga-value { font-size: 1rem; font-weight: 700; color: var(--primary); }
.tech-note { font-size: 0.8rem; color: var(--gray); border-top: 1px solid #f1f5f9; padding-top: 1rem; margin: 0; line-height: 1.5; }
.calc-hint { font-size: 0.8rem; color: var(--primary-alt-text); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.calc-form { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.2rem; }
.calc-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.calc-field label { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); margin-bottom: 0.3rem; }
.calc-field input, .calc-field select { width: 100%; padding: 0.8rem 1rem; border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 8px; font-size: 0.95rem; color: var(--primary); transition: var(--transition); }
.calc-field input:focus, .calc-field select:focus { border-color: var(--primary-alt); background: white; box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.calc-sub { display: block; font-size: 0.75rem; color: var(--gray); margin-top: 0.3rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.calc-btn { width: 100%; justify-content: center; }
.calc-resultado { display: none; }
.calc-resultado.active { display: block; border-top: 1px solid #f1f5f9; padding-top: 1.4rem; margin-top: 0.5rem; }
.calc-items { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.calc-item { background: var(--light); border-radius: 12px; padding: 1.2rem; text-align: center; border: 1px solid #e2e8f0; }
.calc-label { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--gray); letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.calc-num { display: block; font-size: 2rem; font-weight: 800; color: var(--primary-alt-text); font-family: 'Outfit', sans-serif; line-height: 1; }
.calc-unit { display: block; font-size: 0.8rem; color: var(--gray); margin-top: 0.2rem; }
.calc-disclaimer { font-size: 0.78rem; color: var(--gray); margin: 0.9rem 0; line-height: 1.5; }
.calc-badge { display: inline-block; vertical-align: middle; margin-left: 0.5rem; background: #fef3c7; color: #92400e; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.22rem 0.5rem; border-radius: 4px; }
.calc-warning { font-size: 0.84rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 0.9rem; display: none; line-height: 1.5; }
.calc-warning a { color: #7c2d12; font-weight: 700; text-decoration: underline; }
.calc-resultado .btn-primary { width: 100%; justify-content: center; }
@media (max-width: 968px) { .tech-grid { grid-template-columns: 1fr; } }
/* Fix móvil: la tabla de claros forzaba un ancho mínimo mayor al viewport y desbordaba toda la página */
.tech-grid > * { min-width: 0; }
@media (max-width: 600px) {
    /* Sin la columna de carga (identica en ambas filas) la tabla cabe hasta en
       320px; el dato vive en la nota inferior. El scroll queda de red de seguridad. */
    .claros-table th:nth-child(3), .claros-table td:nth-child(3) { display: none; }
    .tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 420px) {
    .claros-table th { padding: 0.8rem 0.6rem; }
    .claros-table td { padding: 0.85rem 0.6rem; font-size: 0.85rem; }
}
@media (max-width: 360px) {
    /* En 320px la tabla pedia ~16px mas que su tarjeta: celdas mas apretadas */
    .claros-table th { padding: 0.7rem 0.4rem; font-size: 0.7rem; letter-spacing: 0; }
    .claros-table td { padding: 0.75rem 0.4rem; font-size: 0.82rem; }
    .peralte-badge { padding: 0.25rem 0.5rem; }
}

.faq-section { background: var(--light); }
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: #fff; border: 1px solid var(--accent); border-radius: 12px; overflow: hidden; transition: var(--transition); }
.faq-item[open] { border-color: var(--primary-alt); box-shadow: var(--shadow-md); }
.faq-item summary { cursor: pointer; padding: 1.3rem 1.6rem; font-weight: 700; color: var(--primary); font-family: "Outfit", sans-serif; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.7rem; color: var(--primary-alt-text); font-weight: 300; line-height: 1; transition: var(--transition); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--primary-alt-text); }
.faq-a { padding: 0 1.6rem 1.4rem; }
.faq-a p { margin: 0; color: var(--gray); line-height: 1.7; font-size: 1rem; }

.contact-section { background: #fff; }
.contact-grid { align-items: stretch; }
.contact-card { background: var(--light); border: 1px solid var(--accent); border-radius: 16px; padding: 2.5rem; display: flex; flex-direction: column; gap: 1.3rem; }
.contact-row { display: flex; gap: 1rem; align-items: flex-start; }
.contact-row svg { width: 24px; height: 24px; color: var(--primary-alt); flex-shrink: 0; margin-top: 2px; }
.contact-row h4 { font-size: 0.95rem; margin-bottom: 0.2rem; color: var(--primary); }
.contact-row p { color: var(--gray); font-size: 0.95rem; margin: 0; line-height: 1.5; }
.contact-row a { color: var(--primary-alt-text); text-decoration: none; font-weight: 600; }
.contact-row a:hover { text-decoration: underline; }
.contact-row em { color: #475569; font-size: 0.85rem; }
.contact-meta { color: #475569; font-size: 0.85rem; font-weight: 400; }
.contact-row a[href^="mailto:"] { overflow-wrap: anywhere; }
.contact-link { display: inline-block; margin-top: 0.45rem; font-size: 0.9rem; }
.pay-methods h4 { font-size: 0.95rem; margin-bottom: 0.6rem; color: var(--primary); }
.pay-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pay-chips span { background: #fff; border: 1px solid var(--accent); border-radius: 50px; padding: 0.4rem 1rem; font-size: 0.82rem; font-weight: 600; color: var(--primary); }
.contact-ctas { margin-top: auto; display: flex; flex-direction: column; gap: 0.7rem; }
.contact-ctas .btn-primary { justify-content: center; }
/* Mismas metricas que .btn-primary (padding, tipografia, radio) para que el par apilado case */
.btn-llamar { display: inline-flex; justify-content: center; align-items: center; padding: 0.8rem 2rem; border: 2px solid var(--primary-alt-text); border-radius: 8px; color: var(--primary-alt-text); font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.4px; text-decoration: none; transition: var(--transition); }
.btn-llamar:hover { background: var(--primary-alt-text); color: #fff; }
@media (max-width: 480px) { .contact-card { padding: 1.5rem; } }
.contact-map { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--accent); min-height: 420px; }
.contact-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }


nav#mainnav ul { gap: 1.7rem; }
@media (max-width: 968px) { .contact-map { min-height: 320px; } .contact-map iframe { min-height: 320px; } nav#mainnav ul { gap: 0; } }

h2 { text-transform: none; letter-spacing: -0.3px; }
.section-title { text-transform: none; letter-spacing: -0.4px; font-weight: 800; }
.cta-banner h2 { letter-spacing: -0.3px; }
.btn-primary, .btn-primary-large, .btn-primary-sm, .btn-secondary { border-radius: 8px; letter-spacing: 0.4px; }
.product-cta { border-radius: 8px; letter-spacing: 0.4px; }
.guarantee-card { border-radius: 16px; }
.section-header p { line-height: 1.75; font-size: 1.12rem; }
.section-title::after { height: 3px; width: 54px; border-radius: 3px; bottom: -14px; }
.section-header { margin-bottom: 4rem; }
p { line-height: 1.7; }
.hero h1 { letter-spacing: -1px; }
.product-info h3, .why-item h4 { letter-spacing: -0.2px; }
nav ul li a { letter-spacing: 0.5px; }

.spec-btn { width: 100%; margin-top: 0.8rem; padding: 0.75rem; background: transparent; border: 1px solid var(--accent); border-radius: 8px; color: var(--gray); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: var(--transition); }
.spec-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--light); }
.product-cta { margin-top: 0.8rem; }
/* ===== Modal ficha técnica profesional ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.65); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box { background: #fff; border-radius: 20px; max-width: 580px; width: 100%; position: relative; box-shadow: 0 25px 60px rgba(0,0,0,0.25); transform: translateY(24px) scale(0.97); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; }
.modal-overlay.open .modal-box { transform: none; }
.modal-header { background: var(--primary); padding: 1.8rem 2rem 1.6rem; border-radius: 20px 20px 0 0; position: relative; }
.modal-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: var(--primary-alt); }
.modal-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.modal-tag { display: inline-block; background: rgba(249,115,22,0.2); color: var(--primary-alt); font-size: 0.7rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; padding: 0.25rem 0.7rem; border-radius: 3px; border: 1px solid rgba(249,115,22,0.35); }
.modal-close { width: 34px; height: 34px; border: none; background: rgba(255,255,255,0.1); border-radius: 50%; font-size: 1.3rem; line-height: 1; color: rgba(255,255,255,0.7); cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-close:hover { background: var(--primary-alt); color: #fff; transform: rotate(90deg); }
.modal-box h3 { font-size: 1.5rem; color: #fff; margin: 0 0 0.3rem; letter-spacing: -0.4px; }
.modal-company { font-size: 0.78rem; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 1.5px; }
.modal-body { padding: 1.8rem 2rem; flex: 1; }
.modal-footer-bar { padding: 1.2rem 2rem 1.8rem; border-top: 1px solid var(--accent); display: flex; flex-direction: column; gap: 0.7rem; }
.modal-footer-bar .btn-primary { width: 100%; justify-content: center; gap: 0.6rem; }
.btn-download { display: inline-flex; align-items: center; justify-content: center; width: 100%; gap: 0.6rem; padding: 0.8rem 1.5rem; border-radius: 4px; text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 1px; border: 2px solid var(--primary); color: var(--primary); background: transparent; transition: var(--transition); }
.btn-download:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
body.modal-open { overflow: hidden; }

/* KPIs grandes en el modal */
.modal-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.8rem; margin-bottom: 1.6rem; }
.modal-kpi { background: var(--light); border-radius: 12px; padding: 1rem 0.8rem; text-align: center; border: 1px solid #e2e8f0; }
.modal-kpi .kpi-val { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary-alt-text); font-family: 'Outfit', sans-serif; line-height: 1; }
.modal-kpi .kpi-unit { display: block; font-size: 0.72rem; color: var(--gray); margin-top: 0.1rem; }
.modal-kpi .kpi-label { display: block; font-size: 0.72rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.4rem; }

/* Sección con etiqueta */
.modal-section-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary-alt-text); margin: 1.4rem 0 0.8rem; display: flex; align-items: center; gap: 0.6rem; }
.modal-section-label::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

/* Comparativa P-15 vs P-20 */
.modal-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.modal-compare-col { border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }
.modal-col-head { padding: 0.6rem 1rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 1px; text-align: center; }
.modal-col-head.p15 { background: var(--primary-alt); color: white; }
.modal-col-head.p20 { background: var(--primary); color: white; }
.modal-col-row { padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--primary); border-top: 1px solid #f1f5f9; display: flex; justify-content: space-between; }
.modal-col-row span { color: var(--gray); font-size: 0.8rem; }

/* Fila simple clave-valor */
.modal-spec-row { display: flex; justify-content: space-between; align-items: center; padding: 0.65rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; }
.modal-spec-row:last-child { border-bottom: none; }
.modal-spec-row span { color: var(--gray); }
.modal-spec-row strong { color: var(--primary); font-weight: 700; text-align: right; max-width: 55%; }
.modal-note-row { font-size: 0.8rem; color: var(--gray); line-height: 1.5; padding: 0.6rem 0.8rem; background: #f8fafc; border-left: 3px solid #e2e8f0; border-radius: 0 6px 6px 0; margin-top: 0.5rem; }

@media (max-width: 600px) { .modal-kpis { grid-template-columns: repeat(3,1fr); gap: 0.5rem; } .modal-kpi .kpi-val { font-size: 1.4rem; } .modal-header, .modal-body, .modal-footer-bar { padding-left: 1.2rem; padding-right: 1.2rem; } .modal-compare { grid-template-columns: 1fr; } }

section { padding: 4.5rem 0; }
.why-section { padding: 4.5rem 0; }
.faq-section, .contact-section { padding: 4.5rem 0; }
.cta-banner { padding: 4rem 0; }
.section-header { margin-bottom: 2.6rem; }
.product-info { padding: 2rem; }
.guarantee-card { padding: 2.2rem; }
footer { padding: 4rem 0 2rem; }
.footer-grid { margin-bottom: 2.5rem; }
.footer-bottom { padding-top: 2rem; }
.why-grid { gap: 3.5rem; }

.hero { height: auto; min-height: 100vh; margin-top: 0; padding: 132px 0 64px; box-sizing: border-box; }
.hero p { margin: 1.4rem 0 2rem; }
.hero-stats { margin-top: 2.6rem; }

@media (max-width: 968px) {
    section, .why-section, .faq-section, .contact-section { padding: 3.2rem 0; }
    /* 104px: el header fijo mide ~66px; con 140px el CTA caia bajo el fold en 360px */
    .hero { height: auto; min-height: auto; padding: 104px 0 40px; }
    .section-header { margin-bottom: 2rem; }
}

/* ===== Animacion de entrada del hero (fade-in con retraso) ===== */
.fade-in-delay { opacity: 0; animation: fadeIn 0.8s ease-out 0.25s forwards; }

/* ===== Aparicion al hacer scroll (el JS agrega .reveal-init y luego .visible) ===== */
.reveal-init { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-init.visible { opacity: 1; transform: none; }

/* ===== Calculadora en pantallas chicas =====
   A dos columnas, el campo "Ancho de la losa" queda fuera de pantalla y no hay
   forma de deslizar hasta el: por debajo de 600px va apilada. */
@media (max-width: 600px) {
    .calc-row-2 { grid-template-columns: 1fr; }
    .calc-field input, .calc-field select { min-width: 0; }
}

@media (max-width: 480px) {
    .claros-card, .calc-card { padding: 1.25rem; }
    .calc-items { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in, .fade-in-delay { animation: none; opacity: 1; }
    .reveal-init { transition: none; opacity: 1; transform: none; }
}
/* ============ Cotizador de losa (formulario de lead) ============
   Reutiliza .modal-overlay / .modal-box / .calc-field que ya usa el sitio.
   Mobile first: casi todo el trafico de obra entra desde celular. */
.lead-box { max-width: 620px; }
.lead-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 560px) {
    .lead-grid { grid-template-columns: 1fr 1fr; }
    .lead-full { grid-column: 1 / -1; }
}
.lead-hint { font-size: 0.78rem; color: var(--gray); margin: 0.35rem 0 0; line-height: 1.35; }
.lead-opcional { color: var(--gray); font-weight: 400; text-transform: none; letter-spacing: 0; }
.lead-error { font-size: 0.78rem; color: #DC2626; font-weight: 600; margin: 0.35rem 0 0; line-height: 1.35; }
.lead-error:empty { display: none; }
.calc-field input.invalido, .calc-field select.invalido { border-color: #DC2626; background: #FEF2F2; }
.calc-field input.invalido:focus, .calc-field select.invalido:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }

/* Aviso de claro fuera de rango: informa, no bloquea el envio. */
.lead-aviso { margin: 1.1rem 0 0; padding: 0.8rem 1rem; border-radius: 8px; background: #FFF7ED;
    border: 1px solid #FED7AA; border-left: 3px solid var(--primary-alt);
    color: #7C2D12; font-size: 0.83rem; line-height: 1.45; }

.lead-submit { width: 100%; justify-content: center; margin-top: 1.3rem; position: relative; }
.lead-submit[disabled] { opacity: 0.75; cursor: wait; }
.lead-submit.cargando .lead-submit-txt { padding-left: 1.5rem; }
.lead-submit.cargando::before { content: ''; position: absolute; left: 50%; top: 50%; width: 15px; height: 15px;
    margin: -7.5px 0 0 -60px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
    border-radius: 50%; animation: leadSpin 0.7s linear infinite; }
@keyframes leadSpin { to { transform: rotate(360deg); } }
.lead-pie { text-align: center; font-size: 0.78rem; color: var(--gray); margin: 0.9rem 0 0; }

/* Confirmacion con folio, por si WhatsApp no alcanza a abrir solo. */
.lead-ok { text-align: center; padding: 1rem 0 0.5rem; }
.lead-ok-icon { width: 62px; height: 62px; margin: 0 auto 1.1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(16,185,129,0.12); color: var(--success); }
.lead-ok h4 { font-size: 1.25rem; color: var(--primary); margin: 0 0 0.5rem; }
.lead-ok p { color: var(--gray); font-size: 0.92rem; line-height: 1.5; margin: 0 0 1.3rem; }
.lead-ok strong { color: var(--primary-alt-text); font-family: 'Outfit', sans-serif; font-weight: 800;
    letter-spacing: 2px; font-size: 1.1rem; }
.lead-ok .btn-primary { width: 100%; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
    .lead-submit.cargando::before { animation-duration: 2.4s; }
}

/* En movil cada pixel de alto cuenta: entre menos scroll haya entre el titulo
   y el boton, mas formularios se terminan. */
@media (max-width: 559px) {
    .lead-box .modal-header { padding: 1.15rem 1.3rem 1rem; }
    .lead-box .modal-header h3 { font-size: 1.3rem; }
    .lead-box .modal-header-top { margin-bottom: 0.6rem; }
    .lead-box .modal-body { padding: 1.35rem 1.3rem 1.6rem; }
    .lead-grid { gap: 0.85rem; }
    .lead-submit { margin-top: 1.1rem; }
}

/* El aviso de privacidad tiene que estar a la mano justo donde se piden los
   datos, no solo enterrado en el pie. */
.lead-pie a { color: var(--primary-alt-text); text-decoration: underline; }
