/* ============================================================
   Fotografías del sitio (fotos libres de Pexels, ver assets/img/fotos/CREDITOS.txt)
   ============================================================ */
img { max-width: 100%; }

/* ---------- Portada: foto con tarjetas flotantes ---------- */
.hero-visual { position: relative; display: grid; min-width: 0; }
.hero-foto { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3.3;
  box-shadow: 0 30px 60px -28px rgba(8, 53, 101, .55); }
.hero-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8, 53, 101, .35)); }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.hero-visual:hover .hero-foto img { transform: scale(1.06); }
.hero-visual .sheet { width: 74%; margin: -150px -18px 0 auto; z-index: 2; padding: 20px; gap: 12px; }
.hero-visual .sheet .note { display: none; }
.chip-flot { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); box-shadow: 0 16px 34px -14px rgba(8, 53, 101, .45); font-size: 14px; line-height: 1.25;
  animation: flotar 6s ease-in-out infinite; }
.chip-flot div { display: grid; }
.chip-flot small { color: #5b6b7d; font-size: 12px; }
.chip-flot .ok-dot, .chip-flot .cal-dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none; font-weight: 800; }
.chip-flot .ok-dot { background: #e3f6ec; color: #138a52; }
.chip-flot .cal-dot { background: #fff3dc; }
.chip-flot.c1 { top: 70px; left: -34px; }
.chip-flot.c2 { top: -22px; right: -14px; animation-delay: -3s; }

/* ---------- Servicios: foto en cada tarjeta ---------- */
.svc-foto { margin: -28px -28px 4px; height: 168px; overflow: hidden; border-radius: 20px 20px 0 0; position: relative; }
.svc-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.svc-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(8, 53, 101, .25)); }
.svc:hover .svc-foto img { transform: scale(1.08); }
.svc.feature .svc-foto::after { background: linear-gradient(180deg, transparent 40%, rgba(8, 53, 101, .6)); }

/* ---------- Cómo funciona: banda con foto ---------- */
.foto-banda { position: relative; margin: 36px 0 0; border-radius: 26px; overflow: hidden; height: 340px; box-shadow: 0 24px 50px -28px rgba(8, 53, 101, .5); }
.foto-banda img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.foto-banda:hover img { transform: scale(1.04); }
.foto-banda::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 53, 101, .85) 0%, rgba(8, 53, 101, .35) 45%, transparent 75%); }
.foto-banda figcaption { position: absolute; z-index: 1; left: 36px; bottom: 36px; max-width: 360px; display: grid; gap: 6px; color: #fff; }
.foto-banda figcaption b { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; line-height: 1.1; }
.foto-banda figcaption span { opacity: .9; }

/* ---------- Tutores, resultados y lista de espera ---------- */
.foto-tutores, .wl-foto { border-radius: 24px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(8, 53, 101, .5); }
.foto-tutores img, .wl-foto img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.foto-tutores:hover img, .wl-foto:hover img { transform: scale(1.04); }
.testimonial-slot.con-foto { padding: 0 0 30px; overflow: hidden; border-style: solid; }
.testimonial-slot.con-foto > :not(.slot-foto) { margin-inline: 30px; }
.slot-foto { justify-self: stretch; height: 200px; overflow: hidden; }
.slot-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Colegios: foto de fondo ---------- */
.con-fondo { position: relative; overflow: hidden; isolation: isolate; }
.con-fondo .fondo-foto { position: absolute; inset: 0; z-index: -1; }
.con-fondo .fondo-foto img { width: 100%; height: 100%; object-fit: cover; opacity: .16; mix-blend-mode: luminosity; }

/* ---------- Encabezados de páginas internas ---------- */
.page-head.con-foto { position: relative; overflow: hidden; isolation: isolate; }
.ph-foto { position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 48%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); }
.ph-foto img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.page-head.con-foto .in > * { max-width: 620px; }

/* ---------- Cuenta: foto detrás del panel azul ---------- */
.av-foto { position: absolute; inset: 0; }
.av-foto img { width: 100%; height: 100%; object-fit: cover; opacity: .2; mix-blend-mode: luminosity; }

