/* ==========================================================================
   CEP Academy — public site
   Palette taken from the logo: navy, cyan and purple.
   ========================================================================== */

:root {
    --cep-navy: #1b3a6b;
    --cep-navy-dark: #142c52;
    --cep-cyan: #29abe2;
    --cep-cyan-dark: #1f8fbe;
    --cep-purple: #92278f;
    --cep-ink: #1c1d1f;
    --cep-muted: #6a6f73;
    --cep-line: #e4e8eb;
    --cep-bg-soft: #f7f9fa;

    --bs-primary: #29abe2;
    --bs-primary-rgb: 41, 171, 226;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    color: var(--cep-ink);
    background: #fff;
}

a { color: var(--cep-navy); text-decoration: none; }
a:hover { color: var(--cep-cyan); }

/* ------------------------------------------------------------------ buttons */
.btn-cep {
    background: var(--cep-cyan);
    border: 1px solid var(--cep-cyan);
    color: #fff;
    font-weight: 600;
    border-radius: 4px;
}
.btn-cep:hover { background: var(--cep-cyan-dark); border-color: var(--cep-cyan-dark); color: #fff; }

.btn-cep-outline {
    background: transparent;
    border: 1px solid var(--cep-navy);
    color: var(--cep-navy);
    font-weight: 600;
    border-radius: 4px;
}
.btn-cep-outline:hover { background: var(--cep-navy); color: #fff; }

.btn-cep-dark {
    background: var(--cep-navy);
    border: 1px solid var(--cep-navy);
    color: #fff;
    font-weight: 600;
    border-radius: 4px;
}
.btn-cep-dark:hover { background: var(--cep-navy-dark); border-color: var(--cep-navy-dark); color: #fff; }

/* ------------------------------------------------------------------ header */
.cep-header {
    background: #fff;
    border-bottom: 1px solid var(--cep-line);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.cep-header .navbar-brand img { height: 40px; width: auto; }

.cep-search .form-control {
    border-radius: 999px 0 0 999px;
    border: 1px solid var(--cep-ink);
    border-right: 0;
    padding-left: 1rem;
}
.cep-search .btn {
    border-radius: 0 999px 999px 0;
    border: 1px solid var(--cep-ink);
    border-left: 0;
    background: #fff;
}
.cep-search .form-control:focus { box-shadow: none; border-color: var(--cep-cyan); }

.cep-nav-link {
    color: var(--cep-ink);
    font-size: .9rem;
    font-weight: 500;
    padding: .5rem .75rem;
}
.cep-nav-link:hover { color: var(--cep-cyan); }

/* ------------------------------------------------------------------ hero */
.cep-hero {
    background: linear-gradient(135deg, var(--cep-navy) 0%, var(--cep-navy-dark) 55%, var(--cep-purple) 140%);
    color: #fff;
    padding: 4.5rem 0;
}
.cep-hero h1 { font-weight: 700; line-height: 1.2; }
.cep-hero p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; }

/* ------------------------------------------------------------------ WhatsApp float */
/* Verde oficial de WhatsApp; el boton se levanta un poco al pasar el cursor y respeta el
   area segura del iPhone para no quedar bajo la barra del navegador. */
.wa-float {
    position: fixed;
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 1030;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 22px rgba(16, 28, 48, .28);
    transition: transform .18s ease, box-shadow .18s ease;
}
.wa-float:hover,
.wa-float:focus-visible {
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 28px rgba(16, 28, 48, .34);
}
.wa-float svg { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) {
    .wa-float { transition: none; }
    .wa-float:hover, .wa-float:focus-visible { transform: none; }
}

/* ------------------------------------------------------------------ hero banner */
/* The banner sits under the same navy gradient the plain hero uses, heavier on the left
   where the title lives, so any photo stays legible without asking the photo's permission. */
.cep-hero.con-banner {
    background-size: cover;
    background-position: center;
}

/* ------------------------------------------------------------- institutional site */
/* ------------------------------------------------------------------------- logo wall */
/* Cada marca con sus colores: son de terceros y desaturarlas para que la fila combine no
   nos corresponde (Alexander, 2026-08-09). La unidad la da la retícula, no un filtro.
   Celda de tamaño fijo, no alto fijo: con `height` a secas, un logo apaisado como Liebherr
   choca antes con el ancho máximo y acaba pintándose a menos de la mitad de alto que uno
   cuadrado. Cada logo se ajusta dentro de la misma caja y la fila se ve pareja. */
.client-wall img {
    width: 150px;
    height: 54px;
    object-fit: contain;
    transition: transform .2s ease;
}
/* Solo se anima el que lleva enlace: insinúa que se puede pulsar, sin tocar el color. */
.client-wall a:hover img { transform: scale(1.06); }

/* The three ways to take a course, straight from the CEP's own language. */
.modality-card {
    display: block;
    height: 100%;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--cep-line);
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.modality-card:hover {
    box-shadow: 0 10px 26px rgba(16, 28, 48, .10);
    transform: translateY(-3px);
    border-color: var(--cep-cyan);
    color: inherit;
}
.modality-card .icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--cep-bg-soft);
    color: var(--cep-navy);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.modality-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.modality-card p { font-size: .9rem; color: var(--cep-muted); margin-bottom: 0; }

/* Three cards, not three full-width rows: the photos are 500 px wide at source,
   so anything bigger than a third of the container shows them upscaled. */
.pillar-card {
    background: #fff;
    border: 1px solid rgba(27, 58, 107, .1);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(16, 28, 48, .05);
}

.pillar-img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
}

/* Facility gallery */
.facility-shot {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 16 / 10;
}
.facility-shot img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.facility-shot:hover img { transform: scale(1.06); }
.facility-shot .caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.6rem .7rem .55rem;
    color: #fff;
    font-size: .8rem;
    background: linear-gradient(transparent, rgba(16, 28, 48, .8));
}

