/* ========================================
   OECSA — ESTILOS DEL SITIO (heredados del sitio PHP, con los cambios anotados)
   ======================================== */

/* ==========================================
   IMAGE SAFETY — Reglas universales para que
   NINGUNA imagen rompa el layout o se distorsione,
   sin importar el tamaño/proporción de archivo subido.

   Estrategia:
   1. Todas las <img> sin object-fit explícito → contain (NO se estiran)
   2. Todas las <img> dentro de aspect-ratio containers → cover
   3. Backgrounds con url() → cover + center + no-repeat
   4. Logos: contain (preservan proporción, no rellenan)
   5. Fotos en cards/grids: cover (recortan pero no deforman)
   ========================================== */

/* Base universal: ninguna imagen excede su contenedor ni se estira */
img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    display: block;
    object-fit: contain;            /* default seguro: NO deforma */
    object-position: center;
    vertical-align: middle;
    -webkit-user-drag: none;
}

/* Si la <img> tiene object-fit/style inline, respeta el del autor */
img[style*="object-fit"] { object-fit: revert; }
img[style*="object-fit: cover"]   { object-fit: cover !important; }
img[style*="object-fit: contain"] { object-fit: contain !important; }
img[style*="object-fit:cover"]    { object-fit: cover !important; }
img[style*="object-fit:contain"]  { object-fit: contain !important; }

/* Backgrounds con imagen → siempre cover, centrado y sin repetir */
[style*="background:"][style*="url("],
[style*="background-image:"],
[style*="background-image :"],
.hero-slideshow .slide {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Logos institucionales (navbar, footer, login, 404, admin)
   → contain absoluto, nunca se estiran */
.top-nav-logo img,
.a-side-logo img,
footer img,
.footer-section img {
    object-fit: contain !important;
    object-position: center;
    max-width: 100%;
    max-height: 100%;
    width: auto;
}

/* Cards: la imagen interna nunca se desborda */
.card img { max-width: 100%; max-height: 100%; }

/* Logos de servicios en home: tarjetas blancas — contain preserva forma */
.service-card img {
    object-fit: contain !important;
    max-height: 80px;
}

/* Slides del hero principal: el contenedor tiene tamaño, el bg cubre */
.hero-slideshow .slide { background-size: cover; background-position: center; }

/* Imágenes circulares (avatares, premios) → cover para llenar el círculo */
img[style*="border-radius: 50%"],
img[style*="border-radius:50%"] {
    object-fit: cover !important;
}

/* Galería de obra del detalle de proyecto: cada celda es un cuadrado/4:3
   que carga la imagen como background → cover ya está aplicado arriba */

/* Loader inicial (200k.png en footer) — preservar proporción */
#load-text { object-fit: contain; max-width: 90vw; }



:root {
    --oecsa-green: #BCD02E;
    --oecsa-gray: #A7ADA1;
    --oecsa-light-bg: #fbfcfb;
    --oecsa-border: #eaede6;
    --white: #ffffff;
    --text-main: #2b2b2b;
    --text-muted: #737c6f;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 15px 40px rgba(0, 0, 0, 0.06);
    --nav-height: 88px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--white);
    color: var(--text-main);
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ==========================================
   TOP FIXED NAVBAR
   ========================================== */
.top-nav {
    position: fixed;
    top: 15px;
    left: 20px;
    right: 20px;
    z-index: 5000;
    height: var(--nav-height);
    /* Fondo verde; el blanco lo aplica directamente .top-nav-logo */
    background: rgba(188, 208, 46, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    border-top: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

.top-nav.scrolled {
    top: 8px;
    background: rgba(188, 208, 46, 0.45);
}

.top-nav.scrolled:hover {
    background: rgba(188, 208, 46, 0.85);
}

.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.top-nav-logo {
    height: 100%;
    width: 180px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    transition: background 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.top-nav.scrolled .top-nav-logo {
    background: rgba(255, 255, 255, 0.98);
}

.top-nav-logo img {
    height: 75px; /* Logo más grande */
    display: block;
    object-fit: contain;
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    padding: 0 20px;
}

.top-nav-links .nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    height: auto;
    width: auto;
    border: none;
}

.top-nav.scrolled .top-nav-links .nav-link {
    color: white;
}

.top-nav-links .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
}

.btn-nav-admin {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--oecsa-green);
    background: white; /* Contraste total: Blanco sobre Verde */
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 40px;
    border: 1px solid white;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-nav-admin:hover {
    background: transparent;
    color: white;
}

.top-nav.scrolled .btn-nav-admin {
    background: white;
    color: var(--oecsa-green);
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: white;
    cursor: pointer;
    padding: 8px;
}

.top-nav.scrolled .nav-hamburger {
    color: var(--text-main);
}

.top-nav-mobile {
    display: none;
    flex-direction: column;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--oecsa-border);
    padding: 16px 32px 24px;
    gap: 4px;
}

.top-nav-mobile.open {
    display: flex;
}

.top-nav-mobile .nav-link {
    font-size: 1rem;
    color: var(--text-main);
    padding: 12px 8px;
    border-bottom: 1px solid var(--oecsa-border);
    display: block;
    height: auto;
    width: auto;
    border-radius: 0;
    text-decoration: none;
}

.top-nav-mobile .nav-link::after {
    display: none;
}

/* ==========================================
   SNAP SCROLL CONTAINER
   ========================================== */
.snap-container {
    height: 100vh;
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  
    scrollbar-width: none;
    padding-top: var(--nav-height); /* Compensar el navbar fijo */
}

.snap-container::-webkit-scrollbar {
    display: none;
}

.snap-section {
    min-height: calc(100vh - var(--nav-height));
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    display: flex;
    align-items: center;
    position: relative;
    padding: 60px 8%;
}

/* First snap section (hero/video) should still be full height */
.snap-section.hero-full {
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    margin-top: calc(-1 * var(--nav-height)); /* Pull up to fill screen */
}

/* ==========================================
   TYPOGRAPHY & LAYOUT
   ========================================== */
h1, h2, h3, h4 {
    font-weight: 300;
    color: var(--text-main);
    line-height: 1.1;
    text-align: center;
}

h1 {
    font-size: clamp(3.5rem, 6vw, 5rem);
    letter-spacing: -2px;
    margin-bottom: 40px;
}

h2 {
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
    letter-spacing: -1px;
    margin-bottom: 35px;
    line-height: 1.2;
}

h3 {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 12px;
}

p {
    color: var(--text-muted);
}

.bg-light {
    background-color: var(--oecsa-light-bg);
}

/* PAGE HERO — espaciado uniforme del título superior en todas las páginas */
.page-hero {
    padding: 120px 8% 80px !important;
    min-height: auto !important;
    height: auto !important;
    display: block !important;
    text-align: center;
}
.page-hero > div {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ==========================================
   CARDS & UI ELEMENTS
   ========================================== */
.card {
    background: var(--white);
    border: 1px solid var(--oecsa-border);
    border-radius: 8px;
    padding: 50px 40px;
    box-shadow: var(--shadow-sm);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--oecsa-green);
}

/* Entrance animations */
/* Entrada: 0.7 s y 24 px (antes 1 s y 40 px) para que al bajar rápido el
   contenido no se quede atrás. Solo anima opacidad y posición, que el
   navegador mueve sin recalcular la página. */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Light beam effect — overflow:hidden está en el wrapper div (inyectado por JS)
   El h1/h2 interior NO tiene overflow:hidden, así los acentos (á,é,ó,ú,ñ) nunca se cortan */
.beam-text {
    position: relative;
    display: block;
    overflow: hidden;
}

.beam-text::after {
    content: "";
    position: absolute;
    top: 0; 
    left: -150%;
    width: 100%; 
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        rgba(188, 208, 46, 0.2) 30%, 
        rgba(188, 208, 46, 0.8) 50%, 
        rgba(188, 208, 46, 0.2) 70%, 
        transparent 100%
    );
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 10;
}

