/* ============================================
   SISTEMA DE DISEÑO - ONG A.S.A.I.S. y Dahomey
   Migración a vanilla CSS desde Next.js + Tailwind
   ============================================ */

/* ============================================
   VARIABLES GLOBALES
   ============================================ */

:root {
  /* Colores principales */
  --background: #ffffff;
  --foreground: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;

  /* Colores de marca - Inspirados en África */
  --primary: #d97706;
  --primary-dark: #b45309;
  --primary-light: #fbbf24;
  --primary-lighter: #fef3c7;

  --secondary: #059669;
  --secondary-dark: #047857;
  --secondary-light: #34d399;

  --accent: #0284c7;
  --accent-dark: #0369a1;
  --accent-light: #38bdf8;

  /* Colores humanitarios */
  --humanitarian-red: #dc2626;
  --humanitarian-orange: #ea580c;
  --humanitarian-blue: #0284c7;
  --humanitarian-green: #059669;

  /* Colores de estado */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Fondos */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-dark: #1f2937;
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* Bordes */
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --border-dark: #9ca3af;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Radios de borde */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  color: var(--foreground);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 0.875rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================
   UTILIDADES GLOBALES
   ============================================ */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 0;
  }
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.header {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  border: 2px solid #f0f0f0;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--humanitarian-red));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  width: 100%;
}

.admin-button {
  background: linear-gradient(135deg, var(--primary), var(--humanitarian-orange));
  color: white;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
  border: none;
  cursor: pointer;
  display: inline-block;
}

.admin-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
  background: linear-gradient(135deg, var(--humanitarian-orange), var(--humanitarian-red));
}

/* Mobile Menu */
.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-button.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}

.mobile-menu-button.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

.mobile-menu {
  display: none;
  background: white;
  border-top: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.mobile-menu.open {
  display: block;
  animation: slideDown 0.3s ease-out;
}

.mobile-menu-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  text-align: center;
}

.mobile-nav-link:hover {
  background: var(--primary-lighter);
  color: var(--primary);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  color: white;
  padding: 4rem 1rem 2rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('/hero-benin.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
  padding: 4rem 1.5rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
  animation: fadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  color: white;
  margin-bottom: 1.75rem;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: white;
  margin-bottom: 3rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.9),
    0 4px 20px rgba(0, 0, 0, 0.7);
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.003em;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(25px) saturate(180%) brightness(110%);
  -webkit-backdrop-filter: blur(25px) saturate(180%) brightness(110%);
  padding: 1.5rem 2.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
    gap: 1.25rem;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(180%) brightness(110%);
  -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(110%);
  color: white;
  font-weight: 700;
  font-size: 1.0625rem;
  border-radius: 980px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  letter-spacing: -0.01em;
  min-width: 180px;
  justify-content: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(180%) brightness(110%);
  -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(110%);
  color: white;
  font-weight: 700;
  font-size: 1.0625rem;
  border-radius: 980px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  letter-spacing: -0.01em;
  min-width: 180px;
  justify-content: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats-section {
  background: white;
  padding: 4rem 1rem;
  position: relative;
  z-index: 2;
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--humanitarian-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   SECTIONS GENERALES
   ============================================ */

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--humanitarian-red));
  border-radius: 2px;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 2rem;
}

/* ============================================
   TIMELINE
   ============================================ */

.timeline-container {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding: 0 1rem;
}

.timeline-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 4rem;
  text-align: center;
  position: relative;
  padding-bottom: 1.25rem;
}

.timeline-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--humanitarian-orange), var(--humanitarian-red));
  border-radius: 3px;
}

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--humanitarian-orange), var(--humanitarian-red));
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-year {
  flex: 0 0 100px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--humanitarian-orange));
  padding: 0.625rem 0.875rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  line-height: 1;
}

.timeline-item:hover .timeline-year {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
  background: linear-gradient(135deg, var(--humanitarian-orange), var(--humanitarian-red));
}

.timeline-content {
  flex: 1;
  background: white;
  padding: 1.75rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 2px solid var(--primary-lighter);
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 2.5rem;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 2.5rem;
  margin-right: 0;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: 2.5rem;
  margin-left: 0;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.2);
  border-color: var(--primary);
}

.timeline-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--humanitarian-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
  margin: 0;
}

/* ============================================
   MISSION / IMPACT CARDS
   ============================================ */

.mission-grid,
.impact-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.mission-card {
  background: linear-gradient(135deg, var(--primary-lighter) 0%, #fed7aa 100%);
  padding: 2.5rem;
  border-radius: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.mission-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(217, 119, 6, 0.2);
  border-color: var(--primary);
}

.mission-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.mission-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.mission-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   IMPACT SECTION
   ============================================ */

.impact-section {
  background: linear-gradient(135deg, var(--foreground) 0%, #2d3748 100%);
  padding: 5rem 1rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.impact-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-align: center;
}

.impact-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
}

.impact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.impact-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary-light);
}

.impact-description {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--humanitarian-orange) 100%);
  padding: 5rem 1rem;
  color: white;
}

.contact-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  text-align: center;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   NEWS CARDS
   ============================================ */

.news-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.news-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.news-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card-video-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #000;
}

.news-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.news-card-video-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #000;
  padding-left: 4px;
}

.news-card-gradient {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--humanitarian-red));
}

