/* ==========================================================================
   MEG ÉLECTRIC - HOJA DE ESTILOS PRINCIPAL (PREMIUM TECH AESTHETICS)
   ========================================================================== */

/* Variables del Sistema de Diseño */
:root {
    /* Colores Principales (Tema Oscuro Eléctrico) */
    --bg-dark: #080c14;
    --bg-surface: rgba(13, 20, 35, 0.75);
    --bg-card: rgba(20, 30, 54, 0.55);
    --bg-card-hover: rgba(28, 42, 74, 0.8);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-glow: rgba(14, 165, 233, 0.25);
    
    /* Acentos */
    --primary: #d97706; /* Bronze/Amber Eléctrico Corporativo */
    --primary-glow: rgba(217, 119, 6, 0.15);
    --secondary: #0284c7; /* Steel Blue Profesional */
    --secondary-glow: rgba(2, 132, 199, 0.15);
    --accent-success: #10b981; /* Verde Certificación */
    --accent-danger: #ef4444; /* Rojo Alerta/Fuego */
    --raee-accent: #10b981;
    --raee-accent-glow: rgba(16, 185, 129, 0.15);
    --raee-accent-dark: #059669;
    
    /* Layout */
    --header-offset: calc(4.75rem + env(safe-area-inset-top, 0px));
    --section-gap: clamp(0.5rem, 1.8vh, 1.25rem);
    --hero-title-max-h: clamp(120px, 28vw, 220px);
    
    /* Tipografía y Textos */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Efectos & Transiciones */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(12px);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow-blue: 0 4px 25px rgba(2, 132, 199, 0.05);
    --shadow-glow-amber: 0 4px 25px rgba(217, 119, 6, 0.05);

    /* Espaciado entre secciones */
    --section-pad-y: clamp(2rem, 3.5vw, 3rem);
    --block-gap: 1.25rem;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* Reset Moderno */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-offset);
    font-size: 16px;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Personalizado */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Estructura Base */
.container {
    width: 100%;
    max-width: 1280px;
    min-width: 0;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-pad-y) 0;
    position: relative;
}

/* Grids */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2col {
    grid-template-columns: 1fr;
}

@media(min-width: 992px) {
    .grid-2col {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tipografía Común */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-white);
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    position: relative;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: var(--block-gap);
    max-width: 650px;
}

.section-desc-center {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: var(--block-gap);
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-white) 30%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--primary);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #b45309 100%);
    color: var(--text-white);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.3);
}

.btn-primary svg {
    transition: var(--transition);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-outline-raee {
    background: transparent;
    color: var(--raee-accent);
    border: 1px solid rgba(16, 185, 129, 0.45);
}

.btn-outline-raee:hover {
    background: var(--raee-accent-glow);
    color: var(--text-white);
    border-color: var(--raee-accent);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 0 1.5rem;
    transition: var(--transition);
    background: transparent;
    border-bottom: 1px solid transparent;
}

.main-header.scrolled {
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 0 1rem;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--text-white);
}

.logo-spark {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 5px var(--primary));
    animation: pulseGlow 2s infinite alternate;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.btn-nav {
    padding: 0.5rem 1.2rem;
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary) !important;
    border: 1px solid var(--secondary-glow);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-nav:hover {
    background: var(--secondary);
    color: #000 !important;
    box-shadow: 0 0 15px var(--secondary-glow);
}

.btn-nav::after {
    display: none;
}

/* Hamburguesa móvil */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger-menu .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(var(--header-offset) + 3rem) 0 4rem;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0%, rgba(8, 12, 20, 0.4) 100%),
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(2, 132, 199, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 70%, rgba(16, 185, 129, 0.06) 0%, transparent 55%);
    pointer-events: none;
    z-index: 3;
}

@media (min-width: 992px) {
    .hero-section {
        padding: calc(var(--header-offset) + 4rem) 0 5rem;
    }
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    z-index: 2;
    pointer-events: none;
}

.shadow-blue {
    background: var(--secondary);
    top: -10%;
    left: -10%;
    animation: driftGlow 25s infinite alternate;
}

.shadow-amber {
    background: var(--primary);
    bottom: -10%;
    right: -10%;
    animation: driftGlow 30s infinite alternate-reverse;
}

.hero-layout {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 992px) {
    .hero-layout {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 4rem;
    }
}

.hero-copy {
    text-align: left;
}

.hero-title {
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    line-height: 1.08;
    margin-bottom: 1.5rem;
    letter-spacing: -0.035em;
    font-weight: 800;
}

.hero-lead {
    font-size: clamp(1rem, 2.2vw, 1.12rem);
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 0 2.5rem;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.hero-panels {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-panel {
    position: relative;
    padding: 1.75rem 1.75rem 1.85rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: rgba(13, 20, 35, 0.75);
    backdrop-filter: var(--glass-blur);
    overflow: hidden;
    transition: border-color 0.35s ease, transform 0.35s ease;
}

.hero-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.hero-panel--install::before {
    background: linear-gradient(180deg, var(--secondary), rgba(2, 132, 199, 0.2));
}

.hero-panel--raee::before {
    background: linear-gradient(180deg, var(--raee-accent), rgba(16, 185, 129, 0.2));
}

.hero-panel--install {
    box-shadow: inset 0 1px 0 rgba(2, 132, 199, 0.12);
}

.hero-panel--raee {
    box-shadow: inset 0 1px 0 rgba(16, 185, 129, 0.12);
}

.hero-panel:hover {
    transform: translateY(-3px);
}

.hero-panel--install:hover {
    border-color: rgba(2, 132, 199, 0.35);
}

.hero-panel--raee:hover {
    border-color: rgba(16, 185, 129, 0.35);
}

.hero-panel-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
}

.hero-panel--install .hero-panel-label {
    color: var(--secondary);
}

.hero-panel--raee .hero-panel-label {
    color: var(--raee-accent);
}

.hero-panel h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
    color: var(--text-white);
}

