
:root {
    --color-base: #065d2d;
    --color-dark: #022714;
    --color-medium: #216a43;
    --color-light: #548f72;
    --color-soft: #91a9a0;
    --color-text: #e4fff5;
}

/* ===== LAYOUT GENERAL ===== */
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #000c06;
}

.main-construcciones-global {
    width: 100%;
    min-height: 100vh;
}

/* ===== CONTENEDOR HERO GENERAL ===== */
.construction-hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: var(--color-dark);
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.hero-content-grid {
    position: relative;
    display: grid;
    grid-template-columns: 38% 62%;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* ===== LADO IZQUIERDO: TRIÁNGULO CON CONTENIDO VERTICAL ===== */
.skewed-title-panel {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12% 0 40px;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%); 
    box-shadow: 15px 0 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.panel-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.panel-image-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-green-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(14, 110, 61, 1) 0%, rgba(6, 113, 54, 0.8) 100%);
    z-index: 2;
}

.panel-content-wrapper {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-right: 30px;
    max-width: 400px;
}

.panel-logo-container {
    width: 100%;
    max-width: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px; /* Reducido levemente para mejorar equilibrio */
}

.main-module-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.6)) grayscale(100%) brightness(100); 
}

.info-description-box-bottom {
    width: 90%; /* Ajustado de 80% a 90% para mayor fluidez del texto */
    text-align: justify;
}

.info-description-box-bottom p {
    text-align: justify;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ffffff;
    margin: 0;
    font-weight: 400;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

/* ===== LADO DERECHO: EXCLUSIVO PARA LOS CAROUSELES ===== */
.dynamic-right-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    padding: 40px 40px 40px 20px;
}

.gallery-marquee-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.marquee-track {
    display: flex;
    overflow: hidden;
    width: 100%;
    user-select: none;
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.marquee-content {
    display: flex;
    gap: 20px;
    width: max-content;
}

.direction-left .marquee-content {
    animation: scrollMarqueeLeft 30s linear infinite;
}

.direction-right .marquee-content {
    animation: scrollMarqueeRight 30s linear infinite;
}

.marquee-track:hover .marquee-content {
    animation-play-state: paused;
}

.gallery-card {
    width: 250px;
    height: 150px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(3, 102, 47, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gallery-card:hover {
    transform: scale(1.03);
    border-color: #ffffff;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes scrollMarqueeLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 10px)); }
}

@keyframes scrollMarqueeRight {
    0% { transform: translateX(calc(-50% - 10px)); }
    100% { transform: translateX(0); }
}

/* ===== RESPONSIVE OPTIMIZADO ===== */

/* Pantallas grandes y portátiles de media escala */
@media (max-width: 1400px) {
    .hero-content-grid { grid-template-columns: 42% 58%; }
    .skewed-title-panel { padding: 0 10% 0 30px; }
    .panel-logo-container { max-width: 220px; margin-bottom: 40px; }
    .info-description-box-bottom p { font-size: 0.9rem; }
    .gallery-card { width: 230px; height: 140px; }
}

/* Tabletas y Computadoras de pantallas compactas */
@media (max-width: 1199px) {
    .hero-content-grid { grid-template-columns: 45% 55%; }
    .skewed-title-panel { clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%); padding-right: 8%; }
    .panel-content-wrapper { margin-right: 15px; }
    .gallery-card { width: 200px; height: 130px; }
}

/* Modo Tableta y Móvil (Vertical) */
@media (max-width: 991px) {
    .construction-hero-container {
        height: auto; 
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    .hero-content-grid {
        grid-template-columns: 1fr; 
        height: auto;
        display: flex;
        flex-direction: column;
    }
    .skewed-title-panel {
        height: auto;
        min-height: 50vh; /* Al menos la mitad de la pantalla para que quepa todo bien */
        width: 100%;
        padding: 60px 30px 80px 30px; /* Más padding abajo para proteger el texto del corte */
        /* Reducimos la agresividad de la diagonal en móvil para que no encime el texto */
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); 
        overflow: visible; /* Permitimos que el flujo se adapte si el texto es largo */
    }
    .panel-content-wrapper {
        max-width: 550px;
        margin-right: 0;
        margin-left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .panel-logo-container { 
        max-width: 220px; 
        margin-bottom: 30px; 
    }
    .info-description-box-bottom { 
        width: 100%; 
    }
    .info-description-box-bottom p { 
        text-align: center; 
        font-size: 0.5rem; 
    }
    
    .dynamic-right-panel {
        height: auto;
        padding: 50px 15px;
    }
}
/* Teléfonos Inteligentes (Móviles) */
@media (max-width: 575px) {
    .skewed-title-panel {
        padding: 50px 20px;
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); /* Diagonal más sutil */
    }
    .panel-content-wrapper {
        padding-bottom: 25px;
    }
    .panel-logo-container { max-width: 180px; }
    .info-description-box-bottom p { font-size: 0.9rem; text-align: justify; }
    
    .dynamic-right-panel {
        padding: 20px 5px 40px 5px;
    }
    .gallery-card { width: 180px; height: 115px; } /* Ajuste del tamaño de tarjetas para no romper el layout */
    .marquee-content { gap: 12px; }
}

/* ===== VENTANA MODAL / LIGHTBOX DE GALERÍA ===== */
.gallery-lightbox-modal {
    display: none; 
    position: fixed; 
    z-index: 99999; 
    padding-top: 60px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 12, 6, 0.85); /* Un poco más oscuro para centrar la atención */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox-modal.show-lightbox {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-modal-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 85%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(3, 102, 47, 0.4); 
    object-fit: contain;
    animation-name: zoomInEffect;
    animation-duration: 0.3s;
}

@keyframes zoomInEffect {
    from { transform: scale(0.95); opacity: 0; } 
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
    z-index: 100000;
}

.lightbox-close-btn:hover {
    color: #03662f; 
    transform: scale(1.1);
}

@media (max-width: 767px) {
    .lightbox-modal-content {
        max-width: 92%;
        max-height: 75vh;
    }
    .lightbox-close-btn {
        top: 20px;
        right: 25px;
        font-size: 38px;
    }
}
/* ===== AJUSTES DE INTERACCIÓN MÓVIL PARA EL SCRIPT ===== */
.gallery-card {
    cursor: pointer;
    touch-action: manipulation; /* Remueve el retraso de respuesta táctil en móviles */
    -webkit-tap-highlight-color: transparent; /* Quita el cuadro azul de selección por defecto */
}

@media (max-width: 991px) {
    .dynamic-right-panel {
        position: relative;
        z-index: 20; /* Eleva el contenedor para que sea la capa interactiva principal */
    }

    .marquee-track {
        pointer-events: auto; /* Permite el paso transparente de eventos al tocar las imágenes */
    }

    .marquee-content {
        will-change: transform; /* Optimiza el renderizado del procesador móvil durante la animación */
    }
}