/* ==========================================================================
   CERAE - Centro Educativo y de Rehabilitación "Amor y Esperanza"
   Sistema de Diseño & Hoja de Estilos Premium (CSS Vanilla)
   ========================================================================== */

/* 1. SISTEMA DE DISEÑO & VARIABLES
   ========================================================================== */
:root {
  /* Paleta de Colores - Modo Claro de Alta Gama (Luxury Philanthropy) */
  --primary-base: 156, 66%, 14%;      /* Verde Esmeralda Imperial Profundo */
  --primary: hsl(var(--primary-base));
  --primary-light: #059669;          /* Jade Luminoso */
  --primary-dark: #062b1d;
  --primary-glow: rgba(5, 150, 105, 0.12);
  --primary-solid: var(--primary);    /* Para fondos sólidos con texto blanco */

  --accent-base: 345, 82%, 50%;       /* Rosa Rubí / Coral Amor Premium */
  --accent: #e11d48;
  --accent-hover: #be123c;
  --accent-glow: rgba(225, 29, 72, 0.28);

  --gold-accent: #d97706;            /* Acento Dorado Esperanza */
  --gold-glow: rgba(217, 119, 6, 0.15);

  --blue-logo-base: 220, 90%, 56%;   /* Azul Inclusión */
  --blue-logo: hsl(var(--blue-logo-base));

  /* Fondos Marfil y Superficies */
  --bg-site: #fafbfd;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --border-color: rgba(12, 59, 40, 0.09);
  --text-main: #0f172a;              /* Slate oscuro para máxima nitidez */
  --text-muted: #526071;
  --text-light: #ffffff;

  /* Glassmorphism & Sombras Multicapa */
  --glass-blur: 20px;
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 10px 30px -5px rgba(12, 59, 40, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 9999px;

  /* Transiciones Suaves */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

  /* Tipografías */
  --font-headers: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Modo Oscuro - Selector de Atributo (Manual) y Media Query (Preferencia del Sistema) */
:root[data-theme="dark"] {
  --primary-base: 152, 60%, 50%;     /* Verde Esperanza para texto y acentos en modo oscuro */
  --primary: hsl(var(--primary-base));
  --primary-light: hsl(152, 65%, 65%);
  --primary-dark: hsl(152, 70%, 30%); /* Verde oscuro con excelente contraste para texto blanco */
  --primary-glow: hsla(var(--primary-base), 0.25);
  --primary-solid: var(--primary-dark);

  --accent-base: 0, 75%, 68%;        /* Coral Amor con alto contraste */
  --accent: hsl(var(--accent-base));
  --accent-hover: hsl(0, 80%, 75%);
  --accent-glow: hsla(var(--accent-base), 0.3);

  --bg-site: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary-base: 152, 60%, 50%;
    --primary: hsl(var(--primary-base));
    --primary-light: hsl(152, 65%, 65%);
    --primary-dark: hsl(152, 70%, 30%);
    --primary-glow: hsla(var(--primary-base), 0.25);
    --primary-solid: var(--primary-dark);

    --accent-base: 0, 75%, 68%;
    --accent: hsl(var(--accent-base));
    --accent-hover: hsl(0, 80%, 75%);
    --accent-glow: hsla(var(--accent-base), 0.3);

    --bg-site: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  }
}

/* Reset Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-main);
  background-color: var(--bg-site);
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headers);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* 2. SOPORTE DE ACCESIBILIDAD Y REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* Personalización del Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-site);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-site);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* 3. ESTILOS DE COMPONENTES GLOBALES (Botones, Contenedores)
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-headers);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px -5px rgba(225, 29, 72, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(225, 29, 72, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--primary);
  border: 1.5px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.btn-secondary:hover {
  background: #ffffff;
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px var(--primary-glow);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Ebanistería Glassmorphic Premium */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}
.glass-panel:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  border-color: rgba(5, 150, 105, 0.2);
  box-shadow: 0 20px 40px -10px rgba(12, 59, 40, 0.08), 0 0 1px rgba(0, 0, 0, 0.05);
}

