/* ==========================================================================
   HABITAR CÓSMICO - DESIGN SYSTEM & STYLESHEET
   Conexión Sagrada entre el Ser, la Vivienda y el Territorio
   Arquitectura Bioclimática • Sierra Nevada de Santa Marta • INHABICO
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES & THEMING
   -------------------------------------------------------------------------- */
:root {
  /* Cosmic Dark Palette (Default) */
  --bg-space: #07090e;
  --bg-deep: #0d121d;
  --bg-card: rgba(18, 25, 38, 0.75);
  --bg-card-hover: rgba(28, 38, 58, 0.85);
  --bg-glass: rgba(13, 18, 29, 0.85);
  --bg-glass-border: rgba(229, 184, 105, 0.18);
  
  /* Sacred & Earth Accent Colors */
  --gold-primary: #e5b869;
  --gold-light: #f5d491;
  --gold-glow: rgba(229, 184, 105, 0.35);
  --terracotta: #c86d51;
  --terracotta-glow: rgba(200, 109, 81, 0.3);
  --moss-emerald: #2e6f40;
  --moss-light: #48a060;
  --sky-celestial: #79a8d8;
  
  /* Text Colors */
  --text-pure: #ffffff;
  --text-primary: #f5f4ef;
  --text-secondary: #b5bcc9;
  --text-muted: #7b8599;
  --text-gold: #f0caa3;
  
  /* Geometry & Borders */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 9999px;
  
  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 25px rgba(229, 184, 105, 0.25);
  --shadow-terracotta: 0 0 25px rgba(200, 109, 81, 0.25);
  
  /* Typography */
  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', Consolas, monospace;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light / Alba Solar Palette */
[data-theme="light"] {
  --bg-space: #fbf9f4;
  --bg-deep: #f1ede3;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(247, 244, 236, 0.9);
  --bg-glass-border: rgba(184, 134, 42, 0.25);
  
  --gold-primary: #a37217;
  --gold-light: #c9932d;
  --gold-glow: rgba(163, 114, 23, 0.2);
  --terracotta: #a84f35;
  --moss-emerald: #1f5730;
  
  --text-pure: #15181f;
  --text-primary: #212631;
  --text-secondary: #4d576a;
  --text-muted: #76839b;
  --text-gold: #8f5f0b;
  
  --shadow-sm: 0 2px 8px rgba(35, 25, 10, 0.06);
  --shadow-md: 0 8px 24px rgba(35, 25, 10, 0.1);
  --shadow-lg: 0 16px 40px rgba(35, 25, 10, 0.14);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE ELEMENTS
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-space);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Canvas de fondo estelar interactivo */
#cosmic-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* Accesibilidad - Enlace para saltar al contenido principal */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--gold-primary);
  color: #000;
  padding: 10px 18px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--transition-fast);
  text-decoration: none;
}
.skip-link:focus {
  top: 20px;
}

/* Tipografía Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-pure);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

h1 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--gold-light);
}

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

ul, ol {
  list-style: none;
}

/* Contenedor centralizado */
.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 96px 0;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(16, 23, 38, 0.5) 20%, rgba(16, 23, 38, 0.5) 80%, transparent);
}

/* --------------------------------------------------------------------------
   3. COMPONENTES COMUNES (BADGES, BOTONES, TARJETAS)
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(229, 184, 105, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(229, 184, 105, 0.28);
  backdrop-filter: blur(8px);
}
.badge-terracotta {
  background: rgba(200, 109, 81, 0.12);
  color: var(--terracotta);
  border-color: rgba(200, 109, 81, 0.3);
}
.badge-emerald {
  background: rgba(46, 111, 64, 0.15);
  color: var(--moss-light);
  border-color: rgba(46, 111, 64, 0.35);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #0b0e14;
  box-shadow: 0 4px 18px var(--gold-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ffffff, var(--gold-light));
  color: #000;
  box-shadow: 0 6px 26px rgba(229, 184, 105, 0.5);
  transform: translateY(-2px);
}

.btn-terracotta {
  background: linear-gradient(135deg, #df7e61, var(--terracotta));
  color: #ffffff;
  box-shadow: 0 4px 18px var(--terracotta-glow);
}
.btn-terracotta:hover {
  background: linear-gradient(135deg, #f09276, #b85c41);
  color: #ffffff;
  box-shadow: 0 6px 26px rgba(200, 109, 81, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-pure);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(229, 184, 105, 0.12);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}
.glass-card:hover {
  border-color: rgba(229, 184, 105, 0.45);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

/* Encabezados de Sección */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}
.section-header .badge {
  margin-bottom: 16px;
}
.section-header h2 {
  margin-bottom: 18px;
}
.section-header p {
  font-size: 1.12rem;
}

