@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap");

/* =======================
   VARIABLES & RESET
======================= */

:root {
  --font-heading: "Bricolage Grotesque", sans-serif;
  --font-body: "Poppins", sans-serif;
  --primary-color: #fbf4e8;
  --text-dark: #3f3b57;
  --text-hover: #c96a1d;
  --text-light: #908ca3;
  --text-title: #2d7735;
  --white: #ffffff;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: "Poppins", sans-serif;
}

img {
  width: 100%;
  display: block;
}

a {
  text-decoration: none;
  transition: 0.3s;
}

ul {
  list-style: none;
}

/* =======================
   Loader
======================= */

/* --- CONTENEDOR PRINCIPAL (LA CORTINA) --- */
#loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  /* Color de fondo primario */
  background-color: var(--text-hover);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Siempre por encima de todo */

  /* Efecto de cortina hacia arriba */
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  overflow: hidden;
}

/* Clase que dispara la subida de la cortina (vía JS) */
#loader-container.loader-hidden {
  transform: translateY(-100%);
}

/* Bloqueo de scroll para el body mientras carga */
body.stop-scrolling {
  height: 100vh;
  overflow: hidden;
}

/* --- ESTILOS DEL LOADER SVG --- */
.loader {
  width: 80px; /* Tamaño ajustado para ser visible */
  height: 80px;
  overflow: visible;
  transform: rotate(-90deg);
  transform-origin: center;

  /* Colores ajustados para fondo oscuro */
  --active: #ffffff;
  --track: rgba(255, 255, 255, 0.15);

  --duration: 8s;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    rotate: 0deg;
  }
  100% {
    rotate: 360deg;
  }
}

/* --- ANIMACIÓN CÍRCULO ACTIVO --- */
.active {
  stroke: var(--active);
  stroke-linecap: round;
  stroke-dashoffset: 360;
  animation: active-animation var(--duration) ease-in-out infinite;
}

@keyframes active-animation {
  0% {
    stroke-dasharray: 0 0 0 360 0 360;
  }
  12.5% {
    stroke-dasharray: 0 0 270 90 270 90;
  }
  25% {
    stroke-dasharray: 0 270 0 360 0 360;
  }
  37.5% {
    stroke-dasharray: 0 270 270 90 270 90;
  }
  50% {
    stroke-dasharray: 0 540 0 360 0 360;
  }
  50.001% {
    stroke-dasharray: 0 180 0 360 0 360;
  }
  62.5% {
    stroke-dasharray: 0 180 270 90 270 90;
  }
  75% {
    stroke-dasharray: 0 450 0 360 0 360;
  }
  87.5% {
    stroke-dasharray: 0 450 270 90 270 90;
  }
  87.501% {
    stroke-dasharray: 0 90 270 90 270 90;
  }
  100% {
    stroke-dasharray: 0 360 1 360 0 360;
  }
}

/* --- ANIMACIÓN CÍRCULO DE FONDO (TRACK) --- */
.track {
  stroke: var(--track);
  stroke-linecap: round;
  stroke-dashoffset: 360;
  animation: track-animation var(--duration) ease-in-out infinite;
}

@keyframes track-animation {
  0% {
    stroke-dasharray: 0 20 320 40 320 40;
  }
  12.5% {
    stroke-dasharray: 0 290 50 310 50 310;
  }
  25% {
    stroke-dasharray: 0 290 320 40 320 40;
  }
  37.5% {
    stroke-dasharray: 0 560 50 310 50 310;
  }
  37.501% {
    stroke-dasharray: 0 200 50 310 50 310;
  }
  50% {
    stroke-dasharray: 0 200 320 40 320 40;
  }
  62.5% {
    stroke-dasharray: 0 470 50 310 50 310;
  }
  62.501% {
    stroke-dasharray: 0 110 50 310 50 310;
  }
  75% {
    stroke-dasharray: 0 110 320 40 320 40;
  }
  87.5% {
    stroke-dasharray: 0 380 50 310 50 310;
  }
  100% {
    stroke-dasharray: 0 380 320 40 320 40;
  }
}