@media (max-width: 900px) {
  .hero-visual { margin-top: 4px; }
  .hero-foto { aspect-ratio: 16 / 11; border-radius: 22px; }
  .chip-flot { font-size: 13px; padding: 8px 12px 8px 8px; }
  .chip-flot .ok-dot, .chip-flot .cal-dot { width: 28px; height: 28px; }
  .chip-flot.c1 { top: 12px; left: 10px; }
  .chip-flot.c2 { top: auto; bottom: 12px; right: 10px; }
  .foto-banda { height: 260px; }
  .foto-banda figcaption { left: 20px; bottom: 20px; right: 20px; }
  .ph-foto { width: 100%; opacity: .14; -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 560px) {
  .svc-foto { height: 140px; }
}

/* ---------- Bienvenida en los espacios de alumno y tutor ---------- */
.bienvenida { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; min-height: 170px; display: flex; align-items: flex-end;
  padding: 26px; color: #fff; box-shadow: 0 20px 44px -26px rgba(8, 53, 101, .6); }
.bv-foto { position: absolute; inset: 0; z-index: -2; }
.bv-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.bienvenida:hover .bv-foto img { transform: scale(1.04); }
.bienvenida::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8, 53, 101, .95) 0%, rgba(8, 53, 101, .82) 45%, rgba(8, 53, 101, .35) 100%), linear-gradient(0deg, rgba(8, 53, 101, .5), transparent 70%); }
.bv-texto h1, .bv-texto p { text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
@media (max-width: 560px) { .bienvenida::before { background: linear-gradient(90deg, rgba(8, 53, 101, .94), rgba(8, 53, 101, .75)); } }
.bv-texto { display: grid; gap: 4px; max-width: 520px; }
.bv-texto h1 { color: #fff; margin: 0; }
.bv-texto p { margin: 0; opacity: .9; }
@media (max-width: 560px) { .bienvenida { min-height: 150px; padding: 20px; } }

/* ---------- Nosotros: foto de la fundadora ---------- */
#nosotros .about { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); column-gap: 56px; row-gap: 18px; align-items: start; }
#nosotros .founder { display: contents; }
#nosotros .founder > div:last-child { grid-column: 2; grid-row: 1; display: grid; gap: 14px; align-self: end; }
#nosotros .about-copy { grid-column: 2; grid-row: 2; }
.founder-foto { grid-column: 1; grid-row: 1 / span 2; position: relative; margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5;
  box-shadow: 0 30px 60px -30px rgba(8, 53, 101, .6); transform: rotate(-1.5deg); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.founder-foto:hover { transform: rotate(0) translateY(-4px); }
.founder-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.founder-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(8, 53, 101, .85)); }
.founder-foto figcaption { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 16px; display: grid; color: #fff; }
.founder-foto figcaption b { font-size: 18px; }
.founder-foto figcaption span { font-size: 13px; opacity: .9; }
.founder-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.founder-chips span { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: #e7f1f8; color: #266590; }
@media (max-width: 860px) {
  #nosotros .about { grid-template-columns: minmax(0, 1fr); }
  #nosotros .founder > div:last-child, #nosotros .about-copy, .founder-foto { grid-column: 1; grid-row: auto; }
  .founder-foto { max-width: 280px; }
}

/* ---------- Portada: selector IB / Universidad / Colegio (cada área con su color) ---------- */
body {
  --area-c: #317ba9; --area-c2: #083565; --area-soft: #e7f1f8; --area-glow: rgba(49, 123, 169, .22);
  transition: background-color .45s ease, color .45s ease;
}
/* Cada perfil redefine el sistema de color completo, no solo la portada. */
body[data-area="ib"] {
  --accent: #317ba9; --accent-2: #266590; --accent-soft: #e7f1f8; --navy: #083565;
  --bg-soft: #f3f7fa; --line: #dfe8ef; --sky: #cfe2ef; --band: #083565;
  --area-c: #317ba9; --area-c2: #083565; --area-soft: #e7f1f8; --area-glow: rgba(49, 123, 169, .22);
}
body[data-area="universidad"] {
  --accent: #6a4bc4; --accent-2: #5034a3; --accent-soft: #efeafc; --navy: #33206e;
  --bg-soft: #f7f4fd; --line: #e3dcf4; --sky: #d9cef4; --band: #33206e;
  --area-c: #6a4bc4; --area-c2: #33206e; --area-soft: #efeafc; --area-glow: rgba(106, 75, 196, .22);
}
body[data-area="colegio"] {
  --accent: #14946b; --accent-2: #0f7556; --accent-soft: #e3f6ee; --navy: #0b5a44;
  --bg-soft: #f1faf6; --line: #d5ebe2; --sky: #c8eadc; --band: #0b5a44;
  --area-c: #14946b; --area-c2: #0b5a44; --area-soft: #e3f6ee; --area-glow: rgba(20, 148, 107, .22);
}
.area-bar { grid-column: 1 / -1; display: flex; justify-content: center; margin-bottom: 8px; }
.area-switch { position: relative; display: inline-flex; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .9);
  border: 1px solid #dfe8ef; box-shadow: 0 1px 2px rgba(8, 53, 101, .06), 0 12px 32px -16px rgba(8, 53, 101, .35); backdrop-filter: blur(8px); }
.area-switch .as-ind { position: absolute; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 999px; background: var(--area-c);
  transform: translateX(var(--x, 6px)); width: var(--w, 0); box-shadow: 0 8px 18px -8px var(--area-c);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), width .4s cubic-bezier(.2, .8, .2, 1), background-color .4s ease; }
.area-switch button { position: relative; z-index: 1; border: 0; background: transparent; padding: 12px 26px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 600; color: #5b6b7d; white-space: nowrap; transition: color .3s ease; }
.area-switch button:hover { color: #0b2545; }
.area-switch button[aria-selected="true"] { color: #fff; }
.area-switch button:focus-visible { outline: 2px solid var(--area-c); outline-offset: 2px; }
/* Fondo y acentos de la portada según el área */
.hero { transition: background-color .5s ease; }
body[data-area] .hero { background:
  radial-gradient(60% 70% at 85% 30%, var(--area-glow), transparent 70%),
  radial-gradient(40% 50% at 10% 0%, var(--area-glow), transparent 70%),
  linear-gradient(180deg, var(--area-soft) 0%, #ffffff 100%); }
body[data-area] .hero h1 em { background-image: linear-gradient(90deg, var(--area-c), var(--area-c2)); }
body[data-area] .hero .btn-primary { background: var(--area-c); border-color: var(--area-c); box-shadow: 0 14px 26px -12px var(--area-c); }
body[data-area] .hero::after { background: radial-gradient(circle, var(--area-glow), transparent 70%); }
body[data-area] .hero .badge { border-color: var(--area-soft); }
body[data-area] .hero .trust b { color: var(--area-c); }
body[data-area] .chip-flot .ok-dot { background: var(--area-soft); color: var(--area-c); }
.hero h1, .hero .lede, .hero .badges, .hero .trust, .hero-foto img, #svcTitulo, #svcLede { transition: opacity .18s ease, transform .18s ease; }
body.cambiando-area .hero h1, body.cambiando-area .hero .lede, body.cambiando-area .hero .badges, body.cambiando-area .hero .trust,
body.cambiando-area .hero-foto img, body.cambiando-area #svcTitulo, body.cambiando-area #svcLede { opacity: 0; transform: translateY(6px); }
body:not([data-area="ib"]) .hero-visual .hero-foto { aspect-ratio: 4 / 3.6; }
[id$="Foto"], section.alt, footer, .eyebrow, .btn, .type .k, .step::before, .final .box {
  transition: background-color .45s ease, border-color .45s ease, color .45s ease, opacity .18s ease, transform .18s ease;
}
body.cambiando-area #procesoFoto, body.cambiando-area #tutoresFoto, body.cambiando-area #listaFoto,
body.cambiando-area #diagnosticoFoto, body.cambiando-area #expressFoto { opacity: 0; transform: scale(1.02); }
[data-areas][hidden] { display: none !important; }
@media (max-width: 560px) {
  .area-switch { width: 100%; }
  .area-switch button { flex: 1; padding: 11px 6px; font-size: 14.5px; }
}
body[data-area="colegio"] .svc[data-areas="colegio"] { order: -1; }
.hero .in { row-gap: 28px; }
body[data-area="universidad"] .svc[data-areas="universidad"] { order: -1; }
body[data-area] .svc.feature { background: linear-gradient(160deg, var(--area-c) 0%, var(--area-c2) 100%); }
body[data-area] .svc.feature .btn-primary { color: var(--area-c); }
.svc ul li b { font-weight: 700; }

/* ---------- Cursos que enseñamos: categorías a la izquierda, lista a la derecha ---------- */
.cursos-ui { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.cat-tabs { display: grid; gap: 4px; }
.cat-tabs button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 13px 16px;
  border: 0; border-radius: 12px; background: transparent; font-family: inherit; font-size: 16px; font-weight: 600; color: #5b6b7d; cursor: pointer;
  transition: background-color .2s ease, color .2s ease; }
.cat-tabs button small { font-size: 13px; font-weight: 700; min-width: 28px; text-align: center; padding: 2px 8px; border-radius: 99px; background: #eef3f7; color: #5b6b7d; }
.cat-tabs button:hover { background: #fff; color: #0b2545; }
.cat-tabs button[aria-selected="true"] { background: #fff; color: var(--area-c2, #083565); box-shadow: 0 1px 2px rgba(8, 53, 101, .06), 0 8px 20px -14px rgba(8, 53, 101, .4); }
.cat-tabs button[aria-selected="true"] small { background: var(--area-c, #317ba9); color: #fff; }
.cat-panel { background: #fff; border: 1px solid #dfe8ef; border-radius: 22px; padding: 28px 32px; min-height: 100%; animation: entrar .3s ease backwards; }
.cat-panel h3 { margin: 0 0 18px; font-size: 22px; letter-spacing: -0.01em; }
.lista-cursos { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
.lista-cursos li { break-inside: avoid; position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid #eef3f7; font-size: 15.5px; color: #0b2545; }
.lista-cursos li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--area-c, #317ba9); }
@media (max-width: 860px) {
  .cursos-ui { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cat-tabs { display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; margin-inline: -20px; padding: 2px 20px; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tabs button { flex: none; width: auto; padding: 10px 14px; font-size: 14.5px; background: #fff; border: 1px solid #dfe8ef; border-radius: 99px; }
  .cat-tabs button[aria-selected="true"] { background: var(--area-c, #317ba9); color: #fff; border-color: transparent; }
  .cat-tabs button[aria-selected="true"] small { background: rgba(255, 255, 255, .25); }
  .cat-panel { padding: 20px; border-radius: 18px; }
  .lista-cursos { columns: 1; }
}