/* --------------------------------------------------------------------------
   4. BARRA DE ANUNCIOS SUPERIOR & HEADER PRINCIPAL
   -------------------------------------------------------------------------- */
.top-announcement {
  background: linear-gradient(90deg, #19273f, #33201a, #19273f);
  background-size: 200% 100%;
  animation: cosmicGradient 10s ease infinite;
  border-bottom: 1px solid rgba(229, 184, 105, 0.25);
  padding: 8px 0;
  font-size: 0.86rem;
  color: var(--text-pure);
  position: relative;
  z-index: 100;
}
.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.announcement-text {
  display: flex;
  align-items: center;
  gap: 8px;
}
.announcement-text .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-primary);
  animation: pulseDot 2s infinite;
}
.announcement-link {
  color: var(--gold-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Header Navegación & Backdrop */
body.nav-open {
  overflow: hidden !important;
  touch-action: none !important;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  pointer-events: none;
}
.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-glass-border);
  transition: all var(--transition-normal);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
  padding: 2px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  position: relative;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-img {
  width: 44px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(229, 184, 105, 0.4);
  object-fit: cover;
  box-shadow: 0 0 12px rgba(229, 184, 105, 0.2);
  flex-shrink: 0;
}
.brand-title {
  display: flex;
  flex-direction: column;
}
.brand-title .main-name {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.6vw, 1.24rem);
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: 0.05em;
  line-height: 1.1;
  white-space: nowrap;
}
.brand-title .sub-name {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-weight: 600;
  white-space: nowrap;
}

/* Links de navegación escritorio (>= 1141px) */
.nav-menu {
  display: flex;
  align-items: center;
}
.drawer-header,
.drawer-footer {
  display: none;
}
.nav-links-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link .nav-icon,
.nav-link .nav-tag {
  display: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gold-primary);
  transition: width var(--transition-normal);
}
.nav-link:hover, .nav-link.active {
  color: var(--gold-primary);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Dropdowns Escritorio */
.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 0;
  transition: color var(--transition-fast);
  white-space: nowrap;
}
.dropdown-trigger svg.chevron {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  transition: transform var(--transition-fast);
}
.nav-item-dropdown:hover .dropdown-trigger,
.nav-item-dropdown:focus-within .dropdown-trigger,
.nav-item-dropdown.active .dropdown-trigger {
  color: var(--gold-primary);
}
.nav-item-dropdown:hover .dropdown-trigger svg.chevron,
.nav-item-dropdown:focus-within .dropdown-trigger svg.chevron,
.nav-item-dropdown.active .dropdown-trigger svg.chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(11, 15, 24, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(229, 184, 105, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(229, 184, 105, 0.2);
  padding: 10px;
  min-width: 270px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(11, 15, 24, 0.96);
  border-top: 1px solid rgba(229, 184, 105, 0.3);
  border-left: 1px solid rgba(229, 184, 105, 0.3);
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu,
.nav-item-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
  background: transparent;
}
.dropdown-link:hover, .dropdown-link.active {
  background: rgba(229, 184, 105, 0.12);
  color: var(--gold-primary);
  transform: translateX(4px);
}
.dropdown-link .item-icon {
  font-size: 1.1rem;
  color: var(--gold-primary);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.dropdown-link .item-text {
  display: flex;
  flex-direction: column;
}
.dropdown-link .item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-pure);
  line-height: 1.2;
}
.dropdown-link:hover .item-title, .dropdown-link.active .item-title {
  color: var(--gold-light);
}
.dropdown-link .item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Selector de Tema */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: rgba(229, 184, 105, 0.15);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

/* Botón Hamburguesa Animado */
.menu-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  padding: 10px 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  z-index: 1002;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.menu-toggle-btn:hover {
  background: rgba(229, 184, 105, 0.15);
  border-color: var(--gold-primary);
}
.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-pure);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background-color 0.25s ease;
}
.menu-toggle-btn.open .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
  background-color: var(--gold-primary);
}
.menu-toggle-btn.open .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle-btn.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
  background-color: var(--gold-primary);
}

