.projeto-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.projeto-modal[style*="display: block"] {
    opacity: 1;
}

/* Grid de Capas */
.projetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.projeto-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.projeto-capa {
    height: 400px;
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
}

/* Overlay e efeito hover */
.projeto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.projeto-item:hover .projeto-overlay {
    opacity: 1;
}

.projeto-item:hover .projeto-capa {
    transform: scale(1.05);
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.overlay-logo {
    max-width: 120px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
	margin: 0 auto;
	text-align:center;
}

.overlay-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    text-transform: uppercase;
	color:#fff;
}

.toque{
	position: absolute; 
	bottom: 10px; 
	right: 40px;
	font-size: 8pt; 
	font-style: italic;
}

@media only screen and (max-width: 768px) {
	.toque{
		position: absolute !important;
		bottom: 10px !important;
		right: 60px !important;
		font-size: 8pt !important;
		font-style: italic !important;
		color:#fff !important;
		z-index: 10000;
	}
}

.projeto-nome {
    display: none; /* Escondemos o nome abaixo pois agora está no overlay */
}

/* Modal da Galeria */
.projeto-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px;
    background: #fff;
    position: relative;
}

.fechar-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #333;
    z-index: 1001;
}

.galeria-interna {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.foto-container {
    position: relative;
}

.galeria-interna img {
    width: 100%;
    margin-bottom: 5px;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.foto-descricao {
    margin-top: 10px;
    font-size: 1rem;
    color: #555;
    text-align: center;
    font-style: italic;
    padding: 0 20px;
}

.botao-voltar {
    display: block;
    margin: 40px auto 20px;
    padding: 12px 25px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    max-width: 200px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.botao-voltar:hover {
    background-color: #555;
    transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 768px) {
    .projetos-grid {
        grid-template-columns: 1fr;
    }
    
    .projeto-capa {
        height: 300px;
    }
    
    .modal-content {
        padding: 20px;
    }
}

/* Estilos base do modal */
.projeto-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.projeto-modal[style*="display: block"] {
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px;
    background: #fff;
    position: relative;
}

/* Controles de visualização */
.visualizacao-opcoes {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 0 0 30px;
    padding: 15px 0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.visualizacao-opcoes button {
    background: #f1f1f1;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.visualizacao-opcoes button.active {
    background: #333;
    color: white;
}

/* Visualização em lista */
.galeria-interna {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.foto-container {
    position: relative;
}

.galeria-interna img {
    width: 100%;
    margin-bottom: 5px;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.foto-descricao {
    margin-top: 10px;
    font-size: 1rem;
    color: #555;
    text-align: center;
    font-style: italic;
    padding: 0 20px;
}

/* Visualização em carrossel (tela inteira) */
.carrossel-fullscreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1000;
}

.projeto-modal.fullscreen-mode .modal-content {
    background: transparent;
    padding: 0;
    max-width: 100%;
    width: 100%;
    margin: 0;
}

.carrossel-slides {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrossel-slides .foto-container {
    display: none;
    width: 100%;
    height: 100%;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.carrossel-slides .foto-container.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.carrossel-slides img {
    max-height: 80vh;
    max-width: 90vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.carrossel-slides .foto-descricao {
    color: white;
    margin-top: 20px;
    max-width: 80%;
    font-size: 1.1rem;
}

/* Setas de navegação */
.carrossel-prev,
.carrossel-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 80px;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrossel-prev {
    left: 20px;
}

.carrossel-next {
    right: 20px;
}

.carrossel-prev:hover,
.carrossel-next:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Contador */
.carrossel-contador {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 16px;
    z-index: 1001;
}

/* Botões de fechar/voltar */
.fechar-modal {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    z-index: 1001;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.botao-voltar {
    display: block;
    margin: 40px auto 20px;
    padding: 12px 25px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    max-width: 200px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.botao-voltar:hover {
    background-color: #555;
    transform: translateY(-2px);
}

.projeto-modal.fullscreen-mode .botao-voltar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background: rgba(0, 0, 0, 0.7);
}

/* Animação */
@keyframes fadeIn {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
    }
    
    .visualizacao-opcoes {
        padding: 10px 0;
    }
    
    .visualizacao-opcoes button {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .galeria-interna {
        gap: 20px;
    }
    
    .carrossel-prev,
    .carrossel-next {
        width: 40px;
        height: 60px;
        font-size: 24px;
    }
    
    .carrossel-slides img {
        max-height: 70vh;
        max-width: 85vw;
    }
    
    .carrossel-slides .foto-descricao {
        font-size: 0.9rem;
    }
}
