:root { --brand-dark: #0b3a8f; --brand: #1d6fe8; --surface: #f4f7fb; }

.public-body { background: var(--surface); }
img { max-width: 100%; }
a { color: var(--brand); }
.text-brand-dark { color: var(--brand-dark) !important; }
.min-w-0 { min-width: 0; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(29, 111, 232, .18); }
.site-header { z-index: 1030; }
.nav-link.active { color: var(--brand) !important; font-weight: 600; }

/* Hero */
.hero { background: linear-gradient(155deg, var(--brand-dark) 0%, var(--brand) 100%); }
.hero-search { max-width: 1080px; margin: 0 auto; border-radius: 16px; }

/* Estadísticas */
.stats-strip { background: #fff; border-bottom: 1px solid #e3e9f2; }
.stat-number { font-size: 1.9rem; font-weight: 700; color: var(--brand-dark); }

/* Tarjetas */
.job-card, .company-card { border: 1px solid #e3e9f2; border-radius: 14px; transition: box-shadow .15s, transform .15s, border-color .15s; }
.job-card:hover, .company-card:hover { box-shadow: 0 8px 22px rgba(11, 58, 143, .1); transform: translateY(-2px); border-color: #c5d6f2; }
.job-card--featured { border-color: #f5c451; }
.card-link-inner { position: relative; z-index: 2; }
.company-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid #e3e9f2; padding: 4px; flex: 0 0 auto; }
.company-logo--lg { width: 72px; height: 72px; }
.company-logo--xl { width: 96px; height: 96px; }
.badge-soft { background: #e8f0fe; color: var(--brand-dark); font-weight: 500; }

.category-tile { display: flex; flex-direction: column; gap: .15rem; padding: 1rem; background: #fff; border: 1px solid #e3e9f2; border-radius: 12px; color: inherit; text-decoration: none; height: 100%; transition: border-color .15s, box-shadow .15s; }
.category-tile:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(29, 111, 232, .12); }
.category-tile .bi { font-size: 1.5rem; color: var(--brand); }

.cta-card { padding: 2rem; border-radius: 16px; }
.cta-card--light { background: #e8f0fe; color: var(--brand-dark); }
.cta-card--dark { background: var(--brand-dark); color: #fff; }

/* Filtros y resultados */
.filters-card { background: #fff; border: 1px solid #e3e9f2; border-radius: 14px; padding: 1.25rem; }
@media (max-width: 991.98px) { .filters-card { border: 0; padding: 0; } }
#job-results { transition: opacity .15s; min-height: 200px; }
#job-results.is-loading { opacity: .45; pointer-events: none; }
.empty-state { background: #fff; border: 1px dashed #c9d5e6; border-radius: 14px; padding: 3rem 1rem; }

/* Detalle */
.job-list { padding-left: 1.1rem; }
.job-list li { margin-bottom: .35rem; }
.job-facts { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; }
.job-facts dt { color: #64748b; font-weight: 500; }
.job-facts dd { margin: 0; text-align: right; }
.mobile-apply { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; background: #fff; border-top: 1px solid #e3e9f2; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); }
@media (max-width: 991.98px) { main { padding-bottom: 4.5rem; } }

/* Blog y contenido */
.post-thumb { height: 170px; object-fit: cover; }
.prose { line-height: 1.75; overflow-wrap: anywhere; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose table { display: block; overflow-x: auto; max-width: 100%; }
.prose h2, .prose h3 { margin-top: 1.75rem; }

/* Footer */
.site-footer { background: #0a2a66; color: #cbd5e1; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer li { margin-bottom: .4rem; }
.footer-title { color: #fff; font-weight: 600; }
.footer-social { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.footer-bottom { background: rgba(0, 0, 0, .2); }

.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-justify { text-align: justify; }
.prose blockquote { border-left: 4px solid #c5d6f2; padding-left: 1rem; color: #475569; }

/* ── Vista móvil tipo app (< 992px) ─────────────────────────────── */
.app-tabbar, .app-home { display: none; }
@media (max-width: 991.98px) {
    .site-header .navbar-toggler, .site-header #mainNav { display: none !important; }
    .site-header .navbar { --bs-navbar-padding-y: .35rem; }
    main { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
    .site-footer { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
    .mobile-apply { bottom: calc(3.9rem + env(safe-area-inset-bottom)); padding-bottom: .75rem; }

    /* Barra inferior */
    .app-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; background: var(--brand-dark); color: #fff;
        padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(5, 25, 70, .25); }
    .app-tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .1rem; background: none; border: 0; padding: .15rem 0;
        color: rgba(255, 255, 255, .65); text-decoration: none; font-size: .66rem; line-height: 1.1; letter-spacing: -.01em; }
    .app-tab.is-active .app-tab__icon { text-shadow: 0 0 .5px #fff; }
    .app-tab.is-active, .app-tab:hover, .app-tab:focus-visible { color: #fff; }
    .app-tab__icon { position: relative; display: grid; place-items: center; height: 1.9rem; font-size: 1.45rem; }
    .app-tab__dot { position: absolute; top: .05rem; right: -.35rem; width: .6rem; height: .6rem; border-radius: 50%; background: #f0607e; border: 2px solid var(--brand-dark); box-sizing: content-box; }
    .app-avatar { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #fff; color: var(--brand-dark); font-size: .85rem; font-weight: 700; }
    .app-tab__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

    /* Menú lateral */
    .app-menu__head { background: var(--brand-dark); color: #fff; }
    .app-menu .list-group-item { display: flex; align-items: center; gap: .8rem; padding: .95rem 1.1rem; font-size: 1rem; color: #1e293b; }
    .app-menu .list-group-item i { color: var(--brand); font-size: 1.2rem; }

    /* Portada */
    .app-home { display: block; background: var(--surface); margin-bottom: -4.75rem; padding-bottom: 5.5rem; min-height: calc(100vh - 0px); }
    .app-home__top { background: var(--brand-dark); color: #fff; padding: calc(1.25rem + env(safe-area-inset-top)) 1rem 3.25rem; text-align: center; }
    .app-home__brand { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.5rem; text-decoration: none; }
    .app-home__brand img { max-width: 220px; height: auto; max-height: 48px; object-fit: contain; }
    .app-home__tagline { margin: 1.1rem 0 1rem; font-size: 1.15rem; }
    .app-search { position: relative; margin: 0 .5rem; }
    .app-search .bi { position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%); color: var(--brand-dark); font-size: 1.15rem; pointer-events: none; }
    .app-search input { width: 100%; border: 0; border-radius: 999px; background: #fff; color: #0f172a; padding: .85rem 1.2rem .85rem 3rem; font-size: 1.05rem; text-align: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
    .app-search input:focus { outline: 3px solid rgba(255, 255, 255, .45); text-align: left; }
    .app-notice { position: relative; display: flex; align-items: center; gap: .9rem; text-align: left; margin: 1.1rem .25rem 0; padding: 1rem 2.4rem 1rem 1rem;
        background: #e9eef7; color: var(--brand-dark); border-radius: 16px; text-decoration: none; font-size: .95rem; line-height: 1.35; }
    .app-notice[hidden] { display: none; }
    .app-notice > .bi { font-size: 1.5rem; flex: 0 0 auto; }
    .app-notice__close { position: absolute; top: .25rem; right: .5rem; background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--brand-dark); padding: .25rem .4rem; }
    .app-chips { display: flex; gap: .45rem; margin: 1.3rem 0 0; overflow-x: auto; scrollbar-width: none; padding: .1rem; }
    .app-chips::-webkit-scrollbar { display: none; }
    .app-chip { flex: 1 1 auto; border: 0; border-radius: 14px; padding: .75rem .45rem; background: rgba(255, 255, 255, .14); color: #fff; font-size: .86rem; white-space: nowrap; }
    .app-chip.is-active { background: #0a63b8; font-weight: 600; }
    .app-panels { margin-top: -2.1rem; padding: 0 .85rem; position: relative; }
    .app-panel[hidden] { display: none; }
    .app-row { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: 16px; padding: 1.05rem 1rem; margin-bottom: .85rem; color: inherit; text-decoration: none; box-shadow: 0 3px 12px rgba(15, 40, 100, .09); }
    .app-row__icon { color: #8a97ad; font-size: 1.3rem; flex: 0 0 auto; }
    .app-row__logo { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; border: 1px solid #e3e9f2; flex: 0 0 auto; }
    .app-row__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
    .app-row__title { font-size: 1.1rem; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-row__sub { font-size: .95rem; color: #6b7686; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-row__go { color: #334155; font-size: 1.1rem; flex: 0 0 auto; }
    .app-row__tag { background: #ef6a86; color: #fff; border-radius: 999px; padding: .35rem .8rem; font-size: .95rem; flex: 0 0 auto; }
    .app-hint { color: #64748b; text-align: center; padding: 1.2rem .5rem .6rem; margin: 0; }
    .app-more { display: block; text-align: center; padding: .9rem; font-weight: 600; text-decoration: none; }
    .app-clear { display: block; margin: 0 auto; color: #64748b; text-decoration: none; }
    .app-clear[hidden] { display: none; }
}
@media (max-width: 991.98px) { .offcanvas.d-lg-none { z-index: 1050; } }

@media (max-width: 991.98px) {
    /* En el panel del candidato la barra inferior también queda fija */
    .has-tabbar .dash-main { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
}

/* ── Slider de banners ──────────────────────────────────────────── */
.banner-slider { border-radius: 16px; overflow: hidden; background: #0f172a; box-shadow: 0 6px 20px rgba(11, 58, 143, .12); }
.banner-slider .carousel-item { aspect-ratio: 8 / 3; background: #0f172a; }
.banner-slider .banner-slider__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.banner-slider a.d-block { height: 100%; }
.banner-slider .carousel-control-prev, .banner-slider .carousel-control-next { width: 3.5rem; opacity: 0; transition: opacity .2s; }
.banner-slider:hover .carousel-control-prev, .banner-slider:hover .carousel-control-next, .banner-slider .carousel-control-prev:focus-visible, .banner-slider .carousel-control-next:focus-visible { opacity: .9; }
.banner-slider .carousel-control-prev-icon, .banner-slider .carousel-control-next-icon { background-color: rgba(0, 0, 0, .45); border-radius: 50%; background-size: 55%; width: 2.4rem; height: 2.4rem; }
.banner-slider .carousel-indicators { margin-bottom: .6rem; }
.banner-slider .carousel-indicators [data-bs-target] { width: 9px; height: 9px; border-radius: 50%; border: 0; margin: 0 4px; }
@media (max-width: 991.98px) {
    .banner-slider { border-radius: 14px; }
    .banner-slider .carousel-item { aspect-ratio: 2 / 1; }
    .banner-slider .carousel-control-prev, .banner-slider .carousel-control-next { display: none; }
}
@media (prefers-reduced-motion: reduce) { .banner-slider .carousel-item { transition: none; } }