/* ---------- RESET BÁSICO ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #333;
  background-color: #ffffff;
}

/* ---------- VARIABLES ---------- */
:root {
  --green-main: #6EC21E;
  --red-main:   #E30613;
  --dark-text:  #222222;
  --light-gray: #f5f5f5;
}

/* ---------- BARRA SUPERIOR ---------- */

.top-bar {
  width: 100%;
  background-color: var(--green-main);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.8rem;
  height: 40px;
  font-size: 0.82rem;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.top-bar-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.top-bar-center {
  display: flex;
  gap: 0.2rem;
}

.slider-arrow {
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.75rem;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
}

/* ---------- CABECERA PRINCIPAL ---------- */

.main-header {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 1.5rem;
  padding: 0.7rem 2.3rem;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 70px;
  width: auto;
}

/* Toggle móvil */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 32px;
  height: 26px;
  position: relative;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #444;
  border-radius: 3px;
  transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-label span {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle-label span::before {
  content: "";
  top: -9px;
}

.nav-toggle-label span::after {
  content: "";
  top: 9px;
}

/* animación X */
.nav-toggle:checked + .nav-toggle-label span {
  background: transparent;
}

.nav-toggle:checked + .nav-toggle-label span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* NAV */

.main-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.main-nav li a {
  display: block;
  padding: 0.95rem 1.3rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #555555;
  background: #f3f3f3;
  border-left: 1px solid #e0e0e0;
}

.main-nav li:first-child a {
  border-radius: 4px 0 0 4px;
}

.main-nav li:last-child a {
  border-radius: 0 4px 4px 0;
}

.main-nav li a:hover,
.main-nav li a.active {
  background: #ffffff;
  color: var(--red-main);
}

.menu-grid {
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.menu-grid i {
  background: var(--red-main);
  color: #ffffff;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: stretch;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("img/fondo.png") center bottom / cover no-repeat;
  opacity: 0.4;
  filter: grayscale(100%);
  z-index: 0;
}

.hero-detail {
  position: absolute;
  right: 0;
  bottom: -40px;
  width: 50%;
  max-width: 650px;
  z-index: 1;
}

.hero-detail img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-flag {
  position: absolute;
  left: 0;
  top: 60px;
  width: 220px;
  z-index: 2;
}

.hero-flag img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 4.5rem 5rem 4.5rem 16rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  color: var(--dark-text);
}

.hero-kicker {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.05rem;
  color: var(--red-main);
}

.hero-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1.1;
}

.highlight-green {
  color: var(--green-main);
}

.hero-subtitle {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #555555;
}

.hero-cta {
  margin-top: 1.4rem;
}

/* BOTONES */

.btn-red {
  background: var(--red-main);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 0.6rem 1.8rem;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-decoration: none;
}

.btn-red:hover {
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.7rem;
  border-radius: 24px;
  border: 1px solid var(--red-main);
  color: var(--red-main);
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.btn-outline:hover {
  background: var(--red-main);
  color: #ffffff;
}

.hero-image {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-image{
    text-align:center;
  }

  .hero-image img{
    width: 100%;
    max-width: 411px;   /* PERMITE CRECER MÁS */
    max-height: 520px;  /* MÁS GRANDE AÚN 😎 */
    height: auto;
    transform: translateY(0);
  }
}

.hero-scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(0,0,0,0.18);
  z-index: 4;
  color: var(--green-main);
  text-decoration: none;
}

/* ---------- SECCIONES GENERALES ---------- */

.section {
  padding: 4.5rem 1.5rem;
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  text-align: center;
}

.section-intro {
  max-width: 780px;
  margin: 0 auto 1.9rem auto;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #555555;
  text-align: center;
}

.align-left {
  text-align: left;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.section-column p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #555555;
  margin-bottom: 0.8rem;
}

.section-cta-center {
  margin-top: 1.7rem;
  text-align: center;
}

.extra-top {
  margin-top: 1.4rem;
}

/* IMÁGENES POR SECCIÓN */

.section-media {
  max-width: 900px;
  margin: 0 auto 1.6rem auto;
}

.section-media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* ---------- QUIÉNES SOMOS ---------- */

.section-about {
  background-color: #ffffff;
}

.section-about .section-inner {
  max-width: 1080px;
}

.about-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.6rem;
  box-shadow: 0 12px 25px rgba(0,0,0,0.06);
}

.profile-img {
  width: 100%;
  max-width: 260px;
  border-radius: 999px;
  display: block;
  margin: 0 auto 0.9rem auto;
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}

