/* ─── Variables ─────────────────────────────────────────── */
:root {
  --blue:       #1a6eb5;
  --blue-light: #e8f4fd;
  --text:       #2c2c2c;
  --muted:      #666;
  --white:      #fff;
  --nav-h:      70px;
  --serif:      'Playfair Display', Georgia, serif;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: 'Poppins', sans-serif; color: var(--text); line-height: 1.6; }
img   { max-width: 100%; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }

/* ─── Utilities ─────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.title-line {
  width: 48px;
  height: 3px;
  background: var(--blue);
  margin: 8px 0 24px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--serif);
}

.btn-outline {
  display: inline-block;
  padding: 10px 28px;
  border: 1.5px solid var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.btn-outline:hover { background: var(--text); color: var(--white); }

.btn-outline-blue {
  display: inline-block;
  padding: 10px 28px;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.btn-outline-blue:hover { background: var(--blue); color: var(--white); }

/* ─── Fade-in on scroll ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ─── Navbar ─────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  height: var(--nav-h);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo img {
  height: 56px;
  width: auto;
}

.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--blue); }

.nav-social {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-social a {
  color: var(--text);
  display: flex;
  transition: color 0.2s;
}
.nav-social a:hover { color: var(--blue); }

/* Hamburger button (oculto en desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
  margin-left: 12px;
  align-items: center;
  justify-content: center;
}

/* ─── Carousel ───────────────────────────────────────────── */
.carousel {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #111;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
  isolation: isolate;
}

.carousel-slide.active { opacity: 1; }


.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.25);
  border: none;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background 0.2s;
}
.carousel-btn:hover { background: rgba(255,255,255,.45); }
.carousel-btn.prev  { left: 16px; }
.carousel-btn.next  { right: 16px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}
.carousel-dot.active { background: var(--white); }

/* ─── Sección Intro (Inicio) ─────────────────────────────── */
.intro {
  padding: 72px 0;
}

.intro .section-title {
  font-size: 2.2rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.intro-grid p { font-size: 0.92rem; color: var(--muted); }

.intro-cta {
  text-align: center;
  margin-top: 36px;
}

/* ─── Estadísticas ───────────────────────────────────────── */
.stats {
  padding: 48px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 0;
}

.stat-item {
  padding: 16px 0;
  border-right: 1px solid #e0e0e0;
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ─── Foto Graduados ─────────────────────────────────────── */
.grad-photo {
  background: var(--blue-light);
  padding: 48px 0;
}

.grad-photo img {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 4px;
  width: 100%;
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
}

/* ─── Cita ───────────────────────────────────────────────── */
.quote-section {
  background: var(--blue-light);
  padding: 64px 0;
}

.quote-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.quote-mark {
  font-size: 4rem;
  color: var(--blue);
  line-height: 0.8;
  margin-bottom: 12px;
  font-family: Georgia, serif;
}

.quote-attr {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 12px;
  font-style: normal;
}

.quote-text {
  font-size: 1.7rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  font-family: var(--serif);
}

/* ─── Plan de estudios (preview Inicio) ──────────────────── */
.plan-preview {
  padding: 72px 0;
}

.plan-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.plan-header p { font-size: 0.92rem; color: var(--muted); }

.materias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.materia-card { overflow: hidden; }

.materia-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.materia-card:hover img {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
}

.materia-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: var(--serif);
}

.materia-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ─── Actividades preview (Inicio) ──────────────────────── */
.activities-preview {
  background: var(--blue-light);
  padding: 72px 0;
}

.activities-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.activities-grid img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  max-height: 380px;
  box-shadow: 0 4px 18px rgba(0,0,0,.10);
}

.activities-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 24px;
  font-family: var(--serif);
}

.activity-item {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.activity-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

.activity-icon svg { color: white; }

.activity-item h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 3px; }
.activity-item p  { font-size: 0.82rem; color: var(--muted); }

/* ─── Page Hero (páginas internas) ──────────────────────── */
.page-hero {
  height: 280px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 45, 110, 0.25);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-size: 2.6rem;
  font-weight: 700;
  font-family: var(--serif);
}

/* ─── Nosotros intro ─────────────────────────────────────── */
.nosotros-intro {
  padding: 72px 0;
}

.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
  margin-top: 8px;
}

.nosotros-grid p { font-size: 0.92rem; color: var(--muted); margin-bottom: 16px; }

/* ─── Por qué nosotros ───────────────────────────────────── */
.por-que {
  padding: 64px 0;
}

.por-que h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 48px;
  font-family: var(--serif);
}

.por-que-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
}

.por-que-item {
  padding: 40px 36px;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  text-align: center;
  transition: background 0.2s;
}
.por-que-item:hover { background: var(--blue-light); }

.por-que-item svg {
  color: var(--blue);
  margin-bottom: 14px;
}

.por-que-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: var(--serif);
}
.por-que-item p  { font-size: 0.85rem; color: var(--muted); max-width: 280px; margin: 0 auto; }

/* ─── Misión / Visión / Valores ──────────────────────────── */
.mision {
  background: var(--blue-light);
  padding: 72px 0;
}

.mision-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid #d0e8f5;
}
.mision-item:last-child { border-bottom: none; }

