/* =========================================================
   UAnorte — Landing (new.uanorte.edu.co)
   Diseño base: 1920 px de ancho. Las medidas en vw escalan
   proporcionalmente en cualquier pantalla de computador.
   ========================================================= */

/* ---------- Tipografía Montserrat (local) ---------- */
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Variables ---------- */
:root {
  --azul: #002f8d;          /* azul institucional */
  --azul-claro: #0098e0;    /* azul secundario */
  --negro: #000;
  --blanco: #fff;

  --topbar-h: clamp(34px, 2.6vw, 64px);
  --header-h: clamp(70px, 5.8vw, 140px);
  --gap: clamp(14px, 1.56vw, 40px);

  --fs-nav: clamp(15px, 1.15vw, 28px);
  --fs-title: clamp(26px, 2.3vw, 56px);
  --fs-go: clamp(14px, 1.05vw, 26px);
  --fs-body: clamp(14px, 1.05vw, 25px);
  --fs-small: clamp(12px, 0.84vw, 20px);
  --fs-legal: clamp(10px, 0.68vw, 16px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 400;
  color: var(--negro);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 78.5%; max-width: 2000px; margin: 0 auto; }

/* Subrayado al pasar el cursor por cualquier texto clicable */
.link { text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
.link:hover, .link:focus-visible { text-decoration: underline; }

/* Agrandar imágenes al pasar el cursor (todas menos el hero) */
.zoom { overflow: hidden; }
.zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.zoom:hover img,
.news-card:hover .zoom img,
.event:hover .zoom img { transform: scale(1.07); }

/* ---------- Barra superior ---------- */
.topbar {
  position: relative;
  z-index: 60;
  height: var(--topbar-h);
  background: var(--negro);
  color: var(--blanco);
  display: flex;
  align-items: center;
  font-size: var(--fs-nav);
}

/* ---------- Cabecera ---------- */
.header {
  position: absolute;
  top: var(--topbar-h);
  left: 0; right: 0;
  z-index: 50;
  color: var(--blanco);
  transition: background-color .25s ease, color .25s ease;
}
.header__inner {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.header__logo { justify-self: start; display: block; }
.logo { height: clamp(40px, 3.4vw, 82px); width: auto; }
.logo--blue { display: none; }

.nav { display: flex; gap: clamp(14px, 1.45vw, 36px); font-size: var(--fs-nav); }
.nav__item.is-active { text-decoration: underline; }

.header__search { justify-self: end; font-size: var(--fs-nav); }
.header__burger { display: none; }

/* Estado sólido (menú o búsqueda abiertos) */
.header.is-solid { background: var(--blanco); color: var(--negro); }
.header.is-solid .logo--white { display: none; }
.header.is-solid .logo--blue { display: block; }

/* ---------- Paneles desplegables ---------- */
.panel {
  display: none;
  background: var(--blanco);
  color: var(--negro);
  padding: clamp(6px, 0.6vw, 14px) 0 clamp(18px, 1.3vw, 30px);
  font-size: var(--fs-nav);
}
.panel.is-open { display: block; animation: drop .25s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.panel__cols { display: grid; grid-template-columns: repeat(4, 1fr); }
.panel__col {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(8px, 1vw, 22px);
  padding: 0 1vw;
}
.panel__col + .panel__col { border-left: 1px solid var(--negro); }
.panel__go {
  display: table;
  margin: clamp(24px, 3.4vw, 70px) auto 0;
  font-style: italic;
}

/* Búsqueda */
.panel--search { padding-top: clamp(8px, 1.2vw, 24px); padding-bottom: clamp(14px, 0.85vw, 24px); }
.search { display: flex; justify-content: center; }
.search input {
  width: clamp(260px, 27.4vw, 640px);
  height: clamp(38px, 2.75vw, 64px);
  border: 1.5px solid var(--negro);
  border-radius: 0;
  padding: 0 0.6em;
  font: inherit;
  color: var(--negro);
  outline: none;
}
.search input::placeholder { color: var(--negro); opacity: 1; }
.search input:focus::placeholder { opacity: .35; }
.search__results { list-style: none; margin: 0 auto; padding: 0; width: clamp(260px, 27.4vw, 640px); }
.search__results li a { display: block; padding: .55em .6em; border-bottom: 1px solid #e6e6e6; font-size: var(--fs-body); }
.search__results li a small { display: block; font-size: .75em; color: #666; }
.search__results .empty { padding: .6em; font-size: var(--fs-body); color: #666; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: calc(100vh - var(--topbar-h));
  height: calc(100svh - var(--topbar-h));
  min-height: 420px;
  overflow: hidden;
  background: #1a1a1a;
}
.hero__slides, .hero__slide { position: absolute; inset: 0; }
.hero__slide {
  background-size: cover;
  background-position: center 35%;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__shade-top {
  position: absolute; left: 0; right: 0; top: 0;
  height: 30%;
  background: linear-gradient(to bottom, rgba(0,47,141,.95) 0%, rgba(0,47,141,.55) 40%, rgba(0,47,141,0) 100%);
  pointer-events: none;
}
.hero__shade-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: clamp(48px, 5.2vw, 110px);
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,.6) 100%);
  display: flex; align-items: center;
}
.hero__controls { display: flex; justify-content: flex-end; gap: clamp(10px, 1.1vw, 26px); }
.hero__arrow { width: clamp(18px, 1.4vw, 34px); height: clamp(26px, 2vw, 48px); color: var(--blanco); }
.hero__arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; }
.hero__arrow:hover { opacity: .75; }

/* ---------- Secciones ---------- */
.section { padding-top: clamp(40px, 3.9vw, 90px); }
.section--last { padding-bottom: clamp(50px, 3.9vw, 90px); }
.section__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: clamp(18px, 2vw, 46px);
}
.section__title { font-size: var(--fs-title); font-weight: 400; }
.section__go { font-size: var(--fs-go); font-style: italic; font-weight: 300; }

/* Educación */
.edu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.edu-card { position: relative; aspect-ratio: 1 / 1; display: block; }
.edu-card::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 47, 141, .48);
  transition: background-color .3s ease;
}
.edu-card:hover::after { background: rgba(0, 47, 141, .38); }
.edu-card__label {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--blanco); font-size: var(--fs-nav);
}
.edu-card:hover .edu-card__label { text-decoration: underline; }

