/* ===== COLOR BASE DE ESTA PÁGINA ===== */
body {
    background-color: var(--color-amarillo);
}

/* ===== TÍTULO GIGANTE ===== */
.titulo-gigante {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.titulo-gigante h1 {
    font-size: 15vw;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.08);
    margin: 0;
    letter-spacing: -5px;
    text-transform: uppercase;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.envoltorio-galeria {
    padding-top: 120px;
    padding-bottom: 120px;
    width: 100%;
}

/* ===== FILAS ===== */
.fila-galeria {
    display: flex;
    width: 90%;
    height: 700px;
    margin: 60px auto;
    gap: 15px;
    z-index: 10;
}

/* ===== ITEMS ===== */
.item-galeria {
    position: relative;
    flex: 1;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    cursor: pointer;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.item-galeria:hover {
    flex: 8;
}

.capa-superior {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0.6;
    transition: opacity 0.4s;
}

.item-galeria:hover .capa-superior {
    opacity: 0.8;
}

/* ===== CONTENIDO INTERNO ===== */
.contenido-item {
    position: absolute;
    bottom: 30px;
    left: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    width: 80%;
    color: #fff;
    pointer-events: none;
}

.item-galeria:hover .contenido-item {
    opacity: 1;
    transform: translateY(0);
}

.numero-proyecto {
    font-size: 3rem;
    font-weight: 300;
    color: var(--color-turquesa);
    margin-bottom: 0;
}

.descripcion {
    color: #ddd;
    max-width: 350px;
    margin: 10px 0 18px;
}

.boton-ver {
    display: inline-block;
    padding: 10px 20px;
    background: #ffffff;
    color: #c17c5f;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
}

.boton-ver:hover {
    background: var(--color-turquesa);
    color: #fff;
}

/* ===== TÍTULO VERTICAL ===== */
.titulo-vertical {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 2px;
    transition: opacity 0.3s;
}

.item-galeria:hover .titulo-vertical {
    opacity: 0;
}

/* ===== RESPONSIVE ===== */
/* ===== RESPONSIVE SOLO PARA MÓVIL ===== */
@media (max-width: 768px) {

    /* Quitamos el título gigante */
    .titulo-gigante h1 {
        display: none;
    }

    /* Las filas ya no hacer flex horizontal */
    .fila-galeria {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }

    /* Cada tarjeta tiene tamaño fijo */
    .item-galeria {
        height: 280px; 
        flex: none;
        border-radius: 18px;
        transition: none;
    }

    /* Quitamos la expansión (flex:8) en móviles */
    .item-galeria:hover {
        flex: none !important;
        height: 280px !important;
    }

    /* La capa visible más suave */
    .capa-superior {
        opacity: .55;
    }

    /* El contenido SIEMPRE visible */
    .contenido-item {
        opacity: 1 !important;
        transform: none !important;
        bottom: 20px;
        left: 20px;
        width: calc(100% - 40px);
        pointer-events: auto;
    }

    .descripcion {
        display: none; /* Simplifica en móvil */
    }

    .titulo-vertical {
        display: none; /* Evita que choque en móvil */
    }
}

