/* =============================== */
/*        VARIÁVEIS GLOBAIS       */
/* =============================== */
:root {
  --verde-escuro: #1b5e20;
  --verde-medio: #2e7d32;
  --verde-claro: #b9e6c9;
  --fundo-claro: #f4faf5;
  --texto-escuro: #243b2e;

  /* Variáveis para modo escuro */
  --dark-bg: #0e0e13;
  --dark-bg-soft: #16201b;
  --dark-card: #15291d;
  --dark-text: #e0f2e9;
  --dark-text-muted: #b7d5c5;
  --dark-accent: #9affbf;
}

/* =============================== */
/*            GERAL                */
/* =============================== */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--fundo-claro);
  color: var(--texto-escuro);
  overflow-x: hidden;
  transition: background-color 0.5s, color 0.5s;
  line-height: 1.5; /* Melhoria de legibilidade */
}

/* Modo Escuro */
body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

/* =============================== */
/*           TIPOGRAFIA            */
/* =============================== */
h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

h1, h2 {
  line-height: 1.2;
}

p {
  text-align: justify;
}

/* =============================== */
/*            NAVBAR               */
/* =============================== */
.navbar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 15px rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.25);
  transition: background 0.3s, backdrop-filter 0.3s;
}

.navbar.scrolled {
  background: rgba(27, 94, 32, 0.25);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.navbar-brand { 
  color: #fff !important; 
  font-size: 1.1rem;
}

.nav-link { 
  color: #e6ffe9 !important; 
}

.nav-link:hover { 
  color: var(--verde-claro) !important; 
}

/* Foco visível */
.nav-link:focus {
  outline: 3px solid var(--verde-claro);
}

/* Modo Escuro - Navbar */
body.dark-mode .navbar {
  background: rgba(0, 20, 10, 0.55) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .navbar.scrolled {
  background: rgba(0, 35, 18, 0.75) !important;
}

body.dark-mode .navbar-brand,
body.dark-mode .nav-link {
  color: #d6ffe0 !important;
}

body.dark-mode .nav-link:hover {
  color: var(--dark-accent) !important;
}
/* =============================== */
/*       BOTÃO MODO ESCURO         */
/* =============================== */
#darkModeToggle {
  background: transparent;
  border: 2px solid #d8f3dc;
  color: #d8f3dc;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: 
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    transform 0.4s ease;
  margin-left: 1rem;
  outline: none;
  position: relative;
  overflow: hidden;
}

/* Acessibilidade */
#darkModeToggle:focus {
  outline: 3px solid var(--verde-claro);
  outline-offset: 3px;
}

/* Hover */
#darkModeToggle:hover {
  background-color: #d8f3dc;
  color: var(--verde-escuro);
  transform: scale(1.08);
}

/* ---------- ANIMAÇÃO DE CLICK (pulse) ---------- */
#darkModeToggle:active {
  transform: scale(0.9);
}

/* Círculo pulsante no clique */
#darkModeToggle::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

#darkModeToggle.clicked::after {
  opacity: 0.3;
  transform: scale(6);
}

/* =============================== */
/*        DARK MODE BUTTON         */
/* =============================== */

body.dark-mode #darkModeToggle {
  border-color: var(--dark-accent);
  color: var(--dark-accent);
}

/* Hover no modo escuro */
body.dark-mode #darkModeToggle:hover {
  background-color: var(--dark-accent);
  color: #0f1b13;
}

/* =============================== */
/*         BOTÃO DA ABELHA         */
/* =============================== */
#toggleBee {
  background: transparent;
  border: 2px solid #d8f3dc;
  color: #d8f3dc;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: 
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    transform 0.4s ease;
  margin-left: 0.5rem;
  outline: none;
  position: relative;
  overflow: hidden;
}

/* Acessibilidade */
#toggleBee:focus {
  outline: 3px solid var(--verde-claro);
  outline-offset: 3px;
}

/* Hover */
#toggleBee:hover {
  background-color: #d8f3dc;
  color: var(--verde-escuro);
  transform: scale(1.08);
}

/* Animação de clique */
#toggleBee:active {
  transform: scale(0.9);
}

/* Efeito de pulso */
#toggleBee::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

#toggleBee.clicked::after {
  opacity: 0.3;
  transform: scale(6);
}

/* =============================== */
/*        DARK MODE BUTTON         */
/* =============================== */
body.dark-mode #toggleBee {
  border-color: var(--dark-accent);
  color: var(--dark-accent);
}

/* Hover no modo escuro */
body.dark-mode #toggleBee:hover {
  background-color: var(--dark-accent);
  color: #0f1b13;
}

