:root {
    --primary-color: #072F60;
    --secondary-color: #009d9d;
    --primary-hover: #05204a;
    --accent-color: #eff6ff;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

/* --- Estilos Globais e Utilitários --- */

.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.bg-secondary-custom {
    background-color: var(--secondary-color) !important;
}

/* Botões Arredondados (Pill) */
.btn-rounded {
    border-radius: 50rem !important;
    padding-left: 2rem;
    padding-right: 2rem;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 47, 96, 0.2);
    color: white;
}

.btn-outline-custom {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: white;
    border-width: 2px;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* --- Navbar e Menu --- */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: white;
}

.nav-link {
    font-weight: 700;
    color: #4b5563;
    margin-right: 0.5rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease-in-out;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease-in-out;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 700;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* --- HERO SECTION (OTIMIZADO PARA PRELOAD E PERFORMANCE) --- */

/* 1. Estilo Padrão (Mobile First) */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding-top: 76px;

    /* Imagem Mobile */
    background-image: url("../img/Hero-Mobile-Jan2026.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
}

/* 2. Estilo para Desktop (Telas acima de 768px) */
@media (min-width: 769px) {
    .hero-section {
        /* Compensa navbar mais alta no desktop */
        padding-top: 110px;

        /* Imagem Desktop */
        background-image: url("../img/Hero-Jan2026.webp");
        background-position: right top;
    }

    .hero-overlay {
        background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 0) 65%);
    }
}

/* Desktop grande (ex.: 1920x1080): mantém a altura, só ajusta o crop do Victor */
@media (min-width: 1600px) and (min-height: 900px) {
    .hero-section {
        background-position: right 40%;
    }
}

/* Ajuste fino para telas baixas (ex.: 1366x768) */
@media (min-width: 769px) and (max-height: 820px) {
    .hero-section {
        /* Hero ocupando a tela toda sem encostar conteúdo no fim */
        height: 100vh;
        min-height: 100vh;
        box-sizing: border-box;

        /* Espaço superior (navbar) + respiro inferior pros botões */
        padding-top: 120px;
        padding-bottom: 70px;

        /* Subir o Victor ~15px (ajuste fino) */
        background-position: right 40%;
    }
}


/* --- HERO: FIX MOBILE LAYOUT (imagem em cima, conteúdo abaixo) --- */
@media (max-width: 768px) {
    .hero-section {
        background-image: none !important;
        min-height: auto;
        display: block;
        padding-top: 76px;
        padding-bottom: 2rem;
        background-color: #ffffff;
    }

    .hero-mobile-media {
        margin-top: 5%;
        margin-bottom: 1.5rem;
    }

    .hero-mobile-media img{
      width: 100%;

      /* altura estável entre aparelhos (não depende só de vh) */
      height: clamp(360px, 52vh, 560px);

      object-fit: cover;

      /* DESCE o enquadramento para parar de cortar a cabeça */
      object-position: center 22%;
    }

    .hero-section .container {
        padding-top: 0;
    }

    .hero-section .row {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) and (max-height: 700px){
  .hero-mobile-media img{
    height: clamp(360px, 58vh, 520px);
    object-position: center 28%;
  }
}

/* --- Elementos de Design (Cards e Ícones) --- */
.bio-image-container {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.feature-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-bottom: 5px solid var(--primary-color);
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.icon-circle {
    width: 64px;
    height: 64px;
    background-color: #e0e7ff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* --- NOVA GALERIA DE PROJETOS --- */
.project-gallery-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease;
    background-color: white;
}

.project-gallery-card:hover {
    transform: translateY(-5px);
}

.gallery-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 240px;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-gallery-card:hover .gallery-img-wrapper img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

/* --- FORMULÁRIO E GATE DE CONTEÚDO --- */

/* Estilo padrão dos inputs */
.form-control, .form-select {
    border-radius: 50rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid #d1d5db;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(7, 47, 96, 0.15);
}

/* Específico para a área do Gate/Formulário */
#access-gate .form-control,
#access-gate .form-select {
    background-color: #f8f9fa !important;
    border: 1px solid #eee !important;
}

#access-gate .form-control:focus,
#access-gate .form-select:focus {
    background-color: #fff !important;
    border-color: var(--primary-color) !important;
}

/* Permite Bootstrap mostrar corretamente is-invalid / is-valid no gate */
#access-gate .form-control.is-invalid,
#access-gate .form-select.is-invalid {
    border-color: var(--bs-danger) !important;
}

#access-gate .form-control.is-valid,
#access-gate .form-select.is-valid {
    border-color: var(--bs-success) !important;
}

/* Animação para o Gate de Conteúdo */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Links de Serviço */
.service-link {
    transition: all 0.2s ease;
    text-decoration: none;
}

.service-link:hover {
    background-color: #f8f9fa !important;
    transform: translateX(5px);
    border-color: var(--primary-color) !important;
}

/* --- BALCÃO DE SERVIÇOS --- */

/* Mobile-first: mantém 1 coluna */
#locked-content .d-grid {
    grid-template-columns: 1fr;
}

