/* ========== Importações ========== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');


/* ========== Reset e Base ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Roboto', sans-serif;
  background: #fff;
  color: #222;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

/* Evita scroll horizontal global */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Garante que todos elementos respeitem a largura do viewport */
* {
  max-width: 100vw;
  box-sizing: border-box;
}


/* ========== Header ========== */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 72px;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.logo-img {
  max-height: 8rem;
  width: auto;
  object-fit: contain;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-weight: 600;
  font-size: 1rem;
}

nav a {
  color: black;
  text-decoration: none;
  position: relative;
  padding: 0.375rem 0;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #6b4eff, #9a7bff);
  transition: width 0.3s ease;
  border-radius: 1px;
}

nav a:hover,
nav a:focus {
  color: #dabfff;
}

nav a:hover::after,
nav a:focus::after {
  width: 100%;
}

/* ========== Seção INICIO ========== */
#inicio {
  position: relative;
  height: 115vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

#inicio::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('images/home.jpg') center center / cover no-repeat;
  z-index: 0;
}

#inicio::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 31, 77, 0.6); /* escurece a imagem */
  z-index: 1;
}

#inicio h1 {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
  padding: 0 2rem;
  max-width: 90vw;
}

#wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 2;
}

#wave svg {
  display: block;
  width: 100%;
  height: 100px;
}


/* ========== Seção SOBRE ========== */
#sobre {
  background-color: #f9f9f9;
  padding: 3.75rem 1.25rem;
  background: #f5f5ff;
}

#sobre h2 {
  text-align: center;
  font-size: 2rem;
  color: #001f4d;
  margin-bottom: 2.5rem;
}

.sobre-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.sobre-container .texto {
  flex: 1 1 300px;
}

.sobre-container .texto p {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.8;
  font-weight: 400;
  text-align: justify;
}

.sobre-container .logo {
  flex: 0 0 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sobre-container .logo img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 0.75rem;
  object-fit: contain;
}

/* ========== Seção PROJETOS CAROUSEL ========== */
#projetos-carousel {
  padding: 3.75rem 1.25rem;
  background-color: #f9f9f9;
  text-align: center;
}

.projetos-titulo {
  margin-bottom: 2.5rem;
}

.projetos-titulo h2 {
  font-size: 2rem;
  color: #001f4d;
  margin-bottom: 0.625rem;
}

.projetos-titulo p {
  font-size: 1.1rem;
  color: #555;
  font-weight: 500;
  margin: 0 auto;
  max-width: 600px;
}

.carousel-wrapper {
  display: flex;
  justify-content: center;
  gap: 1.875rem;
  flex-wrap: wrap;
}

.card {
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  cursor: pointer;
  overflow: hidden;
  width: 220px;
  transition: transform 0.3s ease;
  text-align: center;
  user-select: none;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  outline: none;
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-text {
  padding: 0.9375rem 0.625rem;
  font-weight: 600;
  color: #001f4d;
  font-size: 1rem;
}

/* ========== Modal e Carousel interno ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-content {
  background: #fff;
  padding: 1.25rem;
  border-radius: 1rem;
  max-width: 700px;
  width: 100%;
  position: relative;
  box-sizing: border-box;
  max-height: 90vh;
  overflow-y: auto;
}

.modal .close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: color 0.3s ease;
}

.modal .close:hover,
.modal .close:focus {
  color: #2563eb;
  outline: none;
}

.carousel {
  display: flex;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 400px;
  margin-top: 1.25rem;
  border-radius: 0.625rem;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  border-radius: 0.625rem;
}

.carousel img.active {
  opacity: 1;
  position: relative;
  z-index: 1;
}

.carousel-text-slide {
  position: absolute;
  top: 0; left: 0;
  width: 95%;
  height: 100%;
  background: #fff;
  color: #333;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.875rem;
  font-size: 1rem;
  line-height: 1.6;
  border-radius: 0.625rem;
  transition: opacity 0.5s ease-in-out;
}

.carousel-text-slide.active {
  display: flex;
}

.carousel-text-slide h2 {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  color: #001f4d;
}

.carousel-text-slide p {
  max-width: 500px;
}

.carousel-controls {
  margin-top: 1rem;
  text-align: center;
}

.carousel-controls button {
  background: #001f4d;
  color: white;
  border: none;
  padding: 0.625rem 1rem;
  font-size: 1.125rem;
  margin: 0 0.625rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease;
}

.carousel-controls button:hover,
.carousel-controls button:focus {
  background-color: #2563eb;
  outline: none;
}

/* ========== DOAÇÕES Section ========== */
#doacoes {
  width: 100%;
  margin: 3.75rem 0 5rem;
  padding: 2.5rem 1.875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.875rem;
  background: #f9f9f9;
  box-shadow: 0 0 20px rgba(0,31,77,0.15);
  border-radius: 1rem;
  box-sizing: border-box;
}

