/* =========================================
   Variables Globales (Custom Properties)
   ========================================= */
:root {
  /* Paleta de Colores */
  --color-primary: #2563eb;
  /* Azul vibrante (Acción) */
  --color-secondary: #292c75;
  /* Azul noche (Estructura) */
  --color-primary-hover: #1d4ed8;
  --color-dark: #0f172a;
  /* Azul noche */
  --color-light: #f8fafc;
  /* Fondo claro (Slate 50) */
  --color-pastel: #eef2ff;
  /* Azul Pastel muy suave (Indigo 50) */
  /* Azul Pastel muy suave (Indigo 50) */
  --color-text: #334155;
  /* Texto gris oscuro (Slate 700) - Mayor contraste y elegancia */
  --color-white: #ffffff;
  --color-border: #cbd5e1; /* Borde más definido (Slate 300) */
  --color-gold: #fbbf24; /* Dorado elegante (Amber 400) para contraste */

  /* Espaciado y Dimensiones */
  --header-height: 80px;
  --max-width: 1280px;
  --border-radius: 0.75rem;

  /* Efectos */
  --shadow-soft:
    0 4px 6px -1px rgba(37, 99, 235, 0.1),
    0 2px 4px -1px rgba(37, 99, 235, 0.06);
  --shadow-header: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --transition-speed: 0.3s;

  /* Tipografía - Familias */
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;

  /* Tipografía - Tamaños (Escala Modular) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
}

/* =========================================
   Reset Básico
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================================
   Estilos Base
   ========================================= */
body {
  font-family: var(--font-body);
  background-color: var(--color-light);
  color: var(--color-text);
  line-height: 1.6;
  font-size: var(--text-base);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--color-secondary);
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: var(--color-primary);
}

ul {
  list-style: none;
}

/* =========================================
   Utilidades de Tipografía
   ========================================= */
.font-heading {
  font-family: var(--font-heading);
}

.font-body {
  font-family: var(--font-body);
}

.fw-300 {
  font-weight: 300;
}

.fw-400 {
  font-weight: 400;
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fw-800 {
  font-weight: 800;
}

/* =========================================
   Componente: Header (Mobile First)
   ========================================= */
.header {
  background-color: var(--color-white);
  height: var(--header-height);
  box-shadow: var(--shadow-header);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-secondary); /* Logo Navy (Estructura) */
  text-transform: uppercase;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo-text {
  color: var(--color-secondary);
}

.header__logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Navegación - Mobile */
.nav__list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: color var(--transition-speed);
  padding: 0.5rem;
  display: block;
}

.nav__link:hover {
  color: var(--color-primary);
}

/* Dropdown */
.nav__item {
  position: relative;
}

.nav__submenu {
  display: none;
  list-style: none;
  padding-left: 1rem; /* Indent for mobile */
  background-color: #f8fafc; /* Slightly different bg for mobile nested */
}

.nav__submenu-item {
  margin: 0;
}

.nav__submenu-link {
  display: block;
  padding: 0.5rem;
  font-size: 0.9em;
  color: var(--color-text);
  text-decoration: none;
}

.nav__submenu-link:hover {
  color: var(--color-primary);
}

/* Show submenu on hover/focus-within */
.nav__item:hover .nav__submenu,
.nav__item:focus-within .nav__submenu {
  display: block;
}

/* Botón Hamburguesa */
.header__toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  padding-right: 0; /* Align icon with container edge (match logo) */
}

.header__toggle-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  position: relative;
  transition: background-color 0.3s;
}

.header__toggle-icon::before,
.header__toggle-icon::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  left: 0;
  transition: transform 0.3s;
}

.header__toggle-icon::before {
  top: -8px;
}

.header__toggle-icon::after {
  top: 8px;
}

.header__toggle--active .header__toggle-icon {
  background-color: transparent;
}

.header__toggle--active .header__toggle-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.header__toggle--active .header__toggle-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Menú Desplegable Activo */
/* Menú Desplegable Activo */
.nav__list--active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  z-index: 999;
}

