/* Acércate a tu futuro científico - CP Clarín
   Estilos ligeros, solo lo necesario */

:root {
  --color-bg: #f8fafc;
  --color-bg-alt: #eef2ff;
  --color-primary: #4f46e5;
  --color-primary-dark: #3730a3;
  --color-accent: #f43f5e;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-display: 'Fredoka', 'Outfit', system-ui, sans-serif;
  --radius: 1rem;
  --shadow: 0 4px 20px rgba(79, 70, 229, 0.12);
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main#main {
  flex: 1 0 auto;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 1rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(79, 70, 229, 0.1);
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-school {
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: 1rem;
  margin: 0;
  text-decoration: none;
}
a.logo-school:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  transition: background var(--transition), color var(--transition);
}
.nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230d9488'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E") center/1.5rem no-repeat;
  cursor: pointer;
  border-radius: 0.5rem;
}
.nav-toggle[aria-expanded="true"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230d9488'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem;
    flex-direction: column;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 30%, #a5b4fc 60%, #818cf8 100%);
  opacity: 0.95;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L30 60M0 30L60 30' stroke='%230d9488' stroke-width='0.5' stroke-opacity='0.15' fill='none'/%3E%3C/svg%3E");
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: rgba(255,255,255,0.9);
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

.hero-title-line {
  display: block;
}

.hero-title-accent {
  color: var(--color-primary-dark);
  font-size: 1.15em;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin: 0 0 1.75rem;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  background: var(--color-primary-dark);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

/* Portada: enfoque en el video */
.home-landing {
  position: relative;
  min-height: auto;
  padding: 1.35rem 1rem 2.5rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .home-landing {
    padding: 1.5rem 1.5rem 3rem;
  }
}

.home-landing__inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-landing__intro {
  text-align: center;
  max-width: 52rem;
  margin: 0 auto 0.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

/* Cabecera: insignia + titulo en fila en pantallas amplias */
.home-landing__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

@media (min-width: 720px) {
  .home-landing__head {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.65rem 1rem;
  }

  .home-landing__badge.hero-badge {
    margin-bottom: 0;
  }
}

.home-landing__badge.hero-badge {
  margin-bottom: 0;
  flex-shrink: 0;
}

/* Titulo en una linea (se parte solo si no cabe) */
.home-landing__title.hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem 0.45rem;
  margin: 0;
  font-size: clamp(1.35rem, 4.2vw, 2.5rem);
  line-height: 1.15;
  text-align: center;
}

.home-landing__title-part {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
}

.home-landing__title-part--accent {
  color: var(--color-primary-dark);
}

.home-landing__title-sep {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.65em;
  opacity: 0.75;
  user-select: none;
}

.home-landing__subtitle {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.35;
  max-width: 36rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(79, 70, 229, 0.15);
}

.home-landing__video-block {
  width: 100%;
  max-width: min(100%, 68rem);
  margin: 1rem auto 0;
  text-align: center;
}

@media (min-width: 900px) {
  .home-landing__video-block {
    margin-top: 1.15rem;
  }
}

.home-landing__video.video-embed {
  margin: 0;
}

.home-feature-panel {
  width: 100%;
  max-width: min(100%, 68rem);
  margin: 1.25rem auto 0;
  padding: 1.1rem 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
}

.home-feature-panel__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  color: var(--color-primary-dark);
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
}

.home-feature-panel__text {
  margin: 0;
  color: var(--color-text);
  font-size: 0.97rem;
}

.video-embed--home-focus {
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.85),
    0 0 0 8px rgba(79, 70, 229, 0.18),
    0 20px 50px rgba(79, 70, 229, 0.22),
    0 8px 24px rgba(0, 0, 0, 0.08);
  background: #0f172a;
}

/* Sections */
.section {
  padding: 3.5rem 1.5rem;
}

.section--alt {
  background: var(--color-bg-alt);
}

.container {
  max-width: 68rem;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--color-primary-dark);
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-primary);
  display: inline-block;
}

.section-intro {
  color: var(--color-text-muted);
  margin: -0.5rem 0 1.5rem;
}

/* Prose */
.prose {
  margin: 1.5rem 0;
}

.prose h3 {
  font-size: 1.2rem;
  color: var(--color-primary-dark);
  margin: 1.5rem 0 0.5rem;
}
.prose h3:first-child { margin-top: 0; }

.prose p {
  margin: 0 0 1rem;
}

.prose code {
  background: rgba(79, 70, 229, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.9em;
}

/* Objectives */
.objectives-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.objectives-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
}
.objectives-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-primary);
  border-radius: 50%;
}

/* Level cards */
.levels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (max-width: 600px) {
  .levels {
    grid-template-columns: 1fr;
  }
}

.level-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-primary);
  transition: transform var(--transition);
}
.level-card:hover {
  transform: translateX(4px);
}

