/**
 * Modal de Imagem - CSS Atualizado
 */

/* Modal overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal--active {
    opacity: 1;
    visibility: visible;
}

/* Container do modal */
.modal__container {
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    padding: 10px;
}

/* Container maior para vídeos */
.modal__container--video {
    max-width: 95vw;
    max-height: 95vh;
}

.modal--active .modal__container {
    transform: scale(1);
}

/* Header */
.modal__header {
    padding: 0.5rem;
    color: white;
    display: flex;
	height: 50px;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal__title {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    flex: 1;
}

.modal__counter {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #666;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.modal__close {
    background: #2B3B26;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
	margin-bottom: 5px;
}

.modal__close:hover {
    background: #808D46;
}

/* Body */
.modal__body {
    position: relative;
}

.modal__image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
}

.modal__video {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    background: #000;
    border-radius: 4px;
    min-height: 400px; /* Altura mínima para vídeos */
	min-width: 700px;
}

.modal__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    min-height: 400px;
}

/* Botões de navegação */
.modal__prev,
.modal__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(43, 59, 38, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal__prev:hover,
.modal__next:hover {
    background: rgba(128, 141, 70, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal__prev {
    left: 20px;
}

.modal__next {
    right: 20px;
}

.modal__nav--disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal__nav--disabled:hover {
    background: rgba(43, 59, 38, 0.8);
    transform: translateY(-50%) scale(1);
}

.modal__loading {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.modal__content {
    padding: 1rem;
}

.modal__description {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Cursor pointer nos elementos com modal */
.modal-trigger {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-trigger:hover {
    transform: scale(1.02);
}

/* Ícone de zoom para elementos com background */
.modal-trigger:not(img) {
    position: relative;
}

.modal-trigger:not(img)::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(43, 59, 38, 0.8); /* Usando sua cor #2B3B26 */
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 16px;
}

.modal-trigger:not(img):hover::after {
    opacity: 1;
    background: rgba(128, 141, 70, 0.9); /* Usando sua cor hover #808D46 */
}

/* Mobile */
@media (max-width: 768px) {
    .modal__container {
        max-width: 95vw;
        max-height: 95vh;
        margin: 1rem;
        padding: 8px;
    }
    
    .modal__container--video {
        max-width: 98vw;
        max-height: 98vh;
        margin: 0.5rem;
    }
    
    .modal__header {
        padding: 0.5rem;
    }
    
    .modal__title {
        font-size: 1.1rem;
    }
    
    .modal__counter {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
    
    .modal__image {
        max-height: 60vh;
    }
    
    .modal__video {
        min-height: 250px;
		min-width: 90vw;
    }
    
    .modal__video iframe {
        min-height: 250px;
    }
    
    .modal__close {
        width: 30px;
        height: 30px;
        font-size: 20px;
		background-color: transparent;
		color: #808D46;
		-webkit-text-stroke: 2px #808D46;
    }
    
    /* Botões de navegação menores no mobile */
    .modal__prev,
    .modal__next {
        width: 40px;
        height: 40px;
    }
    
    .modal__prev {
        left: 10px;
    }
    
    .modal__next {
        right: 10px;
    }
    
    /* Remove hover effects no mobile */
    .modal-trigger:hover {
        transform: none;
    }
    
    .modal-trigger:not(img)::after {
        display: none;
    }
}