/* --------------------------------------------------------------------------
   5. HERO SECTION CINEMÁTICA
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 70px 0 90px;
  overflow: hidden;
}
.hero-background-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.38;
  filter: contrast(1.1) brightness(0.85);
  transform: scale(1.02);
  transition: transform 10s ease;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 40%, rgba(13, 18, 29, 0.4) 0%, var(--bg-space) 85%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content .badge {
  margin-bottom: 24px;
}
.hero-title {
  margin-bottom: 22px;
  line-height: 1.15;
}
.hero-title .highlight-gold {
  background: linear-gradient(135deg, #ffffff 10%, var(--gold-light) 50%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 34px;
  max-width: 640px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

/* Métricas del Hero */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid rgba(229, 184, 105, 0.2);
}
.metric-item .metric-val {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.metric-item .metric-label {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Tarjeta Destacada del Hero (Causa Sierra Nevada) */
.hero-feature-card {
  background: rgba(18, 25, 40, 0.82);
  border: 1px solid rgba(229, 184, 105, 0.35);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  backdrop-filter: blur(16px);
  position: relative;
}
.hero-feature-card .card-thumb-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  height: 220px;
}
.hero-feature-card .card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.hero-feature-card:hover .card-thumb-wrap img {
  transform: scale(1.05);
}
.hero-feature-card .card-floating-badge {
  position: absolute;
  top: 14px;
  right: 14px;
}
.hero-feature-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--text-pure);
}
.hero-feature-card p {
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.55;
}
.cause-progress-wrapper {
  margin-bottom: 18px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 6px;
}
.progress-meta .strong {
  color: var(--gold-primary);
  font-weight: 700;
}
.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--terracotta), var(--gold-primary));
  border-radius: var(--radius-pill);
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   6. SECCIÓN CAUSA SOCIAL: ETNO-ESCUELA DUANAMAKE - KOGI
   -------------------------------------------------------------------------- */
.cause-section {
  position: relative;
}
.cause-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.cause-media {
  position: relative;
}
.cause-img-main {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(229, 184, 105, 0.3);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.cause-img-main img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.cause-badge-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(13, 18, 29, 0.88);
  backdrop-filter: blur(12px);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(229, 184, 105, 0.25);
  display: flex;
  align-items: center;
  gap: 14px;
}
.cause-badge-overlay .icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(200, 109, 81, 0.2);
  color: var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cause-details h2 {
  margin-bottom: 20px;
}
.cause-details .lead-text {
  font-size: 1.15rem;
  color: var(--text-pure);
  margin-bottom: 20px;
}
.cause-details p {
  margin-bottom: 18px;
}
.cause-pillars-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0 34px;
}
.cause-pillar-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cause-pillar-item .check-icon {
  color: var(--gold-primary);
  margin-top: 3px;
  flex-shrink: 0;
}
.cause-pillar-item .text strong {
  display: block;
  color: var(--text-pure);
  font-size: 0.96rem;
  margin-bottom: 2px;
}
.cause-pillar-item .text span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7. SECCIÓN DE DONACIONES (INTEGRADA & POTENTE)
   -------------------------------------------------------------------------- */
