/* Configurações Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --tag-bg: #ffe0eb;
  --tag-text: #e91e63;
}

body { font-family: sans-serif; background: var(--bg-color); padding: 40px; }

.gallery-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  padding: 8%;
  padding-top: 0;
}

/* Container centralizador */
.category-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

/* Estado Padrão (Não selecionado) */
.category-selector .filter-btn {
    cursor: pointer;
    padding: 12px 25px;
    border: 2px solid #2bb1ff;  /* Borda sempre preta */
    background: transparent;  /* Fundo transparente */
    color: #000;             /* TEXTO PRETO por padrão */
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Efeito Hover (ao passar o mouse sem clicar) */
.category-selector .filter-btn:hover {
    background-color: rgba(0, 0, 0, 0.05); /* Um cinza bem leve */
}

/* Estado SELECIONADO (Ao clicar) */
.category-selector .active-category {
    background-color: #2bb1ff !important; /* FUNDO PRETO */
    border: 2px solid #ffffff;  /* Borda sempre preta */
    color: #fff !important;            /* TEXTO BRANCO */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Ajuste para Mobile */
@media (max-width: 480px) {
    .category-selector {
        gap: 8px;
    }
    .category-selector .filter-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* ============================================================
   GRID DE THUMBNAILS (2 por 2)
   ============================================================ */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Força 2 colunas */
    gap: 20px;
    margin: 20px auto;
    padding: 0 20px;
    max-width: 1200px; /* Largura máxima da grade */
}

.thumb-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.thumb-item:hover {
    transform: scale(1.02);
}

.thumb-item img {
    width: 100%; /* Adapta ao espaço da coluna */
    height: auto;
    display: block;
    object-fit: cover;
}

/* ============================================================
   MODAL (ISOLAMENTO TOTAL)
   ============================================================ */
.modal {
    display: none; /* Ativado pelo JS */
    position: fixed; /* Fixa na tela independente do scroll */
    z-index: 99999; /* Valor altíssimo para cobrir Navbar e badges */
    left: 0;
    top: 0;
    width: 100vw; /* Largura total da janela */
    height: 100vh; /* Altura total da janela */
    background-color: #000000; /* Preto sólido para esconder o site atrás */
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

/* A imagem ampliada */
.modal-content {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    /* O Box-shadow é aplicado dinamicamente pelo Vibrant no seu JS */
    box-shadow: 0 0 100px rgba(255, 255, 255, 0.05);
    animation: fadeInZoom 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Botão de Fechar */
.close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 50px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
    z-index: 100000;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 0.7;
}

/* ============================================================
   REGRAS DE SUPORTE
   ============================================================ */

/* Impede que o fundo role enquanto a imagem está aberta */
body.modal-open {
    overflow: hidden;
}

/* Animação de entrada suave */
@keyframes fadeInZoom {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsividade: Vira 1 coluna em telas de celular */
@media (max-width: 768px) {
    .thumbnail-grid {
        grid-template-columns: 1fr;
    }
    .close-btn {
        top: 20px;
        right: 20px;
        font-size: 40px;
    }
}

.video-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.video-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-preview img, .video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  font-size: 40px;
  color: white;
  opacity: 0.8;
  transition: 0.3s;
}

.video-preview:hover .play-button { transform: scale(1.2); opacity: 1; }

.card-content { padding: 20px; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: 0.8rem;
  margin-right: 0.8rem;
}

.card-header h3 { margin: 0; font-size: 1.1rem; color: #333; }

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
}

.card-content p { color: #666; margin: 0; font-size: 0.9rem; margin-left: 0.8rem; }

.carousel-section {
    display: flex;
    flex-direction: column;
}

/* Garante que o glow apareça sem ser cortado */
.splide__track {
    padding: 15px 0 !important; 
}

.auto-shadow {
    width: 350px;
    height: auto;
    display: block;
    transition: filter 0.3s ease;
}

/* Remove as setas e pontos padrão do Splide (caso apareçam) */
.splide__arrows, .splide__pagination { display: none; }

.carousel-section {
    /* Ajuste para um fade bem sutil e curto nas pontas */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%, 
        black 3%,      /* Início rápido da visibilidade total */
        black 97%,     /* Início tardio do desaparecimento */
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 3%,
        black 97%,
        transparent 100%
    );
}

/* Garante que o brilho (glow) não seja cortado pelo overflow do container */
.splide__track {
    overflow: visible !important;
}

.splide {
    overflow: hidden; /* O corte acontece apenas no limite do componente */
}

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.9) 50%,
    rgba(255,255,255,0));
    color: #333;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: #fff;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-links a.active {
    color: #008cff;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: #008cff;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5px 5px 5px;
}

.hero h1 {
    margin-top: 4.5rem;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.hero p {
    color: #444;
    font-size: 1.1rem;
}

.hero .subtitle {
    color: #777;
    font-size: 0.95rem;
}

.logo img {
    width: 45px;
    height: auto;
}

/* Grid de Projects */
.projects-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 5px 5%;
    flex-wrap: wrap;
}