/* Desktop (>= 992px): organiza em colunas e limita a altura */
@media (min-width: 992px) {
    #locked-content .d-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 62vh;
        overflow-y: auto;
        padding-right: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    #locked-content .service-link {
        padding: 0.85rem 1rem !important;
    }

    #locked-content .service-link .fw-bold {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    #locked-content .service-link small {
        font-size: 0.8rem;
    }
}

/* Telas grandes (>= 1200px): 3 colunas */
@media (min-width: 1200px) {
    #locked-content .d-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: 60vh;
    }
}

/* --- FOOTER --- */
footer {
    background-color: #0f172a;
    color: white;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- BOTÃO VOLTAR AO TOPO --- */
#btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 1000;
    background-color: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease-in-out;
}

#btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#btn-back-to-top:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* --- BOTÃO WHATSAPP PULSANTE --- */
@keyframes pulse-border-wave {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.btn-whatsapp-pulse {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-whatsapp-pulse::before {
    content: '';
    position: absolute;
    border-radius: 50%;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(37, 211, 102, 0.6);
    z-index: -1;
    animation: pulse-border-wave 1.5s ease-out infinite;
}

.btn-whatsapp-pulse:hover {
    background-color: #128c7e;
    color: white;
    transform: scale(1.1);
}

/* Acessibilidade: melhora contraste em fundos claros */
.on-light-secondary,
.bg-light .text-secondary,
.bg-white .text-secondary {
  color: #475569 !important;
}

/* Acessibilidade: footer com contraste */
footer .text-secondary {
  color: rgba(255, 255, 255, 0.82) !important;
}
footer .opacity-75 {
  opacity: 1 !important;
}
footer a.text-secondary {
  color: rgba(255, 255, 255, 0.82) !important;
}
footer a.text-secondary:hover {
  color: #ffffff !important;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: #072F60;
  color: #fff;
  padding: 8px 12px;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    gap: 1rem;
}

/* Mobile */
@media (max-width: 767.98px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

.lightbox-container-d937552e-40dc-413b-8f55-99ed18d6e0ae .fslightbox-captions-container {
    display: flex !important;
    justify-content: center;
}

.fslightbox-caption-wrapper {
    background-color: rgba(0,0,0,0.50);
    padding: 5px 15px 0px 15px !important;
    width: fit-content !important;
    border-radius: 10px;
}

/* =========================================================================
   Balcão de Serviços — Expansão do card APENAS após liberar acesso (desktop)
   ========================================================================= */

@media (min-width: 992px) {
  #balcaodeservicos { overflow-x: hidden; }

  body.access-unlocked #balcaodeservicos .row > .col-lg-6 {
    display: none !important;
  }

  body.access-unlocked #balcaodeservicos .row > .col-lg-5.offset-lg-1 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
  }

  body.access-unlocked #balcaodeservicos .col-lg-5.offset-lg-1 > .bg-white.rounded-5.shadow-lg {
    width: 100% !important;
    margin-left: 0 !important;
    max-width: none;
  }

  body.access-unlocked #balcaodeservicos #locked-content {
    display: flex;
    flex-direction: column;
    max-height: clamp(520px, 70vh, 780px);
  }

  body.access-unlocked #balcaodeservicos #locked-content > .d-grid {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-gutter: stable;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }

  @media (min-width: 1400px) {
    body.access-unlocked #balcaodeservicos #locked-content > .d-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  body.access-unlocked #balcaodeservicos #locked-content > .text-center.mt-4 {
    flex: 0 0 auto;
    margin-top: 0 !important;
    padding-top: 14px;
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    position: sticky;
    bottom: 0;
    z-index: 2;
  }
}

/* =========================================================================
   SEÇÃO: Evolução dos Votos (Final - Ajustado)
   ========================================================================= */

.section-evolution .font-monospace-custom {
    font-size: 0.9rem;
    color: rgba(10, 30, 60, 0.7);
}

.evolution-chart-container {
    border: 1px solid rgba(10, 30, 60, 0.08);
    padding: clamp(20px, 5vw, 50px);
    background: #fff;
}

.evolution-chart {
    position: relative;
    width: 100%;
    /* Altura aumentada conforme solicitado (min 450px, max 600px) */
    height: clamp(400px, 60vh, 600px); 
    min-height: 450px;
    margin-top: 30px;
}

.evolution-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* --- ESTILOS DAS LINHAS (COR UNIFICADA - Secondary/Teal) --- */
.evo-area {
    opacity: 0.8;
    transition: opacity 0.6s ease;
}