#doacoes .texto {
  flex: 1 1 320px;
  font-size: 1.1rem;
  color: #222;
  font-weight: 500;
  user-select: text;
}

#doacoes .info {
  flex: 1 1 280px;
  background: #001f4d;
  border-radius: 0.75rem;
  padding: 1.5rem 1.875rem;
  font-weight: 600;
  color: #f0f0f0;
  box-shadow: 6px 6px 15px #003070, -6px -6px 15px #002050;
  font-size: 1.1rem;
  user-select: text;
}

#doacoes .info p {
  margin-bottom: 1.125rem;
  line-height: 1.4;
}

#doacoes .info button {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 0.5rem;
  vertical-align: middle;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

#doacoes .info button:hover {
  transform: scale(1.1);
}

#doacoes .info svg {
  vertical-align: middle;
}

/* ========== LOCALIZAÇÃO ========== */
#localizacao {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 60px 40px;
  align-items: center;
  justify-content: space-between;
  background: #f5f5ff;
  box-sizing: border-box;
}

#localizacao .mapa {
  flex: 1 1 480px;
  min-width: 300px;
  aspect-ratio: 4 / 3;
  height: auto;
}

#localizacao .mapa iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

#localizacao .texto {
  flex: 1 1 400px;
  min-width: 280px;
  color: #333;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#localizacao .texto h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

#localizacao .texto p {
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 500;
}

/* ========== FOOTER ========== */
footer {
  background-color: #0a1a2f;
  color: #cbd5e1;
  padding: 2.5rem 1.25rem;
  font-weight: 400;
  font-size: 0.95rem;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-logo img {
  width: 140px;
  height: auto;
  object-fit: contain;
}

.footer-content {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  gap: 1.5625rem;
}

.footer-content p {
  margin: 0;
  letter-spacing: 0.03em;
  font-weight: 500;
  color: #a0aec0;
}

.footer-links {
  display: flex;
  gap: 1.875rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  position: relative;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0%;
  height: 2px;
  background: #2563eb;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #2563eb;
}

.footer-links a:hover::after,
.footer-links a:focus::after {
  width: 100%;
}

.social {
  display: flex;
  gap: 1.5625rem;
}

.social a {
  color: #cbd5e1;
  font-size: 1.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social a:hover,
.social a:focus {
  color: #2563eb;
  transform: scale(1.15);
}


/* ========== RESPONSIVO ========== */
@media (max-width: 1100px) {
  .sobre-container {
    flex-direction: column;
    text-align: center;
  }

  .sobre-container .logo {
    order: 1;
    margin-bottom: 1rem;
    flex: none;
  }

  .sobre-container .texto {
    order: 2;
    flex: none;
  }

  .carousel {
    height: 280px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 1rem;
  }

  nav {
    gap: 1rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  #doacoes {
    flex-direction: column;
    text-align: center;
  }

  #doacoes .texto,
  #doacoes .info {
    flex: 1 1 100%;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .footer-content {
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    gap: 1rem;
  }

  .social {
    gap: 1rem;
  }

  .card {
    width: 180px;
  }

  #localizacao {
    flex-direction: column;
    padding: 40px 20px;
    gap: 30px;
    text-align: center;
  }

  #localizacao .texto {
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 14px;
  }

  .card {
    width: 100%;
    max-width: 300px;
  }

  .carousel-controls button {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }

  footer {
    font-size: 0.85rem;
    padding: 2rem 1rem;
  }

  #inicio h1 {
    font-size: clamp(1.6rem, 6vw, 2.5rem);
    padding: 0 1rem;
  }

  header {
    flex-direction: column;
    height: auto;
    gap: 0.5rem;
  }

  .footer-logo img {
    width: 100px;
  }

  #localizacao .mapa {
    aspect-ratio: 1 / 1;
  }
}
