/* =========================================
   ESTILOS EXCLUSIVOS: PORTAFOLIO DE OBRAS
   Archivo: css/obras.css
   ========================================= */

/* 🌟 HERO BANNER INTERNO 🌟 */
.page-hero {
    position: relative;
    padding: 220px 0 100px 0; 
    text-align: center;
    color: white;
    overflow: hidden;
    border-bottom: 6px solid var(--mpc-green);
}
.page-hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}
.page-hero-bg img {
    width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 17, 17, 0.75); 
}
.relative-z { position: relative; z-index: 2; }
.pill-tag {
    background: var(--mpc-green); color: white; border: none; font-size: 0.9rem;
    padding: 8px 18px; border-radius: 30px; font-weight: 900; display: inline-block; margin-bottom: 20px;
}
.page-hero h1 {
    font-size: 3.8rem; font-weight: 900; margin-bottom: 20px; letter-spacing: 1px; color: #ffffff; 
}
.page-hero h1 .highlight-green { color: var(--mpc-green); }

/* Animaciones */
@keyframes smoothSlideUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
.page-hero h1 .word-1 { display: inline-block; opacity: 0; animation: smoothSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s; }
.page-hero h1 .word-2 { display: inline-block; opacity: 0; animation: smoothSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.5s; }
.page-hero p {
    font-size: 1.15rem; max-width: 680px; margin: 0 auto; color: #e5e8eb; line-height: 1.6;
    opacity: 0; animation: smoothSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.8s;
}

/* 🌟 SECCIONES GLOBALES 🌟 */
.section-light { background-color: #f8fafc; padding: 90px 0; } 

/* 🌟 GALERÍA GRID CON TARJETAS (TITULOS VISIBLES) 🌟 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
}

.gallery-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,154,68,0.15);
    border-color: var(--mpc-green);
}

.g-img-box {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.g-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-card:hover .g-img-box img {
    transform: scale(1.08);
}

.g-info {
    padding: 25px 20px;
    text-align: left;
}

.g-cat {
    display: block;
    color: var(--mpc-green);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.g-info h3 {
    color: var(--mpc-dark);
    font-size: 1.4rem;
    font-weight: 900;
    margin: 0;
}

/* 🌟 VENTANA EMERGENTE (MODAL) 🌟 */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background-color: #fff;
    width: 90%;
    max-width: 1000px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal-overlay.show .modal-window {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}

.modal-close:hover {
    color: var(--mpc-green);
    transform: scale(1.1);
}

/* Estructura dividida del modal */
.modal-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 450px;
}

.modal-img-side {
    background-color: #f1f1f1;
}

.modal-img-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-text-side {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-text-side .sub-tag {
    margin-bottom: 15px;
    border: none;
    background: var(--mpc-gray);
    padding: 6px 15px;
}

.modal-text-side h2 {
    font-size: 2.2rem;
    color: var(--mpc-dark);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
}

.modal-text-side p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* 🌟 CTA FOOTER 🌟 */
.cta-banner { background-color: var(--mpc-green); padding: 60px 0; color: white; }
.cta-banner h2 { font-size: 2.2rem; font-weight: 900; margin-bottom: 15px;}
.cta-banner p { font-size: 1.1rem; margin-bottom: 25px;}
.text-center { text-align: center; }

/* =========================================
   MEDIA QUERIES (MOBILE RESPONSIVE)
   ========================================= */
@media (max-width: 992px) {
    /* Ajuste Anti-Desbordamiento del Hero */
    .page-hero { 
        padding: 150px 20px 70px 20px; 
        width: 100%; 
        max-width: 100vw; 
        box-sizing: border-box;
    }
    
    .page-hero h1 { 
        font-size: 2.5rem; 
        word-wrap: break-word; 
        hyphens: auto; 
    }
    
    .page-hero p { 
        font-size: 1.05rem; 
        padding: 0 10px; 
    }

    /* Modal Responsive */
    .modal-split {
        grid-template-columns: 1fr;
    }
    .modal-img-side {
        height: 250px; 
    }
    .modal-text-side {
        padding: 30px 25px;
        text-align: center;
    }
    .modal-text-side h2 { font-size: 1.8rem; }
}