/* 4. CABECERA & NAVEGACIÓN (Navbar)
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.header.scrolled {
  background: var(--bg-site);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  height: 70px;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1320px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo-img {
  width: 44px;
  height: 44px;
  transition: var(--transition-smooth);
}
.header.scrolled .logo-img {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-family: var(--font-headers);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.3px;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}
.logo-sub {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-link {
  font-family: var(--font-headers);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  position: relative;
  padding: 0.4rem 0;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition-fast);
}
.nav-link:hover {
  color: var(--primary);
}
.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Menú Hamburguesa Móvil & Control de Tema */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--text-main);
  cursor: pointer;
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
}
.theme-toggle:hover {
  background: var(--border-color);
  color: var(--primary);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-toggle:hover svg {
  transform: rotate(45deg);
}

/* 5. HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  padding-bottom: 60px;
  background: radial-gradient(at 0% 0%, rgba(5, 150, 105, 0.07) 0px, transparent 50%),
              radial-gradient(at 100% 0%, rgba(225, 29, 72, 0.05) 0px, transparent 50%),
              radial-gradient(at 50% 50%, rgba(217, 119, 6, 0.03) 0px, transparent 60%),
              var(--bg-site);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero-badge {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(16, 185, 129, 0.12) 100%);
  color: #065f46;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(5, 150, 105, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.08);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  letter-spacing: -1.5px;
  line-height: 1.1;
}
.hero-title span {
  color: var(--primary);
  position: relative;
}
.hero-title span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--primary-glow);
  z-index: -1;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 550px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Elementos visuales del Hero (Imagen) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 81, 50, 0.1);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}
.hero-img-wrapper:hover .hero-img {
  scale: 1.05;
}

.hero-card-floating {
  position: absolute;
  bottom: -20px;
  left: -20px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 260px;
}
.floating-icon {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-sm);
  background: var(--primary-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}
.floating-text h4 {
  font-size: 1rem;
  font-weight: 700;
}
.floating-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 6. SECCIÓN DE ESTADÍSTICAS
   ========================================================================== */
.stats {
  padding: 4rem 0;
  margin-top: -4rem;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-card {
  padding: 2rem 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
  font-family: var(--font-headers);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* 7. QUIÉNES SOMOS & VALORES
   ========================================================================== */
.section {
  padding: 8rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.section-subtitle {
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -1px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Misión y Visión Split */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 6rem;
}

.mv-card {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mv-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.mv-card h3 {
  font-size: 1.75rem;
}

.mv-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Valores Grid */
.valores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.valor-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.valor-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.valor-number {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary-light);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.valor-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
}

.valor-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* 8. HITOS HISTÓRICOS (Línea de Tiempo)
   ========================================================================== */
.timeline-container {
  position: relative;
  padding: 2rem 0;
  margin: 0 auto;
  max-width: 1000px;
}

/* La línea central */
.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--border-color);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1.5rem 3rem;
  box-sizing: border-box;
}

/* Elementos de la izquierda */
.timeline-item.left {
  left: 0;
  text-align: right;
}

/* Elementos de la derecha */
.timeline-item.right {
  left: 50%;
  text-align: left;
}

/* Los puntos en la línea */
.timeline-dot {
  position: absolute;
  top: 2rem;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--primary);
  border: 4px solid var(--bg-site);
  z-index: 2;
  transition: var(--transition-fast);
}

.timeline-item.left .timeline-dot {
  right: -10px;
}

.timeline-item.right .timeline-dot {
  left: -10px;
}

.timeline-item:hover .timeline-dot {
  scale: 1.25;
  background: var(--accent);
}

/* Las cajas de hitos */
.timeline-card {
  padding: 2rem;
}

.timeline-year {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.timeline-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.timeline-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Ajustes Responsive para Línea de Tiempo */
@media (max-width: 768px) {
  .timeline-container::before {
    left: 20px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
    text-align: left !important;
  }
  .timeline-item.right {
    left: 0;
  }
  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: 10px;
  }
}

/* 9. ÁREAS DE SERVICIO (TABS INTERACTIVAS)
   ========================================================================== */
.services-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.2rem 2.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-headers);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.tab-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--primary-solid);
  color: var(--text-light);
  border-color: var(--primary-solid);
  box-shadow: 0 10px 25px 0 rgba(15, 81, 50, 0.15);
}

.services-content {
  position: relative;
}

.tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.service-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.service-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.service-badge {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  display: inline-block;
  align-self: flex-start;
}

.service-details h3 {
  font-size: 2.2rem;
}

.service-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.service-features-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.service-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.feature-check {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.service-media {
  position: relative;
}

.service-img-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
  aspect-ratio: 4/3;
}

.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 10. BANNER DE CITA EMOTIVA & TESTIMONIOS
   ========================================================================== */
.sostenibilidad {
  background: radial-gradient(circle at 100% 0%, rgba(15, 81, 50, 0.05) 0%, transparent 40%);
}

.quote-banner {
  padding: 3.5rem;
  margin: 4rem auto;
  max-width: 950px;
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(15, 81, 50, 0.08) 0%, transparent 60%),
              var(--bg-card);
  border-left: 5px solid var(--accent);
}
.quote-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.quote-mark {
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
  position: absolute;
  top: -2rem;
  left: -1rem;
}
.quote-text {
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-main);
  z-index: 1;
}
.quote-author {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.quote-author strong {
  color: var(--primary);
  font-size: 1.1rem;
}
.quote-author span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* FOTOGRAFÍAS DE SERVICIOS */
.service-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-img-wrapper:hover .service-photo {
  transform: scale(1.04);
}

/* GRID DE TESTIMONIOS */
.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.testimonio-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
  border-top: 4px solid var(--primary);
}
.testimonio-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.testimonio-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.testimonio-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}
.testimonio-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.testimonio-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  font-style: italic;
}
.testimonio-stars {
  color: #f59e0b;
  letter-spacing: 2px;
  font-size: 1.1rem;
}

