/* ============================================================
   ACOMPAÑA-T — Home / Landing Page
   ============================================================ */

/* ── Body del home ── */
body.home-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Calibri', sans-serif;
    background: #f5f6f8;
    overflow-x: hidden;
}

/* Quitar padding del main-content en home */
body.home-body .main-container,
body.home-body #content.main-content {
    padding: 0 !important;
    background: transparent !important;
}

body.home-body .main-content .container {
    max-width: 100% !important;
    padding: 0 !important;
}

body.home-body #cancel-row {
    margin: 0 !important;
}

body.home-body .col-xl-12 {
    padding: 0 !important;
}

/* Orbes de fondo retirados: base neutra, sin glow decorativo */
.home-orb { display: none !important; }

/* ── Hero section ── */
.home-hero {
    position: relative;
    min-height: calc(100vh - 64px); /* descontar topbar */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    z-index: 1;
}

.home-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    width: 100%;
    animation: homeEntrance .6s cubic-bezier(.34,1.56,.64,1) both;
}

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

/* ── Badge ── */
.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 7px 18px;
    border-radius: 30px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    margin-bottom: 28px;
}

.home-badge i {
    color: #38662b;
    font-size: 14px;
}

/* ── Título principal ── */
.home-title {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 16px;
    line-height: 1.15;
    letter-spacing: -.5px;
}

.home-title-highlight {
    color: #38662b !important;
    position: relative;
}

/* ── Subtítulo ── */
.home-subtitle {
    font-size: 16px;
    color: #4b5563;
    margin: 0 0 32px;
    line-height: 1.7;
    font-weight: 400;
}

.home-subtitle strong {
    color: #1f2937;
    font-weight: 600;
}

/* ── Divisor ── */
.home-divider {
    width: 60px;
    height: 2px;
    background: #d6dae0;
    border-radius: 2px;
    margin: 0 auto 28px;
}

/* ── Label "¿Cómo deseas ingresar?" ── */
.home-select-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: .6px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

/* ── Cards de acceso ── */
.home-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.home-access-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px 28px;
    width: 300px;
    text-decoration: none !important;
    transition: all .28s cubic-bezier(.4,0,.2,1);
    text-align: left;
    cursor: pointer;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.home-access-card:hover {
    border-color: #c7ccd2;
    text-decoration: none !important;
}

/* Ícono */
.hac-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    background: #f4f6f8;
    border: 1px solid #e5e7eb;
    color: #38662b;
    transition: transform .28s;
}

.hac-admin   { color: #38662b; }
.hac-student { color: #38662b; }

.home-access-card:hover .hac-icon-wrap {
    background: #eaf4e6;
}

/* Texto */
.hac-body {
    flex: 1;
}

.hac-body h3 {
    color: #1f2937 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    margin: 0 0 5px !important;
    display: block !important;
}

.hac-body p {
    color: #6b7280;
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}

/* Flecha */
.hac-arrow {
    color: #9ca3af;
    font-size: 14px;
    transition: all .28s;
    flex-shrink: 0;
}

.home-access-card:hover .hac-arrow {
    color: #38662b;
    transform: translateX(4px);
}

/* ── Footer note ── */
.home-footer-note {
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: .3px;
    margin: 0;
}

.home-footer-note i {
    color: #38662b;
}

/* ============================================================
   ESTUDIANTE — Dashboard / Home
   ============================================================ */

/* ── Body override para la página home del estudiante ── */
body.est-home-body {
    background: #f5f6f8 !important;
}

body.est-home-body .main-container,
body.est-home-body #content.main-content {
    padding: 0 !important;
    background: transparent !important;
}

body.est-home-body .main-content .container {
    max-width: 100% !important;
    padding: 0 !important;
}

body.est-home-body #cancel-row {
    margin: 0 !important;
}

body.est-home-body .col-xl-12 {
    padding: 0 !important;
}

/* ── Hero section ── */
.est-hero {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    z-index: 1;
    overflow: hidden;
}

/* ── Contenido centrado ── */
.est-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 860px;
    width: 100%;
    animation: homeEntrance .6s cubic-bezier(.34,1.56,.64,1) both;
}

