/* ==========================================================================
   Plataforma Web de Prevención y Preparación ante Emergencias y Desastres - Perú
   Desarrollado por: Roger Elvis Sánchez Aliaga | ehawebprint.com
   ========================================================================== */

/* ===================== DESIGN TOKENS ===================== */
:root {
  /* Colors */
  --primary-red: #C62828;
  --primary-red-light: #EF5350;
  --dark-navy: #0D1B2E;
  --navy-card: #132237;
  --navy-light: #1C3050;
  --accent-gold: #F59E0B;
  --accent-orange: #FB923C;
  --accent-green: #16A34A;
  --accent-blue: #2563EB;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --border-color: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(19, 34, 55, 0.95);
  --glass-bg: rgba(19, 34, 55, 0.7);
  --shadow-glow: 0 8px 32px rgba(198, 40, 40, 0.2);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Spacing */
  --section-py: 96px;
}

/* ===================== LIGHT THEME ===================== */
[data-theme="light"] {
  --dark-navy: #F8FAFC;
  --navy-card: #FFFFFF;
  --navy-light: #F1F5F9;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-color: rgba(0, 0, 0, 0.08);
  --card-bg: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.92);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 8px 24px rgba(198, 40, 40, 0.1);
}

/* Light theme nav */
[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .brand-text h1 {
  color: #0F172A;
}

[data-theme="light"] .nav-link {
  color: #475569;
}

[data-theme="light"] .nav-link:hover {
  color: #0F172A;
}

/* Light theme hero */
[data-theme="light"] .hero-section {
  background: linear-gradient(180deg, #F0F4F8 0%, #E8EFF7 100%);
}

[data-theme="light"] .hero-title {
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  background: none !important;
}

[data-theme="light"] .hero-title .hero-accent {
  color: var(--primary-red) !important;
  -webkit-text-fill-color: var(--primary-red) !important;
}

[data-theme="light"] .institutional-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.06);
  border-left-color: var(--primary-red);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .institutional-card p {
  color: #334155;
}

[data-theme="light"] .institutional-meta {
  color: #475569 !important;
}

[data-theme="light"] .author-credits-badge {
  background: #F8FAFC;
  border-top-color: rgba(0, 0, 0, 0.07);
  color: #475569;
}

/* Light theme components */
[data-theme="light"] .emergency-bar {
  background: #EFF6FF;
  border-bottom-color: #DBEAFE;
}

[data-theme="light"] .hotline-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hotline-number {
  color: #0F172A !important;
}

[data-theme="light"] .hotline-label {
  color: #64748B;
}

[data-theme="light"] .mochila-section {
  background: #F1F5F9;
}

[data-theme="light"] .mochila-status-box {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .checklist-container .item-check {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.07);
  color: #334155;
}

[data-theme="light"] .checklist-container .item-check:hover {
  background: #F8FAFC;
  border-color: var(--primary-red);
}

[data-theme="light"] .gallery-section {
  background: #F8FAFC;
}

[data-theme="light"] .media-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .media-content h3 {
  color: #0F172A !important;
}

[data-theme="light"] .media-content p {
  color: #64748B;
}

[data-theme="light"] .tab-btn {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748B;
}

[data-theme="light"] .quiz-section {
  background: #F1F5F9;
}

[data-theme="light"] .quiz-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .question-text {
  color: #0F172A !important;
}

[data-theme="light"] .quiz-option {
  background: #F8FAFC;
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

[data-theme="light"] .quiz-option:hover {
  background: #FFF5F5;
  border-color: var(--primary-red);
}

[data-theme="light"] .plan-section {
  background: #FFFFFF;
}

[data-theme="light"] .plan-form-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .form-control {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
}

[data-theme="light"] .form-control:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

[data-theme="light"] .form-group label {
  color: #475569;
}

[data-theme="light"] .marketing-section {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F4F8 100%);
}

[data-theme="light"] .marketing-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .marketing-info h2 {
  color: #0F172A !important;
}

[data-theme="light"] .marketing-info p {
  color: #475569;
}

[data-theme="light"] .author-profile-box {
  background: #F8FAFC;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .author-name {
  color: #0F172A !important;
}

[data-theme="light"] .service-item {
  color: #334155;
}

[data-theme="light"] footer {
  background: #1E293B;
}

[data-theme="light"] .section-title {
  color: #0F172A !important;
}

[data-theme="light"] .section-desc {
  color: #64748B !important;
}

[data-theme="light"] .section-tag {
  color: var(--accent-gold) !important;
}

/* Theme toggle button */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle-btn {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: #E2E8F0;
}


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

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

body {
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

/* ===================== TOP MARKETING BAR ===================== */
.top-bar-marketing {
  background: linear-gradient(90deg, #1565C0 0%, #B71C1C 52%, #E65100 100%);
  color: #FFF;
  font-size: 0.82rem;
  padding: 9px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.top-bar-marketing a {
  background: #FFF;
  color: #111;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.top-bar-marketing a:hover {
  background: var(--accent-gold);
  color: #111;
  transform: translateY(-1px);
}

/* ===================== NAVBAR ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 27, 46, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-red), #7B0000);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(198, 40, 40, 0.4);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #FFF;
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.7rem;
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.nav-menu {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
}

.nav-link:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.07);
}

.btn-cta-nav {
  background: linear-gradient(135deg, var(--primary-red-light), var(--primary-red));
  color: #FFF;
  padding: 9px 20px;
  border-radius: 25px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.84rem;
  box-shadow: 0 4px 12px rgba(198, 40, 40, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cta-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(198, 40, 40, 0.5);
}

/* ===================== HERO SECTION ===================== */
.hero-section {
  position: relative;
  padding: 80px 24px 90px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(198, 40, 40, 0.14), transparent 70%),
              linear-gradient(180deg, #0D1B2E 0%, #122035 100%);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(198, 40, 40, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.badge-official {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-gold);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 28px;
  color: #F8FAFC;
}

.hero-accent {
  color: var(--primary-red-light);
}

.institutional-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-red);
  padding: 28px 32px;
  border-radius: var(--radius-md);
  margin: 0 auto 36px;
  max-width: 860px;
  text-align: left;
  box-shadow: var(--shadow-card);
}

.institutional-card p {
  font-size: 1rem;
  color: #CBD5E1;
  line-height: 1.75;
  font-style: italic;
}

.institutional-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.83rem;
  color: #94A3B8;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.author-credits-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  color: #94A3B8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===================== BUTTONS ===================== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-red), #7B0000);
  color: #FFF;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(198, 40, 40, 0.45);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary {
  border-color: #CBD5E1;
  color: #334155;
}

[data-theme="light"] .btn-secondary:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
}