/* =============================== */
/*               HERO               */
/* =============================== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  background-image: url('https://portal.ifba.edu.br/valenca/cursos/superior/infraestrutura-compartilhada/pavilhao-b.jpg/@@images/873dd99c-8cf9-438a-b926-5363fd87980d.jpeg');
  background-attachment: scroll;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

body.dark-mode .hero::after {
  background: rgba(0,0,0,0.65);
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeUp 1.5s ease forwards;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.3;
  animation: fadeUp 1.5s ease forwards, float 4s ease-out 1;
}

@keyframes fadeUp {
  from {opacity: 0; transform: translateY(30px);}
  to {opacity: 1; transform: translateY(0);}
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* =============================== */
/*       SEÇÃO SOBRE               */
/* =============================== */
.wave-section {
  position: relative;
  background-color: #e9f7ec;
  padding: 5rem 2rem;
  overflow: hidden;
  transition: background-color 0.5s;
}

body.dark-mode .wave-section {
  background-color: #0f2417;
}

.wave-section::before {
  content: "";
  position: absolute;
  top: -50px;
  width: 100%;
  height: 100px;
  background: url('https://svgshare.com/i/16sz.svg') repeat-x;
  transform: rotate(180deg);
}

/* =============================== */
/*       PROJECT CARDS             */
/* =============================== */
.project-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.6s ease;
  background: white;
}

.project-card.show {
  transform: translateY(0);
  opacity: 1;
}

.project-card img {
  height: 230px;
  object-fit: cover;
  width: 100%;
  display: block;
  margin: 0 auto;
}

.project-card:hover {
  transform: scale(1.03);
}

/* Project Cards - Modo Escuro */
body.dark-mode .project-card {
  background: var(--dark-card);
  color: var(--dark-text);
  box-shadow: 0 4px 25px rgba(0,0,0,0.6);
}

body.dark-mode .project-card:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 30px rgba(0,0,0,0.75);
}

/* =============================== */
/*        IMPACTO                  */
/* =============================== */
.impacto {
  background: linear-gradient(90deg, #e9f7ec);
  color: var(--texto-escuro);
  padding: 4rem 0;
  text-align: center;
}

body.dark-mode .impacto {
  background: linear-gradient(90deg, #07180f, #041009);
}

.impacto .numero {
  font-size: 3rem;
  font-weight: 700;
  color: var(--texto-escuro);
}

body.dark-mode .numero {
  color: var(--dark-text);
}
body.dark-mode .impacto {
  color: var(--dark-text);
}
/* =============================== */
/*          FOOTER                 */
/* =============================== */
footer {
  background: linear-gradient(180deg, #1b5e20, #243b2e); /* degrade leve e vivo */
  color: #e8ffe9;
  padding: 3rem 0 2rem;
  position: relative;
  border-top: 3px solid rgba(255,255,255,0.15);
}

footer .footer-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffffff55, transparent);
}

footer .social-links a {
  font-size: 1.4rem;
  margin: 0 0.5rem;
  color: #c9fadc;
  transition: 0.3s;
}

footer .social-links a:hover {
  color: var(--verde-claro);
  transform: translateY(-3px);
}

footer p {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

/* Grid das 3 seções */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  text-align: left;
}

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #eaffea;
}

/* Texto */
.footer-section p {
  margin: 0.35rem 0;
  opacity: 0.95;
}

/* Redes sociais */
.footer-social a {
  margin-right: 0.75rem;
  color: #d6ffe0;
  transition: 0.3s;
  display: inline-flex;
}

.footer-social a:hover {
  color: var(--verde-claro);
  transform: translateY(-3px);
}

/* Linha separadora */
.footer-divider {
  width: 85%;
  height: 1px;
  margin: 2.3rem auto 1.3rem;
  background: rgba(255,255,255,0.25);
}

/* Copyright */
.footer-copy {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsivo */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social a {
    margin: 0 0.6rem;
  }
}


body.dark-mode footer {
  background: #06150d;
  border-color: rgba(255,255,255,0.1);
}

body.dark-mode footer .social-links a {
  color: #dfffe8;
}

/* =============================== */
/*       ABELHA PARALLAX           */
/* =============================== */
#abelha {
  position: absolute;
  top: 10%;
  left: 50%;
  font-size: 3rem;
  z-index: 10;
  pointer-events: none;
  transform: translateX(-50%);
  transition: transform 0.05s linear;
  max-width: 80vw;
}

body.dark-mode #abelha {
  filter: brightness(1.5) drop-shadow(0 0 6px rgb(43, 43, 43));
  animation: moveAbelha 5s ease-in-out forwards;
}