.mision-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.mision-label svg { color: var(--blue); }
.mision-label span {
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--serif);
}

.mision-text p { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }

.mision-text dl { display: flex; flex-direction: column; gap: 8px; }
.mision-text dt { font-weight: 600; font-size: 0.9rem; display: inline; }
.mision-text dd { display: inline; font-size: 0.88rem; color: var(--muted); }

/* ─── Mapa ───────────────────────────────────────────────── */
.mapa { padding: 0; }
.mapa iframe { display: block; width: 100%; height: 420px; border: none; }

/* ─── Plan de Estudio (página) ───────────────────────────── */
.plan-intro {
  padding: 64px 0 48px;
}

.plan-badge {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.plan-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 8px;
}

.plan-intro-grid p { font-size: 0.92rem; color: var(--muted); }

.semestres { padding: 0 0 80px; }

.semestre {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid #eee;
}
.semestre:last-child { border-bottom: none; }

.semestre img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0,0,0,.09);
}

.semestre h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  font-family: var(--serif);
}

.semestre ul { display: flex; flex-direction: column; gap: 6px; }
.semestre ul li {
  font-size: 0.88rem;
  color: var(--muted);
}
.semestre ul li::before { content: '– '; }

/* ─── Actividades (página) ───────────────────────────────── */
.actividad {
  padding: 72px 0;
  border-bottom: 1px solid #eee;
}
.actividad:last-child { border-bottom: none; }

.actividad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.actividad-grid.reverse { direction: rtl; }
.actividad-grid.reverse > * { direction: ltr; }

.actividad-grid img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0,0,0,.09);
}

.actividad-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
  font-family: var(--serif);
}

.actividad-content p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--white);
  border-top: 1px solid #e5e5e5;
  padding: 56px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  transition: opacity 0.2s;
}
.footer-social a:hover { opacity: 0.8; }

.footer-brand p { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }

.footer-links h4,
.footer-contact h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  font-family: var(--serif);
}

.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a   { font-size: 0.85rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover,
.footer-links a.active { color: var(--blue); }

.footer-contact strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.footer-contact p { font-size: 0.85rem; color: var(--muted); line-height: 1.85; }

.footer-bottom {
  border-top: 1px solid #e5e5e5;
  text-align: center;
  padding: 16px;
  font-size: 0.78rem;
  color: #aaa;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

/* ─── ≤900px (tablet) ───────────────────────────────────── */
@media (max-width: 900px) {

  /* Hamburguesa */
  .nav-toggle { display: flex; }
  .nav-social  { display: none; }   /* Se ve en el menú desplegado si se quiere */

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 199;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 13px 28px;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-links li:last-child a { border-bottom: none; }

  /* Grids → 1 columna */
  .intro-grid,
  .plan-header,
  .plan-intro-grid,
  .activities-grid,
  .actividad-grid,
  .semestre {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Nosotros: apilar columnas */
  .nosotros-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Actividad reverse: cancelar direction rtl */
  .actividad-grid.reverse {
    direction: ltr;
  }
  .actividad-grid.reverse img {
    order: -1;
  }

  /* Semestre */
  .semestre { align-items: start; }
  .semestre img { height: 220px; }

  /* Materias: 2 columnas en tablet */
  .materias-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Por qué nosotros: 1 columna */
  .por-que-grid {
    grid-template-columns: 1fr;
    border-left: none;
  }
  .por-que-item { border-left: 1px solid #ddd; }

  /* Misión: apilar */
  .mision-item { grid-template-columns: 1fr; gap: 12px; }
  .mision-label {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  /* Actividades img */
  .actividad-grid img { height: 260px; }

  /* Plan header: algo de space entre título y descripción */
  .plan-header { gap: 16px; }
}

/* ─── ≤600px (móvil) ────────────────────────────────────── */
@media (max-width: 600px) {

  /* Carousel */
  .carousel { height: 320px; }
  .carousel-btn { width: 36px; height: 36px; }

  /* Page hero */
  .page-hero { height: 180px; }
  .page-hero h1 { font-size: 1.8rem; }

  /* Tipografía fluida */
  .section-title       { font-size: 1.4rem; }
  .por-que h2          { font-size: 1.4rem; }
  .activities-content h2 { font-size: 1.4rem; }
  .actividad-content h2  { font-size: 1.35rem; }
  .quote-text          { font-size: 1.2rem; }

  /* Stats: 1 columna */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
  }
  .stat-item:last-child { border-bottom: none; }
  .stat-number { font-size: 2.4rem; }

  /* Materias: 1 columna */
  .materias-grid { grid-template-columns: 1fr; }

  /* Footer: 1 columna centrado */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .footer-social { justify-content: center; }
  .footer-contact p { text-align: center; }

  /* Secciones: reducir padding vertical */
  .intro, .plan-preview, .activities-preview,
  .actividad, .nosotros-intro, .por-que,
  .mision, .plan-intro { padding: 48px 0; }

  .semestres   { padding: 0 0 48px; }
  .semestre    { padding: 36px 0; gap: 20px; }
  .semestre img { height: 200px; }
  .actividad-grid img { height: 220px; }
  .mapa iframe { height: 280px; }
}