.beam-text.visible::after {
    animation: beamSweep 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes beamSweep {
    0% { left: -150%; }
    100% { left: 150%; }
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--oecsa-green);
    color: var(--white);
    padding: 16px 36px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 40px;
    border: 1px solid var(--oecsa-green);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--white);
    color: var(--oecsa-green);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border: 1px solid var(--oecsa-border);
    border-radius: 50%;
    margin-bottom: 24px;
    color: var(--oecsa-green);
    font-size: 1.5rem;
    transition: 0.4s ease;
}

.card:hover .icon-wrapper {
    background-color: var(--oecsa-green);
    color: var(--white);
    border-color: var(--oecsa-green);
}

/* ==========================================
   NAMED RESPONSIVE GRID CLASSES
   These classes define grid layouts and collapse
   cleanly on mobile without needing !important wars
   on inline styles.
   ========================================== */

/* History section: image left + text right */
.rg-history {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
    width: 100%;
}

/* Contact page: form + info side-by-side */
.rg-contact {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    width: 100%;
}

/* Footer 3-column grid */
.rg-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 80px;
}

/* Two-column input pairs inside forms */
.rg-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Project detail: carousel + sidebar */
.rg-project-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    align-items: start;
    width: 100%;
}

/* ==========================================
   PREVENCIÓN GLOBAL DE OVERFLOW HORIZONTAL
   ========================================== */
html, body { overflow-x: hidden; max-width: 100vw; }
* { max-width: 100%; }
.snap-container, .snap-section, section { max-width: 100vw; overflow-x: hidden; box-sizing: border-box; }
iframe, video, img { max-width: 100%; }

/* ==========================================
   RESPONSIVE — TABLET (≤ 1024px)
   ========================================== */
@media (max-width: 1024px) {
    .snap-section {
        padding: 60px 5% !important;
    }

    /* Sidebar derecha del detalle de proyecto deja de ser sticky en tablet */
    .rg-project-body aside,
    .rg-project-body > div[style*="sticky"] {
        position: static !important;
    }

    .rg-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* ==========================================
   RESPONSIVE — MÓVIL (≤ 900px)
   ========================================== */
@media (max-width: 900px) {
    /* NAVBAR */
    .top-nav {
        overflow: visible !important;   /* permite que el menú desplegable salga del navbar */
    }
    .top-nav-links { display: none; }
    .btn-nav-admin { display: none; }
    .nav-hamburger { display: block; }
    .top-nav-logo { width: 130px !important; }
    .top-nav-logo img { height: 55px !important; }

    /* En móvil: el enlace a OERP queda dentro del menú */
    .nav-oerp-escritorio { display: none !important; }

    /* MENÚ DESPLEGABLE: posicionado debajo del navbar y con prioridad visual */
    .top-nav-mobile {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 10px;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px);
        border-radius: 12px;
        border: 1px solid var(--oecsa-border) !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
        padding: 16px 0 !important;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 6000;
    }
    .top-nav-mobile .nav-link {
        padding: 14px 28px !important;
        font-size: 1rem !important;
        color: var(--text-main) !important;
        border-bottom: 1px solid var(--oecsa-border) !important;
        border-radius: 0 !important;
        width: 100% !important;
        display: flex !important;
        align-items: center;
        gap: 12px;
    }
    .top-nav-mobile .nav-link:last-child {
        border-bottom: none !important;
        background: var(--oecsa-green) !important;
        color: white !important;
        font-weight: 600;
    }
    .top-nav-mobile .nav-link:hover {
        background: var(--oecsa-light-bg) !important;
    }

    /* CONTENEDOR SCROLL: quitar snap en móvil (mejor UX) */
    .snap-container {
        scroll-snap-type: none;
        overflow-y: auto;
        padding-top: 80px; /* compensar navbar */
    }

    /* SECCIONES */
    .snap-section {
        padding: 50px 18px !important;
        height: auto !important;
        min-height: auto !important;
        display: block !important;
        scroll-snap-align: none !important;
    }
    /* Page hero: mantener el mismo padding superior, ajustado a móvil */
    .page-hero {
        padding: 90px 18px 50px !important;
    }
    .snap-section.hero-full {
        height: 90vh !important;
        min-height: 480px !important;
        max-height: 100vh !important;
        margin-top: 0 !important;
        padding: 60px 18px !important;
    }

    /* TIPOGRAFÍA */
    h1 { font-size: clamp(1.9rem, 8vw, 2.6rem) !important; letter-spacing: -1px; margin-bottom: 22px; line-height: 1.15; }
    h2 { font-size: clamp(1.5rem, 6vw, 2rem) !important; margin-bottom: 22px; line-height: 1.2; }
    h3 { font-size: 1.15rem !important; }
    p  { font-size: 0.98rem !important; line-height: 1.65; }

    /* BOTONES */
    .btn-primary {
        padding: 14px 28px !important;
        font-size: 0.82rem !important;
        letter-spacing: 1px;
    }

    /* MÉTRICAS */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    .metrics-grid > div {
        border-right: none !important;
        border-bottom: 1px solid var(--oecsa-border);
        padding: 18px 8px !important;
    }
    .metrics-grid > div span:first-child {
        font-size: 2.5rem !important;
    }

    /* CARDS */
    .card {
        padding: 28px 22px !important;
    }
    .card:hover { transform: none !important; } /* en móvil hover es por tap, evitar saltos */

    /* FOOTER */
    .footer-section {
        display: block !important;
        padding: 50px 18px 30px !important;
    }
    .rg-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    /* GRIDS NOMBRADOS — todos a 1 columna */
    .rg-history,
    .rg-contact,
    .rg-form-fields,
    .rg-project-body,
    .rg-footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    .rg-history > div:first-child {
        min-height: 240px !important;
        height: 240px !important;
    }

    /* TARJETAS DE SERVICIO (home): que ocupen ancho completo, no 220px fijo */
    .service-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* SLIDER DE PROYECTOS DESTACADOS */
    .projects-slider {
        padding: 10px 4px 30px !important;
        gap: 18px !important;
    }
    .project-card-feat {
        flex: 0 0 85% !important;
        max-width: 85% !important;
    }

    /* GRID DE PROYECTOS (página proyectos) */
    #projects-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* FILTROS DE PROYECTOS */
    #filter-wrapper {
        width: 100%;
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding: 8px !important;
    }
    #filter-wrapper .filter-btn {
        font-size: 0.7rem !important;
        padding: 8px 14px !important;
    }

    /* HERO DEL DETALLE DE PROYECTO */
    .snap-section[style*="75vh"] {
        height: 55vh !important;
        min-height: 380px !important;
    }

    /* CAROUSEL HERO PROYECTO: títulos abajo */
    .snap-section[style*="75vh"] > div + div {
        bottom: 30px !important;
        left: 18px !important;
        right: 18px !important;
        max-width: calc(100% - 36px) !important;
    }

    /* MODAL DE REVISTA: visor a pantalla completa, sin padding excesivo */
    #revistaModal > div {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    #revistaModal > div > div {
        padding: 12px 14px !important;
    }
    #revistaModal button {
        top: 12px !important;
        right: 16px !important;
        font-size: 2rem !important;
    }

    /* ESTANTE DE REVISTAS: tarjetas más pequeñas */
    section#memoria > div > div {
        gap: 25px !important;
    }
    section#memoria > div > div > div {
        width: 160px !important;
    }
    section#memoria > div > div > div > div:first-child {
        width: 140px !important;
        height: 196px !important;
    }

    /* PILARES SOSTENIBILIDAD */
    section.snap-section .card[style*="border-top"] {
        padding: 32px 24px !important;
    }

    /* FORMULARIO DE CONTACTO */
    form input, form textarea, form select {
        font-size: 16px !important; /* iOS no hace zoom si ≥16px */
    }

    /* BOTONES FLOTANTES */
    .floating-call-btn {
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }
    .floating-whatsapp-btn {
        bottom: 80px !important;
        right: 20px !important;
        left: auto !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 1.4rem !important;
    }

    /* MAPA EMBED EN DETALLE: que tenga aspecto razonable */
    iframe[src*="maps"] {
        min-height: 220px;
    }

    /* GALERÍA DEL DETALLE */
    .snap-section[style*="100vh"] [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* FOOTER LOGO: alinea izquierda en móvil */
    footer img { object-position: left center !important; }
}