.nav__list--active .nav__item {
  width: 100%;
  text-align: center;
}

.nav__list--active .nav__link {
  padding: 1rem;
  display: block;
  border-bottom: 1px solid var(--color-border);
}

/* Fix for CTA Button in Mobile Menu */
.nav__list--active .nav__link.btn-cta {
  display: inline-flex;
  margin: 1rem auto; /* Center horizontally */
  border-bottom: none;
  width: auto; /* Ensure it fits content */
}

/* --- Estilos base del botón (btn-cta) --- */
/* --- Estilos base del botón (btn-cta) --- */
.btn-cta {
  width: auto; /* Cambiado de 140px fijo p/ evitar desbordamiento */
  min-width: 140px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: #ffffff !important;
  border-radius: 50px;
  padding: 10px 28px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  gap: 0.5rem;
  /* Espacio para el icono */
}

.btn-cta:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* =========================================
   Componente: Footer (Mobile First)
   ========================================= */
.footer {
  background-color: var(--color-secondary); /* Fondo Navy (Estructura) */
  color: var(--color-white);
  border-top: none;
  padding: 3rem 0;
  margin-top: auto;
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer__section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer__logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.footer__brand-text-container {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.footer__brand-text-line {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.65rem;
  color: var(--color-white); /* Texto blanco */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer__description {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.5rem;
}

.footer__socials {
  margin-top: 1rem;
}

.footer__heading {
  font-size: var(--text-lg);
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.footer__socials-title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.footer__social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__social-link {
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s,
    color 0.2s;
}

.footer__social-link:hover {
  color: var(--color-primary-hover);
  transform: translateY(-2px);
}

.footer__social-link svg {
  width: 24px;
  height: 24px;
}

.footer__divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* Línea blanca sutil */
  width: 100%;
}

.footer__divider--socials {
  display: none;
}

.footer__link-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__link {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  margin-bottom: 0rem; /* Aumentado espaciado entre items */
  display: flex;
}

.footer__link:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer__contact-title {
  font-weight: 600;
  font-size: var(--text-base); /* Un poco más grande */
  color: var(--color-white);
  margin-bottom: 1.5rem; /* Separación solicitada */
}

.footer__contact-item {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  margin-bottom: 1.2rem; /* Separación aumentada */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__contact-item svg {
  color: var(--color-gold); /* Iconos dorados */
  flex-shrink: 0;
}

.footer__copyright {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6); /* Color claro pero discreto */
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   Componente: Sección de Contacto (Mobile First)
   ========================================= */
.contact {
  padding: 4rem 0 4rem 0;
  background-color: var(--color-light);
}

.contact__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.contact__title {
  text-align: center;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.contact__description {
  text-align: center;
  color: var(--color-text);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact__form {
  background-color: var(--color-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact__label {
  font-weight: 600;
  color: var(--color-dark);
  font-size: var(--text-sm);
}

.contact__input,
.contact__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-dark);
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.contact__input:focus,
.contact__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact__textarea {
  resize: vertical;
  min-height: 120px;
}

.contact__submit {
  width: auto;
  min-width: 200px;
  align-self: center;
  margin-top: 1rem;
  cursor: pointer;
  border: none;
  font-size: var(--text-base);
}

/* =========================================
   Componente: Carousel (Hero)
   ========================================= */
.hero-carousel {
  position: relative;
  width: 100%;
  /* Altura dinámica: 100% de la altura de la ventana menos la altura del header */
  height: calc(100vh - var(--header-height));
  overflow: hidden;
  background-color: var(--color-dark);
}

.carousel__inner {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 'contain' asegura que la imagen se vea completa sin cortarse */
  object-fit: contain;
  background-color: #000; /* Fondo negro para las barras laterales/superiores */
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.carousel__img.active {
  opacity: 1;
  z-index: 2;
}

/* Opcional: Overlay oscuro y título */
.carousel__overlay {
  position: absolute;
  top: 0; /* Cambiado de bottom: 0 a top: 0 */
  left: 0;
  width: 100%;
  padding: 2rem;
  /* Gradiente invertido: de arriba (negro opaco) a abajo (transparente) */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
  z-index: 3;
  pointer-events: none;
}

.carousel__title {
  color: var(--color-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  margin: 0;
}

@media (min-width: 1024px) {
  .hero-carousel {
    height: 600px; /* Restaurar altura fija en desktop */
  }

  .carousel__img {
    object-fit: cover; /* En desktop usamos cover para que se vea "super bien" como le gusta al usuario */
  }

  /* En Desktop, el título "Nuestros Eventos" DESAPARECE */
  .carousel__overlay {
    display: none;
  }
}

/* =========================================
   Componente: Perfiles (Cards)
   ========================================= */
.profiles {
  background-color: var(--color-light);
  padding: 6rem 0; /* Padding aumentado para dar aire */
}

.profiles__container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center; /* Centrado horizontal del contenido en mobile */
}

.profile-card {
  background-color: var(
    --color-secondary
  ); /* Color Azul Navy (Institucional) */
  border-radius: var(--border-radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Sombra más pronunciada y visible */
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.3),
    0 4px 6px -2px rgba(0, 0, 0, 0.15);
  transition:
    transform var(--transition-speed),
    box-shadow var(--transition-speed);
  border: 1px solid transparent;
  width: 100%; /* Ocupar ancho disponible */
  max-width: 450px; /* Ancho máximo contenido (como el form) */
}

.profile-card:hover {
  transform: translateY(-5px);
  /* Sombra aún más fuerte al hacer hover */
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.35),
    0 10px 10px -5px rgba(0, 0, 0, 0.2);
  /* border-color: var(--color-border); Ya no es necesario con fondo azul */
}

.profile-card__icon-wrapper {
  background-color: rgba(
    255,
    255,
    255,
    0.2
  ); /* Fondo blanco semitransparente */
  color: var(--color-white); /* Icono blanco */
  padding: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.profile-card__title {
  font-size: var(--text-base);
  color: var(--color-white); /* Texto blanco */
  margin: 0;
  line-height: 1.2;
}

.profile-card__link-text {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.8); /* Texto blanco ligeramente apagado */
  margin-top: 0.25rem;
}

.profile-card__arrow {
  color: var(--color-white); /* Flecha blanca */
  transition: transform 0.3s;
}

.profile-card:hover .profile-card__arrow {
  color: var(--color-white);
  transform: translateX(4px); /* Animación sutil a la derecha */
}

/* =========================================
   Componente: Top Bar (Barra Superior)
   ========================================= */
.top-bar {
  background-color: var(--color-secondary);
  color: var(--color-white);
  font-size: 13px; /* Punto medio entre xs (12px) y sm (14px) */
  padding: 1rem 0;
  width: 100%;
}

.top-bar svg {
  width: 16px;
  height: 16px;
  color: var(--color-gold); /* Iconos en dorado */
}

.top-bar__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column; /* Mobile: columna centrado */
  align-items: center;
  gap: 0.5rem;
}

.top-bar__contact {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.top-bar__item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.top-bar__socials {
  display: flex;
  gap: 1rem;
}

.top-bar__social-link {
  color: var(--color-gold); /* Enlaces sociales en dorado */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity var(--transition-speed);
}

.top-bar__social-link:hover {
  opacity: 1;
}

/* =========================================
   Componente: Profundizaciones
   ========================================= */
.specializations {
  background-color: var(--color-pastel);
  padding: 6rem 0;
}

.specializations__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.specializations__title {
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: 1rem;
}

.specializations__description {
  text-align: center;
  color: var(--color-text);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.specializations__grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile: 1 columna */
  gap: 1.5rem;
}

.spec-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Sombra sutil */
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.02);
  text-decoration: none; /* Asegurar que no haya subrayado */
  color: inherit; /* Heredar color para consistencia */
}

.spec-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.spec-card__icon-wrapper {
  color: var(--color-primary); /* Iconos en Azul Vibrante */
  margin-bottom: 0.5rem;
}

.spec-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-secondary); /* Título en Azul Navy */
  margin: 0;
}

/* =========================================
   Componente: Blogs (News/Press Cards)
   ========================================= */
.blogs {
  background-color: var(--color-white);
  padding: 6rem 0;
}

.blogs__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blogs__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.blogs__title {
  font-size: var(--text-3xl);
  color: var(--color-secondary);
  margin: 0;
}

.blogs__link-all {
  font-weight: 600;
  color: var(--color-primary);
  transition: color 0.3s;
}

.blogs__link-all:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.blogs__subtitle {
  max-width: 700px;
  color: var(--color-text);
  margin-top: -1rem; /* Acercar al título */
  margin-bottom: 1rem;
}

.blogs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Blog Card Styling */
.blog-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  height: 100%; /* Igual altura */
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
  border-color: var(--color-primary);
}

.blog-card__image-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__image {
  transform: scale(1.05);
}

.blog-card__category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.blog-card__content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: #64748b; /* Slate 500 */
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.blog-card__title {
  font-size: var(--text-lg); /* 1.125rem */
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1; /* Empuja el footer hacia abajo */
}

.blog-card__footer {
  padding-top: 1rem;
  border-top: 1px solid var(--color-pastel);
  display: flex;
  align-items: center;
}

.blog-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-card__author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-pastel);
}