/* ── Título ── */
.est-title {
    font-size: clamp(22px, 3.5vw, 38px);
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 14px;
    line-height: 1.2;
    letter-spacing: -.4px;
}

/* ── Subtítulo ── */
.est-subtitle {
    font-size: 15px;
    color: #4b5563;
    margin: 0 0 28px;
    line-height: 1.7;
    font-weight: 400;
}

.est-subtitle strong {
    color: #1f2937;
    font-weight: 600;
}

/* ── Cards grid ── */
.est-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* ── Card individual ── */
.est-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 32px 24px 24px;
    width: 200px;
    text-decoration: none !important;
    transition: all .28s cubic-bezier(.4,0,.2,1);
    text-align: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.est-card:hover {
    border-color: #c7ccd2;
    text-decoration: none !important;
}

/* ── Ícono / imagen de la card ── */
.est-card-icon {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f8;
    border: 1px solid #e5e7eb;
    transition: transform .28s;
    overflow: hidden;
    flex-shrink: 0;
}

.est-card:hover .est-card-icon {
    background: #eaf4e6;
}

.est-card-icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

/* ── Etiqueta de la card ── */
.est-card-label {
    color: #1f2937 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    display: block !important;
    text-decoration: none !important;
    letter-spacing: .2px;
    line-height: 1.3;
}

.est-card:hover .est-card-label {
    color: #38662b !important;
}

/* ============================================================
   RESPONSIVE (OBS-04) — home admin / estudiante
   ============================================================ */
@media (max-width: 991px) {
    .home-hero, .est-hero { padding: 40px 20px; min-height: calc(100vh - 56px); }
    .home-cards { gap: 16px; }
    .est-cards { gap: 16px; }
}

@media (max-width: 768px) {
    .home-hero, .est-hero { padding: 28px 16px; }
    .home-cards { flex-direction: column; align-items: stretch; }
    .home-access-card { width: 100%; }
    .est-card { width: calc(50% - 8px); min-width: 140px; padding: 24px 16px 18px; }
    .est-card-icon { width: 68px; height: 68px; }
}

@media (max-width: 480px) {
    .est-cards { flex-direction: column; align-items: stretch; }
    .est-card { width: 100%; }
}

/* ============================================================
   LANDING PÚBLICO (lp-) — rediseño institucional
   ============================================================ */
.lp {
    --lp-green: #38662b;
    --lp-green-dark: #24481b;
    --lp-green-soft: #eaf1e6;
    --lp-gold: #c79a2e;
    --lp-ink: #1f2937;
    --lp-muted: #5b6470;
    --lp-line: #e4e7ea;
    --lp-page: #eef0f1;
    --lp-surface: #ffffff;

    background: var(--lp-page);
    color: var(--lp-ink);
    font-family: 'Inter', 'Open Sans', sans-serif;
    padding-bottom: 0;
}

.lp section,
.lp .lp-foot { margin: 0 auto; }

body.is-landing { background: #eef0f1; overflow-x: hidden; }
body.is-landing #content.main-content { margin-top: 0; margin-bottom: 0; }

/* ── HERO ── */
.lp-hero {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: center;
}

.lp-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.lp-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(23,52,16,.12) 0%, rgba(18,42,12,.62) 100%),
        linear-gradient(100deg, rgba(23,52,16,.95) 0%, rgba(29,60,21,.90) 52%, rgba(34,66,25,.82) 100%);
}

.lp-hero-wrap {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 24px 56px;
}

.lp-hero-inner {
    max-width: 560px;
}

.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .9px;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 30px;
    margin-bottom: 22px;
}

.lp-badge i { color: var(--lp-gold) !important; -webkit-text-fill-color: var(--lp-gold) !important; font-size: 13px; }

.lp-hero-title {
    font-size: clamp(30px, 4.4vw, 50px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.6px;
    color: #fff;
    margin: 0 0 16px;
}

.lp-hl {
    color: #f3c84c !important;
    -webkit-text-fill-color: #f3c84c !important;
    position: relative;
    white-space: nowrap;
}

.lp-hl::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 4px;
    border-radius: 3px;
    background: var(--lp-gold);
}