.hero-panel p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.hero-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    transition: gap 0.3s ease, color 0.3s ease;
}

.hero-panel-link::after {
    content: '→';
}

.hero-panel-link:hover {
    gap: 0.55rem;
    color: #38bdf8;
}

.hero-panel-link--raee {
    color: var(--raee-accent);
}

.hero-panel-link--raee:hover {
    color: #34d399;
}

.badge-tech {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    backdrop-filter: var(--glass-blur);
    letter-spacing: 0.02em;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.badge-opds {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.06);
}

.dot-green {
    background-color: var(--raee-accent);
    box-shadow: 0 0 8px var(--raee-accent);
}

.dot-blink {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: blink 1.5s infinite;
}

@media(max-width: 768px) {
    .hero-section {
        min-height: auto;
        height: auto;
        padding-top: calc(var(--header-offset) + var(--section-gap));
        padding-bottom: 2rem;
        align-items: flex-start;
        overflow: hidden;
    }

    .hero-layout,
    .hero-copy,
    .hero-panels {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-title {
        margin-bottom: 1.15rem;
    }

    .hero-lead {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1.5rem;
    }

    .hero-cta-row {
        justify-content: center;
    }

    .hero-cta-row .btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
        white-space: normal;
        text-wrap: balance;
    }

    .hero-layout {
        gap: 1.75rem;
    }

    .hero-panels {
        gap: 0.65rem;
    }

    .hero-panel {
        padding: 1rem 1rem 1.05rem;
    }

    .hero-panel::before {
        width: 3px;
    }

    .hero-panel-label {
        font-size: 0.62rem;
        margin-bottom: 0.35rem;
        letter-spacing: 0.1em;
    }

    .hero-panel h2 {
        font-size: 1.1rem;
        margin-bottom: 0.35rem;
    }

    .hero-panel p {
        font-size: 0.82rem;
        line-height: 1.5;
        margin-bottom: 0.6rem;
    }

    .hero-panel-link {
        font-size: 0.8rem;
    }

    .hero-scroll-indicator {
        display: none;
    }
}

@media (max-width: 768px) and (max-height: 740px) {
    :root {
        --hero-title-max-h: clamp(90px, 22vw, 160px);
        --section-gap: clamp(0.4rem, 1.4vh, 0.85rem);
    }

    .hero-section {
        padding-top: calc(var(--header-offset) + var(--section-gap));
        padding-bottom: 1.75rem;
    }

    .hero-title {
        margin-bottom: 1rem;
        font-size: clamp(1.85rem, 8vw, 2.25rem);
    }

    .hero-lead {
        margin-bottom: 1.25rem;
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .hero-layout {
        gap: 1.25rem;
    }

    .hero-panels {
        gap: 0.5rem;
    }

    .hero-panel {
        padding: 0.85rem 0.9rem 0.9rem;
    }

    .hero-panel h2 {
        font-size: 1.02rem;
    }

    .hero-panel p {
        font-size: 0.78rem;
        margin-bottom: 0.45rem;
    }
}

.text-gradient-green {
    background: linear-gradient(135deg, var(--raee-accent) 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 5;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ==========================================================================
   TIRA DE OBRAS POST-HERO
   ========================================================================== */
.hero-obra-strip {
    padding: clamp(0.85rem, 2vw, 1.25rem) 0;
    background: linear-gradient(180deg, #0a0f18 0%, var(--bg-dark) 100%);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
    max-width: 100%;
}

.hero-obra-strip-viewport {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.hero-obra-strip-track {
    display: flex;
    gap: 0.85rem;
    width: max-content;
    animation: heroObraMarquee 55s linear infinite;
    will-change: transform;
}

.hero-obra-card {
    position: relative;
    flex: 0 0 auto;
    width: clamp(200px, 28vw, 280px);
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    text-decoration: none;
    transition: transform 0.35s ease, border-color 0.35s ease;
}

.hero-obra-card:hover {
    transform: translateY(-3px);
    border-color: rgba(2, 132, 199, 0.45);
}

.hero-obra-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.hero-obra-card:hover .hero-obra-img {
    transform: scale(1.05);
}

.hero-obra-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.55rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-white);
    background: linear-gradient(180deg, transparent 0%, rgba(8, 12, 20, 0.92) 75%);
    text-wrap: balance;
}

@keyframes heroObraMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .hero-obra-strip {
        padding: 0.75rem 0;
    }

    .hero-obra-card {
        width: clamp(160px, 42vw, 220px);
    }

    .hero-obra-caption {
        font-size: 0.68rem;
        padding: 0.45rem 0.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-obra-strip-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .hero-obra-strip-viewport {
        mask-image: none;
        -webkit-mask-image: none;
    }
}

.mouse-icon {
    width: 22px;
    height: 36px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    position: relative;
}

.mouse-icon .wheel {
    width: 4px;
    height: 8px;
    background-color: var(--secondary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

/* ==========================================================================
   QUIÉNES SOMOS & NOSOTROS
   ========================================================================== */
.section-about {
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0a0f18 100%);
    --about-gap: clamp(1.75rem, 3.2vw, 2.5rem);
}

.section-eyebrow {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.about-header {
    max-width: 640px;
    margin-bottom: var(--about-gap);
}

.about-title {
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.15rem;
    line-height: 1.15;
}

.about-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.about-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--about-gap);
    background: rgba(255, 255, 255, 0.015);
}

@media (min-width: 768px) {
    .about-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
}

.about-metric {
    padding: 1.65rem 1.5rem;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.about-metric:nth-child(2n) {
    border-right: none;
}

.about-metric:nth-child(n+5) {
    border-bottom: none;
}

@media (min-width: 768px) {
    .about-metric:nth-child(2n) {
        border-right: 1px solid var(--border-color);
    }

    .about-metric:nth-child(3n) {
        border-right: none;
    }

    .about-metric:nth-child(n+4) {
        border-bottom: none;
    }
}

.about-metric .stat-number {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1;
    letter-spacing: -0.03em;
}

.about-metric-suffix {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(241, 245, 249, 0.45);
    margin-left: 0.1rem;
}

.about-metric-label {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.about-metric--raee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--raee-accent);
    opacity: 0.6;
}

.about-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--about-gap);
    align-items: start;
}

@media (min-width: 992px) {
    .about-body {
        grid-template-columns: 1.4fr 1fr;
        gap: clamp(2rem, 3.5vw, 2.75rem);
    }
}

.about-narrative p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-narrative p:last-child {
    margin-bottom: 0;
}

.about-narrative strong {
    color: var(--text-main);
    font-weight: 600;
}

.about-leadership {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.65rem;
    background: var(--bg-card);
}

.about-leadership-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-leadership-names {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-white);
    line-height: 1.5;
    margin-bottom: 1.15rem;
}