.blog-card__author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.blog-card__author-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-dark);
}

.blog-card__editor {
  font-size: var(--text-xs);
  color: #94a3b8; /* Slate 400 */
}

/* =========================================
   Featured Blog Card Styling
   ========================================= */
@media (min-width: 768px) {
  .blogs__grid {
    /* En tablet/desktop, el grid se adapta mejor */
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-card--featured {
    grid-column: span 2; /* Ocupa todo el ancho en tablet */
    flex-direction: row; /* Diseño horizontal */
    max-height: 400px; /* Limitar altura máxima */
  }

  .blog-card--featured .blog-card__image-wrapper {
    width: 50%;
    height: 100%; /* Llenar altura del contenedor padre */
  }

  .blog-card--featured .blog-card__content {
    width: 50%;
    justify-content: center; /* Centrar contenido verticalmente */
    padding: 1.5rem; /* Reducir un poco el padding */
  }

  .blog-card--featured .blog-card__title {
    font-size: var(--text-2xl); /* Título más grande */
  }

  .blog-card--featured .blog-card__excerpt {
    font-size: var(--text-base); /* Texto más grande */
    line-clamp: 2;
    -webkit-line-clamp: 4; /* Mostrar más líneas */
  }
}

@media (min-width: 1024px) {
  .blogs__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-card--featured {
    grid-column: span 3; /* Ocupa todo el ancho en escritorio (3 columnas) */
  }

  /* Ajustes adicionales para pantallas muy grandes sise desea */
  .blog-card--featured .blog-card__image-wrapper {
    width: 60%; /* Imagen un poco más ancha en desktop grande para impacto visual */
  }

  .blog-card--featured .blog-card__content {
    width: 40%;
  }
}

/* =========================================
   Componente: Quiz Ciencias Naturales
   ========================================= */
/* =========================================
   Componente: Quiz Ciencias Naturales (BEM)
   ========================================= */
#quiz-container {
  background-color: var(--color-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
}

/* --- Header & Progress --- */
.quiz__header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  width: 100%;
}