/* ==========================================
   RESPONSIVE — MÓVIL PEQUEÑO (≤ 480px)
   ========================================== */
@media (max-width: 480px) {
    .snap-section {
        padding: 40px 14px !important;
    }

    h1 { font-size: clamp(1.7rem, 7vw, 2.1rem) !important; }
    h2 { font-size: clamp(1.3rem, 6vw, 1.7rem) !important; }
    h3 { font-size: 1.05rem !important; }
    p  { font-size: 0.95rem !important; }

    .top-nav {
        left: 8px;
        right: 8px;
        top: 8px;
        height: 70px;
    }
    .top-nav-logo { width: 100px !important; }
    .top-nav-logo img { height: 45px !important; }

    .btn-primary {
        width: 100%;
        padding: 13px 18px !important;
        font-size: 0.78rem !important;
    }

    .metrics-grid {
        grid-template-columns: 1fr !important;
    }
    .metrics-grid > div span:first-child {
        font-size: 2.2rem !important;
    }

    .rg-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .card {
        padding: 22px 18px !important;
    }

    /* SLIDER PROYECTOS: cards casi a ancho completo */
    .project-card-feat {
        flex: 0 0 90% !important;
        max-width: 90% !important;
    }

    /* RECONOCIMIENTOS: 1 columna en pantallas mini */
    section.snap-section.bg-light [style*="repeat(auto-fit, minmax(300px"] {
        grid-template-columns: 1fr !important;
    }

    /* ESTANTE REVISTAS: 1 por fila */
    section#memoria > div > div {
        flex-direction: column !important;
        align-items: center;
    }

    /* PROYECTO DETALLE: hero más bajo */
    .snap-section[style*="75vh"] {
        height: 45vh !important;
        min-height: 320px !important;
    }
    .snap-section[style*="75vh"] h1 {
        font-size: 1.6rem !important;
    }

    /* FICHA TÉCNICA: 1 columna */
    .ficha-list,
    .card ul[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .ficha-card { padding: 22px 18px !important; }

    /* FORMULARIO DE TRABAJO */
    form input[type="text"],
    form input[type="email"],
    form input[type="tel"],
    form textarea,
    form select {
        padding: 12px 14px !important;
    }
}

/* ==========================================
   ORIENTACIÓN LANDSCAPE EN MÓVIL
   (cuando el usuario rota el teléfono)
   ========================================== */
@media (max-width: 900px) and (orientation: landscape) {
    .snap-section.hero-full {
        height: 100vh !important;
        min-height: 320px !important;
    }
    .top-nav { height: 60px; }
}
/* ==========================================================================
   COMPONENTES — lo que el sitio PHP tenía en estilos en línea y en bloques
   <style> dentro de cada vista, pasado a clases. Mismos valores, mismo look.
   ========================================================================== */

/* ─── Enlace a OERP (reemplaza al casco) ─── */
.nav-oerp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 18px;
    padding: 9px 20px;
    border-radius: 40px;
    background: white;
    color: var(--oecsa-green);
    border: 1px solid white;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.25s ease, color 0.25s ease;
}
.nav-oerp:hover { background: transparent; color: white; }
.top-nav-mobile .nav-oerp-movil span {
    font-size: 0.78rem; font-weight: 400; opacity: 0.85; margin-left: auto;
}
.top-nav-links .nav-link.activo { background: rgba(255,255,255,0.18); }
.top-nav-links .nav-link { white-space: nowrap; }
/* Con «Obras» el menú tiene ocho opciones: entre 900 y 1280 px se compacta
   para que el enlace a OERP no se salga de la barra. */
@media (min-width: 901px) and (max-width: 1280px) {
    .top-nav-logo { width: 140px; }
    .top-nav-logo img { height: 62px; }
    .top-nav-links { gap: 0; padding: 0 8px; }
    .top-nav-links .nav-link { padding: 8px 8px; font-size: 0.8rem; letter-spacing: 0; }
    .nav-oerp { margin-right: 12px; padding: 8px 14px; font-size: 0.74rem; letter-spacing: 1px; }
}

