.home-page {
    width: 100%;
    padding: 0 0 2.75rem;
}

.home-cms {
    min-width: 0;
}

.home-featured {
    position: relative;
    margin: 1.45rem 0;
    padding: clamp(1.05rem, 2vw, 1.35rem);
    overflow: hidden;
    border: 1px solid rgba(214, 212, 216, 0.92);
    border-radius: 1.75rem;
    background:
        radial-gradient(circle at 8% 12%, rgba(206, 50, 105, 0.09), transparent 18rem),
        linear-gradient(135deg, #fff 0%, #fff 48%, #f7f6f8 100%);
}

.home-featured::before {
    position: absolute;
    top: -7rem;
    right: -5rem;
    width: 18rem;
    height: 18rem;
    border: 1px solid rgba(206, 50, 105, 0.14);
    border-radius: 999px;
    content: "";
    pointer-events: none;
}

.home-featured::after {
    position: absolute;
    right: 18%;
    bottom: -5.5rem;
    width: 12rem;
    height: 12rem;
    border-radius: 999px;
    background: rgba(206, 50, 105, 0.055);
    content: "";
    pointer-events: none;
}

.home-featured-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.home-featured-kicker,
.home-course-code {
    display: block;
    color: var(--ecs-color-primary);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-featured-header h2 {
    max-width: 44rem;
    margin: 0.18rem 0 0;
    color: #17131c;
    font-size: clamp(1.65rem, 3.4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.home-featured-header p {
    max-width: 34rem;
    margin: 0.55rem 0 0;
    color: #6f6a78;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.5;
}

.home-peticiones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin: 1.45rem 0;
    padding: clamp(1.05rem, 2vw, 1.35rem) clamp(1.15rem, 2.2vw, 1.6rem);
    border: 1px solid rgba(214, 212, 216, 0.92);
    border-radius: 1.75rem;
    background: #fff;
}

.home-peticiones-copy {
    min-width: 0;
    max-width: 40rem;
}

.home-peticiones h2 {
    margin: 0.18rem 0 0;
    color: #17131c;
    font-size: clamp(1.45rem, 2.8vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.05;
}


.home-peticiones p {
    margin: 0.45rem 0 0;
    color: #6f6a78;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.5;
}

.home-featured-catalog-link,
.home-course-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.65rem;
    border-radius: 999px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.home-featured-catalog-link {
    padding: 0 1rem;
    border: 1px solid #f3c4d4;
    background: #fff;
    color: var(--ecs-color-primary);
}

.home-featured-catalog-link:hover,
.home-featured-catalog-link:focus-visible {
    background: #fff5f8;
    outline: none;
}

.home-featured-catalog-link .material-symbols-outlined,
.home-course-link .material-symbols-outlined {
    font-size: 1rem;
}

.home-featured-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-course-card {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(214, 212, 216, 0.92);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 1rem 2.5rem rgba(38, 36, 41, 0.07);
    backdrop-filter: blur(8px);
}

.home-course-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 10.5rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 70% 18%, rgba(206, 50, 105, 0.12), transparent 7rem),
        linear-gradient(135deg, #f2f2f3 0%, #fff8fb 100%);
}

.home-course-visual img {
    width: 100%;
    height: 100%;
    min-height: 10.5rem;
    object-fit: cover;
}

.home-course-visual::after {
    position: absolute;
    right: -2.8rem;
    bottom: -3rem;
    width: 8rem;
    height: 8rem;
    border: 1px solid rgba(206, 50, 105, 0.16);
    border-radius: 999px;
    content: "";
}

.home-course-orbit {
    position: absolute;
    width: 6.5rem;
    height: 6.5rem;
    border: 1px solid rgba(206, 50, 105, 0.24);
    border-radius: 999px;
}

.home-course-orbit::after {
    position: absolute;
    top: 0.65rem;
    right: 0.9rem;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: var(--ecs-color-primary);
    content: "";
}

.home-course-icon {
    position: relative;
    z-index: 1;
    color: var(--ecs-color-primary);
    font-size: 3.35rem;
}

.home-course-hours {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.85rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid #f3c4d4;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ecs-color-primary);
    font-size: 0.76rem;
    font-weight: 850;
    box-shadow: 0 0.65rem 1.4rem rgba(38, 36, 41, 0.08);
}

.home-course-hours .material-symbols-outlined {
    font-size: 0.95rem;
}

.home-course-body {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    padding: 1rem;
}

.home-course-card h3 {
    margin: 0;
    color: #17131c;
    font-size: 1.08rem;
    font-weight: 850;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.home-course-card p {
    margin: 0;
    color: #6f6a78;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.5;
}

.home-course-link {
    width: 100%;
    margin-top: auto;
    border: 1px solid var(--ecs-color-primary);
    background: var(--ecs-color-primary);
    color: #fff;
}

.home-course-link:hover,
.home-course-link:focus-visible {
    background: var(--ecs-color-primary-border);
    color: #fff;
    outline: none;
}

.home-featured-empty {
    position: relative;
    z-index: 1;
    padding: 1.25rem;
    border: 1px dashed rgba(214, 212, 216, 0.92);
    border-radius: 1.2rem;
    background: #fcfbfc;
    color: #777586;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 1040px) {
    .home-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .home-featured {
        border-radius: 1.35rem;
    }

    .home-featured-grid {
        grid-template-columns: 1fr;
    }

    .home-featured-catalog-link {
        width: 100%;
    }
}

/* Anonymous home: mobile-only compact layout. Desktop unchanged. */
@media (max-width: 767.98px) {
    .home-page {
        padding-bottom: 1.5rem;
        overflow-x: clip;
    }

    .home-cms {
        overflow-x: clip;
    }

    .home-cms section,
    .home-cms > section {
        margin-top: 0.85rem !important;
        margin-bottom: 0.85rem !important;
        padding: 1rem !important;
        border-radius: 1.15rem !important;
    }

    .home-cms h1,
    .home-cms h2 {
        font-size: clamp(1.3rem, 7vw, 1.75rem) !important;
        line-height: 1.12 !important;
        letter-spacing: -0.03em !important;
    }

    .home-cms p,
    .home-cms li {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .home-cms img,
    .home-cms video,
    .home-cms iframe,
    .home-cms svg,
    .home-cms canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    .home-cms [style*="grid-template-columns"] {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.85rem !important;
    }

    .home-cms [style*="position:absolute"],
    .home-cms [style*="position: absolute"] {
        display: none !important;
    }

    .home-cms .material-symbols-outlined {
        font-size: 1.35rem !important;
    }

    .home-featured {
        margin: 0.85rem 0;
        padding: 0.95rem;
        border-radius: 1.15rem;
    }

    .home-featured::before,
    .home-featured::after {
        display: none;
    }

    .home-featured-header {
        margin-bottom: 0.85rem;
        gap: 0.75rem;
    }

    .home-featured-header h2 {
        font-size: 1.45rem;
        letter-spacing: -0.04em;
        line-height: 1.08;
    }

    .home-featured-header p {
        margin-top: 0.4rem;
        font-size: 0.88rem;
    }

    .home-featured-grid {
        gap: 0.85rem;
    }

    .home-course-card {
        border-radius: 1.1rem;
        box-shadow: 0 0.65rem 1.5rem rgba(38, 36, 41, 0.06);
    }

    .home-course-visual,
    .home-course-visual img {
        min-height: 8.5rem;
    }

    .home-course-icon {
        font-size: 2.6rem;
    }

    .home-course-body {
        gap: 0.55rem;
        padding: 0.85rem;
    }

    .home-course-card h3 {
        font-size: 1rem;
    }

    .home-course-card p {
        font-size: 0.84rem;
    }

    .home-featured-catalog-link,
    .home-course-link {
        min-height: 2.45rem;
        font-size: 0.9rem;
    }

    .home-peticiones {
        margin: 0.85rem 0;
        padding: 1rem;
        border-radius: 1.15rem;
    }

    .home-peticiones h2 {
        font-size: 1.35rem;
    }

    .home-peticiones .home-featured-catalog-link {
        width: 100%;
    }
}