/* ===================== EMERGENCY HOTLINES ===================== */
.emergency-bar {
  background: #07101E;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-color);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.hotline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.hotline-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 18px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.hotline-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-red);
  box-shadow: 0 6px 20px rgba(198, 40, 40, 0.2);
}

.hotline-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(198, 40, 40, 0.12);
  color: var(--primary-red-light);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hotline-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.hotline-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* ===================== SECTION HEADERS ===================== */
.section-title-wrap {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: inline-block;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.section-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin: 12px auto 0;
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ===================== MOCHILA SECTION ===================== */
.mochila-section {
  padding: var(--section-py) 0;
  background: linear-gradient(180deg, #101E32 0%, #0D1B2E 100%);
  border-bottom: 1px solid var(--border-color);
}

.mochila-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 36px;
  align-items: start;
}

.mochila-status-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 28px;
  border-radius: var(--radius-md);
  position: sticky;
  top: 90px;
  box-shadow: var(--shadow-card);
}

.backpack-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.backpack-icon-lg {
  font-size: 2.5rem;
  background: rgba(251, 146, 60, 0.12);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.backpack-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.backpack-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.score-progress-bar {
  background: rgba(255, 255, 255, 0.08);
  height: 12px;
  border-radius: 20px;
  overflow: hidden;
  margin: 14px 0;
}

.score-fill {
  background: linear-gradient(90deg, var(--primary-red), var(--accent-gold), var(--accent-green));
  height: 100%;
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 20px;
}

.score-text {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.status-badge {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 14px;
  text-align: center;
  letter-spacing: 0.01em;
}

.status-badge.low {
  background: rgba(198, 40, 40, 0.12);
  color: #F87171;
  border: 1px solid rgba(198, 40, 40, 0.3);
}

.status-badge.medium {
  background: rgba(245, 158, 11, 0.12);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-badge.high {
  background: rgba(22, 163, 74, 0.12);
  color: #86EFAC;
  border: 1px solid rgba(22, 163, 74, 0.35);
}

.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 16px;
  margin-bottom: 2px;
}

.item-check {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
  color: var(--text-main);
  font-size: 0.91rem;
}

.item-check:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.item-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-red);
  flex-shrink: 0;
}