.level-card__title {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--color-primary-dark);
}

.level-num {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0.5rem;
  margin-right: 0.5rem;
  font-family: var(--font-display);
}

.level-card__desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-text);
}

.level-card__desc + .level-card__desc {
  margin-top: 0.65rem;
}

.level-card__subtitle {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.level-card .level-platform + .level-card__subtitle {
  margin-top: 1rem;
}

/* Fotos debajo de la descripcion (pagina Actividades) */
.level-card__photos-block {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(79, 70, 229, 0.14);
}

.level-card__photos-block--kits {
  margin-top: 1rem;
}

.level-card__photos-heading {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.level-card__photos-more {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
}

.level-card__photos-more a {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.level-card__photos-more a:hover,
.level-card__photos-more a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.level-card .gallery--level-card {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  min-height: 0;
}

.level-card .gallery--level-card .gallery-item {
  aspect-ratio: 4/3;
}

/* Actividades: solo 1 miniatura; el resto de fotos solo en lightbox */
.gallery.gallery--lightbox-stack {
  grid-template-columns: 1fr;
  max-width: min(100%, 360px);
  min-height: 0;
}

.level-card__photos-hint {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Indice rapido cursos (Actividades) */
.levels-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 1.25rem;
  padding: 0;
}

.levels-toc a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  padding: 0.35rem 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary-dark);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 0.45rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.levels-toc a:hover,
.levels-toc a:focus-visible {
  background: #fff;
  border-color: var(--color-primary);
  transform: translateY(-1px);
  outline: none;
}

/* Plataforma por nivel (Actividades) */
.level-platform {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: calc(var(--radius) - 2px);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.09) 0%, rgba(79, 70, 229, 0.03) 100%);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.level-platform--code-org {
  border-left: 3px solid #222;
}

.level-platform--makecode {
  border-left: 3px solid #0078d4;
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.1) 0%, rgba(79, 70, 229, 0.04) 100%);
}

.level-platform__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.level-platform__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.level-platform__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
  text-decoration: none;
}

.level-platform__name:hover,
.level-platform__name:focus-visible {
  text-decoration: underline;
  outline: none;
}

.level-platform__name--static {
  text-decoration: none;
  cursor: default;
}

.level-platform__name--static:hover {
  text-decoration: none;
}

.level-platform__meta {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.level-platform__meta a {
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* Logo del proyecto (pagina Proyecto) */
.project-logo-wrap {
  text-align: center;
  margin: 0.25rem 0 1.5rem;
}

.project-logo {
  max-width: min(100%, 280px);
  height: auto;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 6px 20px rgba(79, 70, 229, 0.15));
}

/* Workshops */
.workshops {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.workshop-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--color-accent);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.workshop-card h3 {
  margin: 0 0 0.5rem;
  color: var(--color-primary-dark);
  font-size: 1.1rem;
}

.workshop-card p {
  margin: 0;
  font-size: 0.95rem;
  flex: 1;
}

/* Gallery */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-primary);
  background: #fff;
  color: var(--color-primary-dark);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary);
  color: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  min-height: 120px;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(79, 70, 229, 0.08);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.gallery-item.img-error {
  background: rgba(245, 158, 11, 0.22);
  border: 1px dashed rgba(245, 158, 11, 0.7);
}

.gallery-item:hover {
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.22);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

.gallery-item:focus-within img {
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.35);
}

/* Lightbox */
.lightbox {
  --lightbox-edge: clamp(0.75rem, 3.5vw, 1.75rem);
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  padding-top: 3.5rem;
  z-index: 1000;
  overflow: hidden;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: min(96vw, 1200px);
  max-height: calc(100vh - 2rem);
  min-height: 0;
}

.lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 9.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.lightbox__close {
  position: absolute;
  top: var(--lightbox-edge);
  right: var(--lightbox-edge);
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 6;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Flechas fijas en los bordes de la pantalla (fuera de la imagen), con margen uniforme */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 5;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox__nav--prev {
  left: var(--lightbox-edge);
}

.lightbox__nav--next {
  right: var(--lightbox-edge);
}

.lightbox__nav:focus-visible {
  outline: 3px solid rgba(94, 234, 212, 0.65);
  outline-offset: 3px;
}

.lightbox__nav[hidden] {
  display: none !important;
}

/* Miniaturas bajo la imagen principal */
.lightbox__thumbs-wrap {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  padding: 0 0.25rem;
}

.lightbox__thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0.25rem 0.5rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
  justify-content: safe center;
}

.lightbox__thumbs::-webkit-scrollbar {
  height: 6px;
}

.lightbox__thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.lightbox__thumb {
  flex: 0 0 auto;
  width: 4.5rem;
  height: 3.25rem;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 0.4rem;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0.72;
  transition: border-color var(--transition), opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.lightbox__thumb:hover {
  opacity: 1;
}

.lightbox__thumb.is-active {
  opacity: 1;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.45), 0 6px 20px rgba(0, 0, 0, 0.35);
  transform: scale(1.06);
  z-index: 1;
}