/* -------------------------------------------------------- cinematic hero (GSAP) */
/* Layer order: image, grade, copy. The image wrapper is what the scroll
   scales (the push-in); the <img> itself is what the intro zoom settles — two transforms
   that never fight. The blurred data-URI placeholder behind the <img> paints the very
   first frame, so the opening never flashes white. */
.cine-hero {
    position: relative;
    min-height: min(92svh, 860px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--cep-navy);
    color: #fff;
}

.cine-bg { position: absolute; inset: 0; will-change: transform; }
.cine-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% 30%;
    display: block;
    position: absolute;
    inset: 0;
    will-change: transform;
}

.cine-grade {
    position: absolute;
    inset: 0;
    opacity: .8;
    background:
        linear-gradient(100deg, rgba(16, 28, 48, .88) 0%, rgba(16, 28, 48, .55) 42%, rgba(16, 28, 48, .08) 70%),
        linear-gradient(rgba(16, 28, 48, .25), transparent 30%, transparent 62%, rgba(16, 28, 48, .78));
}

.cine-content { position: relative; z-index: 2; padding: 14vh 0 12vh; }

.cine-title { font-weight: 800; line-height: 1.06; letter-spacing: -.02em; text-wrap: balance; }
.cine-line { display: block; overflow: hidden; }
.cine-line > span { display: inline-block; will-change: transform; }

.cine-sub {
    color: rgba(255, 255, 255, .88);
    font-size: 1.1rem;
    max-width: 34rem;
    text-shadow: 0 1px 18px rgba(11, 21, 38, .6);
}

.cine-scroll {
    position: absolute;
    left: 50%;
    bottom: 9vh;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, .75);
    animation: cine-nudge 2.2s ease-in-out infinite;
}
@keyframes cine-nudge {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 9px); }
}

@media (max-width: 767.98px) {
    .cine-hero { min-height: 88svh; }
    .cine-scroll { bottom: 7vh; }
}

@media (prefers-reduced-motion: reduce) {
    .cine-scroll { animation: none; }
}

/* ------------------------------------------------------------- home parallax (GSAP) */
/* The frames clip their image; GSAP scales the image down from 1.3 to 1 as the user
   scrolls, so each photo "opens up" inside its frame. Everything animates with
   transforms only — no layout shifts, no reflow. */
.showcase { overflow: hidden; }

.showcase-frame {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 4 / 3;
    display: block;
    position: relative;
    background: var(--cep-bg-soft);
}

.showcase-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.3);
    will-change: transform;
}

.showcase-frame .caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2rem 1rem .8rem;
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    background: linear-gradient(transparent, rgba(16, 28, 48, .85));
}

/* Cards float in as they enter; GSAP drives the transition. */
.reveal-up { opacity: 0; transform: translateY(28px); }

/* Without JavaScript — or when the visitor asks for less motion — everything is simply
   visible: the animation is decoration, never a requirement. */
@media (prefers-reduced-motion: reduce) {
    .reveal-up { opacity: 1; transform: none; }
    .showcase-frame img { transform: none; }
}

/* ------------------------------------------------------------------ course card */
.course-card {
    border: 1px solid var(--cep-line);
    border-radius: 6px;
    background: #fff;
    height: 100%;
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
}
.course-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); transform: translateY(-2px); }

