/* HERO */

.hero {
    height: 85vh;
    min-height: 600px;

    background: url('/img/artworks/TOP.webp') center/cover no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10vh;
    position: relative;
}

/* overlay dinámico */

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}

/* TEXTO */

.hero-content {
    position: relative;
    color: white;
    text-align: center;
    z-index: 2;
    opacity: 0;
    transform: translateY(40px);
    animation: heroFade 1.2s ease forwards;
    text-shadow: #363636 2px 2px 2px;
}

/* ARTIST */
.artist {
    background-color: #5f7f7a;
    color: #cdc3b3 !important;
}

.artist .btn-consult {
    border-color: #cdc3b3;
    color: #cdc3b3 !important;
}

.artist .btn-consult:hover {
    background-color: #cdc3b3;
    color: #5f7f7a !important;
}

/* PROCESS */
.process {
    background-color: #cdc3b3 !important;
    color: #5f7f7a !important;
}

.process-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 0 !important;
    padding: 0 !important;
    width: 90% !important;
}

.process-item {
    width: 50%;
    padding: 30px;
}

.process .btn-consult {
    border: 1px solid #5f7f7a !important;
    color: #5f7f7a !important;
}

.process .btn-consult:hover {
    background: #5f7f7a !important;
    color: #cdc3b3 !important;
}

/* ============================================
   GALERÍA - GRID CON COLUMNAS FIJAS
   ============================================ */

.gallery {
    background: #fafafa;
    padding: 40px 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.grid-item {
    width: calc(25% - 24px);
    /* 4 columnas con espacio */
    margin: 12px;
    position: relative;
    display: block;
    text-decoration: none;
    overflow: hidden;
    background: #2a2a2a;
    aspect-ratio: 3 / 4;
}

/* Mantener proporción de la imagen original */
.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center top;
    transition: all 0.4s ease;
}

/* Título centrado - invisible por defecto */
.grid-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    width: 80%;
    pointer-events: none;
}

/* Overlay oscuro al hover */
.grid-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   EFECTOS AL HOVER
   ============================================ */

.grid-item:hover img {
    transform: scale(1.08);
    filter: grayscale(100%);
}

.grid-item:hover::before {
    opacity: 1;
}

.grid-item:hover .grid-title {
    opacity: 1;
    visibility: visible;
}

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

.container {
    max-width: 1600px;
    /* Más ancho */
    /* o */
    max-width: 1200px;
    /* Más estrecho */
}

/* Pantallas grandes (4 columnas) */
@media (min-width: 1200px) {
    .grid-item {
        width: calc(25% - 24px);
    }
}

/* Pantallas medianas (3 columnas) */
@media (max-width: 1199px) and (min-width: 768px) {
    .grid-item {
        width: calc(33.333% - 24px);
    }
}

/* Pantallas pequeñas (2 columnas) */
@media (max-width: 767px) and (min-width: 480px) {
    .grid-item {
        width: calc(50% - 24px);
    }
}

/* Móviles (1 columna) */
@media (max-width: 479px) {
    .grid-item {
        width: calc(100% - 24px);
    }
}


@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .grid-item {
        aspect-ratio: 4 / 3;
    }

    .grid-title {
        font-size: 0.9rem;
        bottom: 15px;
    }
}

/* Reducir movimiento para quienes lo prefieran */
@media (prefers-reduced-motion: reduce) {
    .grid-item img {
        transition: none;
    }

    .grid-item:hover img {
        transform: none;
        filter: grayscale(100%);
    }
}

/* animación */

@keyframes heroFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 300;
}

.hero p {
    opacity: 0.85;
}

/* evitar conflicto global */

.hero {
    padding-top: 0 !important;
}