.about-leadership-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border-color);
    padding-top: 1.15rem;
}

.about-leadership-meta li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.65rem;
}

.about-leadership-meta li:last-child {
    margin-bottom: 0;
}

.about-leadership-meta li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--secondary);
    opacity: 0.7;
}

/* Legacy stats — otras secciones */
.about-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.directors-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    backdrop-filter: var(--glass-blur);
    align-self: flex-start;
}

.director-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.director-avatar:nth-child(2) {
    margin-left: -1.75rem;
    color: var(--secondary);
}

.directors-info h4 {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.directors-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.about-stats-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

@media(min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card-raee:hover {
    border-color: var(--raee-accent);
}

.stat-card-raee .stat-number {
    color: var(--raee-accent);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--secondary);
    background: var(--bg-card-hover);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1;
}

.stat-plus {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Filosofía Tabs */
.filosofia-wrapper {
    margin-top: var(--about-gap);
    padding-top: var(--about-gap);
    border-top: 1px solid var(--border-color);
}

.filosofia-header {
    max-width: 620px;
    margin-bottom: calc(var(--about-gap) * 0.85);
}

.filosofia-title {
    font-size: clamp(1.5rem, 3.5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
    background: linear-gradient(135deg, var(--text-white) 0%, rgba(241, 245, 249, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filosofia-lead {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

.tabs-container {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 55% at 0% 0%, rgba(2, 132, 199, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 60% 45% at 100% 100%, rgba(217, 119, 6, 0.08) 0%, transparent 50%),
        rgba(255, 255, 255, 0.02);
}

.tabs-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.03) 0%, transparent 45%, rgba(16, 185, 129, 0.03) 100%);
    pointer-events: none;
}

.tabs-header {
    position: relative;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 9.5rem;
    padding: 0.7rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(8, 12, 20, 0.55);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.tab-btn-num {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.45;
}

.tab-btn-label {
    letter-spacing: -0.01em;
}

.tab-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.14);
}

.tab-btn--blue .tab-btn-num { color: var(--secondary); }
.tab-btn--amber .tab-btn-num { color: var(--primary); }
.tab-btn--steel .tab-btn-num { color: #94a3b8; }
.tab-btn--green .tab-btn-num { color: var(--raee-accent); }

.tab-btn--blue.active {
    color: var(--text-white);
    border-color: rgba(2, 132, 199, 0.55);
    background: rgba(2, 132, 199, 0.12);
    box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.12);
}

.tab-btn--amber.active {
    color: var(--text-white);
    border-color: rgba(217, 119, 6, 0.55);
    background: rgba(217, 119, 6, 0.1);
    box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.12);
}

.tab-btn--steel.active {
    color: var(--text-white);
    border-color: rgba(148, 163, 184, 0.5);
    background: rgba(148, 163, 184, 0.08);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.1);
}

.tab-btn--green.active {
    color: var(--text-white);
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12);
}

.tab-btn.active .tab-btn-num {
    opacity: 0.9;
}

.tabs-content {
    position: relative;
    min-height: 120px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.35s ease forwards;
}

.tab-pane.active {
    display: block;
}

.tab-pane-inner {
    padding: 1.35rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(8, 12, 20, 0.65);
}

.tab-pane--blue .tab-pane-inner { border-color: rgba(2, 132, 199, 0.45); }
.tab-pane--amber .tab-pane-inner { border-color: rgba(217, 119, 6, 0.45); }
.tab-pane--steel .tab-pane-inner { border-color: rgba(148, 163, 184, 0.4); }
.tab-pane--green .tab-pane-inner { border-color: rgba(16, 185, 129, 0.45); }

.tab-pane-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: start;
}

.tab-pane-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.tab-svg-icon {
    width: 1.65rem;
    height: 1.65rem;
    display: block;
}