/* SECCIÓN COMUNIDAD Y CAMPAÑA */
.comunidad-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4.5rem;
  align-items: center;
}
.comunidad-photo-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  aspect-ratio: 16/10;
}
.comunidad-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.comunidad-photo-wrapper:hover .comunidad-photo {
  transform: scale(1.03);
}
.comunidad-overlay-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  padding: 1rem 1.75rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.comunidad-overlay-badge span {
  font-size: 0.8rem;
  color: #34d399;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.comunidad-overlay-badge strong {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-headers);
}
.comunidad-info {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.necesidad-card {
  padding: 2.25rem;
  border-left: 4px solid var(--primary);
  margin-top: 1rem;
}
.necesidad-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}
.necesidad-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.necesidad-list li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.necesidad-list strong {
  color: var(--text-main);
}

/* 11. SECCIÓN DE DONACIONES (FORMULARIO INTERACTIVO)
   ========================================================================== */
.donaciones {
  background: radial-gradient(circle at 0% 100%, rgba(37, 99, 235, 0.04) 0%, transparent 40%);
}

.donation-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}

.donation-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.donation-info h3 {
  font-size: 2.2rem;
}

.donation-card-highlight {
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--text-light);
  border: none;
}
.donation-card-highlight h4 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.donation-card-highlight p {
  opacity: 0.9;
  font-size: 1rem;
  line-height: 1.6;
}

/* Formulario Interactivo */
.donation-form {
  padding: 3rem;
}

.donation-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.type-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  padding: 0.8rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}
.type-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}
.type-btn.active {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--primary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.form-group label {
  font-weight: 700;
  font-size: 0.95rem;
}

.donation-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.preset-btn {
  background: var(--bg-site);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
}
.preset-btn:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}
.preset-btn.active {
  background: var(--primary-solid);
  color: white;
  border-color: var(--primary-solid);
}

.custom-amount-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-symbol {
  position: absolute;
  left: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
}
.custom-amount-input {
  width: 100%;
  padding: 1.2rem 1.2rem 1.2rem 3rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  background: var(--bg-site);
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.2rem;
  outline: none;
  transition: var(--transition-fast);
}
.custom-amount-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

/* Detalles de Transferencia Bancaria (Paraguay) */
.bank-transfer-card {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}
.bank-transfer-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
}

.bank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.bank-title {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
.bank-logo {
  font-size: 1.5rem;
  color: var(--accent);
}

.bank-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  font-family: var(--font-headers);
}

.bank-info-group {
  display: flex;
  flex-direction: column;
}
.bank-info-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}
.bank-info-val {
  font-size: 0.95rem;
  font-weight: 700;
}