.donations-section {
  background: radial-gradient(circle at 50% 30%, rgba(200, 109, 81, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(229, 184, 105, 0.08) 0%, transparent 50%),
              var(--bg-deep);
  border-top: 1px solid rgba(229, 184, 105, 0.15);
  border-bottom: 1px solid rgba(229, 184, 105, 0.15);
}

.donation-box {
  background: var(--bg-card);
  border: 1px solid rgba(229, 184, 105, 0.35);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  backdrop-filter: blur(20px);
  max-width: 980px;
  margin: 0 auto;
}

/* Controles de Frecuencia y Divisa */
.donation-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.segmented-control {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.segmented-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.segmented-btn.active {
  background: var(--gold-primary);
  color: #07090e;
  box-shadow: 0 2px 10px rgba(229, 184, 105, 0.35);
}

.currency-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.currency-toggle .currency-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
  transition: all var(--transition-fast);
}
.currency-toggle .currency-btn.active {
  background: rgba(200, 109, 81, 0.25);
  color: #ffffff;
  border-color: var(--terracotta);
}

/* Tarjetas de Monto Predeterminado */
.donation-tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.tier-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tier-card:hover {
  background: rgba(229, 184, 105, 0.08);
  border-color: rgba(229, 184, 105, 0.4);
  transform: translateY(-3px);
}
.tier-card.active {
  background: linear-gradient(180deg, rgba(229, 184, 105, 0.18), rgba(200, 109, 81, 0.12));
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(229, 184, 105, 0.3);
}
.tier-popular-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--terracotta);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tier-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.tier-amount {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 8px;
}
.tier-impact {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Monto Personalizado */
.custom-amount-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.custom-amount-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.custom-input-group {
  position: relative;
  flex: 1;
}
.custom-currency-symbol {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--gold-primary);
  font-family: var(--font-mono);
}
.custom-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 38px;
  font-size: 1.15rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-pure);
  outline: none;
  transition: border-color var(--transition-fast);
}
.custom-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* Impacto Dinámico Seleccionado */
.selected-impact-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(46, 111, 64, 0.15);
  border: 1px solid rgba(72, 160, 96, 0.3);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}
.selected-impact-callout .impact-icon {
  font-size: 1.6rem;
}
.selected-impact-callout .impact-text {
  font-size: 0.92rem;
  color: var(--text-pure);
}

/* Tabs de Métodos de Pago */
.payment-tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  overflow-x: auto;
}
.payment-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.payment-tab-btn.active {
  background: rgba(229, 184, 105, 0.15);
  color: var(--gold-primary);
}

/* Paneles de Contenido de Pago */
.payment-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}
.payment-panel.active {
  display: block;
}

.bank-details-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(229, 184, 105, 0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.bank-info-item .item-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.bank-info-item .item-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text-pure);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--gold-primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.copy-btn:hover {
  background: var(--gold-primary);
  color: #000;
}

/* Transparencia de Fondos */
.transparency-bar-container {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.transparency-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.transparency-graph {
  display: flex;
  height: 12px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 12px;
}
.transparency-seg-1 { width: 70%; background: var(--gold-primary); }
.transparency-seg-2 { width: 20%; background: var(--terracotta); }
.transparency-seg-3 { width: 10%; background: var(--moss-emerald); }
.transparency-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   8. SECCIÓN EL INSTITUTO (INHABICO) & LOS 4 PILARES
   -------------------------------------------------------------------------- */
.institute-section {
  position: relative;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 48px;
}
.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
}
.pillar-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}
.pillar-icon-box {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: rgba(229, 184, 105, 0.12);
  border: 1px solid rgba(229, 184, 105, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  margin-bottom: 22px;
  font-size: 1.5rem;
}
.pillar-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.pillar-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. SECCIÓN INVESTIGACIÓN: EL ESCALOR, URDIMBRE, NICHO Y NIDO
   -------------------------------------------------------------------------- */
.research-section {
  position: relative;
}
.research-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.research-feature-card {
  background: linear-gradient(135deg, rgba(18, 25, 40, 0.9), rgba(13, 18, 29, 0.95));
  border: 1px solid rgba(229, 184, 105, 0.3);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.torus-diagram-svg {
  width: 100%;
  max-width: 380px;
  margin: 0 auto 28px;
  display: block;
}
.quote-box {
  border-left: 3px solid var(--gold-primary);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-gold);
}
.quote-box cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.research-items-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.research-subcard {
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-normal);
}
.research-subcard:hover {
  border-color: rgba(229, 184, 105, 0.4);
  transform: translateX(6px);
}
.research-subcard h4 {
  color: var(--gold-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   10. SECCIÓN SERVICIOS & CONSULTORÍA ARQUITECTÓNICA
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
}
.service-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.service-badge {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-primary);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.service-features-list {
  margin: 18px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.service-features-list li span.dot {
  color: var(--gold-primary);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   11. SECCIÓN CURSO DIPLOMADO: ESPACIO SAGRADO Y HÁBITAT SUBJETIVO
   -------------------------------------------------------------------------- */
.course-section {
  position: relative;
}
.course-hero-card {
  background: linear-gradient(135deg, rgba(20, 28, 45, 0.85), rgba(13, 18, 29, 0.92));
  border: 1px solid rgba(229, 184, 105, 0.35);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}
.course-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.course-specs-bar {
  display: flex;
  gap: 28px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.course-spec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
}
.course-spec-item .icon {
  color: var(--gold-primary);
  font-size: 1.2rem;
}

/* Tabs de las 14 Sesiones */
.course-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.course-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.course-tab-btn.active {
  background: var(--gold-primary);
  color: #0b0e14;
  border-color: var(--gold-primary);
  font-weight: 700;
}

.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.session-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all var(--transition-fast);
}
.session-card:hover {
  background: rgba(229, 184, 105, 0.06);
  border-color: rgba(229, 184, 105, 0.3);
}
.session-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.session-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-pure);
  margin-bottom: 6px;
}
.session-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   12. SECCIÓN PREGUNTAS FRECUENTES (FAQ ACORDEÓN)
   -------------------------------------------------------------------------- */