.tab-pane--blue .tab-pane-icon { color: var(--secondary); border-color: rgba(2, 132, 199, 0.35); background: rgba(2, 132, 199, 0.08); }
.tab-pane--amber .tab-pane-icon { color: var(--primary); border-color: rgba(217, 119, 6, 0.35); background: rgba(217, 119, 6, 0.08); }
.tab-pane--steel .tab-pane-icon { color: #94a3b8; border-color: rgba(148, 163, 184, 0.3); background: rgba(148, 163, 184, 0.06); }
.tab-pane--green .tab-pane-icon { color: var(--raee-accent); border-color: rgba(16, 185, 129, 0.35); background: rgba(16, 185, 129, 0.08); }

.tab-pane-num {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.45rem;
    opacity: 0.9;
}

.tab-pane--blue .tab-pane-num { color: var(--secondary); }
.tab-pane--amber .tab-pane-num { color: var(--primary); }
.tab-pane--steel .tab-pane-num { color: #94a3b8; }
.tab-pane--green .tab-pane-num { color: var(--raee-accent); }

.tab-pane h4 {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.tab-pane p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
}

@media (min-width: 992px) {
    .tabs-header {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow: visible;
    }

    .tab-btn {
        min-width: 0;
        width: 100%;
    }
}

/* Compromiso Callout */
.compromiso-block {
    margin-top: var(--block-gap);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background:
        radial-gradient(ellipse 80% 60% at 0% 0%, rgba(2, 132, 199, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 80% 10%, rgba(217, 119, 6, 0.08) 0%, transparent 45%),
        rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.compromiso-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.04) 0%, transparent 40%, rgba(217, 119, 6, 0.03) 100%);
    pointer-events: none;
}

.compromiso-header {
    position: relative;
    max-width: 620px;
    margin-bottom: var(--block-gap);
}

.compromiso-title {
    font-size: clamp(1.5rem, 3.5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
    background: linear-gradient(135deg, var(--text-white) 0%, rgba(241, 245, 249, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.compromiso-lead {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

.compromiso-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 768px) {
    .compromiso-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.compromiso-item {
    position: relative;
    padding: 1.35rem 1.25rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(8, 12, 20, 0.65);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.compromiso-item:hover {
    transform: translateY(-2px);
}

.compromiso-accent {
    display: none;
}

.compromiso-item--blue {
    border-color: rgba(2, 132, 199, 0.55);
}

.compromiso-item--blue:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.15);
}

.compromiso-item--amber {
    border-color: rgba(217, 119, 6, 0.55);
}

.compromiso-item--amber:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.15);
}

.compromiso-item--steel {
    border-color: rgba(148, 163, 184, 0.5);
}

.compromiso-item--steel:hover {
    border-color: #94a3b8;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.compromiso-item--green {
    border-color: rgba(16, 185, 129, 0.55);
}

.compromiso-item--green:hover {
    border-color: var(--raee-accent);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15);
}

.compromiso-num {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.compromiso-item--blue .compromiso-num { color: var(--secondary); opacity: 0.9; }
.compromiso-item--amber .compromiso-num { color: var(--primary); opacity: 0.9; }
.compromiso-item--steel .compromiso-num { color: #94a3b8; opacity: 0.9; }
.compromiso-item--green .compromiso-num { color: var(--raee-accent); opacity: 0.9; }

.compromiso-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.compromiso-item p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ==========================================================================
   CAPACIDADES Y SERVICIOS
   ========================================================================== */
.section-services {
    background: #06090e;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.services-intro {
    margin-bottom: var(--block-gap) !important;
    font-size: 1.05rem !important;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.3s ease, background 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: rgba(2, 132, 199, 0.35);
    background: var(--bg-card-hover);
}

.service-card--potencia:hover {
    border-color: rgba(217, 119, 6, 0.4);
}

.service-card-raee:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.service-card-img-wrapper {
    width: 100%;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .service-card-img-wrapper {
        aspect-ratio: 1 / 1;
    }
}

.service-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-img {
    transform: scale(1.04);
}

.service-card-accent-bar {
    height: 130px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.18) 0%, rgba(180, 83, 9, 0.06) 100%);
    border-bottom: 1px solid rgba(217, 119, 6, 0.2);
    position: relative;
}

.service-card-accent-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 12px,
        rgba(217, 119, 6, 0.04) 12px,
        rgba(217, 119, 6, 0.04) 24px
    );
}

.service-card-accent-bar--raee {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(5, 150, 105, 0.06) 100%);
    border-bottom-color: rgba(16, 185, 129, 0.2);
}

.service-card-accent-bar--raee::after {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 12px,
        rgba(16, 185, 129, 0.04) 12px,
        rgba(16, 185, 129, 0.04) 24px
    );
}

.service-card-content {
    padding: 0.75rem 0.85rem 0.85rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.service-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--secondary);
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.2);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    margin-bottom: 0.35rem;
}

.service-tag--potencia {
    color: var(--primary);
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.2);
}

.service-tag--raee {
    color: var(--raee-accent);
    background: var(--raee-accent-glow);
    border-color: rgba(16, 185, 129, 0.25);
}

.service-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--text-white);
    margin-bottom: 0.45rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-color);
}

.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.service-list li {
    font-size: 0.74rem;
    color: var(--text-muted);
    padding-left: 0.75rem;
    position: relative;
    margin-bottom: 0.28rem;
    line-height: 1.35;
}

.service-list li:last-child {
    margin-bottom: 0;
}

.service-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--secondary);
    opacity: 0.7;
}

.service-card-raee .service-list li::before {
    background-color: var(--raee-accent);
}

.service-card--potencia .service-list li::before {
    background-color: var(--primary);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--raee-accent);
    text-decoration: none;
    transition: var(--transition);
}

.service-link:hover {
    color: #34d399;
    gap: 0.45rem;
}