/* =======================
   GLOBAL CONTAINER
======================= */

.section__container {
  max-width: var(--max-width);
  margin: auto;
  padding: 5rem 1rem;
}

/* =======================
   NAVBAR (INTACTO)
   ⚠️ NO MODIFICAR
======================= */

nav {
  position: fixed;
  isolation: isolate;
  width: 100%;
  z-index: 12;
}

.nav__header {
  padding: 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--primary-color);
}

.nav__logo .logoSM {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  width: 75px;
  height: 75px;
}

.nav__menu__btn {
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

.nav__links {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  background-color: var(--primary-color);
  transition: transform 0.5s;
  z-index: -1;
}

.nav__links.open {
  transform: translateY(100%);
}

.nav__links a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-dark);
}

.nav__links a:hover {
  color: var(--text-hover);
}

/* BOTÓN DONAR - VISIBILIDAD */
.navbtn--desktop {
  display: none;
}

.navbtn--mobile {
  display: flex;
  justify-content: center;
}

.navbtn--mobile .navbtn {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  font-family: "Poppins", sans-serif;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid #c96a1d;
  border-radius: 30px;
  background-color: var(--primary-color);
  color: #c96a1d;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbtn--mobile .navbtn:hover {
  background-color: #c96a1d;
  color: #ffffff;
}

.navbtn--mobile .navbtnmain {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--text-hover);
  color: #ffffff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
}

.navbtn--mobile .navbtn:hover .navbtnmain {
  background-color: #ffffff;
  color: var(--text-hover);
}

/* NAV MEDIA QUERY (SE CONSERVA) */
@media (width > 768px) {
  nav {
    position: static;
    padding: 2rem 7rem;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background-color: var(--primary-color);
  }

  .nav__header {
    padding: 0;
  }

  .nav__menu__btn {
    display: none;
  }

  .nav__links {
    position: static;
    padding: 0;
    flex-direction: row;
    justify-content: flex-end;
    transform: none;
  }

  .navbtn_container {
    display: flex;
    width: 100%;
    justify-content: flex-end;
  }

  .navbtn {
    display: inline-flex;
    align-items: center;
    font-family: "Poppins", sans-serif;
    gap: 10px;
    padding: 8px 18px;
    border: 1px solid #c96a1d;
    border-radius: 30px;
    background-color: var(--primary-color);
    color: #c96a1d;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .navbtn:hover {
    background-color: #c96a1d;
    color: #ffffff;
  }

  .navbtnmain {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--text-hover);
    color: #ffffff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
  }

  .navbtn:hover .navbtnmain {
    background-color: #ffffff;
    color: var(--text-hover);
  }

  .navbtn--desktop {
    display: flex;
  }

  .navbtn--mobile {
    display: none;
  }

  .header__container {
    gap: 3rem !important;
    padding-top: 1rem !important;
  }

  .header__content .title2 {
    font-size: 20px !important;
  }

  .header__text {
    font-size: 16px !important;
  }

  /* Imagen */
  .header__image img {
    width: 100% !important;
    height: auto !important;
    margin: auto;
  }

  .btn_img {
    display: flex;
    gap: 10px;
  }

  #hero_btn {
    font-size: 16px !important;
  }

  .cat-reviews {
    width: 120px !important;
    height: 50px;
  }

  .mision-section-maincontainer {
    text-align: center !important;
    padding-top: 4rem !important;
  }

  #mision {
    padding-top: 4rem !important;
  }
}

/* =======================
   HEADER (GRID NATIVO)
======================= */

header {
  background-color: var(--primary-color);
}

.header__container {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding-top: 6rem;
  direction: rtl;
  justify-content: center;
}

.header__content {
  display: grid;
  gap: 1rem;
  text-align: left;
  margin-top: 20px;
  justify-items: start;
  direction: ltr;
}

.header__content h4 {
  background: #dde9d5;
  padding: 5px 15px;
  border-radius: 2rem;
  width: fit-content;
  color: #63bc89;
}

