:root {
  /* Colores principales */
  --primary-color: #ed6d13;
  --primary-color-light: #f58a3a;
  --primary-color-dark: #c55a0f;
  --secondary-color: #3498db;
  --secondary-color-light: #5dade2;
  --secondary-color-dark: #2980b9;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --error-color: #e74c3c;

  /* Colores neutros */
  --white: #ffffff;
  --light-gray: #ecf0f1;
  --medium-gray: #bdc3c7;
  --dark-gray: #7f8c8d;
  --text-color: #2c3e50;
  --text-color-light: #34495e;
  --text-color-muted: #7f8c8d;
  --bg-color: #0f172a;

  /* Tipografía */
  /*--font-family-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;*/
  --font-family-primary: "Nunito Sans", sans-serif;
  --font-size-xs: 0.85rem;
  --font-size-sm: 1rem;
  --font-size-base: 1.125rem; /* texto general más legible */
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 1.875rem;
  --font-size-3xl: 2.25rem;
  --font-size-4xl: 2.75rem;
  --font-size-5xl: 3.5rem; /* títulos principales más expresivos */

  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 5rem;

  /* Efectos */
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;

  /* Layout */
  --container-max-width: 1200px;
  --header-height: 80px;
  --header-height-mobile: 70px;
}

/* ==========================================================================
   Reset y estilos base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* evita desbordes horizontales en todos los móviles */
html,
body {
  overflow-x: hidden;
}
* {
  box-sizing: border-box;
}

/* cualquier media, img o video nunca debe superar el ancho */
img,
video,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* si usaste 100vw en secciones, cámbialo a 100% */
.slideshow,
.hero,
header,
section,
.container {
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--text-color);
  background-color: #f9f9f9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition-normal),
    color var(--transition-normal);
}

/* Dark mode */

body.dark,
body.dark p,
body.dark li,
body.dark span,
body.dark cite,
body.dark blockquote,
body.dark input,
body.dark textarea,
body.dark label,
body.dark .about-text,
body.dark .mision-info,
body.dark .donation-section,
body.dark .contact,
body.dark footer,
body.dark .team-section,
body.dark .section-title,
body.dark .about-content {
  color: #ffffff !important; /* Blanco puro */
}

body.dark {
  background: #121212;
  color: #f5f5f5;
}

body.dark header.scrolled {
  background: rgba(18, 18, 18, 0.75) !important; /* #121212 con transparencia */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.dark header.scrolled nav ul li a {
  color: #f5f5f5;
}

body.dark header.scrolled nav ul li a:hover,
body.dark header.scrolled nav ul li a:focus {
  color: var(--primary-color);
  background: rgba(237, 109, 19, 0.1);
}

/* Botones */
body.dark .btnDark,
body.dark .btnIdiom {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-strong) !important;
}
body.dark .btnDark:hover,
body.dark .btnIdiom:hover {
  background: rgba(255, 255, 255, 0.16) !important;
}

body.dark .about {
  background: #121212;
  color: #f5f5f5;
}

body.dark h2,
body.dark h3,
body.dark .section-title h2,
body.dark .about-content h3,
body.dark .mision-info h3,
body.dark .team-section h3,
body.dark .contact h3,
body.dark .footer-section h3 {
  color: var(--primary-color-dark);
}

body.dark .contact h2,
body.dark .contact h4 {
  /* Anula el texto degradado del h2 y aplica mamey brillante */
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  color: var(--primary-color-dark) !important; /* mamey visible en oscuro */
}

body.dark .about-card,
body.dark .donation-container,
body.dark .donation-action,
body.dark .contact-info,
body.dark .contact-form,
body.dark .team-member,
body.dark .section-footer,
body.dark .footer-bottom {
  background: #1e1e1e !important;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.08),
    0 10px 30px rgba(2, 6, 23, 0.35) !important;
}

body.dark .slideshow {
  background: transparent;
}