.lp-hero-sub {
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.55;
    color: rgba(255,255,255,.92);
    margin: 0 0 16px;
    font-weight: 500;
}

.lp-hero-lead {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255,255,255,.78);
    margin: 0;
    max-width: 440px;
}

.lp-hero-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 56%;
    background-image:
        linear-gradient(to bottom, rgba(0,0,0,0) 48%, rgba(18,42,12,.86) 100%),
        linear-gradient(90deg, rgba(19,44,13,.99) 0%, rgba(21,48,15,.90) 18%, rgba(23,52,17,.52) 52%, rgba(25,55,19,.24) 100%),
        url('/assets/img/hero-colegio.webp');
    background-size: cover, cover, cover;
    background-position: center, center, right center;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, #000 24%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, #000 24%);
    pointer-events: none;
}

/* ── Contenedor común de secciones ── */
.lp-modules,
.lp-access {
    max-width: 1180px;
    padding-left: 24px;
    padding-right: 24px;
}

/* ── KPIs (montados sobre el hero) ── */
.lp-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 46px;
}

.lp-kpi {
    background: rgba(16,38,10,.46);
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 14px;
    padding: 22px 20px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.20);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.lp-kpi-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.16);
    color: var(--lp-gold);
    font-size: 20px;
}

.lp-kpi-num {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: var(--lp-gold);
    letter-spacing: -1px;
}

.lp-kpi-unit { font-size: 22px; font-weight: 700; margin-left: 2px; color: var(--lp-gold); }

.lp-kpi-label {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.85);
    font-weight: 500;
    line-height: 1.35;
}

/* ── Encabezado de sección ── */
.lp-section-head { text-align: center; margin: 0 auto 28px; max-width: 640px; }

.lp-section-head h2 {
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 800;
    color: var(--lp-ink);
    letter-spacing: -.4px;
    margin: 0;
    margin-top:50px;
}

.lp-section-head p {
    margin: 10px 0 0;
    font-size: 15px;
    color: var(--lp-muted);
    line-height: 1.55;
}

/* ── Módulos ── */
.lp-modules { margin-top: 100px; }

.lp-module-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.lp-module {
    background: var(--lp-green);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 8px 22px rgba(16,32,12,.13);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.lp-module-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.14);
    color: var(--lp-gold);
    font-size: 22px;
    margin-bottom: 16px;
}

.lp-module h3 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 7px;
}

.lp-module p {
    font-size: 13.5px;
    color: rgba(255,255,255,.82);
    line-height: 1.55;
    margin: 0;
}

/* ── Acceso ── */
.lp-access { margin-top: 80px; }

.lp-access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    max-width: 900px;
    margin: 0 auto;
}

.lp-access-card {
    display: flex;
    align-items: center;
    gap: 22px;
    background: var(--lp-surface);
    border: 1px solid var(--lp-line);
    border-radius: 18px;
    padding: 32px 34px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(16,32,12,.07);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.lp-access-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lp-green);
    color: #fff;
    font-size: 29px;
    flex-shrink: 0;
}

.lp-access-body { flex: 1; }

.lp-access-body h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--lp-ink) !important;
    margin: 0 0 6px;
}

.lp-access-body p {
    font-size: 13.5px;
    color: var(--lp-muted);
    line-height: 1.5;
    margin: 0;
}

.lp-access-arrow {
    color: #aab0b7;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform .25s ease, color .25s ease;
}

/* ── Pie ── */
.lp-foot {
    text-align: center;
    margin-top: 56px;
    padding-bottom: 34px;
    font-size: 12.5px;
    color: #8a929b;
    letter-spacing: .2px;
}

.lp-foot i { color: var(--lp-green); margin-right: 4px; }

/* ── Hover (borde + sombra + elevación) ── */
.lp-kpi:hover {
    border-color: rgba(255,255,255,.42);
    background: rgba(16,38,10,.62);
    box-shadow: 0 12px 26px rgba(0,0,0,.26);
    transform: translateY(-2px);
}