.header__content h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
  color: var(--text-title);
  font-weight: 500;
}

.header__content .title2 {
  font-size: 16px;
  color: var(--text-dark);
}

.header__text {
  color: var(--text-light);
  max-width: 500px;
  font-size: 14px;
}

#hero_btn {
  display: inline-flex;
  align-items: center;
  font-family: "Poppins", sans-serif;
  gap: 10px;
  padding: 8px 18px;
  border: none;
  border-radius: 30px;
  background-color: #c96a1d;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#hero_btn:hover {
  background-color: #a2491b;
  color: #fff;
}

.hero_btn_icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  color: #c96a1d;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
}

.btn_img {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cat-reviews {
  width: 120px !important;
  height: 50px;
}

/* Imagen */
.header__image img {
  width: 100%;
  margin: auto;
}

/* =======================
   Mision (GRID NATIVO)
======================= */

.mision-section-maincontainer {
  padding-top: 3rem;
  text-align: center;
}

#mision {
  background-color: var(--white);
  padding-top: 2rem;
}

.mision__container {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  text-align: left;
  direction: ltr; /* eliminamos el rtl que daña el layout */
}

.mision-content {
  display: grid;
  gap: 1.2rem;
  justify-items: start;
  margin-top: 0px !important;
  position: relative;
}

.mision_title {
  font-family: var(--font-body);
  font-size: clamp(28px, 5vw, 40px);
  color: var(--text-dark);
  font-weight: 500;
}

.huella-gato-mision,
.huella-gato-mision-2 {
  width: 60px;
}

.huella-gato-mision-2 {
  position: absolute;
  bottom: -30px;
  right: 20px;
  rotate: calc(-80deg);
}

.mision__header {
  color: var(--text-dark);
  font-size: clamp(14px, 5vw, 36px);
  font-family: var(--font-heading);
  font-weight: 500;
  max-width: 520px;
}

.mision__text {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.5;
  max-width: 520px;
}

.mision-img img {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  border: 8px solid var(--white);
  display: block;
  margin: auto;
  box-shadow: -4px 3px 41px -4px rgba(0, 0, 0, 0.31);
  -webkit-box-shadow: -4px 3px 41px -4px rgba(0, 0, 0, 0.31);
  -moz-box-shadow: -4px 3px 41px -4px rgba(0, 0, 0, 0.31);
}

.mision_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  gap: 10px;

  padding: 14px 20px; /* 🔥 Equivalente a 216 × 54 sin width fijo */

  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, #63bc89 0%, #4ea872 100%);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mision_btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.mision_btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* =======================
   History (GRID NATIVO)
======================= */

.history-section-container {
  padding-top: 3rem;
}

.history-tag {
  font-weight: 500;
  text-align: center;
  font-size: 16px;
  color: #908ca3;
}

.history__title {
  text-align: center;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 500;
  color: #3f3b57;
}

/* 1. El contenedor DEBE ser relative para que las huellas se posicionen respecto a él */
.history-section-container {
  position: relative;
  overflow: hidden; /* Opcional: para que las huellas no generen scroll horizontal si se salen un poco */
}

.history_grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  position: relative;
  z-index: 2; /* Subimos el z-index del contenido */
}

/* 2. Huella superior derecha */
.huella_blanca-1 {
  position: absolute;
  top: -20px;
  right: 0;
  width: 80px;
  z-index: 1;
}

/* 3. Huella detrás del grid (lado izquierdo) */
.huella_blanca-2 {
  position: absolute;
  top: 50%; /* La posiciona a la mitad de la sección */
  left: 0px; /* La saca un poco hacia la izquierda como en el diseño */
  width: 600px; /* En la imagen original parece ser más grande y sutil */
  transform: translateY(-50%); /* La centra verticalmente y le da ángulo */
  z-index: -1; /* Esto la manda detrás de todo el contenido del grid */
  pointer-events: none; /* Para que no interfiera con clicks en el texto o imágenes */
}

