
/* * CSS - TU NEGOCIO 
 * Estilo: Mobile-first, Clean Blue, No Dark Mode
 */

:root {
    /* DEMO LAYER TOKENS (OBLIGATORIOS) */
    --demo-accent: #22c55e;
    --demo-topbar-text: #ffffff;
    --demo-link: #86efac;
    --demo-link-shadow: 0 0 10px rgba(34,197,94,.35);
    --demo-glow: 0 0 0 3px rgba(34,197,94,.25), 0 0 12px rgba(34,197,94,.6);
    
    --demo-topbar-bg: rgba(6, 24, 14, 0.95);
    --demo-note-bg: rgba(34, 197, 94, 0.1);
    --demo-note-border: rgba(34, 197, 94, 0.3);
    --demo-note-text: #0b1220; 
    
    --demo-shadow: 0 10px 30px rgba(0,0,0,.15);
    --demo-radius: 12px;
    --demo-font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --demo-z: 9999;
    
    /* Sticky Offsets Placeholder */
    --demo-topbar-h: 0px;
    --site-nav-h: 0px;
    --demo-safe-top: env(safe-area-inset-top, 0px);
    --demo-topbar-offset: calc(var(--demo-topbar-h) + var(--demo-safe-top));
    --nav-stack-offset: calc(var(--demo-topbar-offset) + var(--site-nav-h));

    /* BRAND COLORS (Blue HVAC Theme) */
    --primary: #0284c7;
    --primary-light: #0ea5e9;
    --primary-dark: #0369a1;
    --secondary: #64748b;
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-inverse: #ffffff;
    
    /* SPACING & TYPO */
    --sp-xs: 8px;
    --sp-sm: 16px;
    --sp-md: 24px;
    --sp-lg: 48px;
    --sp-xl: 80px;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --font-body: 'Roboto', sans-serif;
    --font-heading: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* RESET BASICO */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { 
    font-family: var(--font-body); 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    line-height: 1.6; 
    font-size: 16px;
    /* Padding top dinámico para sticky header */
    padding-top: var(--demo-topbar-offset);
}
img, video { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
button { cursor: pointer; border: none; font-family: inherit; }

/* FOCUS VISIBLE */
:focus-visible { outline: 3px solid var(--demo-accent); outline-offset: 3px; }

/* =========================================
   DEMO LAYER CSS (CRÍTICO) 
   ========================================= */
#demo-layer .demo-topbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: var(--demo-z);
    background: var(--demo-topbar-bg);
    color: var(--demo-topbar-text);
    box-shadow: var(--demo-shadow);
    font-family: var(--demo-font);
    font-size: 13px;
    backdrop-filter: blur(8px);
}

.demo-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 10px 16px;
}

#demo-layer .demo-dot {
    width: 10px; height: 10px; border-radius: 99px; display: inline-block;
    box-shadow: var(--demo-glow); background: var(--demo-accent);
    margin-right: 8px; vertical-align: middle;
}
#demo-layer .demo-link {
    color: var(--demo-link); text-shadow: var(--demo-link-shadow); font-weight: 600;
}

/* Notas Pedagógicas */
#demo-layer .demo-note {
    margin-top: 20px; padding: 16px;
    border-radius: var(--demo-radius);
    border: 1px solid var(--demo-note-border);
    background: var(--demo-note-bg);
    color: var(--demo-note-text);
    box-shadow: 0 0 0 1px rgba(0,0,0,.05) inset;
    font-size: 0.9rem;
}
#demo-layer .demo-note .demo-note-prefix {
    color: #15803d; /* Verde oscuro para legibilidad */
    font-weight: 800; display: block; margin-bottom: 4px;
}

/* Adaptación de notas en fondos oscuros */
.section-dark .demo-note {
    --demo-note-text: #eafff2;
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}
.section-dark .demo-note-prefix { color: #4ade80; }

/* =========================================
   LAYOUT & GRID
   ========================================= */
.container {
    max-width: 1120px; margin: 0 auto; padding-inline: 20px;
}
.section { padding-block: var(--sp-lg); }
.text-center { text-align: center; }
.section-header { margin-bottom: var(--sp-md); max-width: 700px; margin-inline: auto; text-align: center; }
.section-header h2 { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--primary-dark); line-height: 1.2; margin-bottom: 10px; }

