/* Variables de diseño moderno (Eco-Tech 2026) */
:root {
    --primary: #059669;        /* Verde esmeralda moderno y fresco */
    --primary-dark: #047857;   /* Esmeralda profundo para hover */
    --primary-soft: #ecfdf5;   /* Fondo verde menta muy suave */
    --dark: #0f172a;           /* Azul pizarra oscuro */
    --text: #475569;           /* Gris pizarra para lectura cómoda */
    --text-light: #94a3b8;
    --bg-light: #f8fafc;       /* Gris perla ultra limpio */
    --border: #e2e8f0;
    --white: #ffffff;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 28px -6px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.025em;
}

.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
}

/* Barra de navegación con efecto cristal (Glassmorphism) */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 82px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    max-height: 54px;
    width: auto;
    display: block;
    transition: transform 0.25s ease;
}

.logo-img:hover {
    transform: scale(1.03);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.25s ease;
}

.nav-links a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.nav-links a:not(.btn-nav):hover {
    color: var(--primary);
}

.nav-links a:not(.btn-nav):hover::after {
    width: 100%;
}

.btn-nav {
    display: inline-block;
    background: var(--dark);
    color: var(--white) !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600 !important;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-nav:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.28);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark);
}

/* Sección Hero Moderna con degradado de malla sutil */
.hero {
    position: relative;
    background: radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(5, 150, 105, 0.25) 0%, transparent 45%),
                linear-gradient(135deg, #0b1320 0%, #064e3b 100%);
    color: var(--white);
    padding: 130px 0 120px;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 22px;
    line-height: 1.12;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.18rem;
    max-width: 660px;
    margin: 0 auto 40px;
    color: rgba(241, 245, 249, 0.88);
    font-weight: 400;
}

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.35);
    transition: all 0.25s ease;
}

.btn-primary:hover {
    background: #10b981;
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.45);
}

/* Secciones generales */
.section {
    padding: 96px 0;
}

.bg-light {
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 14px;
}

.section-subtitle {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 50px;
    color: var(--text);
    font-size: 1.05rem;
}

/* Animación de entrada (Flow al hacer scroll) */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tarjetas de servicios */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.card {
    background: var(--white);
    padding: 38px 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(5, 150, 105, 0.35);
}

.card h3 {
    color: var(--dark);
    font-size: 1.25rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
    flex-shrink: 0;
}

/* Catálogo de Productos (4 en fila, estilo moderno) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(5, 150, 105, 0.35);
}

.product-img-box {
    position: relative;
    background: #f1f5f9;
    height: 165px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    overflow: hidden;
}

.product-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    mix-blend-mode: multiply;
}

.product-img-box:hover img {
    transform: scale(1.08);
}

.zoom-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.product-img-box:hover .zoom-badge {
    transform: scale(1.1);
    background: var(--primary);
}

.product-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-body h3 {
    color: var(--dark);
    font-size: 1.08rem;
    margin-bottom: 8px;
}

.product-body p {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 18px;
    flex-grow: 1;
}

.btn-product {
    display: block;
    text-align: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.25s ease;
}

.btn-product:hover {
    background: var(--primary);
    color: var(--white);
}

/* Modal Lightbox (Zoom imagen completa) */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-modal.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.lightbox-content img {
    max-width: 80vw;
    max-height: 74vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

#modalCaption {
    margin-top: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Sobre la empresa */
.about-text {
    max-width: 780px;
    margin: 20px auto 0;
    text-align: center;
    font-size: 1.15rem;
    color: var(--text);
}

/* Sección de Contacto y Formulario */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
    gap: 36px;
    align-items: start;
    margin-top: 40px;
}

.contact-info {
    background: var(--bg-light);
    padding: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.contact-info h3 {
    color: var(--dark);
    font-size: 1.35rem;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 12px;
    color: var(--dark);
    font-size: 0.96rem;
}

.contact-note {
    margin-top: 18px;
    font-size: 0.92rem;
    color: var(--text) !important;
}

.map-container {
    margin-top: 24px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    height: 230px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-form {
    background: var(--white);
    padding: 38px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.honeypot {
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.92rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.98rem;
    color: var(--dark);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input {
    margin-top: 4px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-group label {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
}

.checkbox-group a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.25);
}

.btn-submit:disabled {
    background: #94a3b8;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.form-status {
    margin-top: 16px;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
    display: none;
}

.form-status.success {
    display: block;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border: 1px solid #a7f3d0;
}

.form-status.error {
    display: block;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Página Legal (Privacy Policy con estilo de tarjeta moderna) */
.legal-content {
    max-width: 860px;
    background: var(--white);
    padding: 48px 52px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    border-top: 5px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.legal-content h1 {
    color: var(--dark);
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    font-weight: 800;
    margin-bottom: 8px;
}

.legal-update {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 32px;
}

.legal-content h2 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-content h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.legal-content p {
    margin-bottom: 14px;
    color: var(--text);
}

.legal-back {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Footer */
.footer {
    background: var(--dark);
    color: #cbd5e1;
    text-align: center;
    padding: 48px 0 32px;
    font-size: 0.88rem;
}

.footer-legal {
    margin-bottom: 20px;
    line-height: 1.9;
}

.footer-legal strong {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.footer a {
    color: var(--white);
    text-decoration: underline;
    transition: color 0.2s;
}

.footer a:hover {
    color: #34d399;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 58px;
    height: 58px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5);
}

/* Adaptación para tablets (2 arriba y 2 abajo) */
@media (max-width: 960px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Adaptación para móviles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 82px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        padding: 24px 0;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
        gap: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        padding: 90px 0 80px;
    }

    .section {
        padding: 70px 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .legal-content {
        padding: 30px 24px;
    }
}

@media (max-width: 520px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}