/* ==========================
   ESTILOS GENERALES
========================== */
:root {
  --color-primary: #0A2D5A;
  --color-secondary: #29ABE2;
  --color-green: #7AC943;
  --color-red: #E31E24;
  --color-yellow: #F9E300;
  --color-light: #ffffff;
  --color-dark: #111111;
  --text-color: #333333;
  --bg-color: #f8f8f8;
  --transition: all 0.3s ease-in-out;
}

/* Modo oscuro variables */
body.dark-mode {
  --bg-color: #0e0e0e;
  --text-color: #f5f5f5;
  --color-primary: #29ABE2;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
}

/* ==========================
   HEADER Y NAVEGACIÓN
========================== */
.header {
  width: 100%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 999;
  transition: var(--transition);
}

.logo img {
  height: 50px;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  transition: var(--transition);
}

.nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--color-yellow);
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.3rem;
  user-select: none;
  margin-left: 1rem;
}

/* ======= NAV TOGGLE ======= */
.nav-toggle {
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  margin-left: 1rem;
  display: none;
  user-select: none;
  transition: transform 0.3s ease;
}

.nav-toggle.open {
  transform: rotate(90deg);
}

/* ==========================
   SECCIÓN HERO
========================== */
.hero {
  position: relative;
  text-align: center;
  color: white;
  overflow: hidden;
  padding: 0rem 0rem;
}

.hero-bg {
  width: 100%;
  height: 500px; /* altura en desktop */
  background-image: url('../images/imgbanner.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Capa encima (no visible en desktop) */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent; /* Desktop: sin capa */
  pointer-events: none; /* NO bloquea clics */
}

/* Móvil */
@media (max-width: 768px) {
  .hero-bg {
    height: 600px; /* altura en móvil */
    background-image: url('../images/imgbannerMobile.jpg'); /* tu imagen móvil */
  }

  .hero-bg::after {
    background: rgba(0, 0, 0, 0.45); /* Capa oscura en mobile */
  }
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
  .hero-content {
    top: 70%;
    transform: translate(-50%, -50%); /* se mantiene */
  }
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
}

.hero-content h2 {
  font-size: 1.8rem;
  margin-top: 0.5rem;
  color: var(--color-yellow);
}

.hero-content p {
  margin: 1rem 0;
}

.small-hero .hero-bg {
  height: 40vh;
}

/* ==========================
   BOTONES
========================== */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--color-secondary);
  color: white;
  margin-top: 30px;
}

.btn-primary:hover {
  background: var(--color-primary);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
  margin-top: 30px;
}

.btn-secondary:hover {
  background: var(--color-secondary);
  color: white;
}

/* ==========================
   VIDEOS SECTION
========================== */

.video-container {
  width: 100%;
  height: 180px; /* ajusta según tu diseño */
  border-radius: 10px;
  overflow: hidden;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ==========================
   SECCIONES GENERALES
========================== */
section {
  padding: 3rem 2rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

p {
  margin-bottom: 10px;
}

h2 {
  margin-bottom: 20px;
}

h3 {
  margin-top: 50px;
}

/* ==========================
   ABOUT / BIOGRAFÍA
========================== */
.about .container,
.biography .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.about .text,
.biography .bio-text {
  flex: 1;
}

.about .image img,
.biography .bio-photo img {
  width: 100%;
  border-radius: 8px;
}
/* ==========================
   MACROCAUSA
========================== */
.MacroCauses .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.MacroCauses .card {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: relative;
}

.MacroCauses .card::before {
  content: "";
  width: 70px;
  height: 70px;
  background: var(--color-primary);
  border-radius: 50%;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.MacroCauses .card h3 {
  margin-top: 60px;
  font-size: 1.25rem;
  font-weight: 700;
}

.MacroCauses .card p {
  opacity: .75;
  margin-top: 10px;
  font-size: .95rem;
}

/* ==========================
   PROPUESTAS
========================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: var(--transition);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

body.dark-mode .card {
  background: #1a1a1a;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h3, .card h4 {
  margin: 1rem;
  color: var(--color-primary);
}

.card p {
  margin: 0 1rem 1rem;
}

.card:hover {
  transform: translateY(-5px);
}

/* ===== PROPUESTAS — CARD PREMIUM ===== */
.proposals .card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.proposals .card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
}

.proposals .card h3,
.proposals .card p {
  position: relative;
  color: white;
  padding: 0 18px;
  z-index: 2;
}

.proposals .card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.proposals .card p {
  font-size: .9rem;
  opacity: .9;
  margin-bottom: 18px;
}

.proposals .card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent 60%);
}


/* ==========================
   GALERÍA
========================== */
/* ============================
   GALERÍA SLIDER PREMIUM
   ============================ */

.gallery-slider {
  width: 100%;
  max-width: 1200px;
  margin: 70px auto;
  padding: 0 15px;
}

.glide-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 18px;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity .7s ease-in-out;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* IMAGEN COMPLETA */
  background: #fff;
}

/* BOTONES SLIDER */
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  font-size: 2rem;
  padding: 12px 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: .2s;
  z-index: 10;
}

.gallery-btn:hover {
  background: white;
  scale: 1.15;
}

.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }

/* Tablets grandes (≤ 1200px) */
@media (max-width: 1200px) {
  .glide-container {
    height: 430px;
  }
}

/* Tablets (≤ 900px) */
@media (max-width: 900px) {
  .glide-container {
    height: 460px;
  }
}