/* ==========================================================================
   PORTAFOLIO DE OBRAS REALIZADAS
   ========================================================================== */
.portfolio-controls {
    margin-bottom: var(--block-gap);
}

.portfolio-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.85rem 1.25rem 0.85rem 3rem;
    background: rgba(8, 12, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
    background: rgba(8, 12, 20, 0.85);
}

.search-box:focus-within .search-icon {
    color: var(--secondary);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 600px) {
    .filter-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .filter-buttons {
        grid-template-columns: repeat(6, 1fr);
    }
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
}

.filter-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #000;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

/* Projects grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    align-items: stretch;
}

@media(min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media(min-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-card-img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.project-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-card:hover .project-card-img {
    transform: scale(1.08);
}

/* Estilos para banner de modal */
.modal-project-banner {
    margin: -3.5rem -3.5rem 2.5rem -3.5rem;
    height: 320px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-glow);
}

.modal-project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media(max-width: 576px) {
    .modal-project-banner {
        margin: -2rem -1.5rem 2rem -1.5rem;
        height: 220px;
    }
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-md), var(--shadow-glow-blue);
    background: var(--bg-card-hover);
}

.project-card-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.project-category-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    line-height: 1.2;
}

.complexity-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    line-height: 1.2;
    text-wrap: balance;
}

.complexity-badge.gran-escala {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: var(--primary);
}

.complexity-badge.estructural {
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
    color: var(--secondary);
}

.project-card-body {
    padding: 0.75rem 0.9rem 0.65rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.project-card h3 {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-desc {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin: 0;
    flex-grow: 0;
}

.project-card-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.15rem;
    min-height: 1.65rem;
    align-content: flex-start;
}

.highlight-tag {
    font-size: 0.68rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    color: var(--text-main);
    line-height: 1.2;
}

.project-card-footer {
    padding: 0.6rem 0.9rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--secondary);
    transition: var(--transition);
    margin-top: auto;
}

.project-card:hover .project-card-footer {
    color: var(--primary);
}

.project-card-footer svg {
    transition: var(--transition);
}

.project-card:hover .project-card-footer svg {
    transform: translateX(4px);
}

/* ==========================================================================
   MODAL DE PROYECTO
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 6, 10, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-glow);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--shadow-glow-blue);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    z-index: 2010;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-white);
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-danger);
    border-color: var(--accent-danger);
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 3.5rem;
}

.modal-project-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.modal-project-header .badges {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal-project-header h2 {
    font-size: 2.2rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.modal-project-subheader {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.modal-project-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.modal-tech-specs h3 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid var(--secondary);
    padding-left: 0.75rem;
}

.modal-specs-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media(min-width: 600px) {
    .modal-specs-list {
        grid-template-columns: 1fr 1fr;
    }
}

.modal-specs-list li {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius-md);
}

.modal-specs-list li strong {
    display: block;
    color: var(--text-white);
    font-family: var(--font-heading);
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.modal-specs-list li span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   GALERÍA INSTAGRAM
   ========================================================================== */
.ig-gallery-block {
    margin-top: var(--block-gap);
    padding-top: var(--block-gap);
    border-top: 1px solid var(--border-color);
}

.ig-gallery-header {
    margin-bottom: var(--block-gap);
}

.ig-gallery-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e1306c;
    background: rgba(225, 48, 108, 0.08);
    border: 1px solid rgba(225, 48, 108, 0.25);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.ig-gallery-header .subsection-title {
    margin-bottom: 0.75rem;
}

.ig-gallery-carousel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: var(--block-gap);
}

.ig-carousel-desktop,
.ig-carousel-tablet,
.ig-carousel-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ig-carousel-tablet,
.ig-carousel-compact {
    display: none;
}

.ig-carousel-viewport {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.ig-carousel-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: igMarquee 50s linear infinite;
    will-change: transform;
}

.ig-carousel-row--reverse .ig-carousel-track {
    animation-name: igMarqueeReverse;
}

.ig-carousel-row:nth-child(2) .ig-carousel-track {
    animation-duration: 44s;
}

.ig-carousel-row:nth-child(3) .ig-carousel-track {
    animation-duration: 56s;
}