/* Boletín */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.news-card {
  display: flex; flex-direction: column;
  background: var(--negro); color: var(--blanco);
  border: clamp(3px, 0.26vw, 6px) solid var(--negro);
}
.news-card__img { aspect-ratio: 472 / 352; }
.news-card__body { padding: clamp(28px, 3.4vw, 76px) clamp(16px, 1.3vw, 30px) clamp(18px, 1.3vw, 30px); flex: 1; }
.news-card__title { font-size: var(--fs-body); font-weight: 500; line-height: 1.22; margin-bottom: 1.2em; }
.news-card p { font-size: var(--fs-body); font-weight: 300; line-height: 1.22; }
.news-card:hover .news-card__title { text-decoration: underline; }

/* Calendario */
.cal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.cal-list { display: grid; grid-template-rows: repeat(3, 1fr); gap: var(--gap); }
.event {
  display: flex; flex-direction: column;
  background: var(--negro); color: var(--blanco);
  border: clamp(3px, 0.26vw, 6px) solid var(--negro);
}
.event__img { flex: 1; min-height: 0; }
.event__row { display: flex; min-height: clamp(130px, 11.4vw, 270px); flex: 1; }
.event--featured .event__row { flex: 0 0 auto; }
.event__date {
  flex: 0 0 clamp(60px, 5.2vw, 124px);
  background: var(--blanco); color: var(--negro);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: var(--fs-body); line-height: 1.2;
}
.event__body {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(18px, 1.6vw, 36px) clamp(16px, 1.56vw, 36px) clamp(14px, 1.3vw, 30px);
  position: relative;
}
.event__title { font-size: clamp(14px, 1.1vw, 26px); font-weight: 400; }
.event__meta {
  display: flex; gap: 0; margin-top: clamp(22px, 2.8vw, 64px);
  font-size: var(--fs-small); font-weight: 300; color: #bdbdbd;
}
.event__meta span:first-child { width: clamp(110px, 10.4vw, 250px); }
.event:hover .event__title { text-decoration: underline; }

/* ---------- Pie de página ---------- */
.footer { background: var(--azul); color: var(--blanco); padding: clamp(34px, 2.4vw, 60px) 0 clamp(26px, 1.8vw, 44px); }
.footer__top { display: flex; justify-content: space-between; align-items: center; padding-bottom: clamp(24px, 2.2vw, 52px); border-bottom: 1px solid rgba(255,255,255,.85); }
.footer__logo { height: clamp(44px, 3.3vw, 80px); width: auto; }
.footer__top .link { font-size: var(--fs-body); font-weight: 500; }

.footer__menu { display: grid; grid-template-columns: repeat(4, 1fr); padding: clamp(18px, 1.56vw, 36px) 0; border-bottom: 1px solid rgba(255,255,255,.85); }
.footer__col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(8px, 0.95vw, 22px); font-size: var(--fs-body); font-weight: 300; padding: 0 .6vw; }
.footer__col + .footer__col { border-left: 1px solid rgba(255,255,255,.85); }
.footer__head { font-weight: 500; margin-bottom: clamp(0px, .1vw, 4px); }