/* =============================== */
/*          LINKS                  */
/* =============================== */
body.dark-mode a {
  color: var(--dark-accent);
}

body.dark-mode a:hover {
  color: #caffdd;
}

/* =============================== */
/*         BRILHOS SUAVES          */
/* =============================== */
body.dark-mode {
  text-shadow: 0 0 3px rgba(150, 255, 180, 0.15);
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5 {
  text-shadow: 0 0 6px rgba(130, 255, 170, 0.2);
}

body.dark-mode a {
  text-shadow: 0 0 4px rgba(120, 255, 170, 0.25);
}

body.dark-mode a:hover {
  text-shadow: 0 0 7px rgba(150, 255, 190, 0.45);
}

body.dark-mode .navbar {
  box-shadow: 0 0 12px rgba(120, 255, 160, 0.12);
}

body.dark-mode .navbar.scrolled {
  box-shadow: 0 0 14px rgba(160, 255, 200, 0.18);
}

body.dark-mode #darkModeToggle {
  box-shadow: 0 0 8px rgba(140, 255, 190, 0.25);
}

body.dark-mode #darkModeToggle:hover {
  box-shadow: 0 0 12px rgba(150, 255, 200, 0.5);
}

body.dark-mode .project-card {
  box-shadow: 0 0 12px rgba(0,0,0,0.7), 0 0 10px rgba(120, 255, 160, 0.15);
}

body.dark-mode .project-card:hover {
  box-shadow: 0 0 16px rgba(0,0,0,0.8), 0 0 16px rgba(140, 255, 180, 0.25);
}

body.dark-mode .impacto .numero {
  text-shadow: 0 0 8px rgba(180, 255, 200, 0.45);
}

body.dark-mode footer {
  box-shadow: inset 0 0 18px rgba(150, 255, 180, 0.12);
}

body.dark-mode footer .social-links a {
  text-shadow: 0 0 6px rgba(160, 255, 200, 0.3);
}

body.dark-mode footer .social-links a:hover {
  text-shadow: 0 0 9px rgba(200, 255, 220, 0.5);
}

body.dark-mode #abelha {
  filter: drop-shadow(0 0 8px rgba(150, 255, 190, 0.5));
}

 /* POPUP 2 — completamente separado */

/* Fundo escurecido */
.popup2-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 99999;
}

/* Contêiner ativo */
.popup2-container.active {
    opacity: 1;
    pointer-events: auto;
}

/* Caixa branca */
.popup2-content {
    background: #ffffff;
    color: #000000;
    padding: 28px;
    max-width: 550px;
    width: 90%;
    border-radius: 14px;
    box-shadow: 0 0 25px rgba(0,0,0,0.45);
    animation: popup2Show .3s ease;

    /* >>> Correções para permitir scroll sempre <<< */
    max-height: 85vh;
    overflow-y: auto;
}


/* Animação */
@keyframes popup2Show {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Botão fechar */
.popup2-content button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #074600;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
/* =============================== */
/*        BOTÃO VER MAIS           */
/* =============================== */
.ver-mais-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #074600; /* mesma cor do botão fechar */
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, transform 0.2s;
    text-align: center;
    text-decoration: none;
}

.ver-mais-btn:hover {
    background-color: #074600; /* mesma cor hover do fechar */
    transform: translateY(-2px);
}

/* Botão maior no mobile */
@media (max-width: 768px) {
    .ver-mais-btn {
        width: 100%;
        padding: 14px 0;
        font-size: 1rem;
    }
}
  /* =============================== */
  /*        POPUP                    */
  /* =============================== */
.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup-container.active {
    opacity: 1;
    pointer-events: auto;
}

