/* ============================================================================
   UNIVERSITAS — Design System
   Derivado de Portal Central (app.tuweb-ya.com). Misma gramática visual:
   minimalismo SaaS plano, un solo acento, mucho aire, esquinas suaves.
   Lo que cambia: el acento, el peso de la fotografía y la voz.

   Tokens muestreados del logotipo original, no estimados.
   ============================================================================ */

:root {
    --pc-brand-radius: 14px;

    /* Acento — azul marino del escudo UNIVERSITAS */
    --pc-accent:        #132043;
    --pc-accent-dark:   #0D1E3C;   /* navy del wordmark */
    --pc-accent-soft:   rgba(19, 32, 67, .08);
    --pc-accent-softer: rgba(19, 32, 67, .045);

    /* Secundario — bronce del laurel. CONDIMENTO, NO INGREDIENTE.
       Subrayados, viñetas de logro, separadores. NUNCA en botones ni fondos
       grandes: en cuanto crece se ve barato. */
    --edu-bronze:       #A75106;
    --edu-bronze-soft:  rgba(167, 81, 6, .10);

    /* Neutros */
    --pc-ink:     #0f172a;
    --pc-muted:   #64748b;
    --pc-border:  #e2e8f0;
    --pc-surface: #f8fafc;

    /* Apoyos */
    --pc-success:  #0ab39c;
    --pc-whatsapp: #25d366;
}

/* --- Base ------------------------------------------------------------------ */
body.public-site {
    background: #fff;
    color: var(--pc-ink);
    -webkit-font-smoothing: antialiased;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.public-site h1, .public-site h2, .public-site h3,
.public-site h4, .public-site h5 {
    color: var(--pc-ink);
    letter-spacing: -0.02em;
    font-weight: 700;
}
.public-site .text-muted { color: var(--pc-muted) !important; }
.card { border-radius: var(--pc-brand-radius); }

/* Espaciado generoso — más aire que Portal Central */
.py-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
@media (min-width: 992px) {
    .py-6 { padding-top: 6.5rem !important; padding-bottom: 6.5rem !important; }
}

/* --- Navbar: blanca translúcida con blur al hacer scroll ------------------- */
.public-site .navbar {
    background: rgba(255, 255, 255, .88) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent !important;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.public-site .navbar.is-scrolled {
    border-bottom-color: var(--pc-border) !important;
    box-shadow: 0 1px 12px rgba(15, 23, 42, .05);
}
.public-site nav.navbar ul.navbar-nav li.nav-item a.nav-link {
    display: flex !important;
    align-items: center !important;
    color: #475569 !important;
    font-size: .95rem !important;
    font-weight: 500 !important;
    padding: .55rem .9rem !important;
    transition: color .15s ease;
}
.public-site nav.navbar ul.navbar-nav li.nav-item a.nav-link:hover,
.public-site nav.navbar ul.navbar-nav li.nav-item a.nav-link.active {
    color: var(--pc-accent) !important;
}
.public-site .navbar-brand img { max-height: 46px; width: auto; }

@media (max-width: 991.98px) {
    .public-site .navbar .navbar-collapse {
        background: #fff;
        border: 1px solid var(--pc-border);
        border-radius: 12px;
        padding: .75rem 1rem;
        margin-top: .6rem;
        box-shadow: 0 .8rem 1.8rem rgba(15, 23, 42, .08);
    }
}

/* --- Hero a sangre con velo (la fotografía manda) -------------------------- */
.pc-hero-full {
    position: relative;
    width: 100%;
    min-height: clamp(480px, 82vh, 780px);
    background-size: cover;
    background-position: center right;
    display: flex;
    align-items: center;
}
.pc-hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(19, 32, 67, .88) 0%,
        rgba(19, 32, 67, .66) 45%,
        rgba(19, 32, 67, .14) 100%);
}
@media (max-width: 767.98px) {
    .pc-hero-veil { background: rgba(19, 32, 67, .74); }
}
.pc-hero-copy {
    position: relative;
    max-width: 660px;
    padding: 4.5rem 0;
    color: #fff;
}
.pc-hero-eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, .12);
    color: #dfe5f2;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    padding: .4rem 1rem;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.pc-hero-copy h1 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
}
.pc-hero-copy .pc-hero-sub {
    /* blanco al ~82%, nunca gris: sobre el acento el gris se ensucia */
    color: rgba(255, 255, 255, .82);
    font-size: 1.1rem;
    max-width: 36rem;
}
.pc-hero-trust { color: rgba(255, 255, 255, .62); font-size: .85rem; margin-top: 1.25rem; }