@keyframes igMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes igMarqueeReverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.ig-gallery-card {
    flex: 0 0 auto;
    width: clamp(160px, 22vw, 220px);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.ig-gallery-card:hover {
    transform: translateY(-4px) scale(1.02);
}

.ig-gallery-media {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.ig-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ig-gallery-card:hover .ig-gallery-img {
    transform: scale(1.06);
}

.ig-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(8, 12, 20, 0.75) 100%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ig-gallery-card:hover .ig-gallery-overlay {
    opacity: 1;
}

.ig-video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    color: var(--text-white);
    backdrop-filter: blur(4px);
    z-index: 2;
    pointer-events: none;
}

.ig-gallery-label {
    font-size: clamp(0.72rem, 1.6vw, 0.82rem);
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.35;
    text-align: center;
    padding: 0 0.15rem;
    transition: color 0.3s ease;
}

.ig-gallery-card:hover .ig-gallery-label {
    color: var(--text-white);
}

.ig-gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ig-gallery-btn svg {
    transition: transform 0.3s ease;
}

.ig-gallery-btn:hover svg {
    transform: translate(2px, -2px);
}

@media (max-width: 768px) {
    .ig-gallery-block {
        margin-top: var(--block-gap);
        padding-top: var(--block-gap);
    }

    .ig-carousel-desktop {
        display: none;
    }

    .ig-carousel-tablet {
        display: flex;
    }

    .ig-gallery-card {
        width: clamp(140px, 38vw, 190px);
    }
}

@media (max-width: 480px) {
    .ig-carousel-tablet {
        display: none;
    }

    .ig-carousel-compact {
        display: flex;
        gap: 0.75rem;
    }

    .ig-gallery-card {
        width: clamp(120px, 36vw, 155px);
    }

    .ig-gallery-label {
        font-size: 0.7rem;
    }

    .ig-video-badge {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ig-carousel-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 1rem;
    }

    .ig-carousel-viewport {
        mask-image: none;
        -webkit-mask-image: none;
    }

    .ig-carousel-tablet,
    .ig-carousel-compact {
        display: none !important;
    }

    .ig-carousel-desktop {
        display: flex !important;
    }

    .ig-carousel-desktop .ig-carousel-track {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .ig-gallery-card {
        width: auto;
    }
}

/* ==========================================================================
   PARTNERS
   ========================================================================== */
.section-partners {
    background: #06090e;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.partners-carousel {
    margin-top: var(--block-gap);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.partners-desktop,
.partners-tablet,
.partners-compact {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.partners-tablet,
.partners-compact {
    display: none;
}

.partners-viewport {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.partners-track {
    display: flex;
    gap: 0.65rem;
    width: max-content;
    animation: partnersMarquee 55s linear infinite;
    will-change: transform;
}

.partners-row--reverse .partners-track {
    animation-name: partnersMarqueeReverse;
}

.partners-row:nth-child(2) .partners-track {
    animation-duration: 48s;
}

.partners-row:nth-child(3) .partners-track {
    animation-duration: 62s;
}

@keyframes partnersMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes partnersMarqueeReverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.partner-card {
    flex: 0 0 auto;
    width: clamp(280px, 34vw, 380px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.85rem 0.75rem;
    text-align: center;
    transition: border-color 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.partner-card:hover {
    border-color: rgba(2, 132, 199, 0.35);
    background: var(--bg-card-hover);
}

.partner-card h4 {
    font-size: clamp(0.92rem, 2.1vw, 1.08rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
    color: var(--text-white);
    line-height: 1.25;
    text-align: center;
    transition: color 0.3s ease;
}

.partner-card:hover h4 {
    color: var(--secondary);
}

.partner-card p {
    font-size: clamp(0.7rem, 1.5vw, 0.76rem);
    color: rgba(148, 163, 184, 0.62);
    letter-spacing: 0.01em;
    line-height: 1.4;
    margin: 0;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .partners-desktop {
        display: none;
    }

    .partners-tablet {
        display: flex;
    }

    .partner-card {
        width: clamp(250px, 48vw, 320px);
        padding: 0.65rem 0.75rem 0.7rem;
    }
}

@media (max-width: 480px) {
    .partners-tablet {
        display: none;
    }

    .partners-compact {
        display: flex;
        gap: 0.55rem;
    }

    .partner-card {
        width: clamp(220px, 52vw, 280px);
        padding: 0.6rem 0.7rem 0.65rem;
    }

    .partner-card h4 {
        font-size: 0.88rem;
    }

    .partner-card p {
        -webkit-line-clamp: 2;
        font-size: 0.68rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .partners-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 1rem;
    }

    .partners-viewport {
        mask-image: none;
        -webkit-mask-image: none;
    }

    .partners-tablet,
    .partners-compact {
        display: none !important;
    }

    .partners-desktop {
        display: flex !important;
    }

    .partners-desktop .partners-track {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .partner-card {
        width: auto;
    }
}

/* ==========================================================================
   CONTACTO & COBERTURA MAP
   ========================================================================== */
.contact-layout {
    margin-top: var(--block-gap);
}

.contact-info-wrapper {
    display: flex;
    flex-direction: column;
}

.contact-info-wrapper h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.coverage-desc {
    color: var(--text-muted);
    margin-bottom: var(--block-gap);
}

/* Leaflet map styles wrapper */
.map-container-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: var(--block-gap);
    box-shadow: var(--shadow-md);
}

.map-container {
    height: 350px;
    width: 100%;
}

/* CSS Filters to make Leaflet dark theme */
.leaflet-tile-container {
    filter: invert(100%) hue-rotate(180deg) brightness(85%) contrast(90%);
}

.leaflet-container {
    background-color: #080c14 !important;
}

.map-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 1000;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-white);
}

/* Responsables cards */
.responsables-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.contact-site-email {
    margin: 0 0 1rem;
}

.contact-site-email .contact-link {
    font-size: 0.95rem;
    font-weight: 600;
}

@media(min-width: 576px) {
    .responsables-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.responsable-contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.responsable-contact-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.resp-title {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resp-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--text-white);
}

.contact-link span {
    font-weight: 600;
}

.wa-link {
    color: var(--accent-success);
}

.wa-link:hover {
    color: #34d399;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3.5rem;
    border-radius: var(--radius-lg);
    backdrop-filter: var(--glass-blur);
    align-self: start;
    position: relative;
}

.contact-form-wrapper h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.form-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media(min-width: 576px) {
    .form-group-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-white);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
}

.form-group select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

.form-group select option {
    background-color: var(--bg-dark);
    color: var(--text-white);
}

.form-status {
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-status.success {
    display: block;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
}

.form-status.error {
    display: block;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background: #04060a;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media(min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1.5rem;
    max-width: 380px;
}

.footer-coverage-indicator {
    font-size: 0.85rem !important;
    font-weight: 600;
    color: var(--primary) !important;
    margin-top: 1rem !important;
}

.footer-links h4, 
.footer-contact-info h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: var(--text-white);
    padding-left: 4px;
}

.footer-contact-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.footer-contact-info a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact-info a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2.5rem;
}

.footer-bottom-flex {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media(min-width: 768px) {
    .footer-bottom-flex {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes pulseGlow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px var(--primary));
    }
    100% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px var(--primary)) drop-shadow(0 0 25px var(--primary-glow));
    }
}

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 1;
    }
    50% {
        top: 20px;
        opacity: 0;
    }
    100% {
        top: 6px;
        opacity: 0;
    }
}