/* Conteúdo do popup */
.popup-content.dark-popup {
    background-color: #1e1e1e;
    padding: 25px 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    color: #f0f0f0;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Título */
.popup-content.dark-popup h4 {
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

/* Itens do popup */
.popup-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    text-decoration: none;
    color: #f0f0f0;
    transition: background 0.2s, transform 0.2s;
    padding: 5px 10px;
    border-radius: 8px;
}

.popup-item img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.popup-item p {
    margin: 0;
    font-size: 16px;
}

/* Hover nos itens */
.popup-item:hover {
    background-color: #333;
    transform: translateX(3px);
}

/* Botão de fechar */
.close-btn {
    display: block;
    margin: 15px auto 0 auto;
    padding: 8px 18px;
    background-color: #ff4b5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.close-btn:hover {
    background-color: #ff2a3a;
}
  /* Torna popup acessível */
  .popup-container.active {
    display: flex;
  }

  .popup-container.active:focus {
    outline: 3px solid var(--verde-claro);
  }

/* =============================== */
/*          TEAM CARDS             */
/* =============================== */

.team-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.team-img-container {
    width: 100%;
    height: 260px;
    overflow: hidden;
}

.team-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-role {
    font-weight: 600;
    color: var(--verde-medio);
}

.team-contact a {
    margin: 0 8px;
    font-size: 1.3rem;
    color: var(--verde-escuro);
    transition: 0.3s;
}

.team-contact a:hover {
    color: var(--verde-medio);
}

/* Dark mode */
body.dark-mode .team-card {
    background: var(--dark-card);
    color: var(--dark-text);
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

body.dark-mode .team-role {
    color: var(--dark-accent);
}

body.dark-mode .team-contact a {
    color: var(--dark-accent);
}
/* Ajustes gerais para mobile */
@media (max-width: 768px) {
  .popup2-content {
    width: 95%;           /* Ocupa quase toda a tela */
    padding: 20px;        /* Padding reduzido para caber melhor */
    max-height: 90vh;     /* Limita altura para evitar overflow */
    overflow-y: auto;     /* Permite scroll interno se o conteúdo for maior que a tela */
  }

  /* Botão fechar maior e fácil de clicar */
  .popup2-content button {
    width: 100%;          /* Ocupa toda a largura do popup */
    padding: 14px 0;      /* Altura maior para toque confortável */
    font-size: 1rem;      /* Texto legível */
    margin-top: 20px;     /* Espaço do conteúdo */
  }
}


@media (max-width: 768px) {
  .popup2-content {
    animation: popup2ShowMobile 0.3s ease forwards;
  }

  @keyframes popup2ShowMobile {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
}


/* =============================== */
/*         SEÇÃO DE VÍDEO          */
/* =============================== */
.video-section {
  position: relative;
  background: var(--fundo-claro);
  padding: 60px 0;
  text-align: center;
  color: #333;
  margin-top: 50px;
  overflow: hidden;
  border-top: 3px solid rgba(255, 255, 255, 0.15);
  transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark-mode .video-section {
  background: var(--dark-bg-soft);
  color: var(--dark-text);
  border-top: 3px solid rgba(255, 255, 255, 0.1);
}

.video-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: inherit;
  margin-bottom: 20px;
  animation: fadeInFromLeft 1s ease-out;
}

@keyframes fadeInFromLeft {
  0% { opacity: 0; transform: translateX(-30px); }
  100% { opacity: 1; transform: translateX(0); }
}

.video-section .lead {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 40px;
  transition: color 0.3s ease;
}

body.dark-mode .video-section .lead {
  color: var(--dark-text-muted);
}

.video-container {
  position: relative;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

.video-wrap {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

body.dark-mode .video-wrap {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.video {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  border-radius: 15px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.video-wrap:hover .video {
  transform: scale(1.05);
}

body.dark-mode .video {
  filter: brightness(0.8);
}

.video-section:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://www.transparenttextures.com/patterns/45-degree-fabric-light.png');
  opacity: 0.2;
  z-index: 0;
}

body.dark-mode .video-section:before {
  opacity: 0.3;
}


/* =============================== */
/*          RESPONSIVIDADE         */
/* =============================== */
@media (max-width: 1200px) {
  .hero h1 { font-size: 3rem; }
  .navbar-brand { font-size: 1rem; }
  .navbar-nav { margin-left: 1rem; }
  .video-section h2 { font-size: 2rem; }
  .video-wrap { width: 90%; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .impacto .numero { font-size: 2.5rem; }
  .project-card { width: 100%; }
  .navbar-nav { margin-top: 1rem; }
  .footer-content { padding: 2rem 1rem; }
  .video-section h2 { font-size: 1.8rem; }
  .video-wrap { width: 100%; }
}

@media (max-width: 576px) {
  .hero h1 { font-size: 2rem; }
  .impacto .numero { font-size: 2rem; }
  .popup-content { width: 90%; }
  .navbar-nav { text-align: center; padding: 0; }
  .video-section h2 { font-size: 1.6rem; }
  .video-wrap { width: 100%; }
}

@media (max-width: 768px) {
    .navbar-brand img {
        content: url('https://i.postimg.cc/v810DJVd/Logoifbamobile.png');
        height: auto;
    }
}
@media (max-width: 576px) {
    .navbar-brand img {
        content: url('https://i.postimg.cc/v810DJVd/Logoifbamobile.png');
        height: auto;
    }
}