/* Inputs y formularios */
body.dark input,
body.dark textarea {
  background: #1e1e1e !important;
  border: 1px solid var(--primary-color);
  color: #e5e7eb !important;
}

/* Mejora de accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Elementos de texto */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
  color: var(--text-color);
}

h1 {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
}
h2 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
}
h3 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}
h4 {
  font-size: var(--font-size-2xl);
}
h5 {
  font-size: var(--font-size-xl);
}
h6 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-relaxed);
  font-size: 1.125rem; /* antes 1rem */
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--secondary-color-dark);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Componentes reutilizables
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  background: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-md) var(--spacing-xl);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  letter-spacing: 0.025em;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:hover,
.btn:focus {
  background: var(--primary-color-dark);
  border-color: var(--primary-color-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-loading .btn-text {
  opacity: 0;
}

.btn-loading .btn-loading {
  opacity: 1;
}

.btn .btn-loading {
  position: absolute;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btnDark {
  cursor: pointer;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--primary-color);
  color: white;
  transition: background var(--transition-normal);
}

.btnDark:hover,
.btnIdiom:hover {
  background: rgba(237, 109, 19, 0.1);
  color: black;
}

.btnIdiom {
  font-size: large;
  cursor: pointer;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--primary);
  color: white;
  transition: background var(--transition-normal);
}

.section {
  padding: var(--spacing-4xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title h2 {
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: "";
  display: block;
  bottom: -var(--spacing-xl);
  width: 100px;
  height: 4px;
  margin: 1.5rem auto;
  background: var(--primary-color);
  border-radius: var(--radius-sm);
  z-index: 1;
}

/* Estados de error para formularios */
.error-message {
  display: block;
  color: var(--error-color);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-xs);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.form-group.error .error-message {
  opacity: 1;
}

.form-group.error input,
.form-group.error textarea {
  border-color: var(--error-color);
}

/* ==========================================================================
   Header - Diseño Responsivo Profesional
   ========================================================================== */

header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-normal);
  background: transparent;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.65) !important; /* Blanco translúcido */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  padding: 0 var(--spacing-xl);
  max-width: 1400px;
  margin: 0 auto;
  transition: all var(--transition-normal);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  transition: transform var(--transition-normal);
  z-index: 1001;
}

.logo:hover {
  transform: scale(1.05);
}

.logo:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

.logo img {
  height: 87px;
  width: auto;
  transition: all var(--transition-normal);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

header.scrolled .logo img {
  height: 70px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Navegación Desktop */
nav ul {
  display: flex;
  gap: var(--spacing-xl);
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: calc(-1 * var(--spacing-xl) / 2);
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 1px;
  background: rgba(255, 255, 255, 0.3);
  transition: background var(--transition-normal);
}

header.scrolled nav ul li:not(:last-child)::after {
  background: rgba(0, 0, 0, 0.15);
}

nav ul li a {
  color: var(--white);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

nav ul li a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav ul li a:hover::before,
nav ul li a:focus::before {
  width: 80%;
}

nav ul li a:hover,
nav ul li a:focus {
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transform: translateY(-2px);
}

header.scrolled nav ul li a {
  color: var(--text-color);
}

header.scrolled nav ul li a:hover,
header.scrolled nav ul li a:focus {
  color: var(--primary-color);
  background: rgba(237, 109, 19, 0.1);
}

/* Controles (Dark Mode & Language) */
.controls {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  z-index: 1001;
}

.btnDark,
.btnIdiom {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--white);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: var(--font-size-base);
  backdrop-filter: blur(8px);
}

.btnDark:hover,
.btnIdiom:hover,
.btnDark:focus,
.btnIdiom:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

header.scrolled .btnDark,
header.scrolled .btnIdiom {
  background: rgba(237, 109, 19, 0.1);
  border-color: rgba(237, 109, 19, 0.2);
  color: var(--text-color);
}

header.scrolled .btnDark:hover,
header.scrolled .btnIdiom:hover {
  background: rgba(237, 109, 19, 0.2);
  border-color: var(--primary-color);
}

.btnIdiom {
  padding: 6px 10px;
}

/* Menú Móvil - Botón Hamburguesa */
.mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  backdrop-filter: blur(8px);
  z-index: 1001;
}

.mobile-menu:hover,
.mobile-menu:focus {
  background: rgba(255, 255, 255, 0.2);
  color: var(--primary-color);
  transform: scale(1.05);
}

header.scrolled .mobile-menu {
  background: rgba(237, 109, 19, 0.1);
  border-color: rgba(237, 109, 19, 0.2);
  color: var(--text-color);
}

header.scrolled .mobile-menu:hover {
  background: rgba(237, 109, 19, 0.2);
  border-color: var(--primary-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  height: 100vh;
  min-height: 600px;
  background: linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.2) 50%,
      rgba(0, 0, 0, 0.4) 100%
    ),
    url("../images/fotoprincipal.jpg") no-repeat center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 var(--spacing-md);
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-lg);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: var(--line-height-tight);
  color: var(--white);
}

