/* gallery.css - VERSIÓN MEJORADA CON GRID RESPONSIVE */
.gallery-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--gris-claro) 0%, var(--beige) 100%);
}

/* === Overrides finales: presentación consistente, imágenes completas y botones visibles === */
/* Prioridad más específica para evitar conflictos con reglas anteriores */

/* 1) Tarjeta de galería: altura automática para mostrar todo el texto */
.gallery-section .gallery-item {
    height: auto;              /* Permite crecer según el contenido */
    min-height: 420px;         /* Altura mínima agradable en desktop */
    display: flex;
    flex-direction: column;
}

/* En pantallas medianas y pequeñas, ajustar mínimas para evitar recortes */
@media (max-width: 1024px) {
    .gallery-section .gallery-item { min-height: 400px; }
}
@media (max-width: 768px) {
    .gallery-section .gallery-item { min-height: 380px; }
}
@media (max-width: 480px) {
    .gallery-section .gallery-item { min-height: 360px; }
}

/* 2) Portada: imagen completa sin recortes (contain) y aspecto 16:9 */
.gallery-section .galeria-portada-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;      /* Mantiene una caja estable */
    background-color: #f5f5f5; /* Letterboxing suave cuando hay bandas */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #ddd;
}

.gallery-section .galeria-portada-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;       /* Mostrar la foto completa sin recortar */
}

/* 3) Contenido: buena legibilidad y no cortar textos */
.gallery-section .gallery-item-content {
    padding: 1rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.gallery-section .gallery-item-content h4 {
    font-size: 1.15rem;
    line-height: 1.25;
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.gallery-section .gallery-item-content p {
    margin: 0;
    color: #555;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.gallery-section .galeria-meta {
    margin-top: auto;          /* Empuja meta al final de la tarjeta */
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;           /* Evita desbordes en móviles */
    font-size: 0.9rem;
}

/* 4) Carrusel móvil: 1 por vista con snap y scroll suave */
@media (max-width: 768px) {
    .gallery-section .gallery-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 12px;
        scroll-snap-type: x mandatory;
        -ms-overflow-style: none;     /* IE */
        scrollbar-width: none;        /* Firefox */
    }
    .gallery-section .gallery-grid::-webkit-scrollbar { display: none; }
    .gallery-section .gallery-item {
        flex: 0 0 auto;
        width: 86%;                   /* 1 tarjeta por pantalla aprox. */
        scroll-snap-align: center;
        margin-inline: auto;
    }
}

/* 5) Botones de navegación: visibles, centrados verticalmente y con tema */
.gallery-section .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    color: var(--azul-oscuro);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.45);
    z-index: 30;
    -webkit-tap-highlight-color: transparent;
}

.gallery-section .carousel-btn.prev { left: 6px; }
.gallery-section .carousel-btn.next { right: 6px; }

.gallery-section .carousel-btn:hover {
    transform: translateY(-50%) scale(1.08);
}

.gallery-section .carousel-btn:active {
    transform: translateY(-50%) scale(0.98);
}

@media (max-width: 768px) {
    .gallery-section .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
    }
}

/* 6) Botón "Ver Galería" con color acorde y buena legibilidad */
.gallery-section .galeria-overlay button {
    background: #ffc107;   /* Amarillo tema */
    color: #2c2c2c;
    font-weight: 700;
    padding: 0.65rem 1rem;
    border-radius: 6px;
}

.gallery-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--azul-oscuro);
    font-weight: 700;
    position: relative;
}

.gallery-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    border-radius: 2px;
}

.gallery-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 20px;
}

/* Galería en index - GRID RESPONSIVE MEJORADO */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1200px;
}

.gallery-item {
    background: var(--blanco);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--sombra-fuerte);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 420px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(232, 201, 140, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

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

/* PORTADAS SIN RECORTE */
.galeria-portada-container {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
    z-index: 2;
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    width: 100%;
    height: 200px;
}

.galeria-portada-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.6s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.gallery-item:hover .galeria-portada-container img {
    transform: scale(1.15);
}

.galeria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(41, 47, 92, 0.9) 0%, rgba(122, 47, 36, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .galeria-overlay {
    opacity: 1;
}

.galeria-portada-container:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay button {
    background: #ffc107; /* Amarillo */
    color: #333; /* Texto oscuro para contraste */
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease, transform 0.2s ease;
}

.galeria-overlay button:hover {
    background: #e0a800; /* Amarillo más oscuro */
    transform: scale(1.05);
}

/* Ajustes para contenerizar correctamente la información */

.gallery-item-content {
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.gallery-item-content h4 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: #333;
}

.gallery-item-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 10px;
    flex-grow: 1;
}

.galeria-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
    margin-top: auto;
}