/* Móviles medianos (≤ 600px) */
@media (max-width: 600px) {
  .glide-container {
    height: 360px;
  }
}

/* Móviles pequeños (≤ 400px) */
@media (max-width: 400px) {
  .glide-container {
    height: 310px;
  }
}

.gallery-btn {
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-size: 2rem; /* Ajusta tamaño si lo quieres más grande */
}



/* ============================
   MODAL GALERÍA AJUSTADA Y ELEGANTE
   ============================ */

.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: flex-start; /* la centra más arriba, se ve más elegante */
  z-index: 9999;
  overflow-y: auto;
  padding: 40px 20px; /* más margen alrededor */
}

/* CONTENEDOR AJUSTADO */
.gallery-modal-content {
  background: #111;
  padding: 40px;              /* MÁS padding interno */
  border-radius: 20px;        /* más suave */
  max-width: 900px;           /* 🔥 más delgada y equilibrada */
  width: 100%;
  margin-top: 40px;           /* baja un poco para respirar */
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
  position: relative;
}

/* BOTÓN CERRAR */
.gallery-close {
  position: absolute;
  top: 20px;
  right: 26px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  transition: .2s ease;
}

/* ============================
   GRID AJUSTADO Y ARMÓNICO
   ============================ */

.gallery-grid {
  margin-top: 35px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* columnas más pequeñas */
  gap: 18px; /* más compacto */
}

/* IMÁGENES COMPLETAS Y CENTRADAS */
.gallery-grid img {
  width: 100%;
  height: auto;
  max-height: 250px;        /* 🔥 más pequeño, más bonito */
  object-fit: contain;
  background: #000;
  border-radius: 12px;
  padding: 8px;             /* más respiración interna */
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 20px rgba(0,0,0,0.7);
}

/* RESPONSIVE */
@media (max-width: 768px) {

  .gallery-modal-content {
    padding: 28px;
    max-width: 95%;
  }

  .gallery-grid img {
    max-height: 200px;
  }
}

@media (max-width: 480px) {

  .gallery-modal-content {
    padding: 20px;
  }

  .gallery-grid {
    gap: 14px;
  }

  .gallery-grid img {
    max-height: 160px;
    padding: 6px;
  }
}


/* ==========================
   PRENSA
========================== */
.press-item {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark-mode .press-item {
  background: #1a1a1a;
}

.press-item img {
  width: 280px;
  object-fit: cover;
}

.press-content {
  flex: 1;
  padding: 1rem;
}

/* ==========================
   FORMULARIOS
========================== */
.form {
  max-width: 600px;
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-family: "Poppins", sans-serif;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.success-message {
  margin-top: 1rem;
  color: var(--color-green);
  font-weight: 600;
}

/* ==========================
   CTA
========================== */
.cta {
  background: var(--bg-color);
  color: var(--color-dark);
  text-align: center;
  padding: 3rem 2rem;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-dark);
  transition: color 0.4s ease;
}

.cta-content p {
  color: var(--color-dark);
  transition: color 0.4s ease;
}

/* ======= MODO OSCURO ======= */
body.dark-mode .cta {
  background: var(--color-dark);
  color: var(--color-light);
}

body.dark-mode .cta-content h2,
body.dark-mode .cta-content p {
  color: var(--color-light);
}

/* ==========================
   EQUIPO DE TRABAJO
========================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.team-card {
  background: var(--card-bg, #fff);
  padding: 20px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.team-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.team-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.team-card p {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}


/* ==========================
   FOOTER
========================== */
.footer {
  text-align: center;
  padding: 2rem;
  background: var(--color-primary);
  color: white;
}

.footer .social a {
  color: white;
  margin: 0 0.5rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer .social a:hover {
  color: var(--color-yellow);
}

/* ==========================
   WHATSAPP BUTTON
========================== */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;      /* <-- ahora está a la izquierda */
  background: #25D366;
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.whatsapp-btn img {
  width: 60px;      /* tamaño ideal del ícono */
  height: 60px;
  object-fit: contain;
  display: block;   /* elimina espacios extra del inline */
}


.whatsapp-btn:hover {
  transform: scale(1.1);
}

/* ==========================
      ESTILOS EXTRAS
========================== */
.img-bio-home{
  height: 250px;
  width: 250px;
}


/* ==========================
   RESPONSIVE / MENÚ MOBILE
========================== */
@media (max-width: 992px) {
  .nav-toggle {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    background: var(--color-primary);
    position: absolute;
    top: 70px;
    right: 0;
    width: 220px;
    padding: 1rem 0;
    border-radius: 0 0 0 10px;
    display: none;
    transform: translateY(-10px);
    opacity: 0;
  }

  .nav ul.show {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    animation: slideDown 0.4s ease forwards;
  }

  .nav a {
    padding: 1rem;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .about .container,
  .biography .container {
    flex-direction: column;
  }

  .press-item {
    flex-direction: column;
  }
}

/* ======= Aparición profesional de secciones ======= */
.hidden {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s ease, transform 1.1s ease;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======= Animación menú ======= */
@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.social-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin: 0 8px;
}

.btn-social-wrap {
  display: flex;
  align-items: flex-end;
  gap: 20px; /* espacio entre botón e iconos */
  margin-top: 20px;
}

.social-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-inline img.social-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.2s ease-in-out;
}

.social-inline img.social-icon:hover {
  transform: scale(1.1);
}