/* ─── Utilidades de texto ─── */
.etiqueta {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--oecsa-green);
    font-weight: 500;
    text-transform: uppercase;
}
.etiqueta.gris { color: var(--oecsa-gray); letter-spacing: 2px; }
.etiqueta-espaciada { letter-spacing: 12px; font-size: 0.85rem; margin-bottom: 25px; display: block; }
.verde { color: var(--oecsa-green); }
.bajada { font-size: 1.15rem; line-height: 1.8; color: var(--text-muted); margin: 30px auto 0; max-width: 680px; font-weight: 300; }
.titulo-izq { text-align: left; font-size: 2rem; margin-bottom: 30px; }
.titulo-ligero { font-weight: 300; letter-spacing: -2px; }
.raya-verde { width: 100px; height: 2px; background: var(--oecsa-green); margin: 0 auto 30px; }
.subtitulo { text-align: left; margin-bottom: 20px; font-weight: 500; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── Contenedores de sección ─── */
.seccion-alta { height: auto; min-height: 100vh; display: block; padding-top: 100px; padding-bottom: 80px; }
.ancho { width: 100%; max-width: 1300px; margin: 0 auto; }
.estrecho-1000 { max-width: 1000px; text-align: center; }
.estrecho-1100 { max-width: 1100px; text-align: center; }
.encabezado-pagina { max-width: 900px; margin: 0 auto 60px; text-align: center; width: 100%; }
.encabezado-pagina.estrecho { margin-bottom: 0; }
.encabezado-pagina h1 { margin-top: 20px; }
.encabezado-seccion { text-align: center; margin-bottom: 70px; }
.encabezado-seccion h2 { margin: 10px 0 15px; }
.encabezado-seccion p { font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ─── Botones ─── */
.btn-grande { padding: 18px 48px; font-size: 0.9rem; }
.btn-oscuro { background: var(--text-main); border-color: var(--text-main); }
.btn-oscuro:hover { color: var(--text-main); }
.btn-contorno { background: transparent; color: var(--oecsa-green); }
.btn-contorno:hover { background: var(--oecsa-green); color: white; }
.btn-ancho { width: 100%; padding: 15px; margin-top: 10px; }
.btn-secundario {
    color: white; text-decoration: none; font-size: 0.85rem; font-weight: 500;
    letter-spacing: 1.5px; text-transform: uppercase; display: inline-flex; gap: 10px; align-items: center;
    padding: 16px 20px; transition: color 0.3s;
}
.btn-secundario:hover { color: var(--oecsa-green); }
.enlace-suave { color: var(--text-muted); text-decoration: none; padding: 16px 20px; font-size: 0.88rem; font-weight: 500; transition: color 0.3s; }
.enlace-suave:hover { color: var(--oecsa-green); }
.hero-botones { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 40px; }

/* ─── Pantalla de carga del inicio (antes GSAP desde un CDN; ahora CSS) ─── */
#loading {
    position: fixed; inset: 0; background: var(--white); z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    animation: cargaSube 0.6s cubic-bezier(0.65, 0, 0.35, 1) 1.15s forwards;
}
#load-text { height: 240px; width: auto; max-width: 90vw; opacity: 0; margin-bottom: 40px; animation: aparece 0.7s ease-out forwards; }
#progress { width: 0; height: 2px; background: var(--oecsa-green); animation: avanza 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards; }
body.carga-vista #loading { display: none; }
@keyframes aparece { to { opacity: 1; } }
@keyframes avanza { to { width: 240px; } }
@keyframes cargaSube { to { transform: translateY(-100%); visibility: hidden; } }

/* ─── Portada del inicio ─── */
.hero-full { overflow: hidden; }
.hero-slideshow { position: absolute; inset: 0; z-index: 0; background: #1a1a1a; }
.hero-slideshow .slide {
    position: absolute; inset: 0; opacity: 0; transform: scale(1.08);
    transition: opacity 1.4s ease, transform 7.5s linear;
}
.hero-slideshow .slide.activa { opacity: 0.9; transform: scale(1); }
.hero-slideshow .slide-vacia { background: linear-gradient(135deg, #2b2b2b, #4a4f45); }
.hero-velo { position: absolute; inset: 0; z-index: 1; background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.5) 100%); }
.hero-texto { position: relative; z-index: 2; width: 100%; max-width: 900px; margin: 0 auto; text-align: center; padding: 0 40px; }
.hero-texto .etiqueta { letter-spacing: 4px; display: block; margin-bottom: 20px; }
.hero-texto h1 { color: white; font-size: clamp(2.8rem, 5vw, 5rem); letter-spacing: -2px; margin-bottom: 30px; text-shadow: 0 4px 30px rgba(0,0,0,0.3); }
.hero-texto p { font-size: 1.2rem; color: rgba(255,255,255,0.85); max-width: 650px; margin: 0 auto; line-height: 1.8; }
.hero-texto .hero-botones { margin-top: 40px; }
.hero-flecha { position: absolute; bottom: 30px; left: 50%; z-index: 2; color: rgba(255,255,255,0.5); font-size: 1.2rem; animation: rebote 2s infinite; }
@keyframes rebote { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ─── Empresas del grupo ─── */
.servicios { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; }
.service-card {
    text-align: center; padding: 35px 25px; width: 220px; max-width: 100%;
    display: flex; flex-direction: column; align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.service-card:hover { transform: translateY(-10px) scale(1.02); border-color: var(--oecsa-green); box-shadow: 0 40px 70px rgba(0,0,0,0.08); }
.service-card img { height: 80px; width: 100%; margin-bottom: 20px; transition: transform 0.5s ease; }
.service-card:hover img { transform: scale(1.1); }
.service-card h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 10px; }
.service-card p { font-size: 0.82rem; line-height: 1.6; margin: 0; }

/* ─── Carruseles horizontales (destacados y obras) ─── */
.seccion-ancha { padding-left: 8%; padding-right: 8%; }
.encabezado-carrusel { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 60px; }
.encabezado-carrusel h2 { font-size: 2.5rem; margin: 10px 0 0; text-align: left; }
.carrusel-flechas { display: flex; gap: 10px; }
.btn-nav-slider {
    background: white; border: 1px solid #eee; width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-main);
    transition: all 0.3s ease;
}
.btn-nav-slider:hover { background: var(--oecsa-green); color: white; border-color: var(--oecsa-green); transform: scale(1.1); }
.projects-slider {
    display: flex; gap: 30px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none; padding: 20px 0 40px;
    overscroll-behavior-x: contain;
}
.projects-slider::-webkit-scrollbar { display: none; }
.project-card-feat { flex: 0 0 380px; scroll-snap-align: start; text-decoration: none; color: inherit; }
.tarjeta-destacada { padding: 0; overflow: hidden; border-radius: 12px; height: 100%; display: flex; flex-direction: column; }
.tarjeta-enlace { text-decoration: none; color: inherit; display: block; flex-grow: 1; }
.tarjeta-foto { height: 250px; position: relative; background: #eee; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tarjeta-foto img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover !important; }
.tarjeta-foto > i { font-size: 3rem; color: #ccc; }
.insignia-video { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.5); color: white; padding: 5px 10px; border-radius: 4px; font-size: 0.7rem; text-transform: uppercase; }
.tarjeta-cuerpo { padding: 25px; }
.tarjeta-cuerpo h3 { font-size: 1.4rem; margin-bottom: 15px; }
.tarjeta-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.tarjeta-categoria { font-size: 0.75rem; color: var(--oecsa-green); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.pastillas { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pastilla { background: var(--oecsa-green); color: white; padding: 3px 10px; border-radius: 15px; font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.pastilla.gris { background: #f0f0f0; color: #666; font-weight: 400; }
.precio-etiqueta { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 2px; }
.precio { color: var(--oecsa-green); font-weight: 700; font-size: 1.2rem; margin-bottom: 15px; }
.tarjeta-datos { display: flex; gap: 15px; flex-wrap: wrap; color: #666; font-size: 0.85rem; border-top: 1px solid #f5f5f5; padding-top: 15px; }
.tarjeta-datos i { color: #888; }
.tarjeta-pie { padding: 0 25px 25px; }
.tarjeta-pie .btn-primary { width: 100%; padding: 10px; font-size: 0.75rem; gap: 8px; }
.enlace-centro { text-align: center; margin-top: 30px; }
.enlace-centro a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: color 0.3s, gap 0.3s; }
.enlace-centro a:hover { color: var(--oecsa-green); gap: 12px; }

/* ─── Tarjeta de obra (foto con texto encima) ─── */
.obra-tarjeta { display: block; text-decoration: none; color: inherit; }
.obra-foto { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #2b2b2b; box-shadow: var(--shadow-sm); }
.obra-foto img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover !important; transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); }
.obra-tarjeta:hover .obra-foto img { transform: scale(1.06); }
.obra-velo { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.1) 55%, transparent 100%); }
.obra-texto { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; color: white; }
.obra-texto span { font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--oecsa-green); font-weight: 600; }
.obra-texto h3 { color: white; text-align: left; font-size: 1.35rem; margin: 6px 0 4px; font-weight: 400; }
.obra-texto p { color: rgba(255,255,255,0.8); font-size: 0.85rem; margin: 0; }
/* Pestañas de Proyectos: Construcción / En venta (06/11/2026) */
.pestanas { display: inline-flex; gap: 6px; margin-top: 36px; padding: 6px; border-radius: 40px; background: var(--oecsa-light-bg); border: 1px solid var(--oecsa-border); }
.pestana {
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 26px; border-radius: 30px;
    font-size: 0.85rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text-muted); text-decoration: none; transition: background 0.3s, color 0.3s;
}
.pestana span { font-size: 0.7rem; font-weight: 600; background: rgba(0,0,0,0.06); color: inherit; padding: 2px 8px; border-radius: 10px; letter-spacing: 0; }
.pestana:hover { color: var(--oecsa-green); }
.pestana.activa { background: var(--oecsa-green); color: white; }
.pestana.activa span { background: rgba(255,255,255,0.25); }
.panel-pestana[hidden] { display: none; }
.bajada-panel { text-align: center; margin: 0 auto 30px; }
.filtros-centro { text-align: center; margin-bottom: 50px; }
.filtros-centro .filtros { margin-top: 0; }
@media (max-width: 480px) {
    .pestanas { display: flex; width: 100%; }
    .pestana { flex: 1; justify-content: center; padding: 11px 10px; font-size: 0.72rem; letter-spacing: 0.5px; }
}
.rejilla-obras { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.rejilla-obras .obra-foto { aspect-ratio: 4 / 3; }
.rejilla-obras .obra-texto h3 { font-size: 1.15rem; }
.llamado { text-align: center; margin-top: 100px; }
.llamado h2 { margin-bottom: 30px; }

/* ─── Cifras ─── */
.cifras-ancho { max-width: 1100px; text-align: center; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.metrics-grid > div { padding: 20px; border-right: 1px solid var(--oecsa-border); }
.metrics-grid > div:last-child { border-right: none; }
.cifra { display: block; font-size: 4.5rem; font-weight: 300; color: var(--text-main); margin-bottom: 5px; line-height: 1; }
.cifra-texto { font-size: 0.85rem; color: var(--oecsa-gray); font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }

/* ─── Filtros ─── */
.filtros {
    display: inline-flex; gap: 10px; border: 1px solid var(--oecsa-border); padding: 5px; border-radius: 40px;
    background: var(--oecsa-light-bg); margin-top: 40px; flex-wrap: wrap; justify-content: center;
}
.filter-btn {
    padding: 10px 20px; border-radius: 30px; font-size: 0.75rem; letter-spacing: 1px; cursor: pointer;
    color: var(--text-muted); background: transparent; border: 0; text-transform: uppercase; font-weight: 500;
    transition: background 0.3s, color 0.3s;
}
.filter-btn:hover { color: var(--oecsa-green); }
.filter-btn.active { background: var(--oecsa-green); color: white; }
.project-item { transition: opacity 0.35s ease, transform 0.35s ease; }
.project-item.oculto { display: none; }
.project-item.saliendo { opacity: 0; transform: translateY(10px); }

/* ─── Lista de proyectos ─── */
.rejilla-proyectos { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 60px; }
.project-item { text-decoration: none; color: inherit; display: block; }
.tarjeta-plana { padding: 0; overflow: hidden; border: none; background: transparent; }
.tarjeta-foto-169 { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #eee; box-shadow: var(--shadow-sm); }
.tarjeta-foto-169 img, .tarjeta-foto-169 video { width: 100%; height: 100%; max-height: none; object-fit: cover !important; display: block; }
.img-zoom { transition: transform 0.4s ease; }
.project-item:hover .img-zoom { transform: scale(1.05); }
.tarjeta-plana .tarjeta-cuerpo { padding: 20px; }
.tarjeta-plana .tarjeta-cuerpo h3 { font-weight: 500; font-size: 1.3rem; letter-spacing: -0.5px; margin-bottom: 10px; text-align: center; }
.tarjeta-datos-lista { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; color: #666; font-size: 0.85rem; }
.tarjeta-datos-lista .tarjeta-datos { border-top: 0; padding-top: 0; }
.precio-bloque { border-bottom: 1px solid #eee; padding-bottom: 5px; color: var(--oecsa-green); font-weight: 700; font-size: 1.1rem; }
.precio-bloque .precio-etiqueta { font-weight: 400; }
.tarjeta-resumen { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 15px; }
.ver-detalles { font-size: 0.8rem; color: var(--oecsa-green); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.ver-detalles i { font-size: 0.6rem; margin-left: 5px; transition: margin 0.3s; }
.project-item:hover .ver-detalles i { margin-left: 10px; }
.vacio { grid-column: 1 / -1; text-align: center; padding: 100px 0; color: var(--text-muted); }
.vacio i { font-size: 3rem; color: var(--oecsa-border); margin-bottom: 20px; display: block; }

/* ─── Portada de proyecto y de obra ─── */
.project-hero-carousel { padding: 0 !important; height: 75vh; min-height: 500px; overflow: hidden; display: block; }
.carrusel { width: 100%; height: 100%; position: relative; overflow: hidden; background: #1a1a1a; }
.carousel-inner { width: 100%; height: 100%; display: flex; transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1); }
.carousel-inner .slide { flex: 0 0 100%; width: 100%; height: 100%; position: relative; }
.carousel-inner .slide img, .carousel-inner .slide video { width: 100%; height: 100%; max-height: none; object-fit: cover !important; display: block; }
.slide-velo { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.55)); }
.carrusel-puntos { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 10px; }
.carrusel-puntos button { width: 36px; height: 3px; padding: 0; border: 0; background: rgba(255,255,255,0.35); cursor: pointer; transition: background 0.3s; }
.carrusel-puntos button.activo { background: var(--oecsa-green); }
.carrusel-btn {
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); border: 0; color: white;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1rem; z-index: 10; transition: background 0.3s;
}
.carrusel-btn:hover { background: var(--oecsa-green); }
.carrusel-btn.siguiente { right: 25px; }
.carrusel-btn.anterior { left: 25px; }
.carrusel.unica .carrusel-btn, .carrusel.unica .carrusel-puntos { display: none; }
.carrusel-titulo { position: absolute; bottom: 60px; left: 8%; z-index: 5; max-width: 800px; pointer-events: none; }
.carrusel-titulo .etiqueta { display: block; margin-bottom: 15px; }
.carrusel-titulo h1 { color: white; font-size: clamp(2.5rem, 5vw, 4rem); margin: 0; text-align: left; text-shadow: 0 4px 20px rgba(0,0,0,0.3); }

/* ─── Cuerpo de proyecto ─── */
.cuerpo-proyecto { padding: 60px 8% 100px; }
.migas { margin-bottom: 40px; }
.migas ol { list-style: none; display: flex; gap: 6px; align-items: center; font-size: 0.78rem; color: var(--text-muted); flex-wrap: wrap; }
.migas a { color: var(--oecsa-green); text-decoration: none; font-weight: 500; }
.migas li[aria-current] { color: var(--text-main); font-weight: 500; }
.migas i { font-size: 0.55rem; opacity: 0.4; }
.columna-principal { min-width: 0; }
.video-169 { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 50px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.video-169 iframe { width: 100%; height: 100%; border: 0; }
.texto-largo { font-size: 1.15rem; line-height: 1.9; color: var(--text-muted); margin-bottom: 50px; }
.texto-largo p { margin-bottom: 1em; }
.texto-largo ul, .texto-largo ol { padding-left: 1.4em; margin-bottom: 1em; }
.texto-largo a { color: var(--oecsa-green); }
.ficha-card { padding: 30px; border-radius: 12px; border-left: 5px solid var(--oecsa-green); background: var(--oecsa-light-bg); box-shadow: var(--shadow-sm); margin-bottom: 50px; }
.ficha-card:hover { transform: none; }
.ficha-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 30px; font-size: 0.95rem; }
.ficha-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(0,0,0,0.06); padding-bottom: 8px; }
.ficha-list li > span { color: #666; }
.ficha-list li > span i { width: 20px; }
.ficha-list strong { font-weight: 600; text-align: right; }
.precio-ficha { font-weight: 700; font-size: 1.05rem; }
.ficha-obra .ficha-list { grid-template-columns: 1fr; }
.precio-ficha small { color: var(--text-muted); font-weight: 500; }
.avance-venta { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.06); }
.avance-fila { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.avance-fila span { font-size: 0.8rem; color: var(--oecsa-green); font-weight: 600; }
.barra { width: 100%; height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; }
.barra > div { height: 100%; background: var(--oecsa-green); }
.ficha-botones { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.ficha-botones .btn-primary { flex: 1; min-width: 200px; border-radius: 6px; font-size: 0.8rem; letter-spacing: 1px; }
.lista-tarjetas { display: flex; flex-direction: column; gap: 18px; margin-bottom: 50px; }
.tipologia { padding: 24px; border-radius: 12px; }
.tipologia h3 { margin: 0; font-weight: 600; text-align: left; }
.tipologia .tarjeta-datos { border-top: 0; padding: 0; margin: 12px 0; }
.tipologia .tarjeta-datos i { color: var(--oecsa-green); }
.amenidades { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 50px; }
.amenidades li { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.95rem; }
.amenidades i { color: var(--oecsa-green); }
.financiamiento p { margin-bottom: 14px; color: var(--text-main); }
.financiamiento i { color: var(--oecsa-green); width: 22px; }
.texto-suave { color: var(--text-muted); line-height: 1.8; }
.galeria-boton-bloque { text-align: center; margin-bottom: 50px; }
.galeria-boton-bloque .subtitulo { text-align: center; }
.galeria-boton { position: relative; display: block; width: 100%; max-width: 720px; margin: 0 auto; border: 0; padding: 0; cursor: zoom-in; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md); background: #000; aspect-ratio: 16 / 9; }
.galeria-boton img { width: 100%; height: 100%; max-height: none; object-fit: cover !important; transition: transform 0.6s ease; }
.galeria-boton:hover img { transform: scale(1.04); }
.galeria-velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05) 50%, rgba(0,0,0,0.55) 100%); display: flex; align-items: center; justify-content: center; }
.galeria-pastilla { background: rgba(255,255,255,0.95); color: var(--text-main); padding: 14px 28px; border-radius: 40px; font-weight: 600; font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.galeria-pastilla i { color: var(--oecsa-green); }
.mapa { width: 100%; height: 280px; max-width: 600px; margin: 0 auto 40px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid #eee; }
.mapa iframe { width: 100%; height: 100%; border: 0; display: block; }
.faq-item { border: 1px solid var(--oecsa-border); border-radius: 10px; background: white; box-shadow: var(--shadow-sm); }
.faq-item summary { cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--text-main); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { color: var(--oecsa-green); font-size: 0.8rem; transition: transform 0.3s; }
.faq-item[open] summary i { transform: rotate(180deg); }
.faq-item > div { padding: 0 22px 20px; color: var(--text-muted); line-height: 1.8; }
.volver { margin-top: 20px; color: var(--oecsa-gray); text-decoration: none; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; display: inline-flex; align-items: center; gap: 8px; transition: color 0.3s; }
.volver:hover { color: var(--oecsa-green); }
.columna-lateral { position: sticky; top: 120px; height: fit-content; display: flex; flex-direction: column; gap: 30px; }
.logo-proyecto { text-align: center; padding: 30px 20px; background: var(--oecsa-light-bg); border-radius: 12px; border: 1px solid var(--oecsa-border); }
.logo-proyecto img { max-width: 260px; max-height: 200px; width: auto; height: auto; margin: 0 auto; }
.afines { padding: 24px; background: white; border: 1px solid var(--oecsa-border); border-radius: 12px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 18px; }
.afines h3 { font-size: 0.85rem; margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--oecsa-gray); border-bottom: 1px solid var(--oecsa-border); padding-bottom: 12px; text-align: left; }
.rec-card { text-decoration: none; color: inherit; display: flex; gap: 14px; align-items: center; padding: 6px; border-radius: 8px; transition: background 0.25s ease; }
.rec-card:hover { background: var(--oecsa-light-bg); }
.rec-foto { width: 72px; height: 72px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #eee; box-shadow: var(--shadow-sm); }
.rec-foto img { width: 100%; height: 100%; max-height: none; object-fit: cover !important; }
.rec-texto { overflow: hidden; min-width: 0; flex: 1; display: flex; flex-direction: column; }
.rec-texto .tarjeta-categoria { font-size: 0.62rem; font-weight: 700; margin-bottom: 3px; }
.rec-title { font-size: 0.95rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.3s; color: var(--text-main); }
.rec-card:hover .rec-title { color: var(--oecsa-green); }
.rec-precio { font-weight: 700; font-size: 0.88rem; margin-top: 3px; }
.mosaico { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 40px; }
.mosaico-foto { aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: #eee; }
.mosaico-foto img { width: 100%; height: 100%; max-height: none; object-fit: cover !important; transition: transform 0.5s ease; }
.mosaico-foto:hover img { transform: scale(1.06); }

/* ─── Visor de fotos ─── */
.visor { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999; display: flex; align-items: center; justify-content: center; user-select: none; }
.visor[hidden] { display: none; }
.visor-img { max-width: 90vw; max-height: 88vh; box-shadow: 0 30px 60px rgba(0,0,0,0.5); border-radius: 6px; transition: opacity 0.25s; }
.visor-img.cargando { opacity: 0.3; }
.visor-cerrar { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: white; font-size: 2.4rem; cursor: pointer; z-index: 10; line-height: 1; }
.visor-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.12); border: 0; color: white; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; z-index: 10; transition: background 0.25s; }
.visor-btn:hover { background: var(--oecsa-green); }
.visor-btn.anterior { left: 18px; }
.visor-btn.siguiente { right: 18px; }
.visor-contador { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.75); font-size: 0.85rem; letter-spacing: 1px; }

/* ─── Nosotros ─── */
.historia-foto { position: relative; height: 100%; min-height: 400px; border-radius: 8px; overflow: hidden; background-color: #ddd; }
.historia-frase { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.historia-frase span { display: block; font-size: 2rem; color: var(--white); font-weight: 300; line-height: 1.2; }
.historia-p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 24px; }
.rejilla-valores { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 60px; }
.valor { padding: 30px; display: flex; gap: 20px; align-items: flex-start; }
.valor-icono { width: 45px; height: 45px; flex-shrink: 0; margin: 0; background: var(--oecsa-green); color: white; border: none; font-size: 1rem; overflow: hidden; }
.valor-icono img { width: 24px; height: 24px; }
.valor h3 { margin-bottom: 10px; font-size: 1.1rem; font-weight: 500; text-align: left; }
.valor p { font-size: 0.9rem; line-height: 1.6; }

/* ─── Sostenibilidad ─── */
.titulo-sost { font-size: clamp(2.2rem, 5vw, 4.5rem); }
.rejilla-pilares { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.pilar { padding: 45px 35px; border-top: 4px solid var(--color-pilar); }
.pilar-icono { width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 25px; font-size: 1.6rem; color: var(--color-pilar); background: color-mix(in srgb, var(--color-pilar) 14%, transparent); }
.pilar h3 { font-size: 1.3rem; margin-bottom: 15px; text-align: left; }
.pilar p { line-height: 1.8; }
.titulo-memoria { margin: 10px 0 25px; font-size: 3rem; }
.estante { display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; margin-top: 60px; }
.revista { width: 220px; text-align: center; cursor: pointer; background: none; border: 0; transition: transform 0.3s ease; display: flex; flex-direction: column; align-items: center; font: inherit; }
.revista:hover { transform: translateY(-8px); }
.revista-tapa { width: 180px; height: 250px; margin-bottom: 16px; border-radius: 4px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.15); position: relative; background: linear-gradient(135deg, #1a1a1a 0%, #333 100%); display: block; }
.revista-tapa img { width: 100%; height: 100%; max-height: none; object-fit: cover !important; }
.revista-sin-tapa { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; }
.revista-sin-tapa i { font-size: 2.5rem; color: var(--oecsa-green); margin-bottom: 16px; }
.revista-sin-tapa small { font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; color: var(--oecsa-green); text-transform: uppercase; }
.revista-sin-tapa strong { font-size: 2.5rem; font-weight: 300; margin-top: 8px; }
.revista-lomo { position: absolute; left: 0; top: 0; width: 12px; height: 100%; background: linear-gradient(90deg, rgba(0,0,0,0.15), transparent); }
.revista-titulo { font-size: 0.95rem; margin-bottom: 4px; color: var(--text-main); }
.revista-anio { font-size: 0.8rem; color: var(--oecsa-green); font-weight: 600; }
.visor-revista { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.visor-revista[hidden] { display: none; }
.visor-revista-marco { width: 94%; max-width: 1000px; height: 92vh; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; box-shadow: 0 0 60px rgba(0,0,0,0.5); }
.visor-revista-barra { padding: 14px 24px; background: #1a1a1a; display: flex; justify-content: space-between; align-items: center; color: white; font-size: 0.9rem; font-weight: 600; }
.visor-revista-barra > span:last-child { font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 400; }
.visor-revista-barra i { color: var(--oecsa-green); margin-right: 8px; }
.visor-revista iframe { flex: 1; width: 100%; border: 0; background: white; }

/* ─── Reconocimientos ─── */
.awards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; justify-content: center; }
.award-card { padding: 0; overflow: hidden; text-align: center; display: flex; flex-direction: column; }
.award-foto { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #f3f3f3; }
.award-foto img { width: 100%; height: 100%; max-height: none; object-fit: cover !important; }
.award-cuerpo { padding: 28px 24px; }
.award-cuerpo .pastilla { display: inline-block; margin-bottom: 14px; }
.award-cuerpo h3 { font-size: 1.15rem; margin-bottom: 12px; }
.award-cuerpo p { font-size: 0.9rem; line-height: 1.55; }

/* ─── Bolsa de empleo ─── */
.rejilla-beneficios { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-top: 60px; }
.beneficio { display: flex; flex-direction: column; gap: 15px; align-items: center; background: white; padding: 30px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.beneficio-icono { width: 60px; height: 60px; background: rgba(188,208,46,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--oecsa-green); }
.beneficio h3 { font-size: 1.2rem; margin-bottom: 0; }
.beneficio p { line-height: 1.6; font-size: 0.95rem; margin: 0; }
.rejilla-trabajo { max-width: 1200px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 60px; }
.vacante { padding: 25px; border-left: 5px solid var(--oecsa-green); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.vacante h3 { margin-bottom: 8px; font-size: 1.15rem; text-align: left; }
.vacante p { font-size: 0.9rem; margin-bottom: 15px; }
.vacante-lugar { font-size: 0.75rem; color: var(--oecsa-green); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: flex; gap: 8px; align-items: center; }
.vacio-borde { padding: 40px; background: #f9f9f9; border: 1px dashed #ccc; border-radius: 8px; text-align: center; }
.vacio-borde i { font-size: 2rem; color: #ddd; margin-bottom: 15px; }

/* ─── Formularios ─── */
.formulario-tarjeta { padding: 40px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); border-radius: 15px; }
.formulario-tarjeta:hover { transform: none; }
.titulo-form { font-size: 1.6rem; margin-bottom: 10px; }
.form-ayuda { margin-bottom: 30px; font-size: 0.9rem; }
.formulario { display: flex; flex-direction: column; gap: 15px; }
.campo label { display: block; font-size: 0.75rem; font-weight: 700; margin-bottom: 6px; color: #444; text-transform: uppercase; }
.campo input, .campo select, .campo textarea {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; font-size: 0.95rem; background: white; color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--oecsa-green); box-shadow: 0 0 0 3px rgba(188,208,46,0.2); }
.formulario-claro { gap: 20px; }
.formulario-claro .campo input, .formulario-claro .campo textarea { padding: 16px 20px; background: var(--oecsa-light-bg); border-color: var(--oecsa-border); border-radius: 4px; font-weight: 300; }
.formulario-claro textarea { resize: vertical; }
.formulario-claro .btn-primary { width: fit-content; margin-top: 10px; }
.error { display: block; color: #b42318; font-size: 0.8rem; margin-top: 6px; }
.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.aviso-privacidad { font-size: 0.7rem; text-align: center; color: #999; margin: 0; }
.aviso { padding: 18px 20px; border-radius: 8px; margin-bottom: 20px; display: flex; gap: 10px; align-items: flex-start; }
.aviso-success { background: #f0f7e6; border: 1px solid var(--oecsa-green); color: var(--text-main); }
.aviso-success i { color: var(--oecsa-green); margin-top: 4px; }
.aviso-error { background: #fff3f3; border: 1px solid #f66; color: #900; }
.aviso-error i { margin-top: 4px; }
.contacto-form { padding: 60px; }
.sello { display: inline-block; padding: 6px 12px; background: var(--oecsa-light-bg); border: 1px solid var(--oecsa-border); border-radius: 4px; color: var(--oecsa-gray); font-size: 0.75rem; letter-spacing: 1px; font-weight: 500; margin-bottom: 30px; text-transform: uppercase; }
.contacto-datos { display: flex; flex-direction: column; gap: 40px; justify-content: center; }
.contacto-datos .etiqueta { letter-spacing: 2px; display: block; margin-bottom: 20px; }
.contacto-datos h3 { margin-bottom: 10px; text-align: left; }
.contacto-datos a { color: inherit; text-decoration: none; }
.contacto-datos a:hover { color: var(--oecsa-green); }
.contacto-datos p { font-size: 0.95rem; line-height: 1.8; }
.contacto-linkedin { border-top: 1px solid var(--oecsa-border); padding-top: 30px; }
.boton-linkedin { display: flex !important; align-items: center; justify-content: space-between; border: 1px solid var(--oecsa-border); padding: 15px 30px; border-radius: 4px; color: var(--text-main) !important; font-weight: 500; font-size: 0.9rem; transition: border-color 0.3s; }
.boton-linkedin:hover { border-color: var(--oecsa-green); }
.boton-linkedin i { color: var(--oecsa-green); }

/* ─── Error 404 ─── */
.error-page { min-height: 80vh !important; display: flex !important; align-items: center; justify-content: center; }
.error-code { font-size: clamp(6rem, 18vw, 14rem); font-weight: 200; line-height: 1; color: var(--oecsa-border); letter-spacing: -8px; user-select: none; }
.error-accent { display: block; width: 60px; height: 4px; background: var(--oecsa-green); margin: 20px auto 30px; border-radius: 2px; }

/* ─── Pie de página ─── */
.footer-section { height: auto; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px 8% 40px; }
.footer-section footer { width: 100%; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 80px; text-align: left; }
.pie-logo { height: 48px; width: auto; max-width: 220px; object-position: left center; margin-bottom: 25px; }
.pie-lema { font-size: 0.95rem; line-height: 1.8; }
.pie-titulo { font-size: 1rem; color: var(--oecsa-gray); letter-spacing: 2px; margin-bottom: 25px; text-align: left; text-transform: uppercase; }
.pie-lista { list-style: none; display: flex; flex-direction: column; gap: 15px; color: var(--text-muted); }
.pie-datos li { display: flex; gap: 15px; align-items: flex-start; font-size: 0.95rem; }
.pie-datos i { color: var(--oecsa-green); margin-top: 5px; }
.pie-datos a { color: inherit; text-decoration: none; }
.pie-datos a:hover { color: var(--oecsa-green); }
.footer-link { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: color 0.3s; }
.footer-link:hover { color: var(--oecsa-green); }
.rg-footer-bottom { border-top: 1px solid var(--oecsa-border); padding-top: 30px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.pie-derechos { font-size: 0.85rem; }
.pie-redes { display: flex; gap: 20px; }
.pie-redes a { color: var(--oecsa-gray); font-size: 1.2rem; transition: color 0.3s; }
.pie-redes a:hover { color: var(--oecsa-green); }

/* ─── Botones flotantes ─── */
.floating-call-btn, .floating-whatsapp-btn {
    position: fixed; left: 30px; width: 60px; height: 60px; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 5000; transition: all 0.3s ease;
}
.floating-call-btn { bottom: 30px; background: var(--oecsa-green); font-size: 1.5rem; opacity: 0.7; animation: pulsoLlamada 2s infinite; }
.floating-whatsapp-btn { bottom: 100px; background: #25D366; font-size: 1.7rem; opacity: 0.85; animation: pulsoWA 2.5s infinite; }
.floating-call-btn:hover, .floating-whatsapp-btn:hover { opacity: 1; transform: scale(1.1); }
@keyframes pulsoLlamada { 0% { box-shadow: 0 0 0 0 rgba(188,208,46,0.7); } 70% { box-shadow: 0 0 0 15px rgba(188,208,46,0); } 100% { box-shadow: 0 0 0 0 rgba(188,208,46,0); } }
@keyframes pulsoWA { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.6); } 70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }

/* ─── Fluidez: animación de entrada sin saltos y respeto por «reducir movimiento» ─── */
.fade-in { will-change: opacity, transform; }
.fade-in.visible { will-change: auto; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .fade-in { opacity: 1; transform: none; }
    #loading { display: none; }
}

/* ─── Responsive de los componentes ─── */
@media (max-width: 1024px) {
    .columna-lateral { position: static; }
}
@media (max-width: 900px) {
    .seccion-alta { padding-top: 50px; padding-bottom: 50px; }
    .encabezado-carrusel h2 { font-size: 1.8rem !important; }
    .encabezado-carrusel { margin-bottom: 30px; }
    .project-card-feat { flex: 0 0 85%; max-width: 85%; }
    .rejilla-proyectos { grid-template-columns: 1fr; gap: 30px; }
    .rejilla-obras { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .obra-texto { padding: 16px; }
    .obra-texto h3 { font-size: 1.05rem !important; }
    .project-hero-carousel { height: 55vh; min-height: 380px; }
    .carrusel-titulo { bottom: 30px; left: 18px; right: 18px; max-width: calc(100% - 36px); }
    .carrusel-btn { width: 38px; height: 38px; }
    .carrusel-btn.siguiente { right: 12px; }
    .carrusel-btn.anterior { left: 12px; }
    .cuerpo-proyecto { padding: 40px 18px 60px !important; }
    .titulo-izq { font-size: 1.5rem !important; }
    .texto-largo { font-size: 1rem; }
    .contacto-form { padding: 28px 22px !important; }
    .formulario-tarjeta { padding: 28px 22px !important; }
    .historia-frase span { font-size: 1.4rem; }
    .titulo-memoria { font-size: 2rem; }
    .estante { gap: 25px; }
    .revista { width: 160px; }
    .revista-tapa { width: 140px; height: 196px; }
    .visor-revista-marco { width: 100%; max-width: 100%; height: 100vh; border-radius: 0; }
    .visor-btn { width: 42px; height: 42px; }
    .cifra { font-size: 2.5rem; }
    .metrics-grid > div:nth-child(2) { border-right: none; }
    .llamado { margin-top: 60px; }
    .footer-section { min-height: auto; }
    .floating-call-btn { bottom: 20px; right: 20px; left: auto; width: 50px; height: 50px; font-size: 1.2rem; }
    .floating-whatsapp-btn { bottom: 80px; right: 20px; left: auto; width: 50px; height: 50px; font-size: 1.4rem; }
    #load-text { height: 160px; }
}
@media (max-width: 480px) {
    .rejilla-obras { grid-template-columns: 1fr; }
    .obra-foto { aspect-ratio: 4 / 3; }
    .project-card-feat { flex: 0 0 90%; max-width: 90%; }
    .ficha-list { grid-template-columns: 1fr; gap: 12px; }
    .ficha-botones .btn-primary { min-width: 0; }
    .project-hero-carousel { height: 45vh; min-height: 320px; }
    .carrusel-titulo h1 { font-size: 1.6rem !important; }
    .revista { width: 100%; }
    .filtros { gap: 4px; }
    .nav-oerp { padding: 7px 14px; margin-right: 10px; font-size: 0.72rem; }
}