.about-card h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.about-subtitle {
  font-size: 0.88rem;
  color: #777777;
  margin-bottom: 0.9rem;
}

.about-list {
  list-style: none;
  margin-bottom: 0.9rem;
}

.about-list li {
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.1rem;
}

.about-list li::before {
  content: "•";
  position: absolute;
  left: 0.2rem;
  top: 0;
  color: var(--green-main);
}

.about-quote {
  font-size: 0.9rem;
  font-style: italic;
  color: #444444;
  border-left: 3px solid var(--green-main);
  padding-left: 0.7rem;
}

/* ---------- PROPUESTA ---------- */

.section-propuesta {
  background: var(--light-gray);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  margin-top: 1.4rem;
}

.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.04);
}

.card h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--dark-text);
}

.card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555555;
  margin-bottom: 0.6rem;
}

.card ul {
  list-style: disc;
  margin-left: 1.1rem;
  font-size: 0.9rem;
  color: #555555;
}

.card ul li {
  margin-bottom: 0.35rem;
}

/* ---------- AGENDA ---------- */

.section-agenda {
  background: #ffffff;
}

.agenda-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.agenda-block {
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff, #f7f7f7);
  padding: 1.5rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.agenda-block h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: var(--dark-text);
}

.agenda-block ul {
  list-style: disc;
  margin-left: 1.1rem;
  font-size: 0.9rem;
  color: #555555;
}

.agenda-block li {
  margin-bottom: 0.4rem;
}

/* ---------- NOTICIAS ---------- */

.section-news {
  background: var(--light-gray);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.6rem;
}

.news-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.4rem;
  box-shadow: 0 10px 18px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.news-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--green-main);
  color: #ffffff;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.news-card h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.news-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #555555;
  margin-bottom: 0.7rem;
}

.news-link {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red-main);
  text-decoration: none;
  font-weight: 600;
}

/* ---------- VOLUNTARIADO ---------- */

.section-voluntariado {
  background: #ffffff;
}

.section-voluntariado .section-inner {
  max-width: 1080px;
}

.bullet-check {
  list-style: none;
  margin: 0.9rem 0 1.1rem;
}

.bullet-check li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 0.5rem;
}

.bullet-check li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green-main);
}

/* Formulario */

.form {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 1.6rem;
  box-shadow: 0 10px 22px rgba(0,0,0,0.04);
}

.form-row {
  margin-bottom: 0.9rem;
}

.form-row label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #d0d0d0;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.form-row textarea {
  resize: vertical;
}

/* ---------- DONAR ---------- */

.section-donar {
  background: var(--light-gray);
}

.section-donar .section-inner {
  max-width: 1080px;
}

.steps {
  margin: 1.1rem 0 1.2rem;
}

.step {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.step-number {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red-main);
  color: #ffffff;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-text strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}

.step-text p {
  font-size: 0.9rem;
  color: #555555;
}

.donar-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.donar-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 22px rgba(0,0,0,0.05);
}

.donar-box h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.donar-box p {
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 0.6rem;
}

.donar-list {
  list-style: none;
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 0.6rem;
}

.donar-list li {
  margin-bottom: 0.6rem;
}

.donar-note {
  font-size: 0.75rem;
  color: #777777;
}

/* ---------- FOOTER ---------- */

