/* --- 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; 
}

/* GALERIA DE PROJETOS */
.portfolio-gallery { 
    padding: 80px 0; 
    background-color: #011126; 
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #103562;
}

.portfolio-item img {
    width: 100%;
    height: 280px;
    object-fit: contain; /* Garante que a imagem não seja cortada */
    background-color: #011126; /* Adiciona um fundo para preencher o espaço */
    transition: transform 0.4s ease;
}

.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; /* Permite que o clique passe através do overlay */
}

.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; /* Garante que a imagem não seja cortada no modal */
    background-color: #011126; /* Adiciona um fundo elegante no modal */
    border-radius: 10px;
}

#modal-category { 
    display: block; 
    color: #C4A35A; 
    font-weight: 600; 
    margin-bottom: 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; 
}

.tech-stack { 
    margin-bottom: 30px; 
}
.tech-stack span { 
    font-weight: 600; 
    color: rgba(255, 255, 255, 0.9); 
    display: block; 
    margin-bottom: 10px; 
}
.tech-stack ul { 
    list-style: none; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    padding: 0; 
}
.tech-stack li { 
    background-color: #011126; 
    color: rgba(255, 255, 255, 0.8); 
    padding: 5px 15px; 
    border-radius: 5px; 
    font-size: 0.9rem; 
}

.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 PORTFÓLIO */
.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 */
@media (max-width: 992px) {
    .modal-content { 
        grid-template-columns: 1fr; 
    }
}