/* BOTONES DE CARRUSEL MEJORADOS - POSICIÓN CORREGIDA */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    border: none;
    color: var(--azul-oscuro);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.carousel-btn:hover {
    background: linear-gradient(135deg, var(--dorado-claro) 0%, var(--dorado) 100%);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6);
    animation: pulse 2s infinite;
}

.carousel-btn.prev {
    left: 0.5rem;
}

.carousel-btn.next {
    right: 0.5rem;
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%);
    background: var(--gris-claro);
    color: var(--texto-oscuro);
    box-shadow: none;
}

.carousel-btn:disabled:hover {
    transform: translateY(-50%);
    animation: none;
}

/* Ajustes para evitar el bug en las flechas de movimiento */
.carousel-btn {
    position: relative;
    z-index: 10; /* Asegura que las flechas estén por encima de otros elementos */
    background: rgba(0, 0, 0, 0.5); /* Fondo semitransparente para mejor visibilidad */
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8); /* Fondo más oscuro al pasar el mouse */
    transform: scale(1.1); /* Efecto de zoom suave */
}

.carousel-btn:active {
    transform: scale(1); /* Evita que se quede "pegado" al hacer clic */
}

/* Asegura que las flechas no interfieran con el scroll horizontal */
.gallery-container {
    position: relative;
    overflow: hidden;
}

.gallery-grid {
    scroll-behavior: smooth; /* Desplazamiento suave */
    -ms-overflow-style: none; /* Elimina scrollbars en IE */
    scrollbar-width: none; /* Elimina scrollbars en Firefox */
}

.gallery-grid::-webkit-scrollbar {
    display: none; /* Elimina scrollbars en Chrome, Safari */
}

/* ========== RESPONSIVE MEJORADO ========== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .gallery-container {
        padding: 0 1.5rem;
    }
    
    .gallery-item {
        height: 380px;
    }
    
    .galeria-portada-container {
        height: 180px;
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .carousel-btn.prev {
        left: 0.25rem;
    }
    
    .carousel-btn.next {
        right: 0.25rem;
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 2rem 0;
    }
    
    .gallery-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1rem 0;
    }
    
    .gallery-container {
        padding: 0 1rem;
    }
    
    .gallery-item {
        height: 350px;
        margin: 0 auto;
        max-width: 400px;
    }
    
    .galeria-portada-container {
        height: 160px;
    }
    
    .gallery-item-content {
        padding: 1.2rem;
    }
    
    .gallery-item-content h4 {
        font-size: 1.2rem;
    }
    
    .galeria-meta {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
    
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .carousel-btn.prev {
        left: 0.5rem;
    }
    
    .carousel-btn.next {
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        padding: 1.5rem 0;
    }
    
    .gallery-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .gallery-container {
        padding: 0 0.5rem;
    }
    
    .gallery-item {
        height: 320px;
        max-width: 100%;
    }
    
    .galeria-portada-container {
        height: 140px;
    }
    
    .gallery-item-content {
        padding: 1rem;
    }
    
    .gallery-item-content h4 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .gallery-item-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .galeria-meta {
        font-size: 0.8rem;
    }
    
    .btn-ver-galeria {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 360px) {
    .gallery-item {
        height: 300px;
    }
    
    .galeria-portada-container {
        height: 120px;
    }
    
    .gallery-item-content h4 {
        font-size: 1rem;
    }
    
    .btn-ver-galeria {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Ajustes para visualización responsive de la galería */

.gallery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1200px;
}

.gallery-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.galeria-portada-container {
    position: relative;
    width: 100%;
    height: 200px;
}

.galeria-portada-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.galeria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-portada-container:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay button {
    background: #ffc107; /* Amarillo */
    color: #333; /* Texto oscuro para contraste */
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease, transform 0.2s ease;
}

.galeria-overlay button:hover {
    background: #e0a800; /* Amarillo más oscuro */
    transform: scale(1.05);
}

.gallery-item-content {
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.gallery-item-content h4 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: #333;
}

.gallery-item-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 10px;
}

.galeria-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}

/* Ajustes para dispositivos pequeños */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .galeria-portada-container {
        height: 150px;
    }

    .gallery-item-content h4 {
        font-size: 1rem;
    }

    .gallery-item-content p {
        font-size: 0.8rem;
    }
}