.quiz__progress-bar {
  flex: 1;
  display: flex;
  gap: 4px;
  height: 6px;
}

.quiz__segment {
  flex: 1;
  height: 100%;
  border-radius: 4px;
  background-color: #e5e7eb; /* Default gray */
}

.quiz__segment--completed,
.quiz__segment--current {
  background-color: var(--color-primary);
}

.quiz__stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-sm);
  font-weight: 600;
}

.quiz__counter {
  color: var(--color-text);
}

.quiz__badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.quiz__badge--error {
  background-color: #fee2e2;
  color: #b91c1c;
}

.quiz__badge--success {
  background-color: #dcfce7;
  color: #15803d;
}

/* --- Content --- */
.quiz__title {
  text-align: center;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  font-size: var(--text-4xl);
}

.quiz__description {
  text-align: center;
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: 2rem;
}

.quiz__question {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.quiz__question-number {
  font-weight: 800;
}

/* --- Options --- */
.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.quiz__option {
  background-color: #f3f4f6; /* Light gray */
  border: 2px solid transparent;
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column; /* Changed to column to support explanation below */
  align-items: flex-start; /* Align left */
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  width: 100%;
}

.quiz__option-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.quiz__option:hover {
  background-color: #e5e7eb;
}

.quiz__option--correct {
  background-color: #dcfce7 !important;
  border-color: #22c55e;
  color: #15803d;
}

.quiz__option--wrong {
  background-color: #fee2e2 !important; /* Rojo claro */
  border-color: #ef4444; /* Rojo error */
  color: #b91c1c;
}

.quiz__option-letter {
  color: #9ca3af;
  font-weight: 600;
  font-size: var(--text-base);
  flex-shrink: 0;
}

.quiz__explanation {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  width: 100%;
  animation: fadeIn 0.3s ease-in-out;
}

.quiz__explanation-title {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: 0.5rem;
}

.quiz__explanation-text {
  font-size: var(--text-sm);
  line-height: 1.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Footer & Buttons --- */
.quiz__feedback {
  min-height: 60px;
  width: 100%;
}

.quiz__footer {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.quiz__start {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.quiz__topic-badge {
  background-color: #e0e7ff; /* Indigo-100 */
  color: var(--color-primary);
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  display: inline-block;
  border: 1px solid #c7d2fe;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quiz__btn-next {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  transition: background 0.2s;
}

.quiz__btn-next:hover {
  background-color: var(--color-primary-hover);
}

.quiz__btn-start {
  background-color: var(--color-primary);
  color: white; /* Changed to white for better contrast with primary blue */
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: var(--text-lg);
  transition:
    background 0.2s,
    transform 0.1s;
  margin: 0 auto;
  display: block;
}

.quiz__btn-start:hover {
  background-color: var(--color-primary-hover); /* Match hover of next button */
  transform: scale(1.05);
}

.quiz__results {
  text-align: center;
  width: 100%;
}

.quiz__results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  width: 100%;
}

.quiz__result-card {
  background-color: #f3f4f6;
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  min-height: 120px;
}

.quiz__result-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.quiz__result-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1;
}

.quiz__result-value--primary {
  color: var(--color-dark);
}

/* Details Card */
.quiz__result-card--details {
  gap: 0.5rem;
}

/* Resources Section */
.quiz__resources {
  margin: 2rem 0;
  text-align: left;
  background-color: #f8fafc;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}

.quiz__resources-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.quiz__resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.quiz__resource-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background-color: white;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.quiz__resource-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.quiz__resource-icon {
  font-size: 1.5rem;
}

.quiz__detail-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: var(--text-base);
  color: var(--color-text);
  font-weight: 500;
}

.quiz__detail-val {
  font-weight: 700;
}

.quiz__detail-val--green {
  color: #15803d;
}

.quiz__detail-val--red {
  color: #b91c1c;
}

/* =========================================
   Componente: Section Title (BEM)
   ========================================= */
.section__title {
  color: var(--color-secondary);
  margin-bottom: 2rem;
  font-size: var(--text-4xl);
}

/* =========================================
   Componente: Section General (BEM)
   ========================================= */
.section {
  padding: 4rem 0;
  width: 100%;
}

.section__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem; /* Padding lateral para evitar que pegue a los bordes */
  width: 100%;
}

/* --- Animations --- */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes pop-success {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.anim-shake {
  animation: shake 0.5s ease-in-out;
}

.anim-success {
  animation: pop-success 0.3s ease-in-out;
}

/* Confetti */
.quiz__confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background-color: #f00;
  top: -10px;
  z-index: 9999;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
  }
}