@keyframes driftGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(10%, 15%) scale(1.1);
    }
    100% {
        transform: translate(-5%, -10%) scale(0.9);
    }
}

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

/* ==========================================================================
   RESPONSIVO NAVEGACIÓN
   ========================================================================== */
@media(max-width: 991px) {
    .burger-menu {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        height: 100dvh;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(8, 12, 20, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        z-index: 1000;
        transition: right 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    /* Efecto hamburguesa activa */
    .burger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .tab-pane-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tab-pane-icon {
        width: 2.75rem;
        height: 2.75rem;
    }
}

@media(max-width: 576px) {
    .container {
        padding: 0 1.25rem;
    }
    .modal-body {
        padding: 2rem 1.5rem;
    }
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
    .stat-number {
        font-size: 2.5rem !important;
    }
    .stat-card {
        padding: 1.25rem 1rem !important;
    }
    .project-hero-title {
        font-size: 1.8rem !important;
    }
    .detail-block-title {
        font-size: 1.5rem !important;
    }
    .detail-spec-card {
        padding: 1rem !important;
    }
    .detail-project-scope-desc {
        font-size: 0.95rem !important;
    }
}

/* ==========================================================================
   DEDICATED PROJECT DETAIL PAGE STYLES
   ========================================================================== */
.page-project-detail {
    padding-top: 0;
}

.project-detail-hero {
    height: 45vh;
    min-height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(8, 12, 20, 0.4) 0%, rgba(8, 12, 20, 0.95) 100%);
    z-index: 1;
}

.project-hero-content-wrapper {
    position: relative;
    z-index: 5;
}

.project-hero-breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-hero-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.project-hero-breadcrumbs a:hover {
    color: var(--secondary);
}

.project-hero-title {
    font-size: 3rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

@media(max-width: 768px) {
    .project-detail-hero {
        height: auto;
        min-height: 0;
        padding-top: calc(var(--header-offset) + 1.5rem);
        padding-bottom: 2rem;
    }

    .project-hero-title {
        font-size: 2rem;
    }
}

.project-hero-building {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 600;
}

.back-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    transition: var(--transition);
}

.back-link-btn:hover {
    color: var(--text-white);
}

.back-link-btn svg {
    transition: var(--transition);
}

.back-link-btn:hover svg {
    transform: translateX(-4px);
}

/* Grid Layout for detail page */
.project-detail-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media(min-width: 992px) {
    .project-detail-layout-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.detail-block-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--secondary);
    padding-left: 0.75rem;
}

.detail-project-scope-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.detail-specs-grid-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.detail-spec-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.detail-spec-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
}

.detail-spec-card strong {
    display: block;
    color: var(--text-white);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.detail-spec-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Sidebar Styles */
.project-detail-sidebar {
    position: relative;
}

.project-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    position: sticky;
    top: 100px;
}

.project-sidebar-card h3 {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.sidebar-spec-item:last-of-type {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.spec-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
}

.spec-value-badge {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
}

/* Category styles on sidebar */
.spec-value-badge.category-salud {
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.15);
    color: var(--secondary);
}

.spec-value-badge.category-educacion {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.spec-value-badge.category-industrial {
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.15);
    color: var(--primary);
}

.spec-value-badge.category-deportivo {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.spec-value-badge.category-conectividad {
    background: rgba(236, 72, 153, 0.08);
    border: 1px solid rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.sidebar-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.sidebar-cta-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 2rem;
}

.sidebar-cta-box h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.sidebar-cta-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* ==========================================================================
   ESTILOS DE MARKDOWN PARSEADO (NEGRITAS Y LISTAS)
   ========================================================================== */
.parsed-markdown-list {
    list-style: disc !important;
    padding-left: 1.5rem !important;
    margin: 0.75rem 0 !important;
    color: var(--text-muted);
}

.parsed-markdown-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.parsed-markdown-list li:last-child {
    margin-bottom: 0;
}

.parsed-markdown-list li strong {
    color: var(--text-white);
}

/* Espaciado de párrafos anidados en contenedores con markdown */
.project-card-desc p {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-desc p:last-child {
    margin-bottom: 0;
}

.detail-project-scope-desc p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.detail-project-scope-desc p:last-child {
    margin-bottom: 0;
}

.detail-spec-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.detail-spec-card p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   RECICLAJE RAEE
   ========================================================================== */
.section-reciclaje {
    background: linear-gradient(180deg, #06090e 0%, rgba(6, 20, 14, 0.95) 50%, #06090e 100%);
    border-top: 1px solid rgba(16, 185, 129, 0.12);
    border-bottom: 1px solid rgba(16, 185, 129, 0.12);
    position: relative;
    overflow: hidden;
}

.section-reciclaje::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--raee-accent);
    filter: blur(160px);
    opacity: 0.06;
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.raee-intro {
    margin-bottom: var(--block-gap);
}

.raee-section-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--raee-accent);
    background: var(--raee-accent-glow);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
}

