/* ============================================
   MODAL DE TELA CHEIA - VISUALIZADOR DE IMAGENS
   Adicione este código ao carousel-styles.css ou styles.css
   ============================================ */

/* Modal Background */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-modal.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

/* Botão Fechar */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--branco-neve);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Conteúdo do Modal */
.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 100px 120px;
}

/* Container da Imagem */
.modal-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Imagem do Modal */
.modal-image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* Informações da Imagem */
.modal-info {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--branco-neve);
    white-space: nowrap;
}

.modal-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dourado-solar);
}

.modal-counter {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Botões de Navegação */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(3, 90, 133, 0.8);
    border: none;
    color: var(--branco-neve);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-nav:hover {
    background: rgba(3, 90, 133, 1);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.modal-prev {
    left: 30px;
}

.modal-nav.modal-next {
    right: 30px;
}

/* Miniaturas */
.modal-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    max-width: 90%;
    overflow-x: auto;
}

.modal-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.modal-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-thumbnails::-webkit-scrollbar-thumb {
    background: var(--dourado-solar);
    border-radius: 3px;
}

.modal-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modal-thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.modal-thumbnail.active {
    opacity: 1;
    border-color: var(--dourado-solar);
    transform: scale(1.05);
}

/* Animações */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-image {
    animation: modalFadeIn 0.3s ease;
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 60px 20px 100px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .modal-close svg {
        width: 24px;
        height: 24px;
    }
    
    .modal-nav {
        width: 45px;
        height: 45px;
    }
    
    .modal-nav svg {
        width: 28px;
        height: 28px;
    }
    
    .modal-nav.modal-prev {
        left: 10px;
    }
    
    .modal-nav.modal-next {
        right: 10px;
    }
    
    .modal-image {
        max-height: calc(100vh - 180px);
    }
    
    .modal-info {
        bottom: -50px;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-counter {
        font-size: 0.9rem;
    }
    
    .modal-thumbnails {
        bottom: 10px;
        gap: 8px;
        padding: 8px;
    }
    
    .modal-thumbnail {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 50px 10px 90px;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
    }
    
    .modal-nav svg {
        width: 24px;
        height: 24px;
    }
    
    .modal-image {
        max-height: calc(100vh - 160px);
        border-radius: 4px;
    }
    
    .modal-thumbnails {
        gap: 6px;
        padding: 6px;
    }
    
    .modal-thumbnail {
        width: 50px;
        height: 38px;
    }
    
    .modal-info {
        bottom: -45px;
    }
    
    .modal-title {
        font-size: 0.9rem;
    }
    
    .modal-counter {
        font-size: 0.85rem;
    }
}

/* Prevenir scroll do body quando modal está aberto */
body.modal-open {
    overflow: hidden;
}

/* Suporte para gestos touch no modal */
.modal-image-container {
    touch-action: pan-y pinch-zoom;
}