.course-card .thumb {
    aspect-ratio: 16 / 9;
    background: var(--cep-bg-soft) center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cep-muted);
}
.course-card .card-body { padding: .85rem; }
.course-card .title {
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.3;
    color: var(--cep-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.course-card .meta { font-size: .78rem; color: var(--cep-muted); }
.course-card .price { font-weight: 700; font-size: 1rem; color: var(--cep-ink); }

.rating-stars { color: #e59819; font-size: .8rem; }

.badge-modality {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: .2rem .45rem;
    border-radius: 3px;
}
.badge-online { background: #e6f5fc; color: var(--cep-cyan-dark); }
.badge-workshop { background: #f4e8f4; color: var(--cep-purple); }
.badge-live { background: #e6f4fb; color: var(--cep-navy); }

/* ------------------------------------------------------------------ category chips */
.category-chip {
    display: inline-block;
    border: 1px solid var(--cep-line);
    border-radius: 999px;
    padding: .45rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--cep-ink);
    background: #fff;
}
.category-chip:hover { border-color: var(--cep-cyan); color: var(--cep-cyan); }

/* ------------------------------------------------------------------ sections */
.section-title { font-weight: 700; font-size: 1.5rem; }

/* ------------------------------------------------------------------ auth card */
.auth-wrap {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    background: var(--cep-bg-soft);
    padding: 2.5rem 0;
}
.auth-card {
    background: #fff;
    border: 1px solid var(--cep-line);
    border-radius: 8px;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}
.auth-card .logo { height: 48px; margin-bottom: 1.25rem; }

/* ------------------------------------------------------------------ footer */
.cep-footer {
    background: var(--cep-navy-dark);
    color: rgba(255, 255, 255, .8);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}
.cep-footer a { color: rgba(255, 255, 255, .8); }
.cep-footer a:hover { color: #fff; }
.cep-footer h6 { color: #fff; font-weight: 700; margin-bottom: .9rem; }
.cep-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .15);
    margin-top: 2rem;
    padding-top: 1.25rem;
    font-size: .85rem;
}

/* ------------------------------------------------------------------ live edition sales page */
/* Class agenda: the schedule a live edition sells instead of a lesson accordion. */
.agenda-clases { list-style: none; margin: 0; padding: 0; }
.agenda-clase {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    background: #fff;
    border: 1px solid var(--cep-line);
    border-radius: 8px;
    padding: .8rem 1rem;
    margin-bottom: .5rem;
}
.agenda-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cep-cyan);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}
.agenda-tema { font-weight: 600; color: var(--cep-ink); }
.agenda-horario { font-size: .85rem; color: var(--cep-muted); }

/* "Próximas ediciones": sibling runs the visitor can jump to. */
.proxima-edicion {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff;
    border: 1px solid var(--cep-line);
    border-radius: 8px;
    padding: .6rem .8rem;
    margin-bottom: .5rem;
    text-decoration: none;
    color: var(--cep-ink);
}
.proxima-edicion:hover { border-color: var(--cep-cyan); }
.proxima-fecha {
    flex-shrink: 0;
    width: 48px;
    text-align: center;
    background: #e6f5fc;
    border-radius: 6px;
    padding: .3rem 0;
}
.proxima-dia {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.1;
    color: var(--cep-navy);
}
.proxima-mes {
    display: block;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--cep-cyan-dark);
}
.proxima-titulo { display: block; font-weight: 600; font-size: .9rem; }
.proxima-precio { display: block; font-size: .8rem; color: var(--cep-muted); }

/* ------------------------------------------------------------- cuentas bancarias */
/* Ficha de una cuenta en el checkout. El número va destacado porque es el único dato que el
   alumno no puede deducir, y el que más caro sale teclear mal. */
.bank-card {
    border: 1px solid var(--cep-line);
    border-left: 3px solid var(--cep-cyan);
    border-radius: 8px;
    padding: 1rem 1.15rem;
    background: #fff;
}

.bank-number {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cep-navy);
    background: rgba(41, 171, 226, .08);
    padding: .25rem .6rem;
    border-radius: 5px;
    letter-spacing: .03em;
}

/* ------------------------------------------------------------- video de presentación */
/* La miniatura hace de portada del video: se pulsa y el iframe la sustituye. */
.preview-video { cursor: pointer; }
/* Ya reproduciendo: sigue siendo el mismo contenedor —y por eso conserva la clase, que es
   la que dimensiona el iframe—, pero deja de invitar a pulsar. */
.preview-video.reproduciendo { cursor: default; }

.preview-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .92);
    color: var(--cep-navy);
    font-size: 2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(16, 28, 48, .3);
    transition: transform .18s ease, background .18s ease;
}
.preview-video:hover .preview-play { transform: scale(1.08); background: #fff; }

.preview-label {
    position: absolute;
    left: 0; right: 0; bottom: .55rem;
    text-align: center;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
    pointer-events: none;
}

.preview-video iframe { width: 100%; height: 100%; border: 0; display: block; }