.footer__info { display: grid; grid-template-columns: 1fr 1fr; padding: clamp(18px, 1.56vw, 36px) 0; border-bottom: 1px solid rgba(255,255,255,.85); }
.footer__logos { display: flex; align-items: center; justify-content: center; font-size: var(--fs-body); font-weight: 500; min-height: 120px; }
.footer__contact { text-align: center; border-left: 1px solid rgba(255,255,255,.85); font-size: var(--fs-body); font-weight: 300; line-height: 1.25; padding: 0 1vw; }
.footer__contact h3 { font-size: var(--fs-body); font-weight: 500; margin-bottom: clamp(12px, 1vw, 22px); }
.footer__label { color: rgba(255,255,255,.42); margin-top: clamp(8px, .75vw, 18px); }

.footer__legal { text-align: center; font-size: var(--fs-legal); color: rgba(255,255,255,.62); padding-top: clamp(22px, 2vw, 46px); line-height: 1.35; }

/* ---------- Botón flotante de redes ---------- */
.social {
  position: fixed;
  right: clamp(14px, 1.45vw, 34px);
  bottom: clamp(70px, 5.6vw, 130px);
  z-index: 70;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(6px, .62vw, 14px);
}
.social__list { display: flex; flex-direction: column; gap: clamp(6px, .62vw, 14px); }
.social__btn, .social__toggle {
  width: clamp(40px, 2.6vw, 62px); height: clamp(40px, 2.6vw, 62px);
  border-radius: 50%;
  background: var(--negro); color: var(--blanco);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.social__btn svg { width: 46%; height: 46%; fill: currentColor; }
.social__btn--wa { background: #7ac943; }
.social__btn:hover { transform: scale(1.08); }
.social__btn { transition: transform .2s ease, opacity .25s ease; }

.social__list .social__btn { opacity: 0; transform: translateY(12px) scale(.8); pointer-events: none; }
.social.is-open .social__list .social__btn { opacity: 1; transform: none; pointer-events: auto; }
.social.is-open .social__list .social__btn:hover { transform: scale(1.08); }
.social__list .social__btn:nth-child(5) { transition-delay: .00s; }
.social__list .social__btn:nth-child(4) { transition-delay: .03s; }
.social__list .social__btn:nth-child(3) { transition-delay: .06s; }
.social__list .social__btn:nth-child(2) { transition-delay: .09s; }
.social__list .social__btn:nth-child(1) { transition-delay: .12s; }
.social:not(.is-open) .social__list { pointer-events: none; }

.social__toggle .icon-grid { width: 54%; height: 54%; fill: none; stroke: currentColor; stroke-width: 1.7; }
.social__toggle .icon-x { display: none; font-weight: 600; font-size: clamp(14px, .95vw, 22px); }
.social.is-open .icon-grid { display: none; }
.social.is-open .icon-x { display: block; }

/* ---------- Responsive (tablet y celular) ---------- */
@media (max-width: 900px) {
  .container { width: calc(100% - 40px); }

  .header__inner { grid-template-columns: 1fr auto; }
  .nav, .header__search { display: none; }
  .header__burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; justify-self: end; }
  .header__burger span { display: block; height: 2px; background: currentColor; }

  .header.is-mobile { background: var(--blanco); color: var(--negro); max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
  .header.is-mobile .logo--white { display: none; }
  .header.is-mobile .logo--blue { display: block; }
  .header.is-mobile .nav { display: flex; flex-direction: column; grid-column: 1 / -1; gap: 14px; padding: 6px 0 16px; font-size: 18px; }
  .header.is-mobile .header__search { display: block; grid-column: 1 / -1; justify-self: start; padding-bottom: 16px; font-size: 18px; }
  .header.is-mobile .header__inner { height: auto; grid-template-rows: var(--header-h) auto auto; }

  .panel__cols { grid-template-columns: 1fr; gap: 12px; }
  .panel__col { align-items: flex-start; text-align: left; padding: 0; }
  .panel__col + .panel__col { border-left: 0; }
  .panel__go { margin: 18px 0 0; }

  .edu-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .cal-grid { grid-template-columns: 1fr; }

  .footer__menu { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .footer__col:nth-child(3) { border-left: 0; }
  .footer__info { grid-template-columns: 1fr; }
  .footer__contact { border-left: 0; border-top: 1px solid rgba(255,255,255,.85); padding-top: 20px; }
  .footer__logos { min-height: 80px; }
}

@media (max-width: 520px) {
  .footer__menu { grid-template-columns: 1fr; }
  .footer__col + .footer__col { border-left: 0; }
  .section__head { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
