/* =============================== */
/*        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;
}

/* Modo Escuro */
body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text);
  text-shadow: 0 0 3px rgba(150, 255, 180, 0.15);
}

/* =============================== */
/*          TIPOGRAFIA             */
/* =============================== */
h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  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; 
}

.nav-link:focus {
  outline: 3px solid var(--verde-claro);
}

/* Navbar Modo Escuro */
body.dark-mode .navbar {
  background: rgba(0, 20, 10, 0.55) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 12px rgba(120, 255, 160, 0.12);
}

body.dark-mode .navbar.scrolled {
  background: rgba(0, 35, 18, 0.75) !important;
  box-shadow: 0 0 14px rgba(160, 255, 200, 0.18);
}

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;
}

/* Animações */
@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); }
}

/* =============================== */
/*            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;
  }
}


/* Footer - Modo Escuro */
body.dark-mode footer {
  background: #06150d;
  border-color: rgba(255,255,255,0.1);
  box-shadow: inset 0 0 18px rgba(150, 255, 180, 0.12);
}

body.dark-mode footer .social-links a {
  color: #dfffe8;
  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);
}

/* =============================== */
/*          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;
  filter: drop-shadow(0 0 8px rgba(150, 255, 190, 0.5));
}

/* =============================== */
/*          LINKS                  */
/* =============================== */
body.dark-mode a {
  color: var(--dark-accent);
  text-shadow: 0 0 4px rgba(120, 255, 170, 0.25);
}

body.dark-mode a:hover {
  color: #caffdd;
  text-shadow: 0 0 7px rgba(150, 255, 190, 0.45);
}

/* =============================== */
/*        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;
  display: flex;
}

.popup-container.active:focus {
  outline: 3px solid var(--verde-claro);
}

/* 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);
}

.popup-content.dark-popup h4 {
  margin-bottom: 20px;
  font-size: 22px;
  text-align: center;
}

.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;
}

.popup-item:hover {
  background-color: #333;
  transform: translateX(3px);
}

.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;
}

/* =============================== */
/*        DOCUMENTO PAGE           */
/* =============================== */
.doc-card {
  background: #fff;
  border-left: 6px solid var(--verde-medio);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
}

body.dark-mode .doc-card {
  background: var(--dark-card);
  border-left-color: var(--dark-accent);
  color: var(--dark-text);
}

/* Animação do card */
.animate-card {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s ease;
}

.animate-card.show {
  opacity: 1;
  transform: translateY(0);
}

/* =============================== */
/*        RESPONSIVIDADE           */
/* =============================== */
@media (max-width: 1200px) {
  .hero h1 {
    font-size: 3rem;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .navbar-nav {
    margin-left: 1rem;
  }
}

@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;
  }
}

@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;
  }
}

@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;
    }
}