/* =====================================================
   CONFIGURACIÓN GLOBAL
===================================================== */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: #f2f2f2;
    color: #222;
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

#tproyect {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1f2933;
    margin-bottom: 50px;
}

#tproyect::after {
    content: "";
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #00A651, #00d46a);
    display: block;
    margin: 14px auto 0;
    border-radius: 2px;
}

/* =====================================================
   HERO
===================================================== */
.proyecto-hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proyecto-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.proyecto-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 900px;
    padding: 0 15px;
}

.proyecto-hero-content h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.proyecto-hero-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    opacity: 0.95;
}

/* =====================================================
   DETALLE
===================================================== */
.proyecto-detalle {
    padding: 90px 0;
}

.proyecto-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
}

.proyecto-imagen img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.15);
}

.proyecto-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 28px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.info-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    margin-bottom: 12px;
    color: #00A651;
}

.info-card p,
.info-card ul li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =====================================================
   GALERÍA (SIN OVERFLOW)
===================================================== */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

/* IMÁGENES */
.galeria-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* HOVER SOLO DESKTOP */
@media (hover: hover) {
    .galeria-grid img:hover {
        transform: scale(1.06);
        box-shadow: 0 20px 45px rgba(0,0,0,0.18);
    }
}

/* TABLET */
@media (max-width: 1024px) {
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .proyecto-grid {
        grid-template-columns: 1fr;
    }

    .proyecto-imagen img {
        height: 320px;
    }
}

/* MÓVIL – GALERÍA PRO REAL */
@media (max-width: 900px) {

    .galeria-grid {
        display: flex;
        gap: 20px;

        width: 100%;
        max-width: 100%;

        padding-inline: 20px;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .galeria-grid img {
        flex: 0 0 85%;
        height: 260px;
        scroll-snap-align: center;
    }

    .galeria-grid::-webkit-scrollbar {
        display: none;
     }
}
/* ================= MODAL FOTOGRÁFICO ================= */

.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease;
    z-index: 9999;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

.modal-caption {
    margin-top: 18px;
    color: #eee;
    font-size: 1rem;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}
/* =====================================================
   CTA
===================================================== */
.proyecto-cta {
    padding: 100px 20px;
    background:
        linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.6)),
        url("../../images/fondos/fondo-proyect.png") center/cover;
    color: #fff;
    text-align: center;
}

.proyecto-cta h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 18px;
}

.proyecto-cta p {
    font-size: 1.1rem;
    max-width: 750px;
    margin: 0 auto 35px;
}

.btn-cta {
    display: inline-block;
    padding: 16px 40px;
    background: #00A651;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: transform .3s ease, background .3s ease;
}

.btn-cta:hover {
    background: #008f46;
    transform: translateY(-4px);
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
    .proyecto-grid {
        grid-template-columns: 1fr;
    }

    .proyecto-imagen img {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .proyecto-hero {
        height: 60vh;
    }

    .proyecto-hero-content h1 {
        font-size: 2.4rem;
    }
}

@media (max-width: 600px) {
    .proyecto-imagen img {
        height: 260px;
    }
}