.item-check.checked {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.3);
}

.item-check.checked span {
  text-decoration: line-through;
  opacity: 0.5;
}

/* ===================== GALLERY SECTION ===================== */
.gallery-section {
  padding: var(--section-py) 0;
  background: var(--dark-navy);
  border-bottom: 1px solid var(--border-color);
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: 25px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  border-color: var(--primary-red-light);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--primary-red);
  color: #FFF;
  border-color: var(--primary-red);
  box-shadow: 0 4px 14px rgba(198, 40, 40, 0.35);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.media-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.media-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
}

.media-thumb-container {
  position: relative;
  height: 210px;
  background: #000;
  overflow: hidden;
}

.media-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media-card:hover .media-thumb-container img {
  transform: scale(1.06);
}

.badge-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  letter-spacing: 0.03em;
}

.btn-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  background: rgba(198, 40, 40, 0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 1.3rem;
  box-shadow: 0 4px 20px rgba(198, 40, 40, 0.6);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.media-card:hover .btn-play-overlay {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 28px rgba(198, 40, 40, 0.8);
}

.media-content {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.media-content h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.35;
}

.media-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
  line-height: 1.6;
}

.media-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.btn-view-media {
  color: var(--accent-orange);
  font-weight: 700;
  font-size: 0.82rem;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
  font-family: var(--font-body);
}

.btn-view-media:hover {
  color: var(--text-main);
}

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal-content-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close-btn:hover { background: var(--primary-red); }

.modal-body {
  padding: 24px;
}

.modal-body img, .modal-body video, .modal-body audio {
  width: 100%;
  border-radius: var(--radius-sm);
}

/* ===================== QUIZ SECTION ===================== */
.quiz-section {
  padding: var(--section-py) 0;
  background: linear-gradient(180deg, #0D1B2E 0%, #101E32 100%);
  border-bottom: 1px solid var(--border-color);
}

.quiz-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.question-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 24px;
  line-height: 1.45;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.quiz-option {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-color);
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text-main);
  text-align: left;
}

.quiz-option:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-orange);
}

.quiz-option.selected {
  background: rgba(198, 40, 40, 0.15);
  border-color: var(--primary-red-light);
}

.quiz-footer {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===================== PLAN SECTION ===================== */
.plan-section {
  padding: var(--section-py) 0;
  background: var(--dark-navy);
  border-bottom: 1px solid var(--border-color);
}

.plan-form-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: var(--radius-md);
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group.full-width { grid-column: span 2; }

.form-group label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.form-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.93rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12);
}

.form-control::placeholder { color: rgba(148, 163, 184, 0.6); }

textarea.form-control { resize: vertical; min-height: 90px; }

/* ===================== MARKETING SECTION ===================== */
.marketing-section {
  padding: var(--section-py) 0;
  background: linear-gradient(135deg, #091527 0%, #122035 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.marketing-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(37, 99, 235, 0.07), transparent 60%);
  pointer-events: none;
}

.marketing-card {
  background: rgba(19, 34, 55, 0.8);
  border: 1.5px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  position: relative;
}

.marketing-info h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.25;
}