/* GRID UTILS */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* MOBILE FIRST STRICTO < 768px */
@media (max-width: 767px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .section { padding-block: 40px; }
    #demo-layer .demo-text { display: none; } /* Ahorrar espacio en topbar */
    #demo-layer .demo-left::after { content: "Demo activa"; color: white; font-size: 12px; }
}

/* =========================================
   COMPONENTS
   ========================================= */

/* NAV STICKY */
.site-nav {
    position: sticky;
    top: var(--demo-topbar-offset);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.brand-logo { font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; gap: 8px; color: var(--text-main); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); }

/* Botones */
.btn { display: inline-flex; align-items: center; padding: 10px 24px; border-radius: 99px; font-weight: 600; text-align: center; justify-content: center; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-nav { background: var(--primary-dark); color: white !important; padding: 8px 20px; border-radius: 6px; }

/* HERO */
.hero-section {
    position: relative;
    min-height: 85vh; /* Evitar 100vh para móviles con barras url */
    display: flex;
    align-items: center;
    color: white;
    padding-block: 60px;
    overflow: hidden;
    margin-top: -1px; /* Fix gap */
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.4)); }
.hero-content { position: relative; z-index: 1; max-width: 700px; margin-left: 0; }
.hero-badge { background: rgba(255,255,255,0.1); backdrop-filter: blur(4px); padding: 6px 16px; border-radius: 99px; font-size: 0.9rem; margin-bottom: 20px; display: inline-block; border: 1px solid rgba(255,255,255,0.2); }
.hero-section h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; line-height: 1.1; margin-bottom: 24px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-section p { font-size: 1.125rem; margin-bottom: 32px; opacity: 0.9; max-width: 500px; }
.text-gradient { background: linear-gradient(90deg, #38bdf8, #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 30px; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-weight: 700; font-size: 1.5rem; color: #38bdf8; }
.stat-label { font-size: 0.85rem; opacity: 0.8; }

/* CARDS (Features) */
.feature-card { background: var(--bg-surface); padding: 30px; border-radius: var(--radius-md); box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,0.03); transition: transform 0.2s; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.icon-box { font-size: 2.5rem; margin-bottom: 16px; }

/* TABS (Services) */
.tabs-container { background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.tabs-header { display: flex; overflow-x: auto; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.tab-btn { padding: 16px 24px; background: none; border-bottom: 3px solid transparent; font-weight: 600; color: var(--text-muted); flex: 1; min-width: 140px; text-align: center; }
.tab-btn.active { border-bottom-color: var(--primary); color: var(--primary-dark); background: white; }
.tabs-content { padding: 30px; }
.tab-pane { display: none; animation: fadeIn 0.3s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.check-list li { position: relative; padding-left: 24px; margin-bottom: 10px; }
.check-list li::before { content: "✓"; color: var(--primary); position: absolute; left: 0; font-weight: bold; }
.service-img img { border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
@media (max-width: 767px) { .service-detail { grid-template-columns: 1fr; } }

/* GALLERY (Dark + Labels) */
.section-dark { background-color: var(--color-dark); color: white; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gallery-item { position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; aspect-ratio: 4/3; background: #334155; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.75); color: white;
    padding: 10px; font-size: 0.85rem; font-weight: 500;
    transform: translateY(100%); transition: transform 0.3s;
}
/* En desktop hover, en mobile touch/always visible via JS if wanted, pero "touch" funciona */
.gallery-item:hover .gallery-overlay { transform: translateY(0); }

/* LIGHTBOX */
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; }
.lightbox-content img { max-height: 80vh; border-radius: 4px; border: 2px solid #333; }
.lightbox-caption { color: white; text-align: center; margin-top: 10px; font-weight: 500; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: none; color: white; font-size: 2rem; padding: 10px; opacity: 0.7; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* STEPPER */
.stepper { display: flex; justify-content: space-between; position: relative; max-width: 800px; margin: 40px auto; }
.step { flex: 1; text-align: center; position: relative; z-index: 2; }
.step-circle { width: 50px; height: 50px; background: var(--primary); color: white; border-radius: 50%; line-height: 50px; font-weight: bold; margin: 0 auto 16px; font-size: 1.2rem; box-shadow: 0 0 0 5px var(--bg-body); }
.step-line { flex-grow: 1; height: 2px; background: #e2e8f0; position: absolute; top: 25px; left: 0; width: 100%; z-index: 1; }
@media(max-width: 767px) {
    .stepper { flex-direction: column; gap: 30px; margin-left: 20px; border-left: 2px solid #e2e8f0; }
    .step-line { display: none; }
    .step { display: flex; align-items: flex-start; text-align: left; gap: 20px; }
    .step-circle { margin: 0; transform: translateX(-26px); }
}

/* FAQ ACORDION */
.accordion { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.accordion-item { background: var(--bg-surface); border-radius: var(--radius-sm); border: 1px solid #e2e8f0; overflow: hidden; }
.accordion-header { width: 100%; padding: 20px; text-align: left; background: none; font-weight: 600; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.accordion-header:hover { background: #f8fafc; }
.accordion-header[aria-expanded="true"] .acc-icon { transform: rotate(45deg); }
.acc-icon { font-size: 1.5rem; transition: transform 0.3s; }
.accordion-body { display: none; padding: 0 20px 20px; color: var(--text-muted); }
.accordion-header[aria-expanded="true"] + .accordion-body { display: block; }

/* CONTACT FORM & FOOTER */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: white; padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.contact-list li { margin-bottom: 12px; }
.btn-whatsapp-lg { background: #25D366; color: white; margin-top: 20px; width: 100%; justify-content: center; font-weight: 700; }
.input-group { margin-bottom: 20px; position: relative; }
.input-group input, .input-group select { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); font-size: 16px; background: #f8fafc; }
.floating-label { position: absolute; left: 12px; top: 12px; color: #94a3b8; pointer-events: none; transition: 0.2s; background: transparent; }
.input-group input:focus + .floating-label, .input-group input:not(:placeholder-shown) + .floating-label { top: -10px; left: 8px; font-size: 12px; background: white; padding: 0 4px; color: var(--primary); }
@media(max-width: 767px) { .contact-wrapper { grid-template-columns: 1fr; padding: 24px; } }

.site-footer { background: var(--color-dark); color: white; padding: 40px 0 20px; margin-top: auto; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.footer-links a { color: #94a3b8; display: block; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 20px; text-align: center; color: #64748b; font-size: 0.85rem; }

/* MENU MOBILE DRAWER */
.mobile-toggle { display: none; padding: 10px; background: none; }
@media(max-width: 768px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
}
.mobile-drawer { position: fixed; inset: 0; z-index: 10001; pointer-events: none; }
.mobile-drawer[aria-hidden="false"] { pointer-events: auto; }
.drawer-content { position: absolute; top: 0; right: 0; bottom: 0; width: 80%; max-width: 300px; background: white; transform: translateX(100%); transition: transform 0.3s ease; z-index: 2; padding: 80px 20px 20px; display: flex; flex-direction: column; }
.mobile-drawer[aria-hidden="false"] .drawer-content { transform: translateX(0); }
.drawer-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.3s; z-index: 1; }
.mobile-drawer[aria-hidden="false"] .drawer-overlay { opacity: 1; }
.drawer-close { position: absolute; top: 20px; right: 20px; font-size: 2rem; padding: 10px; }
.drawer-links a { display: block; padding: 15px 0; border-bottom: 1px solid #f1f5f9; font-size: 1.1rem; font-weight: 500; }
.drawer-links .highlight { color: var(--primary); font-weight: 700; }

/* EXTRAS */
.float-wa { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 999; transition: transform 0.2s; }
.float-wa:hover { transform: scale(1.1); }
.wa-icon { width: 34px; height: 34px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: #333; color: white; padding: 12px 24px; border-radius: 99px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.3s; z-index: 10002; }
.toast.show { transform: translateX(-50%) translateY(-20px); }

#back-to-top { position: fixed; bottom: 90px; right: 25px; background: var(--primary-dark); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 990; }
#back-to-top.visible { opacity: 1; pointer-events: auto; }

/* SCROLL OFFSET LOGIC (CRUCIAL) */
section { scroll-margin-top: var(--nav-stack-offset); }
    