.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 1000;
    background: #0f172a;
    color: #fff;
    padding: .65rem .9rem;
    border-radius: .5rem;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 1rem;
    color: #fff;
}

.home-modern {
    --home-primary: #1b3a6b;
    --home-primary-dark: #0f2344;
    --home-accent: #1e73e8;
    --home-cyan: #19b4cf;
    --home-surface: #ffffff;
    --home-muted: #475569;
    --home-border: #e2e8f0;
    --home-bg: #f8fafc;
    background:
        radial-gradient(circle at top right, rgba(30, 115, 232, 0.14) 0%, transparent 42%),
        radial-gradient(circle at 12% 88%, rgba(25, 180, 207, 0.12) 0%, transparent 28%),
        linear-gradient(180deg, #f7fbff 0%, #ffffff 38%);
}

.home-modern .container {
    max-width: 1220px;
}

.home-hero {
    background: linear-gradient(135deg, #0f2344 0%, #1b3a6b 50%, #1e73e8 80%, #19b4cf 100%);
    border-radius: 1.25rem;
    color: #fff;
    padding: 1.5rem;
    box-shadow: 0 16px 34px rgba(15, 35, 68, 0.25);
    position: relative;
    overflow: hidden;
}

.home-hero::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -80px;
    top: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .22) 0%, transparent 62%);
    pointer-events: none;
}

/* Botões do hero: contraste garantido (evita texto escuro sobre o fundo azul por CSS global) */
.home-hero .home-hero-btn--solid,
.home-hero .home-hero-btn--solid:hover,
.home-hero .home-hero-btn--solid:focus,
.home-hero .home-hero-btn--solid:focus-visible {
    color: #0f172a !important;
    background-color: #ffffff !important;
    border-color: #ffffff !important;
}

.home-hero .home-hero-btn--solid:hover {
    filter: brightness(0.97);
}

.home-hero .home-hero-btn--outline,
.home-hero .home-hero-btn--outline:focus,
.home-hero .home-hero-btn--outline:focus-visible {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.home-hero .home-hero-btn--outline:hover {
    color: #0f172a !important;
    background-color: #ffffff !important;
    border-color: #ffffff !important;
}

.home-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: .25rem;
}

.home-section-subtitle {
    color: var(--home-muted);
    margin-bottom: 1.5rem;
}

.home-panel {
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    border-left: 5px solid var(--home-accent);
    overflow: hidden;
}

.home-panel p:last-child {
    margin-bottom: 0;
}

.home-quick-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--home-border);
    border-radius: .9rem;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
}

.home-quick-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(30, 115, 232, .03), rgba(25, 180, 207, .07));
    opacity: 0;
    transition: opacity .2s ease;
}

.home-quick-link:hover {
    transform: translateY(-4px);
    border-color: #8db8ef;
    box-shadow: 0 12px 24px rgba(27, 58, 107, .15);
}

.home-quick-link:hover::before {
    opacity: 1;
}

.home-quick-link img {
    border-radius: 12px;
    padding: .2rem;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 6px 12px rgba(27, 58, 107, .12);
}

.home-card {
    border: 1px solid var(--home-border);
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
    position: relative;
}

.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(15, 35, 68, .14);
}

.home-card h6,
.home-card h5 {
    line-height: 1.3;
    letter-spacing: .1px;
}

.home-media {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--home-bg);
    border-bottom: 1px solid #d8e6fb;
}