/* Subtítulo del hero — versión pro */
.hero-subtitle {
  /* tipografía fluida y legible sobre foto */
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.6;
  text-align: center;

  /* “pill” de glass para mejorar contraste sobre la imagen */
  display: inline-block;
  max-width: min(70ch, 90%);
  margin: 0 auto var(--spacing-2xl);
  padding: 0.65rem 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.25);

  /* entrada suave */
  animation: fadeInUp 0.9s ease-out both;
  text-wrap: balance; /* mejora quiebre de líneas */
}

/* subrayado degradado “vivo” */
.hero-subtitle::after {
  content: "";
  display: block;
  width: clamp(120px, 42%, 280px);
  height: 4px;
  margin: 0.55rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a18 0%, #ffb556 100%);
  box-shadow: 0 6px 20px rgba(255, 122, 24, 0.35);
  animation: glow 2.8s ease-in-out infinite;
}

/* brillo sutil */
@keyframes glow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 122, 24, 0));
    opacity: 0.9;
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 122, 24, 0.45));
    opacity: 1;
  }
}

/* accesibilidad: si el usuario reduce animaciones */
@media (prefers-reduced-motion: reduce) {
  .hero-subtitle {
    animation: none;
  }
  .hero-subtitle::after {
    animation: none;
  }
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about {
  background: var(--white);
  padding: var(--spacing-4xl) 0;
}

.about h2 {
  color: var(--text-color);
  text-align: center;
}

.about > .container > p {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--text-color-light);
  margin: 0 auto var(--spacing-xs);
}

.about cite {
  display: block;
  text-align: center;
  font-style: italic;
  color: var(--text-color-muted);
  margin-bottom: var(--spacing-3xl);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-3xl);
  margin-top: var(--spacing-3xl);
}

.about-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: grid;
  grid-template-columns: 1fr 1fr; /* Imagen | Contenido */
  gap: var(--spacing-lg);
  align-items: center;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.about-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1; /* 🔹 Mantiene la imagen cuadrada */
  border-radius: var(--radius-lg); /* 🔹 Bordes redondeados */
  box-shadow: var(--shadow-md); /* 🔹 Un poco de sombra para destacar */
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.about-image .img1 {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔹 Se adapta sin deformarse */
  transition: transform var(--transition-slow);
  object-position: 50% 50%;
}

.about-image .img2 {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔹 Se adapta sin deformarse */
  transition: transform var(--transition-slow);
  object-position: 50% 85%;
}

.about-image:hover {
  box-shadow: var(--shadow-lg); /* sombra más marcada */
}

.about-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0.4)
  );
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.about-image:hover::after {
  opacity: 1; /* aparece el degradado al hacer hover */
}

.about-card:hover .about-image img {
  transform: scale(1.05); /* zoom sutil */
}

.about-content {
  padding: var(--spacing-xl);
}