.faqs-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.faq-item.active {
  border-color: rgba(229, 184, 105, 0.45);
}
.faq-trigger {
  width: 100%;
  background: transparent;
  border: none;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  cursor: pointer;
}
.faq-question {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--text-pure);
  font-weight: 600;
}
.faq-icon-arrow {
  width: 20px;
  height: 20px;
  stroke: var(--gold-primary);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}
.faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
}
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}
.faq-content {
  padding: 0 26px 24px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   13. SECCIÓN SOBRE EL INVESTIGADOR / AUTOR & ALIANZAS
   -------------------------------------------------------------------------- */
.author-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid rgba(229, 184, 105, 0.3);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-lg);
}
.author-avatar-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 25px rgba(229, 184, 105, 0.25);
}
.author-avatar-wrap img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}
.author-badge-floating {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: rgba(13, 18, 29, 0.9);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--gold-primary);
  text-align: center;
  font-family: var(--font-mono);
}
.author-info h3 {
  font-size: 1.7rem;
  margin-bottom: 6px;
}
.author-title {
  color: var(--gold-primary);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.author-credentials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 22px 0 28px;
}
.credential-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.credential-item .gold-star {
  color: var(--gold-primary);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   14. FOOTER CÓSMICO INTEGRAL
   -------------------------------------------------------------------------- */
.site-footer {
  background: #05070a;
  border-top: 1px solid rgba(229, 184, 105, 0.2);
  padding: 72px 0 32px;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 1.2fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand p {
  font-size: 0.92rem;
  margin: 16px 0 24px;
  max-width: 340px;
}
.footer-social-links {
  display: flex;
  gap: 12px;
}
.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.social-icon-btn:hover {
  background: var(--gold-primary);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(229, 184, 105, 0.4);
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  margin-bottom: 20px;
}
.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links-list a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}
.footer-links-list a:hover {
  color: var(--gold-primary);
  transform: translateX(4px);
}

.footer-newsletter p {
  font-size: 0.88rem;
  margin-bottom: 14px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
}
.newsletter-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 0.9rem;
  color: var(--text-pure);
  outline: none;
}
.newsletter-input:focus {
  border-color: var(--gold-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   15. MODALES & TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.modal-dialog {
  background: var(--bg-deep);
  border: 1px solid rgba(229, 184, 105, 0.4);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  position: relative;
}
.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}
.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  transition: color var(--transition-fast);
}
.modal-close-btn:hover {
  color: var(--text-pure);
}

.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #141c2b;
  border: 1px solid var(--gold-primary);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}