/* --- Botones --------------------------------------------------------------- */
.btn-pc-primary {
    background: var(--pc-accent);
    border: 1px solid var(--pc-accent);
    color: #fff;
    font-weight: 600;
    padding: .7rem 1.5rem;
    border-radius: 10px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-pc-primary:hover {
    background: #0b1730;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 .6rem 1.4rem rgba(19, 32, 67, .28);
}
.btn-pc-ghost {
    background: transparent;
    border: 1px solid var(--pc-border);
    color: var(--pc-ink);
    font-weight: 600;
    padding: .7rem 1.5rem;
    border-radius: 10px;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.btn-pc-ghost:hover {
    border-color: var(--pc-accent);
    color: var(--pc-accent);
    background: var(--pc-accent-softer);
}
.btn-pc-light {
    background: #fff; color: var(--pc-accent); font-weight: 700;
    border: 1px solid #fff; padding: .7rem 1.6rem; border-radius: 10px;
}
.btn-pc-light:hover { background: #e8ecf6; color: var(--pc-accent); }
.btn-pc-outline-light {
    background: transparent; color: #e6ebf7; font-weight: 600;
    border: 1px solid rgba(255,255,255,.45); padding: .7rem 1.6rem; border-radius: 10px;
}
.btn-pc-outline-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }

/* --- Secciones ------------------------------------------------------------- */
.public-section-label {
    color: var(--pc-accent);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.public-surface { background: var(--pc-surface); }

/* --- Tarjetas de programa -------------------------------------------------- */
.public-card {
    border: 1px solid var(--pc-border) !important;
    box-shadow: none !important;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.public-card:hover {
    transform: translateY(-4px);
    border-color: rgba(19, 32, 67, .35) !important;
    box-shadow: 0 1.2rem 2.4rem rgba(15, 23, 42, .09) !important;
}
.public-card-thumb {
    height: 180px;
    border-radius: calc(var(--pc-brand-radius) - 2px) calc(var(--pc-brand-radius) - 2px) 0 0;
    background: var(--pc-accent-softer);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.public-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Tarjeta grande del programa base: es la decisión de vida, va sola */
.edu-card-hero .public-card-thumb { height: 100%; min-height: 260px; border-radius: 0; }

/* Ficha de dato dentro de la tarjeta */
.edu-meta { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; font-size: .88rem; color: var(--pc-muted); }
.edu-meta i { color: var(--pc-accent); }

/* Precio: se muestra la colegiatura, NO el total.
   "$400 semanales" alguien se lo imagina pagando; "$24,000" la manda
   a cotizar a otra escuela. El total vive en la FAQ. */
.edu-price { font-size: 1.5rem; font-weight: 800; color: var(--pc-accent); line-height: 1; }
.edu-price small { font-size: .82rem; font-weight: 500; color: var(--pc-muted); }

/* Requisito de ingreso — va visible, nunca en letra chica */
.edu-requisito {
    display: flex; gap: .5rem; align-items: flex-start;
    background: var(--edu-bronze-soft);
    border-left: 3px solid var(--edu-bronze);
    border-radius: 8px;
    padding: .6rem .8rem;
    font-size: .86rem;
    color: #6b3a08;
}

/* --- Lista de documentos que se expiden (el argumento más desaprovechado) --- */
.edu-docs { list-style: none; padding: 0; margin: 0; }
.edu-docs li {
    display: flex; gap: .6rem; align-items: flex-start;
    padding: .45rem 0;
    border-bottom: 1px dashed var(--pc-border);
    font-size: .92rem;
}
.edu-docs li:last-child { border-bottom: 0; }
.edu-docs i { color: var(--edu-bronze); margin-top: .15rem; flex: 0 0 auto; }
.edu-docs .edu-doc-qty {
    background: var(--pc-accent); color: #fff;
    border-radius: 999px; font-size: .72rem; font-weight: 700;
    padding: .05rem .45rem; margin-right: .1rem;
}

/* --- Plan de estudios por módulos ----------------------------------------- */
.edu-modulos { list-style: none; padding: 0; margin: 0; counter-reset: modulo; }
.edu-modulos li {
    display: flex; gap: .9rem; align-items: flex-start;
    padding: .8rem 0;
    border-bottom: 1px solid var(--pc-border);
}
.edu-modulos li:last-child { border-bottom: 0; }
.edu-modulo-num {
    flex: 0 0 auto;
    width: 2rem; height: 2rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--pc-accent-soft);
    color: var(--pc-accent);
    font-weight: 700; font-size: .85rem;
}

/* --- Chips de valor -------------------------------------------------------- */
.public-feature-chip {
    display: flex; align-items: center; gap: .6rem;
    padding: .9rem 1rem;
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    background: #fff;
    font-weight: 600;
    transition: border-color .15s ease, transform .15s ease;
}
.public-feature-chip:hover { border-color: rgba(19,32,67,.4); transform: translateY(-2px); }
.public-feature-chip i { font-size: 1.15rem; color: var(--edu-bronze); }

/* --- Sello de acreditación (nunca en el hero: va donde ya hay duda) -------- */
.edu-badge-oficial {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--pc-border);
    border-left: 3px solid var(--edu-bronze);
    border-radius: 10px;
    background: #fff;
    padding: .55rem .9rem;
    font-size: .82rem;
    color: var(--pc-muted);
}
.edu-badge-oficial strong { color: var(--pc-ink); font-weight: 600; }

/* --- WhatsApp flotante ----------------------------------------------------- */
.edu-wa {
    position: fixed; right: 18px; bottom: 18px; z-index: 1040;
    display: inline-flex; align-items: center; gap: .55rem;
    background: var(--pc-whatsapp); color: #fff;
    border-radius: 999px;
    padding: .7rem 1.1rem;
    font-weight: 600; text-decoration: none;
    box-shadow: 0 .8rem 1.8rem rgba(37, 211, 102, .35);
    transition: transform .15s ease;
}
.edu-wa:hover { color: #fff; transform: translateY(-2px); }
.edu-wa i { font-size: 1.3rem; }
@media (max-width: 575.98px) { .edu-wa span { display: none; } .edu-wa { padding: .85rem; } }

/* --- Footer ---------------------------------------------------------------- */
.public-footer { background: var(--pc-surface); border-top: 1px solid var(--pc-border); }
.public-footer a { color: var(--pc-muted); text-decoration: none; }
.public-footer a:hover { color: var(--pc-accent); }
.public-footer .edu-legal { font-size: .78rem; color: var(--pc-muted); line-height: 1.7; }

/* --- Animación de entrada --------------------------------------------------
   Solo se ocultan los elementos si el JS cargó y agregó .pc-js al <html>.
   Sin JS, todo el contenido es visible. */
.pc-js .pc-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
.pc-js .pc-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .pc-js .pc-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------------------
   FOTOGRAFÍA
   La imagen del hero va como <img> detrás del velo, no como background:
   un background no acepta srcset y ésta es la imagen que debe cargar primero.
--------------------------------------------------------------------------- */
.pc-hero-full { background: var(--pc-accent); overflow: hidden; }
.pc-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
}
@media (max-width: 767.98px) {
    /* En vertical el encuadre útil está al centro, no a la derecha */
    .pc-hero-img { object-position: 60% center; }
}

/* Galería ------------------------------------------------------------------ */
.edu-foto {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: var(--pc-radius, 14px);
    overflow: hidden;
    background: var(--pc-surface);
    cursor: zoom-in;
}
.edu-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.edu-foto:hover img,
.edu-foto:focus-visible img { transform: scale(1.05); }
.edu-foto:focus-visible { outline: 3px solid var(--pc-accent); outline-offset: 3px; }

.edu-foto-lupa {
    position: absolute;
    right: .6rem;
    bottom: .6rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(19, 32, 67, .72);
    color: #fff;
    font-size: 1rem;
    opacity: 0;
    transition: opacity .25s ease;
}
.edu-foto:hover .edu-foto-lupa,
.edu-foto:focus-visible .edu-foto-lupa { opacity: 1; }

/* Visor: fondo oscuro y la foto entera, sin recorte */
#eduVisor .modal-content { background: transparent; border: 0; }
#eduVisor .modal-body { padding: 0; }
#eduVisor img {
    width: 100%;
    max-height: 86vh;
    object-fit: contain;
    border-radius: var(--pc-radius, 14px);
}
#eduVisor .btn-close {
    position: absolute;
    top: -2.6rem;
    right: 0;
    filter: invert(1) grayscale(1) brightness(2);
    opacity: .9;
}

@media (prefers-reduced-motion: reduce) {
    .edu-foto img { transition: none; }
    .edu-foto:hover img { transform: none; }
}