.lightbox__thumb:focus-visible {
  outline: 3px solid rgba(94, 234, 212, 0.85);
  outline-offset: 2px;
  opacity: 1;
}

.gallery-legend {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.gallery-legend code {
  background: rgba(79, 70, 229, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
}

/* COVID Gallery (mini-sección) */
.covid-gallery {
  margin-top: 1.25rem;
}

.covid-gallery__title {
  font-family: var(--font-display);
  color: var(--color-primary-dark);
  margin: 1.1rem 0 0.75rem;
  font-size: 1.2rem;
}

.covid-gallery__hint {
  margin: 0 0 0.9rem;
  color: var(--color-text-muted);
}

.covid-gallery__youtube {
  margin: 0 0 0.9rem;
}

.covid-gallery__youtube a {
  color: var(--color-primary-dark);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(79, 70, 229, 0.25);
}

.covid-gallery__youtube a:hover {
  border-bottom-color: rgba(79, 70, 229, 0.6);
}

.video-link {
  margin: 0 0 1rem;
}

.video-link a {
  color: var(--color-primary-dark);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(79, 70, 229, 0.25);
}

.video-link a:hover {
  border-bottom-color: rgba(79, 70, 229, 0.6);
}

/* Embedded video (YouTube) */
.video-embed {
  position: relative;
  width: 100%;
  margin: 0 0 1.25rem;
  padding-top: 56.25%; /* 16:9 */
  background: rgba(79, 70, 229, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.08);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Video destacado en la portada */
.home-video__intro {
  text-align: center;
  max-width: 36rem;
  margin: -0.5rem auto 1.5rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.home-video__embed {
  max-width: min(52rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.home-video__more {
  text-align: center;
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.home-video__more a {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.gallery-intro {
  text-align: center;
  max-width: 32rem;
  margin: -0.25rem auto 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.gallery-intro a {
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* Extraescolar videos (IoT Por Bloques) */
.extrascolar-videos {
  margin: 1.25rem 0 0.25rem;
}

.extrascolar-gallery__title {
  font-family: var(--font-display);
  color: var(--color-primary-dark);
  margin: 2.25rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.extrascolar-gallery__hint {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

.extrascolar-gallery.gallery {
  margin-top: 0.25rem;
}

.extrascolar-videos__title {
  font-family: var(--font-display);
  color: var(--color-primary-dark);
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.video-highlight {
  padding: 1.1rem 1.1rem;
  background: rgba(79, 70, 229, 0.06);
  border-radius: var(--radius);
  border: 1px solid rgba(79, 70, 229, 0.12);
  margin-bottom: 1.25rem;
}

.video-highlight__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
}

.video-highlight__desc {
  margin: 0 0 0.9rem;
  color: var(--color-text-muted);
}

.video-embed--highlight {
  margin: 0;
  box-shadow: 0 10px 35px rgba(79, 70, 229, 0.14);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.video-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--color-primary);
  padding: 1rem 1rem 1.05rem;
}

.video-card__title {
  margin: 0 0 0.75rem;
  color: var(--color-primary-dark);
  font-size: 1rem;
  font-weight: 700;
}

.video-embed--small {
  margin: 0;
  box-shadow: none;
  background: rgba(79, 70, 229, 0.05);
}

@media (max-width: 980px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .video-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* COVID video picker */
.covid-video-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.covid-video-picker__btn {
  padding: 0.55rem 1rem;
  border: 2px solid var(--color-primary);
  background: #fff;
  color: var(--color-primary-dark);
  font-family: var(--font-sans);
  font-weight: 700;
  border-radius: 2rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.covid-video-picker__btn:hover,
.covid-video-picker__btn.active {
  background: var(--color-primary);
  color: #fff;
}

.covid-video-picker__btn:focus-visible {
  outline: 3px solid rgba(94, 234, 212, 0.65);
  outline-offset: 3px;
}

/* Collaborations */
.collab-blocks {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.collab-block {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-primary);
}

.collab-block__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.85rem;
  color: var(--color-primary-dark);
}

.collab-block p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
}

.collab-block p:last-child {
  margin-bottom: 0;
}

.collab-block a {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.collab-block a:hover,
.collab-block a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.collab-block strong {
  color: var(--color-text);
}

/* Footer */
.footer {
  background: var(--color-primary-dark);
  color: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer .container {
  max-width: 52rem;
  margin: 0 auto;
}

.footer p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.footer-logo {
  display: block;
  width: min(100%, 260px);
  height: auto;
  margin: 0 auto 0.85rem;
  border-radius: 0.6rem;
  background: #fff;
  padding: 0.25rem;
}

.footer a {
  color: #c7d2fe;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}