.marketing-info h2 span {
  color: var(--accent-gold);
}

.marketing-info p {
  color: #CBD5E1;
  font-size: 0.97rem;
  margin-bottom: 26px;
  line-height: 1.7;
}

.services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 30px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

.service-item i {
  color: var(--accent-gold);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.author-profile-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}

.author-avatar {
  width: 86px;
  height: 86px;
  background: linear-gradient(135deg, var(--accent-orange), var(--primary-red));
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 8px 20px rgba(198, 40, 40, 0.35);
}

.author-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.author-role {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ===================== FOOTER ===================== */
footer {
  background: #050D18;
  padding: 52px 0 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.footer-brand p {
  line-height: 1.7;
  max-width: 380px;
}

footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

footer ul a {
  transition: color 0.2s;
}

footer ul a:hover {
  color: var(--text-main);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.83rem;
  color: rgba(148, 163, 184, 0.7);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .marketing-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root { --section-py: 64px; }

  .navbar { padding: 10px 18px; }

  .nav-menu { display: none; }

  .mochila-wrapper {
    grid-template-columns: 1fr;
  }

  .mochila-status-box { position: static; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width { grid-column: span 1; }
}

@media (max-width: 600px) {
  .top-bar-marketing {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 10px 14px;
  }

  .top-bar-marketing span {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .top-bar-marketing a {
    font-size: 0.72rem;
    padding: 4px 12px;
  }

  .navbar {
    padding: 8px 12px;
    gap: 8px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    border-radius: 8px;
  }

  .brand-text h1 {
    font-size: 0.9rem;
    letter-spacing: -0.2px;
  }

  .brand-text span {
    font-size: 0.6rem;
    letter-spacing: 0.3px;
  }

  .nav-right-actions {
    gap: 6px;
  }

  .theme-toggle-btn {
    padding: 5px 9px;
    font-size: 0.75rem;
    border-radius: 16px;
  }

  .btn-cta-nav {
    padding: 6px 11px;
    font-size: 0.75rem;
    border-radius: 20px;
  }

  .hero-title { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { justify-content: center; width: 100%; }
  .quiz-card { padding: 20px; }
  .plan-form-card { padding: 20px; }
  .marketing-card { padding: 24px; }
  .services-list { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .navbar {
    padding: 8px 10px;
  }

  .nav-brand {
    gap: 8px;
  }

  .brand-text span {
    display: none;
  }

  .nav-right-actions .btn-text {
    display: none;
  }

  .theme-toggle-btn {
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    justify-content: center;
  }

  .btn-cta-nav {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* ===================== CONTADOR Y ESTADÍSTICAS DE IMPACTO ===================== */
.counter-stats-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 24px auto 0;
  max-width: 860px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.stat-pill i {
  color: var(--accent-gold);
}

.stat-pill span.num {
  color: var(--primary-red-light);
  font-weight: 800;
  font-size: 0.92rem;
}

[data-theme="light"] .stat-pill {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .stat-pill span.num {
  color: var(--primary-red);
}

/* ===================== BANNER DE COOKIES & PRIVACIDAD ===================== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: calc(100% - 40px);
  max-width: 720px;
  background: rgba(13, 27, 46, 0.97);
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: transform 0.4s ease-out;
}

.cookie-banner.show {
  transform: translateX(-50%) translateY(0);
}

[data-theme="light"] .cookie-banner {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--accent-gold);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.cookie-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.cookie-icon {
  font-size: 1.6rem;
  color: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-text {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.5;
}

.cookie-text a {
  color: var(--accent-gold);
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: linear-gradient(135deg, var(--primary-red), #900C3F);
  color: #FFF;
  border: none;
  padding: 9px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s;
}

.btn-cookie-accept:hover {
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    bottom: 12px;
  }
  .cookie-actions {
    justify-content: flex-end;
  }
  .btn-cookie-accept {
    width: 100%;
    text-align: center;
  }
}