.about-content h3 {
  text-align: center;

  margin: var(--spacing-lg) 0;
  font-size: var(--font-size-2xl);
}

.about-text p {
  text-align: left;
  line-height: var(--line-height-relaxed);
  color: var(--text-color-light);
}

blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  font-style: italic;
  color: var(--text-color-muted);
}

blockquote cite {
  display: block;
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-sm);
  text-align: right;
}

/* ==========================================================================
   Team Section
   ========================================================================== */

.containerTeam {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.team-section {
  padding: 100px 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-header-team {
  text-align: center;
  margin-bottom: 60px;
}

.section-header.team h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.team-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.team-member {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 30px 25px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-member::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-color-dark)
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.team-member:hover::before {
  transform: scaleX(1);
}

.team-member:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.member-image {
  width: 220px; /*140*/
  height: 220px; /*140*/
  border-radius: 100%;
  object-fit: cover;
  object-position: 50% 1%;
  margin-bottom: 20px;
  border: 4px solid var(--primary-color);
  position: relative;
  transition: var(--transition);
}

#member_img5 {
  object-position: 50% 75%;
}

.team-member:hover .member-image {
  transform: scale(1.05);
  border-color: var(--primary-color-dark);
}

.member-info h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.member-role {
  display: block;
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 500;
}

.member-description {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

/*.member-social {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}*/

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-member {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.team-member:nth-child(1) {
  animation-delay: 0.1s;
}
.team-member:nth-child(2) {
  animation-delay: 0.2s;
}
.team-member:nth-child(3) {
  animation-delay: 0.3s;
}
.team-member:nth-child(4) {
  animation-delay: 0.4s;
}
.team-member:nth-child(5) {
  animation-delay: 0.5s;
}
.team-member:nth-child(6) {
  animation-delay: 0.6s;
}

/* ==========================================================================
   Slideshow Section
   ========================================================================== */

.slideshow {
  width: 100%;
  max-width: 1200px;
  height: 85vh;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  background: #0b1220;
  margin: auto;
  margin-bottom: var(--spacing-3xl);
}

/* Slides */
.slides {
  height: 100%;
  display: flex;
  transition: transform var(--transition);
  will-change: transform;
}
.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Badge del país encima de la foto */
.country-badge {
  position: absolute;
  left: 18px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  color: white;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.country-badge .flag {
  font-size: 20px;
}
.country-badge .country-name {
  font-size: 14px;
  letter-spacing: 0.4px;
}
/* Caption */
.caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.45));
  border-radius: 14px;
  color: #fff;
  max-width: 70%;
  backdrop-filter: blur(2px);
}

/* Controls (dots a los lados) */
.slidecontrols {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 12px;
}

.dot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 160ms ease;
}
.dot:active {
  transform: scale(0.9);
}
.dot.active {
  background: white;
  color: black;
}

/* ==========================================================================
   Donations Section
   ========================================================================== */

.donation-section {
  padding: 60px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-radius: 12px;
  max-width: 1200px;
  margin: auto;
  width: 100%;
}

.donation-content p {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 25px;
  line-height: 1.6;
}

.donation-highlights {
  list-style: none;
  margin-bottom: 30px;
}

.donation-highlights li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  color: var(--text-color);
}

.donation-highlights li i {
  color: var(--primary-color-dark);
  margin-right: 12px;
  font-size: 1.1rem;
}

.donation-container {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.donation-action {
  background: #fff;
  padding: 35px;
  height: 100dvh;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--primary-color-dark);
  text-align: center;
}

.donation-action h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-color);
  font-weight: 600;
}

.donation-action p {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 25px;
}

/* 🔹 Contenedor QR */
.qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  border-radius: 10px;
  background: #f2fff8;
  box-shadow: 0 4px 10px rgba(27, 180, 94, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-container:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(27, 180, 94, 0.2);
}

