/* ==========================================================================
   Variables Globales & Reset Multi-Navegador (Edge Compatible)
   ========================================================================== */
:root {
  --navy: #1b396a;
  --navy2: #0f2444;
  --cyan: #008fa8;
  --mint: #20b2aa;
  --gold: #d4af37;
  --bg-soft: #f8fafc;
  --bg-dark: #12284c;
  --text-color: #475467;
  --line: #e2e8f0;
  --muted: #64748b;
  --shadow: 0 12px 32px -4px rgba(27, 57, 106, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  color: var(--text-color);
  background-color: #ffffff;
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  width: 100vw;
}

h1, h2, h3, h4, .eyebrow {
  font-family: 'Montserrat', sans-serif;
}

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

ul, ol {
  list-style: none;
}

/* Forzar renderizado estricto de imágenes en Edge */
img {
  max-width: 100% !important;
  height: auto;
  vertical-align: middle;
}

/* Accesibilidad */
.skip-link {
  position: absolute;
  top: -50px;
  left: 10px;
  background: var(--navy);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  z-index: 10000;
  transition: top 0.3s ease;
}
.skip-link:focus {
  top: 10px;
}

/* Layout Base */
.container {
  width: 90%;
  max-width: 1240px;
  margin: 0 auto;
}

.section-pad {
  padding: 80px 0;
}

.section-soft {
  background-color: var(--bg-soft);
}

.section-dark {
  background-color: var(--bg-dark);
  color: #ffffff;
}

.eyebrow {
  color: var(--cyan);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: block;
}

.section-heading h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  color: var(--navy2);
  font-weight: 800;
  line-height: 1.15;
}

.section-dark .section-heading h2 {
  color: #ffffff;
}

.section-heading p {
  color: var(--muted);
  max-width: 700px;
  margin-top: 12px;
  font-size: 1.05rem;
}

.section-dark .section-heading p {
  color: rgba(255, 255, 255, 0.7);
}

.section-heading--center {
  text-align: center;
}
.section-heading--center p {
  margin: 12px auto 0 auto;
}

/* ==========================================================================
   1. Franja de Logos e Identidad
   ========================================================================== */
.brand-strip {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.brand-strip__inner {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 30px;
}

.header-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   2. Navegación Adhesiva
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  background: var(--navy);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-mark {
  display: flex;
  align-items: center;
  color: #ffffff;
}

.event-mark strong {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  line-height: 1.1;
  color: #ffffff;
}

.event-mark small {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  font-weight: 600;
}

.menu {
  display: flex;
  gap: 28px;
}

.menu a {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #ffffff;
  cursor: pointer;
}

/* ==========================================================================
   3. Banner Oficial (Solución Específica para Microsoft Edge)
   ========================================================================== */
.hero-banner-sec {
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(27, 57, 106, 0.08);
}

.hero-banner-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-banner-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(27, 57, 106, 0.15);
  background-color: #ffffff;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-banner-card:hover {
  transform: translateY(-4px);
  border-color: rgba(27, 57, 106, 0.35);
  box-shadow: 0 22px 45px -6px rgba(27, 57, 106, 0.22);
}

.hero-banner-img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 520px !important;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* ==========================================================================
   4. Fotografía del Director con Marco
   ========================================================================== */
.director-photo-frame {
  width: 100%;
  max-width: 100%;
  border-radius: 24px;
  padding: 8px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--cyan) 50%, var(--gold) 100%);
  box-shadow: var(--shadow);
  position: relative;
}

.director-photo-inner {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
}

.director-photo-inner img {
  width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: cover;
}

.director-photo__badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(23, 52, 95, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==========================================================================
   5. Tarjetas (Features & Recursos)
   ========================================================================== */
.feature-grid, .resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card, .resource-card {
  background: #ffffff;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover, .resource-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.feature-card i, .resource-card__icon {
  font-size: 2.2rem;
  color: var(--cyan);
  margin-bottom: 16px;
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--cyan);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--navy);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--navy);
}

/* ==========================================================================
   6. Sección de Programa
   ========================================================================== */
.program-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 60px;
  align-items: center;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.timeline li:first-child {
  padding-top: 0;
}

.timeline li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline li span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #20b2aa;
  font-size: 1.1rem;
  font-family: 'Montserrat', sans-serif;
}

.timeline li strong {
  display: block;
  font-size: 1.15rem;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 4px;
}

.timeline li p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

/* ==========================================================================
   7. Sección de Ubicación
   ========================================================================== */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.location-card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.location-img {
  width: 100% !important;
  height: 220px !important;
  object-fit: cover;
  display: block;
}

.location-card__body {
  padding: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-weight: 700;
  color: var(--cyan);
}

/* ==========================================================================
   8. Sección de Contacto
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 30px;
  align-items: center;
}

.contact-card a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
  transition: border-color 0.3s ease;
}

.contact-card a:hover {
  border-color: var(--cyan);
}

.contact-card i {
  font-size: 1.5rem;
  color: var(--cyan);
}

.contact-card small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.2rem;
  transition: transform 0.2s ease, background 0.3s ease;
}

.socials a:hover {
  background: var(--cyan);
  transform: scale(1.08);
}

/* ==========================================================================
   9. Pie de Página (Footer)
   ========================================================================== */
.footer {
  background: var(--navy2);
  color: #ffffff;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
}

.footer span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.reveal {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   10. Responsivo Móvil
   ========================================================================== */
@media (max-width: 868px) {
  .welcome-wrapper, .program-grid, .contact-grid {
    grid-template-columns: 1fr !important;
  }

  .socials {
    flex-direction: row;
    justify-content: flex-start;
  }

  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--navy);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  .menu.is-open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}


/* ==========================================================================
   Ajustes y Correcciones para Dispositivos Móviles
   ========================================================================== */

/* 1. Evitar desbordamiento y scroll horizontal en teléfonos */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* 2. Asegurar que ningún elemento/imagen se salga de la pantalla */
*, *::before, *::after {
  box-sizing: border-box;
}

img, video, iframe, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* 3. Media Query para pantallas pequeñas (móviles) */
@media (max-width: 768px) {

  /* Ajuste de márgenes y rellenos en contenedores principales */
  .container, 
  [class*="container"] {
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Si usas CSS Grid o Flexbox en tus secciones, haz que se vuelvan verticales */
  .row,
  [class*="-grid"],
  [class*="-wrapper"],
  [class*="-flex"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* Banners e imágenes principales adaptadas a la pantalla del celular */
  [class*="banner"] img,
  [class*="hero"] img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }

  /* Ajuste de tamaños de texto en móviles para evitar saltos raros */
  h1 { font-size: 1.8rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.25rem !important; }
  p, li { font-size: 0.95rem !important; }

  /* Tablas responsivas si utilizas en el proyecto */
  table {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }
}