/* --- CONFIGURAÇÕES GERAIS --- */
:root {
  --primary-color: #2b6cb0;
  --hover-color: #1a4971;
  --text-dark: #2d3748;
  --text-gray: #4a5568;
  --card-bg-color: #eaf4ff;
  --card-border-color: #bee3f8;
  --bg-color: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.8);
  --header-height: 80px;
  --shadow-color: rgba(0, 0, 0, 0.05);
  --input-bg: #ffffff;
  --input-border: #cbd5e0;
}

[data-theme="dark"] {
  --primary-color: #63b3ed;
  --hover-color: #90cdf4;
  --text-dark: #e2e8f0;
  --text-gray: #a0aec0;
  --card-bg-color: #2d3748;
  --card-border-color: #4a5568;
  --bg-color: #1a202c;
  --header-bg: rgba(26, 32, 44, 0.9);
  --shadow-color: rgba(0, 0, 0, 0.4);
  --input-bg: #2d3748;
  --input-border: #4a5568;
}

/* --- UTILITIES --- */
.page-background {
  background:
    linear-gradient(rgba(0, 30, 60, 0.9), rgba(0, 30, 60, 0.8)),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  /* Ensure text is visible if not in a card */
}

/* Fix canvas positioning for full page backgrounds */
.page-background #hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Ensure content sits above the canvas */
.page-background .form-container,
.page-background .back-link {
  position: relative;
  z-index: 10;
}

.page-background .toggles {
  position: absolute;
  z-index: 10;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  /* Ajuste para o header fixo */
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-color);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

h1,
h2,
h3,
nav a {
  font-family: "Montserrat", sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

/* --- MENU (NAVBAR) --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  background-color: transparent;
  height: var(--header-height);
  position: absolute;
  /* Mudado de fixed para absolute */
  top: 0;
  width: 100%;
  z-index: 1000;
}

.logo {
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  /* Aumentado de 1.5rem */
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease;
}

/* Menu Desktop */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

nav a {
  font-weight: 600;
  font-size: 1.15rem;
  /* Aumentado de 0.95rem */
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--primary-color);
}

/* Hamburger */
.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- HERO SECTION (Home) --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  padding-top: calc(var(--header-height) + 120px);
  position: relative;
  background:
    linear-gradient(rgba(0, 30, 60, 0.9), rgba(0, 30, 60, 0.8)),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero h1,
.hero p,
.hero .cta-button,
.hero .scroll-down {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 40px;
  max-width: 700px;
  font-weight: 400;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  color: #e2e8f0;
}

.cta-button {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 18px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  display: inline-block;
}

.cta-button:hover {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
}

.scroll-down {
  margin-top: 80px;
  color: white;
  animation: bounce 2s infinite;
  opacity: 0.8;
  cursor: pointer;
  display: flex;
  justify-content: center;
}

.scroll-down svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.scroll-down a {
  color: white;
  display: flex;
  /* Fixes anchor height */
}

