/**
 * Estilos principales - Instituto Jiménez
 * Sitio de Cursos Libres
 */

:root {
  /* Colores del proyecto */
  --brand: #006cb6;
  --brand-hover: #005a9a;
  --secondary-1: #fedc09;
  --secondary-2: #f9b036;
  
  /* Colores de texto */
  --text: #ffffff;
  --text-dark: #000000;
  --muted: #e7e7e7;
  
  /* Colores de fondo */
  --bg-dark: #0f0f10;
  --bg-light: #ffffff;
  
  /* Efectos */
  --stroke: rgba(255, 255, 255, 0.2);
  --overlay: 0.55;
  --radius: 16px;
  
  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== Reset y Base ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Navbar — Instituto Jiménez ===== */
.ij-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition-normal);
}

.ij-nav__inner {
  width: 100%;
  padding-inline: 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Logo */
.ij-nav__logo {
  flex: 0 0 auto;
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
}

.ij-nav__logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* Links desktop */
.ij-nav__links {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
}

.ij-nav__links a {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 300;
  color: #2d2f31;
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.ij-nav__links a:hover {
  color: var(--brand);
  background: rgba(0, 108, 182, 0.06);
}

/* Barra de búsqueda */
.ij-nav__search {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: 420px;
  min-width: 160px;
  background: #fff;
  border: 1.5px solid #d1d7dc;
  border-radius: 9999px;
  padding: 0 0.875rem;
  gap: 0.5rem;
  margin-inline: 0.75rem;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              max-width var(--transition-normal);
}

.ij-nav__search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 108, 182, 0.1);
}

.ij-nav__search-icon {
  color: #6a6f73;
  flex-shrink: 0;
}

.ij-nav__search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 300;
  color: #2d2f31;
  padding: 0.5rem 0;
  min-width: 0;
}

.ij-nav__search input::placeholder {
  color: #9fa3a9;
}

/* Actions desktop */
.ij-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.ij-nav__user-name {
  font-size: .78rem;
  font-weight: 600;
  color: #1c1d1f;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Botones navbar */
.ij-nav__btn {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-block;
  line-height: 1.5;
}

.ij-nav__btn--outline {
  color: var(--brand);
  border: 1.5px solid var(--brand);
  background: transparent;
}

.ij-nav__btn--outline:hover {
  background: rgba(0, 108, 182, 0.06);
  color: var(--brand);
}

.ij-nav__btn--filled {
  color: #fff;
  background: var(--brand);
  border: 1.5px solid var(--brand);
}

.ij-nav__btn--filled:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

/* Botón avatar mobile (derecha) — oculto en desktop */
.ij-nav__mobile-login {
  display: none;
  margin-left: auto;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Hamburguesa — oculto en desktop */
.ij-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex: 0 0 auto;
  flex-shrink: 0;
}

.ij-nav__toggle span {
  width: 22px;
  height: 2px;
  background: #2d2f31;
  border-radius: 2px;
  display: block;
  transition: all var(--transition-normal);
}

/* Drawer mobile */
.ij-nav__drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 82vw);
  height: 100%;
  background: #ffffff;
  z-index: 1002;
  padding: 4rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
}

/* Botón cerrar dentro del drawer */
.ij-nav__drawer-close {
  position: absolute;
  top: 0.875rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #6a6f73;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.ij-nav__drawer-close:hover {
  color: #2d2f31;
  background: rgba(0, 0, 0, 0.05);
}

.ij-nav__drawer.active {
  transform: translateX(0);
}

.ij-nav__drawer a {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  color: #2d2f31;
  padding: 0.8rem 0.25rem;
  border-bottom: 1px solid #e0e0e0;
  display: block;
  transition: color var(--transition-fast);
}

.ij-nav__drawer a:hover {
  color: var(--brand);
}

.ij-nav__drawer a:last-child {
  border-bottom: none;
}

/* Overlay */
.ij-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.ij-nav__overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Nombre de usuario (nav auth) */
.ij-nav__username {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 300;
  color: #2d2f31;
  padding: 0 0.25rem;
}

/* ===== Collapse progresivo del navbar ===== */

/* ≤1150px: shrink search, hide Empresas (último link) */
@media (max-width: 1150px) {
  .ij-nav__search {
    max-width: 260px;
  }
  .ij-nav__links a:last-child {
    display: none;
  }
}

/* ≤1020px: shrink más, hide Capacitaciones (penúltimo) */
@media (max-width: 1020px) {
  .ij-nav__search {
    max-width: 180px;
    min-width: 120px;
  }
  .ij-nav__links a:nth-last-child(2) {
    display: none;
  }
}

/* ≤900px: modo mobile completo */
@media (max-width: 900px) {
  .ij-nav__inner {
    position: relative; /* necesario para logo centrado absoluto */
  }

  .ij-nav__links,
  .ij-nav__search,
  .ij-nav__actions {
    display: none;
  }

  /* Hamburguesa — izquierda */
  .ij-nav__toggle {
    display: flex;
  }

  /* Logo — centrado absoluto */
  .ij-nav__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }

  /* Botón avatar — derecha */
  .ij-nav__mobile-login {
    display: flex;
  }
}