.home-card .small {
    font-size: .92rem;
    color: #334155;
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    font-weight: 700;
    color: #123a72;
    background: linear-gradient(135deg, #e5f1ff 0%, #d7ebff 100%);
    border-radius: 999px;
    padding: .35rem .7rem;
}

.home-cta {
    background: linear-gradient(135deg, #1b3a6b 0%, #1e73e8 60%, #19b4cf 100%);
    border: none;
    color: #fff;
    border-radius: .75rem;
    font-weight: 700;
    padding: .75rem 1.3rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    box-shadow: 0 8px 18px rgba(18, 58, 114, .2);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.home-section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: .45rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #1b3a6b 0%, #1e73e8 60%, #19b4cf 100%);
}

.home-cta:hover {
    color: #fff;
    background: linear-gradient(135deg, #0f2344 0%, #1b4f96 60%, #14899d 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(18, 58, 114, .28);
}

.home-cta i {
    transition: transform .2s ease;
}

.home-cta:hover i {
    transform: translateX(2px);
}

.home-focusable:focus-visible,
.home-quick-link:focus-visible,
.home-cta:focus-visible,
.home-card a:focus-visible,
.btn:focus-visible {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
    border-radius: .5rem;
}

.home-muted {
    color: var(--home-muted);
}

.home-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.home-kpi {
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .12);
    border-radius: .8rem;
    padding: .75rem;
    text-align: center;
    backdrop-filter: blur(2px);
}

.home-kpi strong {
    display: block;
    font-size: 1.1rem;
}

.home-kpi span {
    font-size: .82rem;
    opacity: .9;
}

.home-kpi-note {
    display: block;
    margin-top: .35rem;
    font-size: .72rem;
    line-height: 1.35;
    font-weight: 600;
    opacity: .88;
}

.home-cursos-catalog {
    background: linear-gradient(180deg, rgba(255, 255, 255, .94) 0%, rgba(248, 251, 255, .97) 100%);
    border: 1px solid #d0e2fc;
    border-radius: 1rem;
    box-shadow: 0 14px 32px rgba(15, 35, 68, .08);
}

.home-cursos-block__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #e3ebfa;
}

.home-cursos-block__accent {
    width: 5px;
    min-height: 2.75rem;
    border-radius: 999px;
    flex-shrink: 0;
    margin-top: .15rem;
    background: linear-gradient(180deg, #1e73e8, #19b4cf);
}

.home-cursos-block__accent--aberto {
    background: linear-gradient(180deg, #1e73e8 0%, #19b4cf 100%);
}

.home-cursos-block__accent--encerrado {
    background: linear-gradient(180deg, #64748b, #94a3b8 100%);
}

.home-cursos-block__title {
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    font-weight: 800;
    color: #0b1324;
}

.home-cursos-block__lead {
    margin-top: .35rem;
    font-size: .92rem;
    color: #4b5a74;
    line-height: 1.45;
}

.home-cursos-block--historico {
    border-top: 1px dashed #cbd5e1;
}

.home-cursos-tabs {
    border-bottom: 1px solid #dbe7fb;
    gap: .25rem;
}

.home-cursos-tabs .nav-item {
    margin-bottom: -1px;
}

.home-cursos-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #475569;
    font-weight: 700;
    font-size: .88rem;
    padding: .55rem .95rem;
    border: 1px solid transparent;
    border-radius: .65rem .65rem 0 0;
    background: rgba(248, 250, 252, 0.9);
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.home-cursos-tabs .nav-link:hover {
    color: #1e73e8;
    background: #fff;
    border-color: #e2e8f0 #e2e8f0 #dbe7fb;
}

.home-cursos-tabs .nav-link.active {
    color: #0f2344;
    background: #fff;
    border-color: #d0e2fc #d0e2fc #fff;
    box-shadow: 0 -2px 0 #1e73e8 inset;
}

.home-cursos-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    padding: .1rem .4rem;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1e40af;
    background: rgba(30, 115, 232, 0.14);
    border-radius: 999px;
}

.home-cursos-tabs .nav-link.active .home-cursos-tab-badge {
    color: #fff;
    background: linear-gradient(135deg, #1e73e8, #1558b5);
}

.home-cursos-tab-content {
    padding-top: .25rem;
}

.home-cursos-empty-tab {
    border-style: dashed;
}

.home-section-cursos .escola-curso-card {
    min-height: 100%;
}

.home-section-block {
    margin-bottom: 3rem;
}

.home-panel,
.home-quick-link,
.home-card {
    backdrop-filter: blur(2px);
}

@media (min-width: 992px) {
    .home-hero {
        padding: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-card,
    .home-quick-link,
    .home-cta,
    .skip-link,
    .home-cta i {
        transition: none !important;
    }
}