.qr-image {
  width: 320px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

.qr-link {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

.qr-link:hover .qr-container,
.qr-link:focus-visible .qr-container {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(27, 180, 94, 0.2);
  outline: 2px solid var(--primary-color-dark); /* accesible al teclado */
  outline-offset: 4px;
}

/* 🔹 Contenedor banreservas */
.banreservascard {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  border-radius: 10px;
  background: #f2fff8;
  box-shadow: 0 4px 10px rgba(27, 180, 94, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banreservascard:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(27, 180, 94, 0.2);
}

.banreservasimg {
  width: 320px;
  height: 25rem;
  border-radius: 8px;
  object-fit: contain;
}

.security-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-color);
}

.security-note i {
  color: var(--primary-color-dark);
}

/* ==========================================================================
       Contact Section
========================================================================== */
.containerContact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.contact {
  padding: 100px 0;
}

.contact h2 {
  text-align: center;
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: 16px;
  background: var(--text-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 60px;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: start;
}

/* Información de contacto */
.contact-info {
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  height: fit-content;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: var(--text-color);
  position: relative;
  padding-bottom: 15px;
}

.contact-info h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-color-dark)
  );
  border-radius: 2px;
}

.contact-details {
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  padding: 15px;
  border-radius: 12px;
  transition: var(--transition);
}

.contact-item:hover {
  background: var(--primary-color-light);
  transform: translateX(5px);
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 15px;
  flex-shrink: 0;
}

.contact-text h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--text-color);
}

.contact-text p,
.contact-text a {
  color: var(--text-color-light);
  text-decoration: none;
  transition: var(--transition);
}

.contact-text a:hover {
  color: var(--primary-color);
}

/* Formulario de contacto - Estructura original mejorada */
.contact-form {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: var(--text-color);
  position: relative;
  padding-bottom: 15px;
}

.contact-form h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-color-dark)
  );
  border-radius: 2px;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

/* Etiquetas ocultas para screen readers (como en el original) */

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
  color: var(--text-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Estados del formulario */
.form-group.success input,
.form-group.success textarea {
  border-color: #10b981;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #ef4444;
}

.error-message {
  display: block;
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 5px;
}

.success-message {
  background: #10b981;
  color: white;
  padding: 15px;
  border-radius: 12px;
  margin-top: 20px;
  text-align: center;
  display: none;
}

/* Tema oscuro/claro */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 1000;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: rotate(15deg);
}

.subscribe {
  background: url(../images/sub.jpeg) center;
  object-fit: cover;
  padding: 30px;
  text-align: center;
  color: white;
}

.subscribe .section-title h2 {
  color: var(--white);
}

.subscribe .section-title p {
  font-size: var(--font-size-lg);
  color: white;
}
.subscribe .newsletterE {
  width: 50%;
}
/* ==========================================================================
       Footer Section
       ========================================================================== */
footer {
  background: white;
  color: var(--text-color);
  padding: var(--spacing-4xl) 0 0;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-3xl);
  margin-bottom: var(--spacing-3xl);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.footer-section h3 {
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-color-dark)
  );
  border-radius: 2px;
}

.footer-section p {
  color: var(--text-color);
  line-height: var(--line-height-relaxed);
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--spacing-md);
}

.footer-section ul li {
  transition: var(--transition);
}

.footer-section ul li:hover {
  transform: translateX(5px);
}

.footer-section ul li a {
  color: var(--text-color);
  transition: var(--transition);
  font-size: var(--font-size-base);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.footer-section ul li a::before {
  content: "▸";
  color: var(--primary-color);
  font-size: var(--font-size-sm);
  transition: var(--transition);
}

.footer-section ul li a:hover,
.footer-section ul li a:focus {
  color: var(--white);
}

.footer-section ul li a:hover::before {
  transform: translateX(3px);
}

.footer-section form {
  margin-top: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.footer-section .form-group {
  position: relative;
}

.footer-section input {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  font-size: var(--font-size-base);
  transition: var(--transition);
}

.footer-section input::placeholder {
  color: var(--text-color);
}

.footer-section input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.footer-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color-dark) 0%,
    var(--primary-color) 100%
  );
  color: var(--white);
  border: none;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.footer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.footer-social a {
  display: flex;
  color: white;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: var(--font-size-lg);
  transition: var(--transition);
  text-decoration: none;
}