/* ===== Hero Split 50/50 ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* El gap revela el fondo degradado — actúa como separador colorido entre los dos paneles */
  gap: 3px;
  background: linear-gradient(
    90deg,
    var(--brand)       0%,
    #3fa9e8            40%,
    var(--secondary-1) 70%,
    var(--secondary-2) 100%
  );
}

.pane {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  min-height: 50svh;
}

.pane::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: center/cover no-repeat;
  transform: scale(1.02);
  transition: transform 0.5s ease;
}

.pane:hover::before {
  transform: scale(1.05);
}

.pane::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, var(--overlay));
}

/* Overlay con tinte de marca por pane */
.pane.left::after {
  background: linear-gradient(160deg, rgba(0, 40, 90, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.pane.right::after {
  background: linear-gradient(160deg, rgba(55, 25, 0, 0.62) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.pane.left::before {
  background-image: url('../images/front-page/cl.webp');
}

.pane.right::before {
  background-image: url('../images/front-page/ea.webp');
}

.content {
  position: relative;
  overflow: hidden;
  width: min(520px, 88%);
  text-align: center;
  padding: 36px 30px 32px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.07);
  border-radius: calc(var(--radius) + 4px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: rise 0.8s ease both;
}

/* Acento degradado de marca en la parte superior del card — eco del separador entre paneles */
.content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--brand)       0%,
    #3fa9e8            40%,
    var(--secondary-1) 70%,
    var(--secondary-2) 100%
  );
}

.eyebrow {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--stroke);
  color: #fff;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Tinte de marca por panel */
.pane.left .eyebrow {
  background: rgba(0, 108, 182, 0.45);
  border-color: rgba(63, 169, 232, 0.55);
}

.pane.right .eyebrow {
  background: rgba(249, 176, 54, 0.25);
  border-color: rgba(249, 176, 54, 0.45);
  color: var(--secondary-1);
}

h1 {
  font-size: clamp(1.3rem, 1.5vw + 0.6rem, 1.6rem);
  margin: 4px 0 12px;
  line-height: 1.2;
  font-weight: 700;
  color: #f0f0f0;
}

/* H1 dentro del hero — protagonista visual */
.hero h1 {
  font-size: clamp(1.65rem, 2.0vw + 0.7rem, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 14px;
}

p.desc {
  color: var(--muted);
  margin: 6px 0 18px;
  font-size: clamp(0.9rem, 0.8vw + 0.6rem, 1.05rem);
  line-height: 1.5;
}

.meta {
  color: #efefef;
  opacity: 0.9;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--brand);
  color: white;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

.btn.btn-secondary {
  background: var(--secondary-2);
  color: var(--text-dark);
}

.btn.btn-secondary:hover {
  background: var(--secondary-1);
}

/* ===== Animaciones ===== */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive Design ===== */

/* Tablets — apila los paneles verticalmente, separador horizontal */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pane {
    min-height: 55svh;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .pane {
    min-height: 50svh;
    padding-block: 48px;
  }

  .content {
    padding: 32px 20px 28px;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 5vw + 0.4rem, 2rem);
  }
}

/* Mobile pequeño */
@media (max-width: 480px) {
  .pane {
    min-height: 46svh;
    padding-block: 40px;
  }

  .content {
    padding: 28px 16px 24px;
    width: 92%;
  }
}

/* Reducir movimiento para usuarios con preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Utilidades ===== */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.py-1 { padding-block: 0.5rem; }
.py-2 { padding-block: 1rem; }
.py-3 { padding-block: 1.5rem; }
.py-4 { padding-block: 2rem; }
.py-5 { padding-block: 3rem; }

/* ===================================================
   FOOTER — Instituto Jiménez
   Estructura inspirada en el footer de Udemy:
   4 columnas de enlaces + barra inferior con logo
   =================================================== */

.ij-footer {
  background-color: #1c1d1f;
  color: #a8adb3;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.875rem;
}

.ij-footer__container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* --- Bloque superior --- */
.ij-footer__top {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ij-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.ij-footer__heading {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.ij-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ij-footer__list a {
  color: #a8adb3;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: color var(--transition-fast);
}

.ij-footer__list a:hover {
  color: #ffffff;
}

/* --- Barra inferior --- */
.ij-footer__bottom {
  padding: 1.5rem 0;
}

.ij-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ij-footer__brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.ij-footer__logo {
  height: 36px;
  width: auto;
  display: block;
  /* El logo tiene fondo blanco, le damos un recorte sutil */
  border-radius: 4px;
}

.ij-footer__copy {
  font-size: 0.8125rem;
  color: #6d7380;
}

/* --- Redes sociales --- */
.ij-footer__social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ij-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #a8adb3;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.ij-footer__social-link:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.06);
}

/* --- Responsivo --- */
@media (max-width: 900px) {
  .ij-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 3rem;
  }
}

@media (max-width: 560px) {
  .ij-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .ij-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .ij-footer__brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