/* Carrusel en tira — pilares RAEE */
.raee-carousel {
    margin-bottom: var(--block-gap);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.raee-carousel-desktop,
.raee-carousel-tablet,
.raee-carousel-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.raee-carousel-tablet,
.raee-carousel-compact {
    display: none;
}

.raee-carousel-viewport {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.raee-carousel-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: raeeMarquee 42s linear infinite;
    will-change: transform;
}

.raee-carousel-row--reverse .raee-carousel-track {
    animation-name: raeeMarqueeReverse;
}

.raee-carousel-row:nth-child(2) .raee-carousel-track {
    animation-duration: 36s;
}

.raee-carousel-row:nth-child(3) .raee-carousel-track {
    animation-duration: 48s;
}

@keyframes raeeMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes raeeMarqueeReverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.raee-carousel-card {
    flex: 0 0 auto;
    width: clamp(220px, 28vw, 300px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem 1.25rem;
    transition: border-color 0.3s ease;
}

.raee-carousel-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
}

.raee-carousel-title {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.25;
    margin-bottom: 0.45rem;
    letter-spacing: -0.01em;
}

.raee-carousel-desc {
    font-size: clamp(0.78rem, 1.8vw, 0.85rem);
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .raee-carousel-desktop {
        display: none;
    }

    .raee-carousel-tablet {
        display: flex;
    }

    .raee-carousel-card {
        width: clamp(200px, 44vw, 260px);
    }
}

@media (max-width: 480px) {
    .raee-carousel-tablet {
        display: none;
    }

    .raee-carousel-compact {
        display: flex;
        gap: 0.75rem;
    }

    .raee-carousel-card {
        width: clamp(168px, 42vw, 210px);
        padding: 0.95rem 1rem 1.05rem;
    }

    .raee-carousel-title {
        font-size: 0.88rem;
        margin-bottom: 0.35rem;
    }

    .raee-carousel-desc {
        font-size: 0.76rem;
        line-height: 1.45;
        -webkit-line-clamp: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .raee-carousel-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .raee-carousel-viewport {
        mask-image: none;
        -webkit-mask-image: none;
    }

    .raee-carousel-tablet,
    .raee-carousel-compact {
        display: none !important;
    }

    .raee-carousel-desktop {
        display: flex !important;
    }

    .raee-carousel-desktop .raee-carousel-track {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
    }

    .raee-carousel-desktop .raee-carousel-card {
        width: auto;
    }
}

.raee-process {
    margin-bottom: var(--block-gap);
}

.raee-process-desc {
    margin-bottom: var(--block-gap);
}

.raee-process-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media(min-width: 768px) {
    .raee-process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(min-width: 1100px) {
    .raee-process-steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

.raee-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.5rem;
    position: relative;
    transition: var(--transition);
}

.raee-step:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.raee-step-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: rgba(16, 185, 129, 0.25);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.raee-step h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.raee-step p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.raee-faq {
    margin-bottom: var(--block-gap);
}

.faq-accordion {
    max-width: 800px;
    margin: var(--block-gap) auto 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.open {
    border-color: rgba(16, 185, 129, 0.35);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--raee-accent);
}

.faq-chevron {
    flex-shrink: 0;
    transition: var(--transition);
    color: var(--text-muted);
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--raee-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.raee-cta {
    background: var(--bg-card);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1rem, 3vw, 1.5rem);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.raee-cta::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--raee-accent);
    filter: blur(100px);
    opacity: 0.08;
    bottom: -80px;
    left: -80px;
    pointer-events: none;
}

.raee-cta h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-bottom: 0;
}

.raee-cta > p {
    color: var(--text-muted);
    margin-bottom: 0;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.92rem;
    line-height: 1.5;
}

.raee-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-bottom: 0;
}

.raee-cta-phone {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.raee-cta-phone a {
    color: var(--raee-accent);
    text-decoration: none;
    font-weight: 600;
}

.raee-cta-phone a:hover {
    text-decoration: underline;
}

@media (max-width: 380px) {
    .section-eyebrow {
        letter-spacing: 0.1em;
    }

    .hero-title {
        text-wrap: balance;
    }

    .filter-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }

    .filter-btn {
        font-size: 0.72rem;
        padding: 0.55rem 0.35rem;
        white-space: normal;
        text-wrap: balance;
    }

    .tab-btn {
        min-width: 8.25rem;
        font-size: 0.78rem;
    }

    .partner-card {
        width: clamp(200px, 78vw, 260px);
    }

    .raee-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .raee-cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   REGLA 02 — Crédito DpEstudio
   ========================================================================== */
.footer-credit {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text-muted);
}

.footer-credit a {
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: var(--transition);
}

.footer-credit a:hover {
    color: var(--secondary);
}

/* ==========================================================================
   REGLA 07 — Botón WhatsApp flotante
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    right: max(22px, env(safe-area-inset-right, 0px));
    bottom: max(22px, calc(22px + env(safe-area-inset-bottom, 0px)));
    z-index: 1500;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
}

.whatsapp-float:hover {
    transform: translateZ(0) translateY(-3px) scale(1.04);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55);
    color: #ffffff;
}

.whatsapp-float:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.whatsapp-float-icon {
    width: 30px;
    height: 30px;
}

@media (max-width: 768px) {
    .whatsapp-float {
        right: max(16px, env(safe-area-inset-right, 0px));
        bottom: max(24px, calc(20px + env(safe-area-inset-bottom, 0px)));
        width: 54px;
        height: 54px;
    }

    .whatsapp-float-icon {
        width: 28px;
        height: 28px;
    }
}

/* ==========================================================================
   REGLA 08 — Carruseles horizontales sin desborde del documento
   ========================================================================== */
.ig-gallery-block,
.partners-carousel,
.tabs-header {
    max-width: 100%;
}