/* 12. CONTACTO & PIE DE PÁGINA
   ========================================================================== */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-info-panel h3 {
  font-size: 2.2rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.contact-icon {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-sm);
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.contact-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.contact-text p, .contact-text a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.contact-text a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.social-btn {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: var(--transition-smooth);
}
.social-btn:hover {
  background: var(--primary-solid);
  color: white;
  transform: scale(1.1);
}

/* Formulario de Contacto Premium (Etiquetas Flotantes) */
.contact-form {
  padding: 3rem;
}

.contact-form-group {
  position: relative;
  margin-bottom: 2rem;
}

.contact-input {
  width: 100%;
  padding: 1.2rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-site);
  color: var(--text-main);
  outline: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.contact-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

.contact-label {
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* Flotación de Etiqueta */
.contact-input:focus ~ .contact-label,
.contact-input:not(:placeholder-shown) ~ .contact-label {
  top: -0.65rem;
  left: 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-card);
  padding: 0 0.4rem;
}

textarea.contact-input {
  min-height: 120px;
  resize: vertical;
}

/* Pie de Página (Footer) */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-logo-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-logo-img {
  width: 45px;
  height: 45px;
  filter: brightness(0) invert(1);
}
.footer-logo-text {
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
}

.footer-desc {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-nav-title {
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-link a {
  transition: var(--transition-fast);
}
.footer-link a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* 13. ESTILOS DE MODALES / DIÁLOGOS NATIVOS
   ========================================================================== */
dialog {
  border: none;
  outline: none;
  margin: auto;
  max-width: 550px;
  width: 90%;
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: var(--bg-site);
  color: var(--text-main);
  animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  animation: backdropFadeIn 0.3s ease forwards;
}

dialog[open]::backdrop {
  opacity: 1;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dialog-title {
  font-size: 1.5rem;
  font-weight: 800;
}

.dialog-close-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.dialog-close-btn:hover {
  background: var(--accent);
  color: white;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.dialog-body p {
  color: var(--text-muted);
}

.success-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* 14. SISTEMA DE ANIMACIONES EN SCROLL (PROGRESSIVE ENHANCEMENT)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Soporte nativo para scroll driven animations */
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(60px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .scroll-reveal {
      animation: fadeInUp auto linear backwards;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
  }

  /* Para navegadores que no lo soportan (usando fallback de IntersectionObserver) */
  .reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 15. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-content {
    align-items: center;
  }
  .hero-description {
    margin: 0 auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonios-grid {
    grid-template-columns: 1fr;
  }
  .comunidad-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .donation-grid,
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 992px) {
  .quote-banner {
    padding: 2.25rem 1.5rem;
  }
  .quote-text {
    font-size: 1.15rem;
  }
  .nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-left: 1px solid var(--border-color);
    padding: 6rem 2rem 2rem 2rem;
    gap: 2rem;
    z-index: 999;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    align-items: stretch;
  }
  .nav.active {
    display: flex;
    animation: drawerSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .nav-link {
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
  }
  .nav-cta {
    margin-left: 0;
    margin-top: 1rem;
  }
  .menu-toggle {
    display: block;
    z-index: 1001; /* Queda sobre el panel lateral */
  }
  .mv-grid {
    grid-template-columns: 1fr;
  }
  .service-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .service-media {
    order: -1;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .services-tabs-nav {
    flex-direction: column;
  }
  .tab-btn {
    width: 100%;
    justify-content: center;
  }
  .donation-presets {
    grid-template-columns: 1fr;
  }
}

@keyframes drawerSlideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* ==========================================================================
   16. CALCULADORA DE IMPACTO SOLIDARIO & ELEMENTOS IRRESISTIBLES
   ========================================================================== */

/* 1. CALCULADORA DE IMPACTO */
.impact-calc-card {
  padding: 3.5rem;
  background: radial-gradient(circle at 50% 0%, rgba(5, 150, 105, 0.08) 0%, transparent 70%),
              var(--bg-card);
  border-top: 4px solid var(--primary-light);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.calc-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.calc-slider-wrapper {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-slider-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-slider-label {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
}

.calc-slider-val {
  font-family: var(--font-headers);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
}

.impact-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(12, 59, 40, 0.12);
  outline: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.impact-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-glow);
  border: 3px solid #ffffff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.impact-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-ticks {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.tick-btn {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.tick-btn:hover,
.tick-btn.active {
  color: var(--primary);
  background: var(--primary-glow);
  font-weight: 700;
}

.impact-result-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
}

[data-theme="dark"] .impact-result-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(30, 41, 59, 0.6) 100%);
}

.impact-result-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.impact-result-text h3 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.impact-result-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 2. CAMPOS COPIABLES & BOTÓN COPIAR */
.copyable-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-copy:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: scale(1.08);
}

.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 3. FOTOGRAFÍAS INTERACTIVAS & LIGHTBOX MODAL */
.zoomable-photo {
  cursor: zoom-in;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.zoomable-photo:hover {
  filter: brightness(1.04);
}

.lightbox-modal {
  border: none;
  background: transparent;
  max-width: 90vw;
  max-height: 90vh;
  padding: 0;
  overflow: visible;
  outline: none;
}

.lightbox-modal::backdrop {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.lightbox-close {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 44px;
  height: 44px;
  background: #ffffff;
  color: #0f172a;
  border: none;
  border-radius: var(--radius-full);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 2;
}

.lightbox-close:hover {
  background: var(--accent);
  color: #ffffff;
  transform: scale(1.1);
}

.lightbox-full-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-info {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  text-align: center;
  max-width: 700px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-caption-text {
  font-size: 0.95rem;
  color: #f1f5f9;
  line-height: 1.5;
}

/* 4. BOTÓN FLOTANTE GLASSMORFISMO DE WHATSAPP */
.whatsapp-floating-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9990;
}

.whatsapp-pill-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(37, 211, 102, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px -5px rgba(37, 211, 102, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.whatsapp-pill-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 35px -5px rgba(37, 211, 102, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  background: #25d366;
}

.whatsapp-icon-svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

.whatsapp-pulse-dot {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: var(--radius-full);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

@media (max-width: 768px) {
  .whatsapp-label {
    display: none;
  }
  .whatsapp-pill-btn {
    padding: 0.9rem;
    border-radius: var(--radius-full);
  }
  .impact-result-box {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .calc-ticks {
    display: none;
  }
}