.evo-line {
    fill: none;
    stroke-width: 5px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke: var(--secondary-color, #009d9d); /* Cor única para todo o traço */
}

.evo-line--solid {
    filter: drop-shadow(0 4px 8px rgba(0, 157, 157, 0.25));
}

.evo-line--dash {
    stroke-dasharray: 10 12;
    opacity: 0.8; 
}

/* --- PONTOS E LABELS --- */
.evo-point {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

/* Coordenadas (baseadas no viewBox 0 0 1200 600 do SVG) */
.evo-point--2020 { left: 8.33%; top: 75%; }
.evo-point--2024 { left: 50%; top: 41.66%; }

/* 2028 - Topo da seta */
.evo-point--2028 { 
    left: 91.66%; 
    top: 8.33%; 
    /* MUDANÇA IMPORTANTE: Empurra o conteúdo para BAIXO da ponta da seta */
    transform: translate(-50%, 15px); 
    align-items: center;
}

/* Dots (Bolinhas) */
.evo-dot {
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid var(--secondary-color, #009d9d);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 10px 0;
    transition: transform 0.3s ease;
}

.evo-point:hover .evo-dot { transform: scale(1.2); }
.evo-dot--hidden { opacity: 0; width: 1px; height: 1px; margin: 0; }

.evo-dot--pulse {
    background: var(--secondary-color, #009d9d);
    box-shadow: 0 0 0 0 rgba(0, 157, 157, 0.5);
    animation: evoPulse 2s infinite;
}

@keyframes evoPulse {
    70% { box-shadow: 0 0 0 12px rgba(0, 157, 157, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 157, 157, 0); }
}

/* Textos e Anos */
.evo-year {
    font-weight: 600;
    color: rgba(10, 30, 60, 0.7);
    font-size: 0.95rem;
}

.evo-tooltip {
    background: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.evo-tooltip--dark {
    /* Mantendo a cor unificada do gráfico para o tooltip também */
    background: var(--secondary-color, #009d9d); 
    color: #fff;
    border: none;
}

.evo-val { display: block; font-weight: 800; font-size: 1.2rem; line-height: 1; }
.evo-sub { display: block; font-size: 0.75rem; opacity: 0.8; }

/* Badge do Foguete (Reposicionada para baixo) */
.evo-rocket-badge {
    background: #fff;
    color: var(--primary-color, #072F60);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    border: 2px solid rgba(10, 30, 60, 0.08);
    
    /* Margem superior para afastar do texto '2028' e da seta */
    margin-top: 10px; 
    
    position: relative;
    z-index: 3;
    white-space: nowrap;
}

/* Estilo do Ícone Font Awesome dentro da Badge */
.evo-rocket-badge i {
    font-size: 1rem;
    color: var(--secondary-color); /* Ícone na cor Teal para destaque */
    margin-right: 8px;
}

/* Responsividade */
@media (max-width: 768px) {
    .evolution-chart { height: 400px; }
    .evo-val { font-size: 1rem; }
    .evo-sub { display: none; }
    
    /* Ajuste da badge no mobile para não sair da tela pela direita */
    .evo-rocket-badge { 
        font-size: 0.8rem; 
        padding: 6px 12px; 
        transform: translateX(-20%);
    }
}

//* =========================================================================
   ANIMAÇÃO DO GRÁFICO
   ========================================================================= */

/* --- 1. Configuração Base das Linhas --- */
.evolution-chart .evo-line[data-draw="true"] {
    will-change: stroke-dashoffset;
    transition-timing-function: linear; 
}

/* Quando visível, zera o offset (desenha a linha) */
.evolution-chart.is-visible .evo-line[data-draw="true"] {
    stroke-dashoffset: 0 !important;
}


/* --- 2. Sequenciamento das Linhas (Cronograma Acelerado) --- */

/* PASSO 1: Linha Sólida (2020 -> 2024) */
/* Reduzido de 1.2s para 0.8s */
.evolution-chart .evo-line--solid {
    transition: stroke-dashoffset 0.8s ease-in; 
}

/* PASSO 2: Linha Tracejada (2024 -> 2028) */
/* Espera 0.8s e leva mais 0.8s */
.evolution-chart .evo-line--dash {
    transition: stroke-dashoffset 0.8s ease-out; 
    transition-delay: 0.8s; /* Começa assim que a primeira termina */
}


/* --- 3. Sincronia dos Pontos (Pop-up) --- */

.evo-point {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.5); 
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Pop mais rápido também (0.4s) */
}

/* Ajuste específico para o ponto de 2028 (posição inicial) */
.evo-point--2028 {
    transform: translate(-50%, 40px) scale(0.5); 
}

/* ESTADO VISÍVEL DOS PONTOS */
.evolution-chart.is-visible .evo-point {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
/* O 2028 volta para a posição correta (abaixo da seta) */
.evolution-chart.is-visible .evo-point--2028 {
    transform: translate(-50%, 15px) scale(1);
}


/* --- 4. Delays dos Pontos (Ajustados para o novo tempo) --- */

/* Ponto 2020: Quase imediato (0.1s) */
.evolution-chart.is-visible .evo-point--2020 {
    transition-delay: 0.1s; 
}

/* Ponto 2024: Aparece em 0.8s (fim da primeira linha) */
.evolution-chart.is-visible .evo-point--2024 {
    transition-delay: 0.8s;
}

/* Ponto 2028 + Seta: Aparecem em 1.6s (fim da segunda linha) */
.evolution-chart.is-visible .evo-point--2028,
.evolution-chart.is-visible marker#evoArrow {
    transition-delay: 1.6s;
}

/* Seta (Triângulo) */
#evoArrow path {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.evolution-chart.is-visible #evoArrow path {
    opacity: 1;
    transition-delay: 1.6s; 
}