.footer-social a:hover {
  transform: translateY(-3px);
}

/* Colores oficiales */
.footer-social .social-link.facebook {
  background: #1877f2;
}
.footer-social .social-link.twitter {
  background: #1da1f2;
}
.footer-social .social-link.instagram {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}
.footer-social .social-link.youtube {
  background: #ff0000;
}

.footer-bottom {
  text-align: center;
  padding: var(--spacing-xl) 0;
  background: var(--bg-color);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--medium-gray);
  font-size: var(--font-size-sm);
}

.footer-logo {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-md);
  background: linear-gradient(
    135deg,
    var(--primary-color-dark) 0%,
    var(--primary-color) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: var(--transition);
  font-size: 1.8rem;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-5px);
  background-color: #128c7e;
  text-decoration: none;
  color: white;
}

/* Tema oscuro/claro */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 1000;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: rotate(15deg);
}

/* Estados del formulario */
.error-message {
  display: block;
  color: #f87171;
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-sm);
}

.success-message {
  background: #10b981;
  color: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-md);
  text-align: center;
  display: none;
}
/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
  /*header*/
  .header-container {
    padding: 0 var(--spacing-lg);
  }

  nav ul {
    gap: var(--spacing-lg);
  }

  nav ul li a {
    font-size: 0.95rem;
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .logo img {
    height: 75px;
  }

  header.scrolled .logo img {
    height: 65px;
  }

  .container {
    padding: 0 var(--spacing-lg);
  }

  .mision-content {
    flex-direction: column;
  }

  .mision-image {
    min-height: 250px;
  }

  .mision-info {
    padding: var(--spacing-xl);
  }
}