.footer {
  background: #111111;
  color: #cccccc;
  padding: 1.4rem 1rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.footer-small {
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

/* ---------- RESPONSIVE ---------- */

/* Tablets medianas */
@media (max-width: 1024px) {
  .top-bar {
    padding: 0 1.2rem;
  }

  .main-header {
    padding: 0.7rem 1.4rem;
  }

  .hero-flag {
    width: 160px;
    top: 80px;
  }

  .hero-content {
    padding: 3.5rem 2rem 4.5rem 12rem;
    grid-template-columns: 1.1fr 0.9fr;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-image img {
    max-height: 360px;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .agenda-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablets pequeñas / móviles horizontales */
@media (max-width: 800px) {
  .top-bar-center {
    display: none;
  }

  .top-bar {
    padding: 0 0.8rem;
  }

  .main-header {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    row-gap: 0.6rem;
  }

  .menu-grid {
    display: none;
  }

  /* aparece hamburguesa */
  .nav-toggle-label {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .main-nav {
    grid-column: 1 / -1;
    width: 100%;
  }

  .main-nav ul {
    position: absolute;
    left: 0;
    top: 100%;
    right: 0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    z-index: 15;
  }

  .main-nav li a {
    border-radius: 0;
    border-left: none;
    border-top: 1px solid #eeeeee;
  }

  /* abrir menú */
  .nav-toggle:checked ~ .main-nav ul {
    max-height: 400px;
  }

  .hero-content {
    padding: 3rem 1.4rem 4.5rem 1.4rem;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-flag {
    width: 150px;
    top: 80px;
  }

  .hero-text {
    align-items: center;
  }

  .hero-image {
    margin-top: 1.4rem;
  }

  .hero-detail {
    width: 90%;
    right: -15%;
    opacity: 0.7;
  }

  .two-columns {
    grid-template-columns: 1fr;
  }

  .align-left {
    text-align: left;
  }

  .section {
    padding: 3.5rem 1.4rem;
  }
}

/* Móviles pequeños */
@media (max-width: 520px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .btn-red,
  .btn-outline {
    font-size: 0.75rem;
    padding-inline: 1.2rem;
  }

  .section h2 {
    font-size: 1.4rem;
    letter-spacing: 0.1em;
  }

  .section-intro {
    font-size: 0.9rem;
  }

  .cards-grid,
  .agenda-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .top-bar-right {
    gap: 0.35rem;
  }

  .social {
    font-size: 0.8rem;
  }
}

/* ======== AJUSTES HERO SOLO PARA CELULAR ======== */
@media (max-width: 768px) {

  /* Que el hero sea más compacto en alto */
  .hero {
    min-height: auto;
    padding-bottom: 2.5rem;
  }

  /* La bandera pasa a ser un elemento NORMAL, encima del texto */
  .hero-flag {
    position: relative;   /* ya no absolute */
    left: auto;
    top: auto;
    width: 130px;
    margin: 12px auto 4px; /* centrada arriba */
    transform: none;
    z-index: 3;
  }

  .hero-flag img {
    width: 100%;
  }

  /* Contenido del hero centrado y con aire lateral */
  .hero-content {
    padding: 10px 20px 0 20px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    align-items: center;
  }

  .hero-title {
    font-size: 28px;
    line-height: 1.2;
    margin-top: 6px;
  }

  .hero-subtitle {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
  }

  .hero-image {
    margin-top: 18px;
  }

  .hero-image img {
    max-height: 400px;
    transform: translateY(0); /* ya no la bajamos tanto */
  }
}

.popup{
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,.7);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.popup-content{
  background:white;
  padding:0;
  border-radius:12px;
  max-width:900px;      /* 🔥 Ahora es más grande */
  width:95%;
  text-align:center;
  overflow:hidden;
}


.popup-content img{
  width:100%;
  display:block;
}

.close{
  position:absolute;
  top:20px;
  right:30px;
  color:white;
  font-size:40px;
  cursor:pointer;
}




/* ===========================
   LOOP ANIMACIONES HERO
   =========================== */

.hero-bg,
.hero-detail,
.hero-flag,
.hero-text,
.hero-image img {
  opacity: 0;
}

/* Duración total de cada ciclo
   8 segundos = fade in + 4 seg visibles + fade out */
:root{
  --hero-duration: 8s;
}

/* 1) Fondo */
.hero-bg{
  animation: heroLoop var(--hero-duration) ease-in-out infinite;
  animation-delay: .1s;
}

/* 2) Triángulos */
.hero-detail{
  animation: heroLoop var(--hero-duration) ease-in-out infinite;
  animation-delay: .6s;
}

/* 3) Personajes */
.hero-image img{
  animation: heroLoop var(--hero-duration) ease-in-out infinite;
  animation-delay: 1.2s;
}

/* 4) Bandera */
.hero-flag{
  animation: heroLoop var(--hero-duration) ease-in-out infinite;
  animation-delay: 1.8s;
}

/* 5) Textos */
.hero-text{
  animation: heroLoop var(--hero-duration) ease-in-out infinite;
  animation-delay: 2.4s;
}


/* =====================
   KEYFRAME LOOP
   ===================== */

/*
Explicación:
0% → invisible
10% → aparece
10%–60% → visible (≈4s)
70% → empieza a irse
100% → invisible
*/

@keyframes heroLoop{
  0%{
    opacity:0;
    transform: translateY(20px);
  }

  10%{
    opacity:1;
    transform: translateY(0);
  }

  60%{
    opacity:1;
  }

  70%{
    opacity:.5;
  }

  100%{
    opacity:0;
  }
}