/* Sad Emoji Overlay */
.quiz__sad-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
  pointer-events: none;
  animation: sad-fade 1.5s ease-out forwards;
  z-index: 100;
}

@keyframes sad-fade {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.8);
  }
}

/* Start Countdown */
.quiz__countdown {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  font-weight: 800;
  color: var(--color-primary);
  z-index: 50;
  border-radius: var(--border-radius);
}

.anim-pop-in {
  animation: pop-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* =========================================
   Modern Editorial Blog Styles (Mobile First)
   ========================================= */
:root {
  --color-gold-accent: #d4af37;
  --color-navy-dark: #0a1f44;
  --font-serif: "Playfair Display", serif;
}

/* Hero Section */
.article-hero {
  position: relative;
  height: 60vh; /* Mobile height */
  min-height: 400px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: scroll; /* Mobile usually handles fixed poorly */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.article-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 31, 68, 0.3),
    rgba(10, 31, 68, 0.9)
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1rem;
  max-width: 900px;
  animation: fadeUp 1.2s ease-out;
}

.hero-category {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-gold-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.5rem; /* Mobile font size */
  color: white;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
}

/* Editorial Content */
.editorial-container {
  max-width: 800px;
  margin: -50px auto 0; /* Less negative margin on mobile */
  position: relative;
  z-index: 20;
  padding: 0 1rem;
}