.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   16. MEDIA QUERIES (RESPONSIVE)
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-content {
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-metrics {
    justify-content: center;
  }
  .cause-grid, .research-grid, .author-card {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .donation-tiers {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1140px) {
  .menu-toggle-btn {
    display: flex;
  }

  /* Slide-in Mobile Drawer */
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 88%;
    max-width: 380px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-deep);
    border-left: 1px solid var(--bg-glass-border);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.85);
    z-index: 2100;
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    gap: 0;
  }
  .nav-menu.open {
    transform: translateX(0);
  }

  /* Drawer Header */
  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 3;
  }
  .drawer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .drawer-brand-img {
    width: 36px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid rgba(229, 184, 105, 0.4);
    object-fit: cover;
  }
  .drawer-brand-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-pure);
    letter-spacing: 0.04em;
    display: block;
    line-height: 1.1;
  }
  .drawer-brand-sub {
    font-size: 0.68rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
  }
  .drawer-close-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  .drawer-close-btn:hover {
    background: rgba(229, 184, 105, 0.2);
    color: var(--gold-primary);
    border-color: var(--gold-primary);
  }

  /* Drawer Navigation Links List */
  .nav-links-wrap {
    display: flex;
    flex-direction: column;
    padding: 16px 14px;
    gap: 6px;
    flex: 1;
  }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    width: 100%;
  }
  .nav-link .nav-icon {
    display: inline-block;
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    color: var(--gold-primary);
    flex-shrink: 0;
  }
  .nav-link .nav-text {
    flex: 1;
  }
  .nav-link .nav-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(200, 109, 81, 0.25);
    color: var(--terracotta);
    border: 1px solid rgba(200, 109, 81, 0.4);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.05em;
  }
  .nav-link::after {
    display: none;
  }
  .nav-link:hover, .nav-link:focus {
    background: rgba(229, 184, 105, 0.1);
    color: var(--gold-light);
    border-color: rgba(229, 184, 105, 0.25);
    transform: translateX(4px);
  }
  .nav-link.active {
    background: linear-gradient(90deg, rgba(229, 184, 105, 0.18), rgba(200, 109, 81, 0.12));
    color: var(--gold-primary);
    border-color: rgba(229, 184, 105, 0.35);
  }
  .nav-link.highlight-nav {
    background: rgba(200, 109, 81, 0.12);
    border-color: rgba(200, 109, 81, 0.25);
  }
  .nav-link.highlight-nav .nav-icon {
    color: var(--terracotta);
  }

  /* Dropdowns en Móvil (Acordeón desplegable) */
  .nav-item-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  .dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s;
  }
  .dropdown-trigger:hover, .nav-item-dropdown.open .dropdown-trigger {
    background: rgba(229, 184, 105, 0.1);
    color: var(--gold-primary);
    border-color: rgba(229, 184, 105, 0.25);
  }
  .dropdown-trigger svg.chevron {
    transition: transform 0.25s ease;
  }
  .nav-item-dropdown.open .dropdown-trigger svg.chevron {
    transform: rotate(180deg);
  }
  .nav-dropdown-menu {
    position: static;
    transform: none !important;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(229, 184, 105, 0.15);
    border-radius: var(--radius-md);
    box-shadow: none;
    padding: 6px;
    margin-top: 4px;
    margin-bottom: 6px;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    width: 100%;
  }
  .nav-dropdown-menu::before {
    display: none;
  }
  .nav-item-dropdown.open .nav-dropdown-menu {
    display: flex;
  }
  .dropdown-link {
    padding: 9px 12px;
  }

  /* Drawer Footer */
  .drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.4);
    position: sticky;
    bottom: 0;
    z-index: 2;
  }
  .drawer-donate-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.98rem;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 18px var(--gold-glow);
  }
  .drawer-contact-bar {
    text-align: center;
  }
  .drawer-contact-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: inline-block;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.2s;
  }
  .drawer-contact-item:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
  }
  .drawer-theme-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
  }
  .drawer-theme-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
  }
}

@media (max-width: 768px) {
  .donation-box {
    padding: 24px 18px;
  }
  .donation-tiers {
    grid-template-columns: 1fr;
  }
  .course-hero-card {
    padding: 28px 20px;
  }
  .author-card {
    padding: 26px 18px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Extra small mobile screens (width < 480px) */
@media (max-width: 480px) {
  .top-announcement {
    font-size: 0.78rem;
    padding: 6px 0;
  }
  .announcement-inner {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
  .nav-container {
    padding: 10px 14px;
    gap: 10px;
  }
  .brand-logo {
    gap: 8px;
  }
  .brand-img {
    width: 38px;
    height: 35px;
  }
  .brand-title .main-name {
    font-size: 0.98rem;
  }
  .brand-title .sub-name {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }
  .header-actions {
    gap: 8px;
  }
  .header-donate-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
    gap: 6px;
  }
  .theme-toggle-btn {
    width: 36px;
    height: 36px;
  }
  .menu-toggle-btn {
    width: 38px;
    height: 38px;
    padding: 9px 8px;
  }
}

@media (max-width: 360px) {
  .theme-toggle-btn {
    display: none; /* En pantallas < 360px ahorramos espacio porque ya está en el cajón */
  }
}