@media (max-width: 968px) {
  /*header*/
  nav ul {
    max-width: 100%;
    padding-inline: 16px;
    gap: var(--spacing-md);
  }

  nav ul li:not(:last-child)::after {
    display: none;
  }

  /* Ocultar navegación desktop */
  nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(92vw, 360px); /* no 100vw */
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.65) !important; /* Blanco translúcido */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    transform: translateX(100%); /* oculto a la derecha */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

  nav.show {
    transform: translateX(0);
  }

  nav ul {
    flex-direction: column;
    height: auto;
    align-items: stretch;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    gap: 0;
  }

  nav ul li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul li a {
    color: #111111 !important;
    transition: color 0.3s ease;
    display: block;
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
  }

  nav ul li a::before {
    display: none;
  }

  nav ul li a:hover,
  nav ul li a:focus {
    color: var(--primary-color) !important; /* mamey */
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    color: var(--primary-color);
    transform: translateX(8px);
    border-radius: var(--radius-md);
  }

  /* Mostrar botón móvil */
  .mobile-menu {
    background: rgba(255, 255, 255, 0.3);
    color: #111111;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Animación del icono hamburguesa */
  .mobile-menu i {
    transition: transform 0.3s ease;
  }

  .mobile-menu[aria-expanded="true"] i {
    transform: rotate(90deg);
  }

  /*Modo oscuro para el movil*/
  body.dark nav {
    background: rgba(
      18,
      18,
      18,
      0.55
    ) !important; /* #121212 con transparencia */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
  }

  body.dark nav ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.dark nav ul li a {
    color: #ffffff !important;
    transition: color 0.3s ease;
  }

  body.dark nav ul li a:hover,
  body.dark nav ul li a:focus {
    color: #ff7b1a !important; /* resalta mamey */
    background: rgba(255, 255, 255, 0.08);
  }

  /* Botón menú y header scrolleado en dark */
  body.dark header.scrolled {
    background: rgba(18, 18, 18, 0.9);
  }
  body.dark .mobile-menu {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .btnIdiom {
    max-width: 72px; /* ajusta si lo necesitas */
    white-space: nowrap;
  }
}

/* ==========================================================================
   Responsive Design - Móvil
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --header-height: 80px;
  }

  .header-container {
    height: 80px;
    padding: 0 var(--spacing-md);
  }

  .logo img {
    height: 65px;
  }

  header.scrolled .logo img {
    height: 55px;
  }

  /* Ocultar navegación desktop */
  nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 999;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  }

  nav.show {
    transform: translateX(0);
  }

  nav ul {
    flex-direction: column;
    height: auto;
    align-items: stretch;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    gap: 0;
  }

  nav ul li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul li a {
    color: var(--text-color);
    display: block;
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
  }

  nav ul li a::before {
    display: none;
  }

  nav ul li a:hover,
  nav ul li a:focus {
    background: rgba(237, 109, 19, 0.1);
    color: var(--primary-color);
    transform: translateX(8px);
    border-radius: var(--radius-md);
  }

  /* Mostrar botón móvil */
  .mobile-menu {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Animación del icono hamburguesa */
  .mobile-menu i {
    transition: transform 0.3s ease;
  }

  .mobile-menu[aria-expanded="true"] i {
    transform: rotate(90deg);
  }

  /* Ajustar controles en móvil */
  .controls {
    gap: 8px;
  }

  .btnDark,
  .btnIdiom {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  /* Ajustes de secciones */
  .section,
  .about,
  .misiones {
    padding: var(--spacing-3xl) 0;
  }

  .hero h1 {
    font-size: var(--font-size-4xl);
    color: var(--white) !important;
  }

  .hero p {
    font-size: var(--font-size-lg);
  }

  .country-badge {
    padding: 6px 10px;
    font-size: 13px;
  }
  .caption {
    padding: 10px 12px;
    max-width: 90%;
  }
  .dot {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  /* Ajustar barra naranja en tablets */
  .section-title h2::after {
    width: 60px;
    height: 3px;
    bottom: -var(--spacing-lg);
  }

  .about-card {
    grid-template-columns: 1fr; /* 🔹 Ahora se apilan: primero un bloque, luego el otro */
  }

  /* Imagen siempre arriba */
  .about-card .about-image {
    order: -1;
  }

  .team-section {
    padding: 80px 0;
  }

  .section-header-team h2 {
    font-size: 2.2rem;
  }

  .team-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  .member-image {
    width: 120px;
    height: 120px;
  }

  .donation-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .donation-section {
    padding: 40px 20px;
  }

  .donation-action {
    padding: 25px 20px;
  }

  .qr-image {
    width: 320px;
  }

  .contact {
    padding: 60px 0;
  }

  .contact h2 {
    font-size: 2.2rem;
  }

  .contact-info,
  .contact-form {
    padding: 30px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .footer-section h3 {
    text-align: center;
  }

  .footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-social {
    justify-content: center;
  }
}

/* ==========================================================================
   Responsive Design - Móviles Pequeños
   ========================================================================== */

@media (max-width: 480px) {
  header {
    width: 100%;
    left: 0;
    right: 0;
  }
  .header-container {
    margin: 0; /* por si alguna regla previa añadió margen */
    padding-inline: 12px; /* ya lo tienes, mantenlo */
  }

  .logo img {
    height: 55px;
  }

  header.scrolled .logo img {
    height: 48px;
  }

  nav ul {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  nav ul li a {
    padding: var(--spacing-md);
    font-size: 1rem;
  }

  .controls {
    gap: 6px;
  }

  .btnDark,
  .btnIdiom {
    max-width: 72px;
    white-space: nowrap;
    padding: 5px 8px;
    font-size: 0.85rem;
  }

  .mobile-menu {
    padding: 8px 10px;
    font-size: 1.3rem;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  /* ✅ Solo las tarjetas conservan margen lateral */
  .card,
  .donation-card {
    margin-inline: 12px;
  }

  /* ✅ Las secciones de ancho completo no usan margen externo.
   En su lugar, padding interno para que el fondo llegue a los bordes */
  .section,
  .hero {
    margin-inline: 0;
    padding-inline: 12px;
  }

  .slideshow,
  .slides {
    width: 100%;
  }
  .slidecontrols {
    inset-inline: 12px;
  }

  /* Reducir padding en móviles para mejor uso del espacio */
  .about,
  .misiones {
    padding: var(--spacing-2xl) 0;
  }

  .dot {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .hero h1 {
    font-size: var(--font-size-3xl);
    color: var(--white) !important;
  }

  .hero-subtitle {
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.22);
  }
  .hero-subtitle::after {
    height: 3px;
  }

  .section-title h2 {
    font-size: var(--font-size-3xl);
  }

  /* Ajustar barra naranja en móviles */
  .section-title h2::after {
    width: 50px;
    height: 3px;
    bottom: -var(--spacing-md);
  }

  .mision-info {
    padding: var(--spacing-lg);
  }

  .mision-info h3 {
    font-size: var(--font-size-2xl);
  }

  .team-container {
    grid-template-columns: 1fr;
  }

  .contact,
  .contact-section,
  #contact {
    overflow-x: clip; /* evita scroll lateral */
  }

  .contact-container,
  .contact-grid,
  .contact-row {
    display: grid;
    grid-template-columns: 1fr; /* ← 1 columna en 480px */
    gap: 16px;
    margin-inline: 0; /* cero margen externo */
    padding-inline: 12px; /* respiración interna */
  }

  .contact-info,
  .contact-form {
    width: 100%;
    max-width: 100%;
    min-width: 0; /* importante en grid/flex */
    margin: 0; /* por si heredan márgenes */
    padding: 20px; /* ya lo usabas; se mantiene */
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .contact-form form,
  .contact-form .form-group {
    min-width: 0; /* rompe anchos intrínsecos */
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea,
  .contact-form button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .contact .card {
    /* solo dentro de Contacto */
    margin-inline: 0;
    max-width: 100%;
  }

  .contact .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
  }

  .contact-icon {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .social-media {
    justify-content: center;
  }

  footer {
    padding: var(--spacing-3xl) 0 0;
  }

  .footer-section {
    text-align: center;
  }
}

/* ==========================================================================
   Animaciones y Efectos Adicionales
   ========================================================================== */

/* Overlay cuando el menú móvil está abierto */
@media (max-width: 768px) {
  body::before {
    content: "";
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    backdrop-filter: blur(4px);
  }

  body.menu-open::before {
    opacity: 1;
    visibility: visible;
  }
}

/* Mejora de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  nav,
  .logo,
  nav ul li a,
  .mobile-menu,
  .btnDark,
  .btnIdiom {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Landscape Mobile
   ========================================================================== */

@media (max-width: 968px) and (orientation: landscape) {
  .header-container {
    height: 70px;
  }

  nav {
    top: 70px;
    height: calc(100vh - 70px);
  }

  .logo img {
    height: 50px;
  }

  nav ul {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  nav ul li a {
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

.loading {
  opacity: 0.7;
  pointer-events: none;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Estados de focus mejorados para accesibilidad */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Mejoras para usuarios que prefieren movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Mejoras para modo oscuro */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #1a1a1a;
    --light-gray: #2d2d2d;
    --text-color: #e0e0e0;
    --text-color-light: #b0b0b0;
    --text-color-muted: #888888;
  }
}

/* Print styles */
@media print {
  header,
  .mobile-menu,
  .carousel-nav,
  .carousel-dots,
  .social-media {
    display: none;
  }

  .hero {
    height: auto;
    min-height: auto;
    padding: var(--spacing-2xl) 0;
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  * {
    color: black !important;
    background: white !important;
  }
}
