/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 1000;
    overflow: auto;
    cursor: pointer;
}

.modal.active {
    display: block;
}

.modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 30px;
    cursor: default;
}

.modal-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 85vh;
    cursor: default;
    position: relative;
    flex: 1;
}

.modal-img {
    max-width: 96vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
    cursor: default;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
}

.modal-img.zoomed {
    cursor: move;
}

.modal-img.grabbing {
    cursor: grabbing !important;
}

/* Botones de navegación del modal */
.nav-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.7);
    color: #FDB813;
    border: 3px solid rgba(253, 184, 19, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
    opacity: 0.8;
    user-select: none;
}

.nav-button:hover {
    background: rgba(253, 184, 19, 0.95);
    color: #000;
    opacity: 1;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 25px rgba(253, 184, 19, 0.6);
}

.prev-button {
    left: 30px;
}

.next-button {
    right: 30px;
}

/* Mejorar la información del modal */
.modal-info {
    text-align: center;
    padding: 2.5rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    margin-top: 2rem;
    max-width: 80%;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.foto-counter {
    color: #FDB813;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.foto-title {
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.foto-seccion {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    font-style: italic;
}
/* Botón cerrar */
.close-modal {
    position: fixed;
    top: 25px;
    right: 25px;
    color: rgba(253, 184, 19, 0.8);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(253, 184, 19, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.close-modal:hover {
    background: rgba(253, 184, 19, 0.9);
    color: #000;
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 15px rgba(253, 184, 19, 0.5);
}

body.modal-open {
    overflow: hidden;
}