.lp-module:hover {
    border-color: var(--lp-gold);
    background: var(--lp-green-dark);
    box-shadow: 0 14px 28px rgba(16,32,12,.22);
    transform: translateY(-2px);
}

.lp-access-card:hover {
    border-color: var(--lp-green);
    background: #fbfdfa;
    box-shadow: 0 16px 32px rgba(16,32,12,.16);
    transform: translateY(-3px);
}

.lp-access-card:hover .lp-access-arrow { color: var(--lp-green); transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
    .lp-kpi, .lp-module, .lp-access-card, .lp-access-arrow, .lp-hero-bg { transition: none; }
    .lp-kpi:hover, .lp-module:hover, .lp-access-card:hover { transform: none; }
    .lp-access-card:hover .lp-access-arrow { transform: none; }
}

/* ── Nav superior (solo landing) ── */
.lp-topnav { gap: 2px; }

.lp-topnav a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .2px;
    padding: 6px 14px;
    border-radius: 8px;
    transition: color .2s ease, background .2s ease;
}

.lp-topnav a:hover { color: #fff; background: rgba(255,255,255,.14); }

html { scroll-behavior: smooth; }

/* ── Reveal al entrar en viewport ── */
.lp-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
    will-change: opacity, transform;
}
.lp-reveal.lp-shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .lp-topnav a { transition: none; }
    html { scroll-behavior: auto; }
    .lp-reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ── Responsive ── */
@media (max-width: 980px) {
    .lp-hero {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
    }
    .lp-hero-photo {
        position: relative;
        width: 100%;
        height: 200px;
        margin: 0;
        background-image:
            linear-gradient(180deg, rgba(19,44,13,.28) 0%, rgba(19,44,13,.72) 100%),
            url('/assets/img/hero-colegio.webp');
        background-size: cover, cover;
        background-position: center, center;
        background-repeat: no-repeat;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .lp-hero-wrap { padding: 32px 20px 36px; }
    .lp-hero-inner { max-width: none; }
    .lp-hero-text { text-align: center; }
    .lp-hero-lead { margin-left: auto; margin-right: auto; }
    .lp-kpis { grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 30px; }
    .lp-module-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .lp-hero-photo { height: 180px; }
    .lp-hero-wrap { padding: 28px 16px 32px; }
    .lp-kpis { gap: 12px; }
    .lp-kpi { padding: 18px 14px; }
    .lp-kpi-icon { width: 40px; height: 40px; font-size: 17px; margin-bottom: 10px; }
    .lp-kpi-num { font-size: 28px; }
    .lp-kpi-unit { font-size: 18px; }
    .lp-kpi-label { font-size: 12px; }
    .lp-modules, .lp-access { padding-left: 16px; padding-right: 16px; }
    .lp-access-grid { grid-template-columns: 1fr; }
    .lp-modules, .lp-access { margin-top: 44px; }
    .lp-section-head h2 { margin-top: 0; }
    .lp-module { padding: 22px 20px; }
}

@media (max-width: 520px) {
    .lp-hero-photo { height: 160px; }
    .lp-hero-wrap { padding: 24px 16px 28px; }
    .lp-hero-title { font-size: clamp(25px, 7vw, 34px); }
    .lp-kpis { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
    .lp-kpi { padding: 18px 20px; }
    .lp-module-grid { grid-template-columns: 1fr; }
    .lp-access-card { padding: 20px; gap: 16px; }
    .lp-access-icon { width: 56px; height: 56px; font-size: 24px; }
    .lp-access-body h3 { font-size: 18px; }
}

/* ── Topbar móvil del landing ── */
body.is-landing .tabMobileView { display: none !important; }

@media (max-width: 767px) {
    body.is-landing .admin-topbar {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }
    body.is-landing .admin-topbar .admin-brand {
        flex: 0 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
    }
    body.is-landing .admin-topbar .admin-brand-separator,
    body.is-landing .admin-topbar .admin-brand-text { display: none; }
    body.is-landing .admin-topbar > div:last-child {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }
    body.is-landing .admin-topbar > div:last-child img { height: 32px; }
}