.editorial-content {
  background-color: white;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.8;
  color: #334155;
  font-family: "Open Sans", sans-serif;
}

/* Typography */
.drop-cap {
  float: left;
  font-family: var(--font-serif);
  font-size: 4rem;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.2rem;
  color: var(--color-secondary);
}

.editorial-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-secondary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1rem;
}

.editorial-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background-color: var(--color-gold-accent);
  max-height: 24px;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 col on mobile */
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.feature-card {
  background: #f8fafc;
  padding: 1.5rem;
  border-top: 3px solid var(--color-secondary);
  transition: transform 0.3s;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.feature-title {
  font-family: var(--font-heading);
  color: var(--color-navy-dark);
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.feature-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
  color: #64748b;
}

/* Immersive Quote */
.immersive-quote {
  margin: 3rem -1.5rem; /* Break out mobile */
  padding: 3rem 1.5rem;
  background-color: var(--color-navy-dark);
  color: white;
  text-align: center;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

.quote-icon {
  font-size: 2.5rem;
  color: var(--color-gold-accent);
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.5;
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
}

/* Full Width Figure */
.full-width-figure {
  margin: 2rem -1.5rem;
  position: relative;
}

.full-width-figure img {
  width: 100%;
  border-radius: 0; /* No radius on edge-to-edge mobile */
  box-shadow: none;
}

.caption {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
  padding: 0 1rem;
}

/* Floating Back Button */
.floating-back {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: var(--color-secondary);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  z-index: 100;
  opacity: 0.9;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   Componente: Tarjetas de Directivos (Modern Grid)
   ========================================= */
.directivos-section {
    padding: 2rem 0 4rem;
    background-color: var(--color-light); /* Ensure background is consistent */
}

.directivos-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 column on mobile */
    gap: 2rem;
    padding: 1rem;
}

.directivo-card {
    background-color: var(--color-white);
    border-radius: 1rem; /* Rounded corners */
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Equal height cards */
    border: 1px solid rgba(0,0,0,0.05); /* Subtle border */
    text-decoration: none; /* Remove link underline */
}

.directivo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.directivo-card__image-container {
    width: 100%;
    height: 250px;
    background-color: var(--color-pastel); /* Fallback color */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.directivo-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.directivo-card:hover .directivo-card__image {
    transform: scale(1.05); /* Slight zoom on hover */
}

.directivo-card__placeholder-icon {
    color: var(--color-secondary);
    opacity: 0.5;
}

.directivo-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.directivo-card__role {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.directivo-card__name {
    font-size: var(--text-2xl); /* Larger font for name */
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.directivo-card__bio {
    font-size: var(--text-base);
    color: var(--color-text);
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes link to bottom */
    line-height: 1.6;
}

.directivo-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: var(--text-sm);
    transition: gap 0.2s ease;
    margin-top: auto; /* Ensures it stays at bottom */
}

.directivo-card__link:hover {
    gap: 0.75rem; /* Arrow moves away */
}