/* --- PAGE HEADER (Equipe) --- */
.page-header {
  height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  padding-top: var(--header-height);
  position: relative;
  background:
    linear-gradient(rgba(0, 30, 60, 0.9), rgba(0, 30, 60, 0.8)),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  margin-bottom: 60px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  position: relative;
  z-index: 2;
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle,
.theme-toggle-btn,
.lang-toggle {
  background: none;
  /* ... existing toggle styles ... */
}

/* --- PARTNERS SECTION --- */
.partners {
  background-color: #001e3c;
  /* Dark blue matching hero gradient base */
  padding: 40px 0;
  text-align: center;
}

.partners img {
  max-height: 85px;
  opacity: 0.9;
  transition: all 0.3s ease;
  /* Invert colors to make logo white on dark background */
  filter: invert(1) grayscale(1) brightness(2) contrast(1.5);
  mix-blend-mode: screen;
}

.partners img:hover {
  transform: scale(1.05);
  opacity: 1;
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle,
.theme-toggle-btn,
.lang-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.4rem;
  /* Aumentado de 1.2rem */
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.3s,
    transform 0.2s,
    color 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.theme-toggle:hover,
.theme-toggle-btn:hover,
.lang-toggle:hover {
  background-color: var(--card-border-color);
  transform: rotate(15deg);
}

.lang-toggle {
  font-size: 1.05rem;
  /* Aumentado de 0.9rem */
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 5px 10px;
  /* Aumentado o padding (área do botão) */
  width: auto;
  height: auto;
  transform: none !important;
}

/* --- CONTENT SECTIONS --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding-bottom: 80px;
}

.about {
  padding: 80px 0;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: var(--text-dark);
  font-weight: 700;
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text,
.text-content {
  font-size: 1.15rem;
  color: var(--text-gray);
  line-height: 1.9;
  text-align: justify;
  hyphens: auto;
  max-width: 900px;
  /* From user dump */
  margin: 0 auto;
  /* From user dump */
}

.about-text p,
.text-content p {
  margin-bottom: 25px;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* --- COURSES CARDS --- */
.courses {
  padding: 40px 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-gray);
  margin-bottom: 40px;
  margin-top: -30px;
}

.course-grid,
.grid-minicursos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.card {
  background-color: var(--bg-color);
  border: 1px solid var(--card-border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(43, 108, 176, 0.15);
}

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 2px solid var(--primary-color);
}

[data-theme="dark"] .card-image.theme-adapt-logo {
  filter: brightness(0) invert(1);
}

.card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.card-tag {
  background-color: #f5f0e6;
  color: #5c4b37;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .card-tag {
  background-color: #2d3748;
  color: #e2e8f0;
}

.card-actions {
  margin-top: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 15px;
  text-align: left;
}

.btn-learn-more {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.3s;
  padding: 0;
  position: relative;
  display: inline-block;
}

.btn-learn-more::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.btn-learn-more:hover {
  background-color: transparent;
  color: var(--hover-color);
  transform: none;
}

.btn-learn-more:hover::after {
  width: 100%;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-color);
  margin: auto;
  padding: 30px;
  border: 1px solid var(--card-border-color);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  color: var(--text-dark);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close-modal {
  color: var(--text-gray);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: var(--primary-color);
}

.modal-body {
  margin-top: 20px;
  font-size: 1rem;
  line-height: 1.6;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-dates ul {
  list-style: none;
  padding-left: 0;
}

.modal-body ul li {
  background-color: var(--card-bg-color);
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.date-subscribe-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s;
}

.date-subscribe-btn:hover {
  background-color: #1a4a7c;
  /* Darker blue */
}

/* Remove old modal footer styles if present, or just leave them unused */
.modal-footer {
  display: none;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.card-content h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-dark);
  font-weight: 800;
}

.card-content p {
  color: var(--text-gray);
  margin-bottom: 25px;
  text-align: justify;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-link {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  /* Smaller */
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.card-link-disabled {
  display: inline-block;
  margin-top: 20px;
  color: var(--text-gray);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  cursor: not-allowed;
  opacity: 0.6;
}

/* --- TEAM CARDS --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 50px;
  justify-content: center;
}

.team-card {
  background-color: var(--bg-color);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.member-role {
  color: var(--primary-color);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.4rem;
  letter-spacing: 1px;
  margin-bottom: 5px;
  display: block;
}

.member-name {
  font-size: 1.8rem;
  margin-bottom: 35px;
  color: var(--text-dark);
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
}

.member-bio {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.7;
  text-align: justify;
}

/* --- ADVISOR CARD --- */
.advisor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 768px) {
  .advisor-card {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
  }
}

.advisor-image-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.advisor-photo {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 4px solid var(--primary-color);
}

.advisor-info-col {
  flex: 1;
}

.advisor-info-col .member-role {
  text-align: inherit;
}

.advisor-info-col .member-name {
  margin-bottom: 20px;
  text-align: inherit;
}

/* --- VOLUNTEERS --- */
.volunteers-section {
  margin-top: 80px;
  text-align: center;
}

.modern-volunteers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto 0;
  text-align: center;
}

.volunteer-card {
  background-color: var(--bg-color);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.volunteer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.volunteer-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: var(--card-border-color); /* neutral gray/border color */
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  font-family: "Montserrat", sans-serif;
  object-fit: cover;
}

.volunteer-photo {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.hidden-volunteer {
  display: none !important;
}

.volunteer-card-name {
  font-size: 1.15rem;
  color: var(--text-dark);
  font-weight: 800;
  margin-bottom: 5px;
  font-family: "Montserrat", sans-serif;
  line-height: 1.3;
}

.volunteer-card-role {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 700;
}

.volunteer-card-desc {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 20px;
  line-height: 1.4;
}

.volunteer-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.volunteer-card-link {
  color: var(--text-gray);
  font-weight: 600;
  font-size: 0.75rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

.volunteer-card-link:hover {
  color: var(--primary-color);
}

.link-separator {
  color: var(--text-gray);
  font-size: 0.8rem;
  opacity: 0.5;
}

/* --- FOOTER --- */
footer {
  padding: 60px 20px;
  margin-top: 50px;
  text-align: center;
  color: var(--text-gray);
}

@media (max-width: 1024px) {
  .modern-volunteers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    gap: 0;
    flex-direction: column;
    background-color: var(--bg-color);
    width: 100%;
    height: calc(100vh - var(--header-height));
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding-top: 20px;
  }

  .nav-menu li {
    margin: 16px 0;
  }

  header nav a {
    color: var(--text-dark);
    /* Changed to dark for mobile menu visibility since mobile menu has light background */
    text-shadow: none;
  }

  header nav a:hover {
    color: var(--primary-color);
  }

  .nav-menu.active {
    left: 0;
  }

  .hero h1 {
    font-size: 1.8rem;
    /* Reduced from 2.5rem */
  }

  .hero p {
    font-size: 0.95rem;
    /* Reduced from 1.1rem */
    line-height: 1.5;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .modern-volunteers-grid {
    grid-template-columns: 1fr;
  }

  html {
    scroll-padding-top: 80px;
    /* Reverted to 80px to remove white space gap */
  }

  /* Fix for justified text on mobile */
  .card p,
  .text-content,
  .about-text,
  .member-bio {
    text-align: left;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  .card-icon {
    font-size: 2.5rem;
  }

  /* Reduce section padding on mobile to minimize white space */
  .courses,
  .about,
  .partners,
  .partners + .section-padding,
  .section-padding {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}


/* Fix for load more button in light theme */
#load-more-btn {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  border: 2px solid var(--primary-color) !important;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 50px;
  padding: 18px 40px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

#load-more-btn:hover {
  background-color: var(--hover-color) !important;
  border-color: var(--hover-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