/* Fila de Historia */
.history__item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

/* Invertir la segunda fila */
.history__item.reverse {
  direction: ltr; /* Mantiene el texto alineado a la izquierda */
}

/* 1. Contenedor de la imagen */
/* 1. Contenedor de la imagen: Quitamos overflow:hidden para que se vean las curvas */
.history__image-wrapper {
  position: relative;
  z-index: 1;
}

.history__image-wrapper img {
  width: 100%;
  border-radius: 30px;
  display: block;
  object-fit: cover;
  overflow: hidden;
}

.arrow-icon {
  background-color: #f5f5f5;
  padding: 16px 20px;
  z-index: 3;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

/* 2. Botón Next: Ajuste de bordes y sombras */
.arrow-btn.next {
  position: absolute;
  right: -1px; /* Un pequeño ajuste para que tape el borde de la imagen */
  top: -3px;
  background: white;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Solo redondeamos la esquina que entra a la imagen */
  border-bottom-left-radius: 30px;
  border-top-right-radius: 30px; /* Mantener la esquina exterior redondeada si la imagen la tiene */

  z-index: 10;
}

/* 3. Seudoelementos con sombras de "relleno" */
.arrow-btn.next::before,
.arrow-btn.next::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  background: transparent;
  pointer-events: none;
}

/* Curva hacia la IZQUIERDA */
.arrow-btn.next::before {
  top: 3px; /* Alineación fina */
  left: -30px;
  border-top-right-radius: 40px;
  /* La sombra es la que "limpia" el negro de la imagen */
  box-shadow: 15px -15px 0 15px white;
}

/* Curva hacia ABAJO */
.arrow-btn.next::after {
  bottom: -30px;
  right: 1px;
  border-top-right-radius: 30px;
  box-shadow: 15px -15px 0 15px white;
}

/* 1. Botón Prev: Posicionado abajo a la izquierda */

.arrow-btn.prev {
  position: absolute;
  left: -1px; /* Alineación con el borde izquierdo */
  bottom: -3px; /* Alineación con el borde inferior (compensando el recorte) */
  background: white;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Redondeamos la esquina que entra a la imagen (superior derecha) 
     y la que da al borde exterior (inferior izquierda) */
  border-top-right-radius: 30px;
  border-bottom-left-radius: 30px;

  z-index: 10;
  cursor: pointer;
}

/* 2. Seudoelementos para las curvas invertidas */
.arrow-btn.prev::before,
.arrow-btn.prev::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  background: transparent;
  pointer-events: none;
}

/* Curva hacia ARRIBA (conecta el borde izquierdo del botón con la imagen) */
.arrow-btn.prev::before {
  top: -30px;
  left: 1px;
  border-bottom-left-radius: 30px;
  /* La sombra se expande hacia la izquierda y abajo para limpiar la imagen */
  box-shadow: -15px 15px 0 15px white;
}

/* Curva hacia la DERECHA (conecta el borde inferior del botón con la imagen) */
.arrow-btn.prev::after {
  bottom: 3px;
  right: -30px;
  border-bottom-left-radius: 40px; /* Radio mayor para suavizar la transición */
  box-shadow: -15px 15px 0 15px white;
}

/* Mantenemos el estilo del icono interno */
.arrow-icon {
  background-color: #f5f5f5;
  padding: 16px 20px;
  z-index: 3;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Posición de botones de imagen */

/* Contenido de Texto */
.history__content {
  max-width: 480px;
}

.content-title {
  font-size: clamp(14px, 5vw, 32px);
  color: var(--text-dark);
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  line-height: 1.3;
  font-weight: 500;
}

.history__content p {
  color: var(--text-light);
  line-height: 1.6;
  font-size: 16px;
}

/* Badges de Iconos */
.icon-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  margin-bottom: 1rem;
}

.yellow {
  background-color: #fff9eb;
}
.blue {
  background-color: #f0f8ff;
}

