/* --- ESTILO COMPLETO E ATUALIZADO PARA A PÁGINA DE PORTFÓLIO --- */

/* HERO DA PÁGINA */
.hero-portfolio-section {
    background-image: linear-gradient(rgba(1, 17, 38, 0.85), rgba(1, 17, 38, 0.88)), url('../img/FUNDO_INICIO.png');
    padding: 220px 0 120px 0; 
    text-align: center; 
    border-bottom: 1px solid #103562;
}
.hero-portfolio-section h1 { 
    font-size: 3rem; 
    font-weight: 700; 
    color: #ffffff; 
    margin-bottom: 15px; 
}
.hero-portfolio-section p { 
    font-size: 1.2rem; 
    color: rgba(255, 255, 255, 0.8); 
    max-width: 700px; 
    margin: 0 auto; 
}

/* CARROSSEL DE PROJETOS */
.portfolio-gallery { 
    padding: 80px 0; 
    background-color: #011126; 
}

.portfolio-carousel-wrapper {
    position: relative;
    padding: 0 50px; /* Espaço para os botões */
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-viewport {
    overflow: hidden; /* Esconde os itens fora da área visível */
    width: 100%;
}

.portfolio-grid {
    display: flex; /* Flexbox para permitir o slider horizontal */
    gap: 30px;
    transition: transform 0.5s ease-in-out; /* Animação suave */
    width: 100%;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #103562;
    /* Cálculo de largura padrão (Desktop - 3 itens) */
    min-width: calc((100% - 60px) / 3);
    flex-shrink: 0;
}

.portfolio-item img {
    width: 100%;
    height: 280px;
    object-fit: contain; 
    background-color: #011126; 
    transition: transform 0.4s ease;
}

/* BOTÕES DO CARROSSEL - REDESIGN (CIRCULARES) */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px; 
    height: 50px;
    
    /* Estilo "Vidro" e cores da marca */
    background: rgba(10, 43, 82, 0.6);
    border: 1px solid rgba(196, 163, 90, 0.4);
    color: #C4A35A;
    
    border-radius: 50%;
    font-size: 1.2rem;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-btn:hover {
    background: #C4A35A;
    color: #011126;
    border-color: #C4A35A;
    box-shadow: 0 0 20px rgba(196, 163, 90, 0.6); 
    transform: translateY(-50%) scale(1.15);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Ajuste de margem para alinhar visualmente */
.prev-btn {
    left: 0;
    margin-left: -15px;
}

.next-btn {
    right: 0;
    margin-right: -15px; /* Adicionado para simetria */
}


/* OVERLAYS E MODAL */

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 17, 38, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; 
}

.portfolio-item:hover img { 
    transform: scale(1.05); 
}
.portfolio-item:hover .item-overlay { 
    opacity: 1; 
}

/* ESTILOS DO MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 17, 38, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active { 
    display: flex; 
}

.modal-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    background-color: #0A2B52;
    padding: 40px;
    border-radius: 15px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    border: 1px solid #103562;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: contain;
    background-color: #011126;
    border-radius: 10px;
}

#modal-title { 
    font-size: 2.5rem; 
    color: #ffffff; 
    margin-bottom: 20px; 
    line-height: 1.2; 
}
#modal-description { 
    font-size: 1rem; 
    color: rgba(255, 255, 255, 0.8); 
    line-height: 1.7; 
    margin-bottom: 30px; 
}

/* Botão dentro do modal */
.portfolio-button { 
    display: inline-block; 
    background-image: linear-gradient(45deg, #d4ae5f, #b89543); 
    color: #011126; 
    padding: 12px 28px; 
    border-radius: 5px; 
    text-decoration: none; 
    font-weight: 600; 
    transition: filter 0.3s ease; 
}
.portfolio-button:hover { 
    filter: brightness(1.1); 
}

/* AJUSTES NO OVERLAY DO CARD */
.overlay-text {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-item:hover .overlay-text {
    transform: translateY(0);
}

.item-overlay h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 15px;
    transform: none;
    transition: none;
}

.view-details-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #C4A35A;
    color: #C4A35A;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    background-color: #C4A35A;
    color: #011126;
}

/* RESPONSIVIDADE CARROSSEL */
@media (max-width: 1024px) {
    /* Tablet: 2 itens */
    .portfolio-item {
        min-width: calc((100% - 30px) / 2);
    }
}

@media (max-width: 992px) {
    .modal-content { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 768px) {
    /* Mobile: 1 item */
    .portfolio-item {
        min-width: 100%;
    }
    .portfolio-carousel-wrapper {
        padding: 0 30px;
    }
}