.news-card-social-preview {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.news-card-social-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-social-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.news-card-social-badge span:first-child {
  font-size: 1rem;
  line-height: 1;
}

.news-card-social-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-social-icon {
  font-size: 4rem;
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.news-card-content {
  padding: 1.5rem;
}

.news-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-card-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.news-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* ============================================
   CAROUSEL
   ============================================ */

.carousel-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.carousel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  padding: 2rem;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 10;
}

.carousel-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-nav.prev {
  left: 1rem;
}

.carousel-nav.next {
  right: 1rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-medium);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero {
    min-height: 75vh;
    background-attachment: scroll;
    padding: 3rem 1.25rem;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-left: 60px;
  }

  .timeline-year {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }

  .timeline-content {
    margin: 3.5rem 0 0 0 !important;
    padding: 1.25rem 1.5rem;
    width: 100%;
  }

  /* News grid responsive */
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 0.5rem;
  }

  .news-card {
    max-width: 100%;
  }

  .news-card-image,
  .news-card-video-container,
  .news-card-gradient {
    height: 220px;
  }

  .news-card-content {
    padding: 1.25rem;
  }

  .news-card-title {
    font-size: 1.15rem;
  }

  .news-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .news-card-meta {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  /* Carousel responsive */
  .carousel-slide img {
    height: 300px;
  }

  .carousel-content {
    padding: 1.25rem;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .carousel-nav.prev {
    left: 0.5rem;
  }

  .carousel-nav.next {
    right: 0.5rem;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 640px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 300px;
  }

  .container {
    padding: 0 0.75rem;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .news-card-image,
  .news-card-video-container,
  .news-card-gradient {
    height: 200px;
  }

  .carousel-slide img {
    height: 250px;
  }
}

/* Responsive para noticia-detalle.php */
@media (max-width: 768px) {
  /* Galería multimedia en detalle de noticia */
  article.section-padding > .container > div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Ajustar alturas de imágenes/videos en galería */
  article.section-padding video[controls],
  article.section-padding img {
    max-height: 250px !important;
  }
}

@media (max-width: 640px) {
  /* Breadcrumb más compacto */
  article.section-padding > .container > div:first-child {
    font-size: 0.875rem;
    margin-bottom: 1.5rem !important;
  }

  /* Meta info más compacta */
  article.section-padding .news-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  /* Avatar más pequeño */
  article.section-padding > .container > div[style*="display: flex"] > div[style*="display: flex"] > div[style*="width: 48px"] {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.1rem !important;
  }

  /* Texto más compacto */
  article.section-padding h1 {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
    margin-bottom: 1.25rem !important;
  }

  /* Excerpt más compacto */
  article.section-padding > .container > div[style*="background: var(--primary-lighter)"] {
    padding: 1.25rem 1.5rem !important;
    font-size: 1rem !important;
  }

  /* Contenido más legible */
  article.section-padding > .container > div[style*="font-size: 1.125rem"] {
    font-size: 1rem !important;
  }

  /* Galería multimedia título */
  article.section-padding h3 {
    font-size: 1.25rem !important;
  }

  /* Galería más compacta */
  article.section-padding > .container > div[style*="margin-top: 3rem"] > div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Videos y imágenes en galería más pequeños */
  article.section-padding video[style*="height: 200px"],
  article.section-padding img[style*="height: 200px"] {
    height: 180px !important;
  }

  /* Botón volver más compacto */
  article.section-padding > .container > div[style*="margin-top: 4rem"] {
    margin-top: 3rem !important;
  }
}

/* ============================================
   SCROLLBAR PERSONALIZADA
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ============================================
   LIGHTBOX / IMAGE GALLERY
   ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.lightbox-image {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: lightboxZoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes lightboxZoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 0;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 0;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox-counter {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  z-index: 10001;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Responsive lightbox */
@media (max-width: 768px) {
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
  }

  .lightbox-nav {
    width: 50px;
    height: 50px;
    font-size: 2.5rem;
  }

  .lightbox-prev {
    left: 1rem;
  }

  .lightbox-next {
    right: 1rem;
  }

  .lightbox-counter {
    bottom: 1rem;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
  }

  .lightbox-image {
    max-height: 90vh;
  }
}

/* ============================================
   SOCIAL MEDIA EMBEDS - FRONTEND
   ============================================ */

.social-embeds-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

/* Instagram embeds */
.social-embeds-container iframe[src*="instagram.com"] {
  width: 100%;
  max-width: 650px;
  height: 900px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* TikTok embeds */
.social-embeds-container blockquote[class*="tiktok"] {
  max-width: 605px !important;
  margin: 0 auto !important;
}

/* YouTube embeds */
.social-embeds-container iframe[src*="youtube.com"],
.social-embeds-container iframe[src*="youtu.be"] {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  margin: 0 auto;
  display: block;
}

/* Twitter embeds */
.social-embeds-container .twitter-tweet {
  margin: 0 auto !important;
}

/* Facebook embeds */
.social-embeds-container .fb-post {
  margin: 0 auto;
}

/* Responsivo para embeds */
@media (max-width: 768px) {
  .social-embeds-container iframe[src*="instagram.com"] {
    max-width: 100%;
    height: 700px;
  }

  .social-embeds-container iframe {
    max-width: 100%;
  }
}