/* Responsive: En móviles se apilan */
@media (max-width: 768px) {
  .history__item,
  .history__item.reverse {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .history__item.reverse .history__content {
    order: 2; /* Texto abajo de la imagen en móvil */
  }

  .history__content {
    max-width: 100%;
  }

  .icon-badge {
    margin: 0 auto 1rem;
  }
}

/* =======================
   About (GRID)
======================= */

.about {
  padding: 5rem 1rem;
  display: flex;
  justify-content: center;
  background-color: var(--primary-color);
  position: relative;
  /* Eliminamos overflow: hidden para permitir que el overlay sobresalga abajo */
}

/* Gradiente detrás de las fotos */
.gradient-about {
  position: absolute;
  left: -250px; /* Lo movemos hacia la izquierda para que asome detrás de las fotos */
  top: 50%;
  transform: translateY(-50%);
  width: 80rem; /* Tamaño grande para cubrir el área de las imágenes */
  z-index: 0; /* Capa base */
  pointer-events: none;
}

.huella-gato-about {
  position: absolute;
  right: 0;
  top: 8rem;
  width: clamp(350px, 30vw, 500px); /* Tamaño fluido */
  z-index: 0;
  pointer-events: none;
}

.about__container {
  position: relative;
  z-index: 2; /* Por encima de ambos elementos decorativos */
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* --- AJUSTE DE IMÁGENES PARA QUE SE VEA EL GRADIENTE --- */
.about__images {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, 1fr); /* Sistema de rejilla interna */
  align-items: start;
  min-height: 550px; /* Asegura espacio para el overlay */
  z-index: 3;
}

.image-wrapper {
  border: 4px solid white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main-img {
  grid-column: 1 / 8; /* Ocupa el 70% del ancho del contenedor de imágenes */
  aspect-ratio: 420 / 480;
  z-index: 1;
}

.overlay-img {
  grid-column: 5 / 11; /* Se solapa con la principal */
  align-self: end;
  aspect-ratio: 1 / 1; /* O el ratio que prefieras */
  margin-top: 150px; /* Empuja la imagen hacia abajo */
  margin-bottom: -100px; /* HACE QUE SOBRESALGA DE LA SECCIÓN */
  z-index: 2;
  position: absolute;
}

/* --- TEXTO Y CONTENIDO --- */
.about__subtitle {
  color: var(--text-hover);
  font-size: clamp(19px, 5vw, 32px); /* Tamaño de fuente fluido */

  font-weight: 500;

  display: block;
  margin-bottom: 0.5rem;
}

.about__title {
  font-size: clamp(28px, 5vw, 40px); /* Tamaño de fuente fluido */
  color: var(--text-dark);
  font-family: var(--font-heading);
  line-height: 1.1;
  margin-bottom: 2rem;
  font-weight: 600;
}

.about__text {
  font-size: 1rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 968px) {
  .about__container {
    grid-template-columns: 1fr;
    gap: 5rem; /* Más espacio para que el overlay no pise el texto inferior */
  }

  .about__images {
    max-width: 500px;
    margin: 0 auto;
    min-height: auto;
    display: block; /* Volvemos a posicionamiento manual para control total */
    height: 450px;
  }

  .main-img {
    width: 80%;
    position: relative;
  }

  .overlay-img {
    width: 60%;
    position: absolute;
    bottom: -40px;
    right: 0;
    margin: 0;
  }

  .gradient-about {
    top: 20rem;
  }

  .huella-gato-about {
    top: 40rem;
  }
}

/* ==========================================
   SECCIÓN DONATE (GRID & LAYOUT)
   ========================================== */
.donate {
  padding: 5rem 1rem;
  display: flex;
  justify-content: center;
  background-color: #ffffff;
  position: relative;
  /* Mantenemos sin overflow para el efecto de imagen sobresaliente */
}

.donate__container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 10; /* Menor que el modal */
}

/* --- CONTENIDO TEXTUAL --- */
.donate__icon-wrapper {
  margin-bottom: 1.5rem;
}

.donate__icon {
  width: 40px;
  height: auto;
}

.donate__subtitle {
  color: var(--text-hover);
  font-weight: 500;
  font-size: 16px;
  display: block;
  margin-bottom: 0.5rem;
}

.donate__title {
  font-size: clamp(28px, 5vw, 40px);
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
}

.donate__title strong {
  font-weight: 800;
}

.donate__text {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* --- BOTONES DE LA SECCIÓN --- */
.donate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Botón base de la web */
.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-size: 0.9rem;
  display: inline-block;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn--paypal { background-color: #e3f2fd; color: #1e88e5; }
.btn--sinpe { background-color: #fff3e0; color: #f4511e; }
.btn--bank { background-color: #e8f5e9; color: #43a047; }

/* --- IMÁGENES --- */
.donate__image-container {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.donate__img-group {
  width: 100%;
  height: auto;
  max-width: 550px;
  z-index: 5;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

/* ==========================================
   MODAL SYSTEM (GLOBAL FIXED)
   ========================================== */

/* Capa de fondo oscura (Overlay) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%; /* Cambiado de 100vw para evitar problemas con scrollbars */
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  padding: 1rem; /* Margen de seguridad para que el modal nunca toque los bordes */
}

/* Tarjeta del Modal */
.modal-card {
  background: #ffffff;
  /* El cambio clave: max-width para desktop, pero ancho fluido con margen para móvil */
  width: 100%; 
  max-width: 380px;
  
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
  display: none;
  position: relative;
  
  /* Asegura que el modal esté centrado y no se desplace */
  margin: auto; 
  
  /* Evita que el padding sume al ancho total */
  box-sizing: border-box; 
  
  animation: modalAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalAppear {
  from { transform: scale(0.8) translateY(30px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal__icon-success {
  font-size: 2.5rem;
  color: #10b981;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.modal-card h3 {
  color:var(--text-dark);
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

.modal__instruction {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

/* Caja de Datos Bancarios */
.modal__data-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem; /* REDUCIDO: De 1.25rem a 1rem */
  text-align: left;
  margin-bottom: 1.25rem; /* REDUCIDO */
}

.modal__label {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.modal__copy-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.modal__copy-group strong {
  font-size: 1rem;
  color: #334155;
  letter-spacing: 0.5px;
}

.modal__copy-group button {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

.modal__copy-group button:hover {
  background: #e2e8f0;
  color: #334155;
}

/* Botones de acción del Modal */
.modal__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-close {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: var(--text-light);
  padding: 0.8rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 12px !important;
  cursor: pointer;
  transition: 0.3s;
  font-family: var(--font-body);
}

.btn-close:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-confirm {
  background: #c0702d; /* El naranja de Markat */
  color: #ffffff;
  border: none;
  padding: 0.8rem;
  border-radius: 12px;
  font-weight: 500 !important;
  font-size: 12px !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

.btn-confirm:hover {
  background: #a65d22;
  transform: translateY(-2px);
}

/* Contenedor para un solo QR centrado */
.modal__qr-container--single {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e2e8f0; /* Cambiado a dashed para que se vea más ligero */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.modal__qr-img--single {
  width: 100%;
  max-width: 120px; /* Tamaño ideal para un solo QR */
  height: auto;
  margin-top: 0.5rem;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 5px;
  background: white;
  transition: transform 0.3s ease;
}

.modal__qr-img--single:hover {
  transform: scale(1.05); /* Efecto sutil al pasar el mouse */
}

/* --- RESPONSIVE --- */
@media (max-width: 968px) {
  .donate__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .donate__icon-wrapper,
  .donate__actions {
    justify-content: center;
  }

  .donate__image-container {
    justify-content: center;
    margin-top: 1rem;
  }

  .donate__img-group {
    margin-bottom: -4rem; /* Ajustado para que no tape tanto el footer */
  }
  
  .modal-card {
    padding: 1.5rem 1.25rem;
    max-width: 95%; /* Asegura que casi toque los bordes pero con margen */
  }
  
  .modal__copy-group strong {
    font-size: 0.9rem; /* Texto más pequeño en móviles mini para evitar saltos de línea */
  }
 
}

/* =======================
   INSTAGRAM (GRID)
======================= */

.instagram__container {
  padding: 5rem 1rem; /* Manteniendo tu estándar de espaciado */
  max-width: 1200px;
  margin: 0 auto;
}

.instagram__container p {
  background: #e6e3fa;
  padding: 6px 20px;
  border-radius: 2rem;
  width: fit-content;
  color: #3f3b57;
  margin-bottom: 10px;
  font-weight: 600;
}

.instagram__container .section__header {
  border-bottom: 1px solid var(--text-light);
  padding-bottom: 1rem;
  text-align: left;
  font-weight: 500;
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: 2rem;
}

.instagram__grid {
  display: grid;
  /* Definimos un tamaño mínimo de 250px para que las fotos luzcan bien */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.instagram__grid img {
  width: 100%;
  /* FORZAMOS LA ESTÉTICA: Proporción cuadrada */
  aspect-ratio: 1 / 1;
  /* EVITAMOS COLAPSO: La imagen llena el cuadro sin deformarse */
  object-fit: cover;

  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Efecto opcional para darle vida a la galería */
.instagram__grid img:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Ajuste para móviles muy pequeños */
@media (max-width: 480px) {
  .instagram__grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
  }
}

/* =======================
    FOOTER (GRID)
======================= */

footer {
  background-color: var(--white);
}

.footer__container {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer__logo a {
  font-size: clamp(14px, 5vw, 18px);
  font-weight: 700;
  color: var(--text-dark);
}

.footer__col h4 {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-size: clamp(16px, 4vw, 18px);
  font-weight: 600;
}

.footer__links {
  display: grid;
  gap: 0.75rem;
  
}

.footer__links a {
word-wrap: break-word;         /* Rompe palabras largas */
    overflow-wrap: break-word;     /* Estándar moderno */
    word-break: break-all;         /* Fuerza el quiebre si es necesario en móvil */
    display: inline-block;         /* Permite que las reglas de bloque funcionen */
    max-width: 100%;
  color: var(--text-light);
  transition: 0.3s;
  
}

.footer__links a:hover {
  color: #c0702d; /* Color énfasis */
  padding-left: 5px;
}

.footer__col p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
  line-height: 1.6;
  font-size: clamp(14px, 4vw, 16px);
}

/* --- CORRECCIÓN DEL FORMULARIO --- */
.footer__col form {
  display: flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid var(--text-hover);
  border-radius: 50px;
  padding: 0; /* Quitamos el padding para que el botón toque los bordes */
  overflow: hidden; /* Esto asegura que el botón se corte si es necesario */
  transition: 0.3s;
  max-width: 350px; /* Opcional: para que no sea excesivamente ancho */
}

.footer__col input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1.5rem; /* Más espacio a la izquierda */
  outline: none;
  font-size: 0.9rem;
  color: #333;
  width: 100%;
  font-family: var(--font-body);
}

.footer__col button {
  border: none;
  background: #c0702d; /* El color naranja/café */
  color: white;
  padding: 0.75rem 1.5rem; /* Debe ser igual al width para ser un círculo */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50px; /* Esto lo hace circular */
  margin-right: 2px; /* Pequeño margen para que no toque el borde final */
  transition: 0.3s;
  flex-shrink: 0; /* Evita que el botón se aplaste */
}

.footer__col button:hover {
  background-color: #a65d22;
  transform: scale(1.05);
}

/* Ajuste para el icono dentro del botón si es necesario */
.footer__col button i {
  line-height: 1;
}

/* --- ESTILO REDES SOCIALES --- */
.footer__socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer__socials a {
  background-color: #c0702d; /* Fondo solicitado */
  color: white;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: 0.3s ease;
}

.footer__socials a:hover {
  background-color: #a65d22; /* Cambia a azul oscuro al pasar el mouse */
  transform: translateY(-3px);
}

/* --- BARRA INFERIOR --- */
.footer__bar {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  border-top: 1px solid #eee;
}
