/* === Estilos de Galería y Detalles (añadidos) === */

.detail-container {
    padding: 20px 0;
}
.construction-notice {
    text-align: center;
    padding: 50px 20px;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #1abc9c;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #1abc9c;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}
.back-link:hover {
    background-color: #1abc9c;
    color: white;
}
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer; /* Added for better mobile click detection */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.15); /* Sombra moderna y más pronunciada */
    height: 200px; /* Altura fija para el contenedor del item */
    width: 100%; /* Asegura que ocupe el ancho de la celda de la grilla */
}

.gallery-item img {
    width: 100%;
    height: 100%; /* La imagen llena el contenedor */
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}



.gallery-item .overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1; /* Siempre visible */
    transition: all 0.3s ease;
    pointer-events: none; /* Para que no interfiera con el clic en la imagen */
}

.gallery-item:hover .overlay {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.gallery-item .overlay::after {
    content: '\f065'; /* Icono de expandir de Font Awesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px; /* Icono más pequeño y adecuado */
    color: white;
}

/* Lightbox styles */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    justify-content: center;
    align-items: center;
}
.lightbox.is-active {
    display: flex; /* Shown when active */
}
.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    animation: zoom 0.3s ease-in-out;
}
 @keyframes zoom {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #333333;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: #333333;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s;
    user-select: none;
}
.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.lightbox-prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}
.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* === Gallery Filter Styles === */
.filter-controls {
    text-align: center;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.filter-btn.active {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.gallery-item.hidden {
    display: none;
}