/* Ajustes para visualización de galería en dispositivos móviles */

.gallery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 20px;
    overflow: hidden;
}

.gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    width: 100%;
    max-width: 1200px;
}

.gallery-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 90%;
    max-width: 300px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.galeria-portada-container {
    position: relative;
    width: 100%;
    height: 200px;
}

.galeria-portada-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.galeria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-portada-container:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay button {
    background: #ffc107; /* Amarillo */
    color: #333; /* Texto oscuro para contraste */
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease, transform 0.2s ease;
}

.galeria-overlay button:hover {
    background: #e0a800; /* Amarillo más oscuro */
    transform: scale(1.05);
}

.gallery-item-content {
    padding: 15px;
    text-align: center;
}

.gallery-item-content h4 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: #333;
}

.gallery-item-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 10px;
}

.galeria-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}

/* Ajustes específicos para dispositivos pequeños */
@media (max-width: 768px) {
    .gallery-grid {
        gap: 10px;
    }

    .gallery-item {
        width: 100%;
        max-width: 280px;
    }

    .galeria-portada-container {
        height: 150px;
    }

    .gallery-item-content h4 {
        font-size: 1rem;
    }

    .gallery-item-content p {
        font-size: 0.8rem;
    }
}

/* El resto del CSS para modales se mantiene igual */
.galeria-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(41, 47, 92, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-modal.show {
    display: flex;
    opacity: 1;
}

.galeria-modal-content {
    background: linear-gradient(135deg, var(--blanco) 0%, var(--beige) 100%);
    border-radius: 20px;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--dorado);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.galeria-modal.show .galeria-modal-content {
    transform: scale(1);
}

.galeria-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 3px solid var(--dorado);
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--rojo-vino) 100%);
    color: var(--blanco);
}

.galeria-modal-header h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dorado);
}

.close-galeria-modal {
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--azul-oscuro);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.close-galeria-modal:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    animation: pulse 2s infinite;
}

.galeria-modal-body {
    padding: 2rem;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    background: var(--blanco);
}

.galeria-descripcion {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--gris-claro) 0%, var(--beige) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--dorado);
    color: var(--azul-oscuro);
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
}

.galeria-fotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.galeria-foto-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    height: 200px;
}

.galeria-foto-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--dorado);
}

.galeria-foto-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s;
}

.galeria-foto-item:hover img {
    transform: scale(1.05);
}

.foto-descripcion {
    padding: 1rem;
    margin: 0;
    background: linear-gradient(135deg, var(--gris-claro) 0%, var(--beige) 100%);
    font-size: 0.9rem;
    color: var(--azul-oscuro);
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    font-weight: 600;
}

/* Responsive para el modal de galería */
@media (max-width: 768px) {
    .galeria-modal {
        padding: 1rem;
    }
    
    .galeria-modal-content {
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .galeria-modal-header {
        padding: 1.5rem;
    }
    
    .galeria-modal-header h3 {
        font-size: 1.4rem;
    }
    
    .close-galeria-modal {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .galeria-modal_body {
        padding: 1.5rem;
        max-height: calc(95vh - 80px);
    }
    
    .galeria-descripcion {
        padding: 1rem;
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .galeria-fotos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .galeria-foto-item {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .galeria-modal {
        padding: 0.5rem;
    }
    
    .galeria-modal-header {
        padding: 1.2rem;
    }
    
    .galeria-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .galeria-modal_body {
        padding: 1rem;
    }
    
    .galeria-fotos-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .galeria-foto-item {
        height: 200px;
    }
    
    .foto-descripcion {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
}

/* ====== VISOR DE IMÁGENES (LIGHTBOX) ====== */
body.modal-open {
    overflow: hidden;
    touch-action: none;
}

.image-viewer-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    padding: 16px;
}

.image-viewer-modal.show { display: flex; }

.image-viewer-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-image {
    width: 100%;
    max-height: 85vh;
    object-fit: contain; /* Mostrar imagen completa */
    border-radius: 8px;
    background: #111;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    color: var(--azul-oscuro);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10100;
}

.prev-btn { left: 8px; }
.next-btn { right: 8px; }

.close-viewer-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    color: var(--azul-oscuro);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10100;
}

.image-caption {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .nav-btn { width: 44px; height: 44px; font-size: 1.05rem; }
    .close-viewer-btn { width: 40px; height: 40px; font-size: 1.05rem; }
}