:root {
    --kora-brown: #321714;   /* Marrom Profundo (Base) */
    --kora-cream: #FFF1B6;   /* Creme Amarelado (Contraste Suave) */
    --kora-sage: #D8D4B1;    /* Bege Mate / Oliva (Cor de Apoio) */
    --kora-accent: #C1DBEA;  /* Azul Gelo (Destaque) */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--kora-brown); color: #FFF1B6; font-family: Arial, sans-serif; overflow-x: hidden; }

/* NAVBAR */
.navbar { position: fixed; top: 0; width: 100%; padding: 30px 50px; display: flex; justify-content: space-between; z-index: 1000; transition: 0.4s; }
.navbar.scrolled { background: #321714; padding: 15px 50px; }
.logo { height: 25px; }
.nav-right a { color: #D8D4B1; text-decoration: none; margin-left: 30px; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; }

/* HERO E BOTÃO BRANCO */
.hero { height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.hero-center-content { position: relative; z-index: 5; text-align: center; }
.btn-hero { color: #D8D4B1 !important; border: 1px solid #C1DBEA; padding: 12px 35px; border-radius: 20px;
    margin-top: 50px; text-decoration: none !important; display: inline-block; font-size: 0.7rem; letter-spacing: 2px;
    transition: 0.3s; }
.btn-hero:hover { background: #C1DBEA; color: #321714 !important; }

/* FILTROS (CORRIGIDO) */

.play-icon {
    /* 1. Posicionamento no meio do container pai */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* 2. Criação do círculo e centralização do símbolo */
    display: flex;
    align-items: center;
    justify-content: center;
    
    width: 70px;  /* Ajusta o tamanho que desejares */
    height: 70px;
    background-color: rgba(50, 23, 20, 0.6); /* Marrom KORA com transparência */
    border: 2px solid #FFF1B6;               /* Borda Creme KORA */
    border-radius: 50%;                      /* Deixa redondo */
    color: #FFF1B6;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;

    /* 3. O SEGREDO DO TRIÂNGULO */
    /* Adicionamos um pouco de espaço na esquerda para compensar a ponta do triângulo */
    padding-left: 5px; 
}

.play-icon:hover {
    background-color: #FFF1B6;
    color: #321714;
    transform: translate(-50%, -50%) scale(1.1); /* Aumenta um pouco ao passar o mouse */
}
.portfolio-filters { width: 100%; display: flex; flex-direction: column; align-items: center; padding: 60px 0; }
.filter-line { width: 90%; height: 1px; background: rgba(255,255,255,0.1); margin-bottom: 30px; }
.filter-btns { display: flex; gap: 40px; justify-content: center; }
.filter-btn { background: none; border: none; color: #FFF1B6; cursor: pointer; opacity: 0.4; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; transition: 0.3s; }
.filter-btn.active, .filter-btn:hover { opacity: 1; }

/* Classe nova para o título da seção */
.portfolio-header {
    text-align: center;
    margin-bottom: 40px; /* Controla o espaço entre o título e os botões */
}

.portfolio-header h2 {
    font-size: 2.5rem;    /* Tamanho da letra */
    letter-spacing: 5px;   /* Espaçamento entre as letras para ficar chic */
    color: var(--kora-cream);
    text-transform: uppercase;
    font-weight: 700;
}

/* Ajuste opcional na linha para não ficar colada no título */
.filter-line {
    margin-bottom: 40px !important; 
}

/* PORTFOLIO GRID */
.titulo-header   { font-size: 1.5rem; color:#FFF1B6; margin-top: 120px;   margin-bottom: 5px; text-align: center; }  /* Tamanho da letra */
.titulo-header2   { font-size: 1.5rem; color:#FFF1B6; text-align: center; }  /* Tamanho da letra */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 20px 100px; }
.project-item { position: relative; border-radius: 15px; overflow: hidden; aspect-ratio: 4/3; text-decoration: none; }
.project-bg { width: 100%; height: 100%; background-size: cover; background-position: center; transition: 0.6s; }
.project-item:hover .project-bg { transform: scale(1.1); }


/* BADGES */
.badges { position: absolute; top: 15px; left: 15px; right: 15px; display: flex; justify-content: space-between; z-index: 10; }
.badge { padding: 4px 10px; border-radius: 15px; font-size: 0.6rem; text-transform: uppercase; font-weight: bold; }
.badge.destaque { background: #FFF1B6; color: black; }
.badge.type { background: rgba(255,255,255,0.2); color: white; backdrop-filter: blur(5px); }

/* HOVER */
.project-hover { position: absolute; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.3s; z-index: 5; }
.project-item:hover .project-hover { opacity: 1; }
.play-icon { width: 50px; height: 50px; background: #FFF1B6; color: black; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
/* Container do texto que fica escondido */

/* MODAL */
/* O fundo do modal */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 10, 9, 0.98); /* Marrom KORA bem escuro */
    
    /* MUDANÇAS AQUI: Permite rolar o modal se o conteúdo for grande */
    overflow-y: auto; 
    padding: 60px 0; /* Espaço para o "X" não sumir no topo */
    display: none; /* Mantém oculto até o JS ativar */
}

.modal.active {
    display: block !important; /* Mudamos de flex para block para o scroll funcionar melhor */
}

/* A caixa onde fica a foto/vídeo e o texto */

/* --- GALERIA DENTRO DO MODAL --- */
.modal-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Força sempre 3 colunas */
    gap: 10px;
    margin-top: 30px;

}
.modal-text {
    padding: 40px 50px; /* Aumentei o espaço interno do texto e laterais */
}
    .gallery-item {
        position: relative;
        cursor: pointer;
        border-radius: 8px;
        overflow: hidden;
        aspect-ratio: 16 / 9; /* Mantém o formato deitado do vídeo */
        background: #000;
        transition: transform 0.3s ease;
    }

    .gallery-item:hover {
        transform: scale(1.05); /* Pequeno zoom ao passar o rato */
    }

    .gallery-item video, 
    .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6; /* Fica um pouco escuro para destacar o Play */
    transition: 0.3s;
}
.gallery-item:hover video, 
.gallery-item:hover img {
    opacity: 1;
}
.play-mini {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--kora-cream);
    font-size: 1.5rem;
    pointer-events: none; /* Para não atrapalhar o clique */
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}
.modal-gallery video, 
.modal-gallery img {
    width: 100%;
    border-radius: 10px; /* Bordas arredondadas no padrão KORA */
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* 1. Adicione esta nova regra para a caixa que criámos */
.modal-media-wrapper {
    position: relative;
    width: 100%;
}

/* 2. Procure o seu .nav-btn e altere apenas o 'top' para 50% */
.nav-btn {
    position: absolute;
    top: 50%; /* Mudei de 40% para 50% */
    transform: translateY(-50%);
    background: rgba(50, 23, 20, 0.6);
    border: 2px solid var(--kora-cream);
    color: var(--kora-cream);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1000;
    width: 60px;
    height: 60px;
    margin-left: 90px;
    margin-right: 90px;
    margin-top: 60px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-content {
    position: relative;
    margin: 0 auto; /* Centraliza na largura */
    width: 90%;
    max-width: 1000px;
    background-color: #321714;
    border-radius: 20px;
    overflow: visible; /* Para o X aparecer fora */
}

/* --- BOTÕES DE NAVEGAÇÃO DO MODAL --- */
.nav-btn {
    position: absolute;
    top: 40%; /* Ajusta a altura para ficar no meio da imagem */
    transform: translateY(-50%);
    background: rgba(50, 23, 20, 0.6); /* Cor da KORA transparente */
    border: 2px solid var(--kora-cream);
    color: var(--kora-cream);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Botões redondos */
    display: none; /* Escondido por defeito, o JS mostra se for preciso */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--kora-cream);
    color: var(--kora-brown);
    transform: translateY(-50%) scale(1.1);
}

#btn-prev {
    left: -30px; /* Coloca ligeiramente de fora do modal na esquerda */
}

#btn-next {
    right: -30px; /* Coloca ligeiramente de fora do modal na direita */
}

/* Ajuste das setas para telemóveis */
@media (max-width: 768px) {
    #btn-prev { left: 10px; }
    #btn-next { right: 10px; }
    .nav-btn { width: 45px; height: 45px; font-size: 1.2rem; top: 30%; }
}

/* Garante que a foto não seja maior que a tela do usuário */
#modal-media-container img, 
#modal-media-container video {
    width: 100%;
    max-height: 75vh; /* A foto nunca ocupa mais que 75% da altura da tela */
    object-fit: contain; /* Não corta a foto, apenas ajusta */
    display: block;
    border-radius: 20px 20px 0 0;
}
/* Botão de Fechar - Forçando visibilidade */
.close-modal {
    position: absolute;
    top: 15px;      /* Distância do topo */
    right: 20px;    /* Distância da direita */
    color: #FFF1B6; /* Use a cor creme clara da KORA */
    font-size: 50px;/* Bem grande para ser visto */
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    z-index: 9999 !important; /* Garante que fica acima da foto/vídeo */
    transition: transform 0.3s ease;
    display: block !important; /* Força a exibição */
}

.close-modal:hover {
    transform: scale(1.2); /* Aumenta um pouco ao passar o mouse */
    color: #fff;
}

/* REVEAL */
.reveal { opacity: 0; transform: translateY(20px); transition: 0.8s; }
.reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) { .portfolio-grid { grid-template-columns: 1fr; } }

/* --- RODAPÉ KORA --- */
.footer-kora {
    background-color: #321714; /* Marrom Predominante */
    padding: 80px 50px;
    position: relative;
    overflow: hidden; /* Garante que a marca d'água não saia do limite */
    border-top: 1px solid rgba(216, 212, 177, 0.1); /* Linha sutil no topo */
}

.footer-container {
    display: flex;
    justify-content: space-between; /* Empurra os blocos para as extremidades */
    align-items: center;           /* Alinha tudo ao meio verticalmente */
    width: 100%;
    max-width: 100%;               /* Ocupa a largura toda da tela */
    padding: 40px 60px;            /* Espaço nas bordas laterais */
    box-sizing: border-box;
}

/* 2. O segredo: dar peso igual às três partes */
.footer-left, 
.footer-center, 
.footer-right {
    flex: 1; /* Faz com que cada div ocupe exatamente 1/3 da largura */
    display: flex;
}

/* Marca d'água (A Logo Gigante no fundo) */
.watermark-logo {
    position: absolute;
    /* Centralização exata */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 600px; /* Podes aumentar para 800px se quiseres que ocupe quase tudo */
    opacity: 0.03; /* Mantém bem discreto */
    pointer-events: none;
    z-index: 1;
}

.footer-logo {
    height: 60px;
    filter: brightness(1.2);
}

.footer-center {
    flex-direction: column;      /* Texto e CNPJ um por baixo do outro */
    justify-content: center;    
    align-items: center;         /* Centraliza o texto no meio exato */
    text-align: center;
}

.cnpj-text {
    margin-top: 10px;
    opacity: 0.6;
    font-size: 0.6rem;
}

.footer-right {
    justify-content: flex-end;   /* Ícones na ponta direita */
    gap: 25px;                   /* Espaço entre os ícones */
}

.social-link img {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

/* Efeito ao passar o mouse */
.social-link:hover img {
    opacity: 0.7;
    transform: translateY(-3px); /* Pequeno salto para cima */
}

/* Ajuste para Mobile */
@media (max-width: 768px) 
{
    .footer-right {
        display: flex;
        justify-content: flex-end; /* Alinha os links na ponta direita da div */
        flex: 1;                   /* Ocupa o terço direito do rodapé para empurrar o resto */
        gap: 30px;                 /* Espaço entre INSTAGRAM, WHATSAPP e EMAIL */
    }
    
    /* Garante que os links fiquem elegantes */
    
    .social-link:hover {
        opacity: 0.5;
    }
    .footer-left {
        justify-content: flex-start; /* Logo na ponta esquerda */
    }
}   