.fotos_piezas {
    width: 100%;
    height: 300dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.fotos_piezas_header {
    width: 100%;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.fotos_piezas_header h2 {
    font-weight: 300;
    font-size: 5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--white);
    background-image: linear-gradient(45deg, var(--white) 15%, var(--grey) 82%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fotos_piezas_header p {
    color: var(--grey);
    font-size: 1.2rem;
    text-align: center;
    max-width: 400px;
}

.fotos_grid {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    position: relative;
}

.grid_fotos_1 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 40dvh;
    position: relative;
    /* Máscara más grande en el bottom - se desvanece hacia abajo */
    -webkit-mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.429) 30%,
            rgba(0, 0, 0, 0.353) 50%,
            rgba(0, 0, 0, 0.329) 70%,
            rgba(0, 0, 0, 0.139) 85%,
            rgba(0, 0, 0, 0) 100%);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.429) 30%,
            rgba(0, 0, 0, 0.353) 50%,
            rgba(0, 0, 0, 0.329) 70%,
            rgba(0, 0, 0, 0.139) 85%,
            rgba(0, 0, 0, 0) 100%);
}

.grid_fotos_2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 40dvh;
    position: relative;
    /* Máscara más grande en el top - se desvanece hacia arriba */
    -webkit-mask: linear-gradient(to top,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.437) 30%,
            rgba(0, 0, 0, 0.367) 50%,
            rgba(0, 0, 0, 0.229) 70%,
            rgba(0, 0, 0, 0.165) 85%,
            rgba(0, 0, 0, 0) 100%);
    mask: linear-gradient(to top,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.429) 30%,
            rgba(0, 0, 0, 0.353) 50%,
            rgba(0, 0, 0, 0.329) 70%,
            rgba(0, 0, 0, 0.139) 85%,
            rgba(0, 0, 0, 0) 100%);
}

.grid_fotos_1 img,
.grid_fotos_2 img {
    width: 33%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--grey);
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.8s ease;
    opacity: 1;
}

.grid_fotos_1 img {
    border-bottom: 0;
}

.grid_fotos_2 img {
    border-top: 0;
}

/* Clase para la transición de cambio de imagen */
.grid_fotos_1 img.changing,
.grid_fotos_2 img.changing {
    opacity: 0;
}

/* Efectos hover para las imágenes */
.grid_fotos_1 img:hover,
.grid_fotos_2 img:hover {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1);
    z-index: 10;
    position: relative;
}

/* Botón más pequeño y estilizado */
.fotos_grid .btn {
    margin: 1rem 0;
    padding: 1.5%;
    gap: 5%;
    z-index: 20;
    position: relative;
    transition: all 0.3s ease;
    min-width: auto;
    /* Permite que sea más pequeño */
    width: auto;
    /* Ancho automático */
}

/* Responsive */
@media (max-width: 768px) {
    .grid_fotos_1,
    .grid_fotos_2 {
        width: 80%;
    }

    /* En móvil: solo 2 imágenes por fila (ocultar la tercera) */
    .grid_fotos_1 img:nth-child(3),
    .grid_fotos_2 img:nth-child(3) {
        display: none;
    }

    /* Ajustar ancho de las 2 imágenes restantes */
    .grid_fotos_1 img,
    .grid_fotos_2 img {
        width: 50%; /* 50% cada una para ocupar todo el ancho */
    }

    .fotos_piezas_header h2 {
        font-size: 2rem;
    }

    .fotos_piezas_header p {
        font-size: 1rem;
        max-width: 300px;
    }

    .fotos_grid .btn {
        font-size: 0.9rem;
    }
}

/* Móvil más pequeño - ajustes adicionales */
@media (max-width: 480px) {
    .grid_fotos_1,
    .grid_fotos_2 {
        width: 90%;
    }

    .fotos_piezas_header h2 {
        font-size: 1.8rem;
    }

    .fotos_piezas_header p {
        font-size: 0.9rem;
        max-width: 280px;
    }

    .fotos_grid .btn {
        font-size: 0.8rem;
        padding: 1rem;
    }
}