.card {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 380px; /* ↓ menor */
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    overflow: hidden;
    padding: 18px; /* ↓ menos espaçamento */
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* mantém proporção sem cortar */
}

.card-image {
    width: 100%;
    height: 220px; /* ALTURA FIXA */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-content {
    padding: 20px 0 10px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.card-content p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
    min-height: 45px;
}

/* Botões */
.btn-see {
    display: block;
    text-align: center;
    background: #008cff;
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-see:hover {
    background: #006dc7;
}

.footer-action {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.btn-projects {
    background: #008cff;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 140, 255, 0.3);
}

.btn-projects:hover {
    background: #006dc7;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: linear-gradient(
        to bottom,
        rgba(255,255,255,1) 60%,
        rgba(255,255,255,0)
    );

    backdrop-filter: blur(1px);
    z-index: 1000;
}

.lang-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 20px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #000;
    color: #fff;
}


/* ANIMAÇÃO BASE */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* Delay progressivo */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade: Se a tela for pequena (celular), vira 1 coluna só */
@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: 1fr;
  }

  .auto-shadow {
    width: 340px;
    height: auto;
    display: block;
    transition: filter 0.3s ease;
    }
}

/* Responsividade (Mobile) */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        display: none;
    }
    
    .nav-links li {
        margin: 0 10px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .projects-grid {
        flex-direction: column;
        align-items: center;
    }
}

/* Pagina project */
.projects-header {
    text-align: center;
    padding: 0px 20px 0px;
    position: relative;
    max-width: 800px;
    margin: 10rem auto;
}

.projects-header h1 {
    margin-top: 5rem;
    font-size: 6.2rem; 
    font-weight: 800;
    color: #000;
}

.projects-header p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* BADGES GIGANTES E FLUTUANTES */

.badge {
    position: absolute;
    /* Removemos o fundo azul, padding e bordas, pois a imagem já tem o design */
    background: transparent; 
    border: none;
    box-shadow: none;
    z-index: -10;
}

/* Ajuste o tamanho das imagens aqui */
.badge img {
    width: 570px; /* Ajuste esse valor para o tamanho que desejar */
    height: auto;
    display: block;
}

.badge-left {
    /* Posicionamento bem distante para não cobrir o texto */
    top: 65px; 
    left: -370px; 
    animation: floatLeft 7s ease-in-out infinite;
}

.badge-right {
    top: 90px;
    right: -320px; 
    animation: floatRight 9s ease-in-out infinite;
}

/* Mantemos as animações de flutuar que você gostou */
@keyframes floatLeft {
    0%, 100% { transform: rotate(-5deg) translate(0, 0); }
    25% { transform: rotate(-8deg) translate(7px, -13px); }
    50% { transform: rotate(-9deg) translate(-5px, -18px); }
    75% { transform: rotate(-6deg) translate(-6px, -9px); }
}

@keyframes floatRight {
    0%, 100% { transform: rotate(5deg) translate(0, 0); }
    33% { transform: rotate(9deg) translate(5px, -15px); }
    66% { transform: rotate(4deg) translate(15px, -5px); }
}

/* IMPORTANTE: Garanta que o container pai permita ver as imagens fora dele */
.projects-header {
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: visible; /* Permite que os badges "saiam" para as laterais */
}

/* =========================================
   FILTROS (PÍLULAS)
   ========================================= */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.logoafter {
    width: 25px;
    height: auto;
}

.filter-btn {
    padding: 12px 28px;
    border-radius: 50px;
    border: 1.5px solid #008cff;
    background: white;
    color: #008cff;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s ease;
    text-align: center;
    justify-content: center;
}

.filter-btn.active {
    background: #008cff;
    color: white;
}

.filters > a {
    text-decoration: none;
    border: none;
}

.filter-btn span {
    background: #1a0033;
    color: #cfafff;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: bold;
}

.section-title {
    margin-left: 8%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title > h2 {
    color: #000;
}

/* =========================================
   RESPONSIVIDADE
   ========================================= */
@media (max-width: 1200px) {
    .badge-left { left: -50px; }
    .badge-right { right: -50px; }
}

@media (max-width: 900px) {

    .badge-left {
    /* Posicionamento bem distante para não cobrir o texto */
    top: 70px; 
    left: -135px; 
    animation: floatLeft 7s ease-in-out infinite;
    }

    .badge-right {
        top: 270px;
        right: -50px; 
        animation: floatRight 9s ease-in-out infinite;
    }
}

@media (max-width: 600px) {
    .navbar { flex-direction: column; gap: 20px; }
    .nav-links li { margin: 0 10px; }
    .card-image-container { height: 200px; }

    .projects-header > h1 {
        font-size: 4rem;
    }

    .badge img {
        width: 430px; /* Ajuste esse valor para o tamanho que desejar */
        height: auto;
        display: block;
    }

}