/* RichlyAI Learn homepage repair. Loaded after legacy LMS CSS on the home route only. */
:root {
    --rl-orange: #FF5722;
    --rl-orange-dark: #d94313;
    --rl-dark: #0d111c;
    --rl-ink: #182230;
    --rl-muted: #667085;
    --rl-soft: #f7f8fb;
    --rl-border: #e5e7ef;
}

.rl-page {
    background: #fff;
}

.rl-page > .modal:not(.show) {
    display: none !important;
}

.rl-page .toast-container:empty {
    display: none !important;
}

.rl-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid rgba(16, 24, 40, 0.08);
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.04);
    backdrop-filter: blur(16px);
}

.rl-header .rl-nav {
    min-height: 76px;
    padding: 0;
}

.rl-header .container,
.rl-home .container,
.rl-footer .container {
    max-width: 1180px;
    width: 100%;
}

.rl-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--rl-ink) !important;
    font-size: 20px;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
}

.rl-header-logo img,
.rl-footer-logo img {
    display: block;
    width: auto;
    max-width: 180px;
    height: 40px;
    object-fit: contain;
}

.rl-footer-logo img {
    height: 36px;
}

.rl-brand-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--rl-orange);
    color: #fff;
    font-weight: 900;
}

.rl-header .navbar-collapse {
    align-items: center;
}

.rl-header .rl-nav-links {
    gap: 6px;
}

.rl-header .rl-nav-links .nav-link,
.rl-header .rl-nav-link {
    color: #344054 !important;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none !important;
}

.rl-header .rl-nav-links .nav-link {
    padding: 10px 14px !important;
}

.rl-header .rl-nav-links .nav-link.active,
.rl-header .rl-nav-links .nav-link:hover,
.rl-header .rl-nav-link:hover {
    color: var(--rl-orange) !important;
}

.rl-header .rl-nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rl-header .rl-toggler {
    border: 0;
    color: var(--rl-ink);
    box-shadow: none !important;
}

.rl-home {
    overflow: hidden;
    background: #fff;
    color: var(--rl-ink);
}

.rl-home *,
.rl-header *,
.rl-footer * {
    box-sizing: border-box;
}

.rl-hero {
    position: relative;
    overflow: hidden;
    padding: 104px 0 92px;
    color: #fff;
    background:
        radial-gradient(circle at 78% 14%, rgba(255, 87, 34, 0.36), transparent 28%),
        radial-gradient(circle at 16% 18%, rgba(46, 125, 246, 0.18), transparent 30%),
        linear-gradient(135deg, #0a0f1c 0%, #151b2b 56%, #261107 100%);
}

.rl-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent);
}

.rl-hero .container {
    position: relative;
    z-index: 1;
}

.rl-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    align-items: center;
    gap: 64px;
}

.rl-eyebrow,
.rl-section-heading > span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 13px;
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 999px;
    background: rgba(255, 87, 34, 0.12);
    color: var(--rl-orange);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
}

.rl-hero h1 {
    max-width: 780px;
    margin: 24px 0 20px;
    color: #fff !important;
    font-size: 68px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.02;
}

.rl-hero-copy {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
    line-height: 1.72;
}

.rl-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
}

.rl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.rl-btn:hover {
    transform: translateY(-1px);
}

.rl-btn-primary {
    border: 1px solid var(--rl-orange);
    background: var(--rl-orange);
    color: #fff !important;
    box-shadow: 0 16px 34px rgba(255, 87, 34, 0.28);
}

.rl-btn-primary:hover {
    border-color: var(--rl-orange-dark);
    background: var(--rl-orange-dark);
}

.rl-btn-secondary,
.rl-btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

.rl-btn-secondary:hover,
.rl-btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

.rl-btn-small {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 14px;
}

.rl-header .rl-btn-outline {
    border-color: var(--rl-border);
    background: #fff;
    color: var(--rl-ink) !important;
    box-shadow: none;
}

.rl-trust {
    max-width: 640px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.55;
}

.rl-hero-visual {
    min-width: 0;
}

.rl-hero-panel {
    position: relative;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.rl-hero-panel::after {
    content: "";
    position: absolute;
    inset: 14px;
    z-index: -1;
    border-radius: 24px;
    background: rgba(255, 87, 34, 0.2);
    filter: blur(34px);
}

.rl-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-weight: 800;
}

.rl-panel-head strong {
    color: #fff;
}

.rl-ai-card {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
}

.rl-ai-card p {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    font-weight: 750;
}

.rl-ai-card h3 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 850;
    line-height: 1.32;
}

.rl-progress-line {
    overflow: hidden;
    height: 10px;
    margin-top: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.rl-progress-line span {
    display: block;
    width: 72%;
    height: 100%;
    border-radius: inherit;
    background: var(--rl-orange);
}

.rl-workflow-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.rl-workflow-list div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
}

.rl-workflow-list span {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--rl-orange);
}

.rl-section {
    padding: 92px 0;
}

.rl-section-muted {
    background: var(--rl-soft);
}

.rl-section-heading {
    max-width: 770px;
    margin: 0 0 38px;
}

.rl-section-heading h2 {
    margin: 16px 0 12px;
    color: var(--rl-ink) !important;
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.12;
}

.rl-section-heading p {
    margin: 0;
    color: var(--rl-muted);
    font-size: 17px;
    line-height: 1.72;
}

.rl-heading-row {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.rl-text-link {
    flex: 0 0 auto;
    color: var(--rl-orange) !important;
    font-weight: 850;
    text-decoration: none !important;
}

.rl-path-grid,
.rl-why-grid,
.rl-course-grid,
.rl-steps {
    display: grid;
    gap: 20px;
}

.rl-path-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rl-why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rl-course-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rl-path-card,
.rl-why-card,
.rl-course-card,
.rl-empty-courses,
.rl-step {
    border: 1px solid var(--rl-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.06);
}

.rl-path-card {
    min-height: 214px;
    padding: 24px;
}

.rl-path-card > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 22px;
    border-radius: 11px;
    background: rgba(255, 87, 34, 0.1);
    color: var(--rl-orange);
    font-size: 13px;
    font-weight: 900;
}

.rl-path-card h3,
.rl-why-card h3 {
    margin: 0 0 10px;
    color: var(--rl-ink) !important;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
}

.rl-path-card p,
.rl-why-card p {
    margin: 0;
    color: var(--rl-muted);
    font-size: 15px;
    line-height: 1.65;
}

.rl-why-card {
    min-height: 220px;
    padding: 26px;
}

.rl-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 20px;
    border-radius: 11px;
    background: rgba(255, 87, 34, 0.12);
    color: var(--rl-orange);
    font-size: 16px;
    font-weight: 900;
}

.rl-course-card {
    display: flex;
    overflow: hidden;
    min-height: 100%;
    flex-direction: column;
}

.rl-course-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #eef1f6;
}

.rl-home-ai-course-placeholder {
    display: flex;
    align-items: center;
    min-height: 192px;
    height: 100%;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(255, 87, 34, 0.18), transparent 34%),
        linear-gradient(135deg, #f8fafc 0%, #eef3fb 52%, #fff7ed 100%);
    color: var(--rl-ink);
}

.rl-home-ai-course-placeholder span {
    display: block;
    margin-bottom: 10px;
    color: var(--rl-orange);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.rl-course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.rl-course-card:hover .rl-course-image img {
    transform: scale(1.025);
}

.rl-price-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    max-width: calc(100% - 28px);
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(13, 17, 28, 0.86);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.rl-course-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.rl-course-meta,
.rl-course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rl-course-meta span {
    color: var(--rl-orange);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.rl-course-body h3 {
    margin: 13px 0 10px;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.3;
}

.rl-course-body h3 a {
    color: var(--rl-ink) !important;
    text-decoration: none !important;
}

.rl-course-body p {
    min-height: 54px;
    margin: 0 0 18px;
    color: var(--rl-muted);
    font-size: 15px;
    line-height: 1.65;
}

.rl-course-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--rl-border);
    color: var(--rl-muted);
    font-size: 14px;
    line-height: 1.3;
}

.rl-course-footer > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rl-course-cta {
    flex: 0 0 auto;
    color: var(--rl-orange) !important;
    font-weight: 900;
    text-decoration: none !important;
}

.rl-empty-courses {
    padding: 36px;
}

.rl-empty-courses h3 {
    margin: 0 0 10px;
    color: var(--rl-ink);
    font-size: 24px;
    font-weight: 900;
}

.rl-empty-courses p {
    max-width: 620px;
    margin: 0 0 22px;
    color: var(--rl-muted);
    line-height: 1.7;
}

.rl-steps {
    position: relative;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rl-step {
    position: relative;
    min-height: 214px;
    padding: 24px;
}

.rl-step > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: var(--rl-orange);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.rl-step h3 {
    margin: 0 0 9px;
    color: var(--rl-ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.3;
}

.rl-step p {
    margin: 0;
    color: var(--rl-muted);
    font-size: 14px;
    line-height: 1.6;
}

.rl-final-cta {
    padding: 86px 0;
    background: #fff;
}

.rl-final-inner {
    position: relative;
    overflow: hidden;
    padding: 58px 40px;
    border-radius: 24px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 84% 22%, rgba(255, 87, 34, 0.28), transparent 30%),
        linear-gradient(135deg, #111827 0%, #251107 100%);
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.16);
}

.rl-final-inner h2 {
    max-width: 760px;
    margin: 0 auto;
    color: #fff !important;
    font-size: 46px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.12;
}

.rl-final-inner p {
    max-width: 700px;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    line-height: 1.7;
}

.rl-footer {
    padding: 62px 0 30px;
    background: var(--rl-dark);
    color: rgba(255, 255, 255, 0.84);
}

.rl-footer .rl-brand {
    color: #fff !important;
}

.rl-footer-copy {
    max-width: 450px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 15px;
    line-height: 1.75;
}

.rl-footer h3 {
    margin: 0 0 15px;
    color: #fff !important;
    font-size: 15px;
    font-weight: 900;
}

.rl-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rl-footer li + li {
    margin-top: 10px;
}

.rl-footer a {
    color: rgba(255, 255, 255, 0.84) !important;
    text-decoration: none !important;
}

.rl-footer a:hover {
    color: #fff !important;
}

.rl-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 46px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.5;
}

@media all and (max-width: 1199px) {
    .rl-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
        gap: 42px;
    }

    .rl-hero h1 {
        font-size: 58px;
    }

    .rl-path-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rl-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media all and (max-width: 991px) {
    .rl-header .rl-nav {
        min-height: 70px;
        padding: 12px 0;
    }

    .rl-header .navbar-collapse {
        padding: 16px 0 4px;
    }

    .rl-header .rl-nav-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding-top: 14px;
    }

    .rl-header .rl-nav-links {
        gap: 0;
    }

    .rl-header .rl-nav-links .nav-link {
        padding: 11px 0 !important;
    }

    .rl-hero {
        padding: 84px 0 74px;
    }

    .rl-hero-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .rl-hero h1 {
        font-size: 52px;
    }

    .rl-section-heading h2,
    .rl-final-inner h2 {
        font-size: 38px;
    }

    .rl-why-grid,
    .rl-course-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rl-heading-row,
    .rl-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media all and (max-width: 767px) {
    .rl-brand {
        font-size: 18px;
    }

    .rl-header-logo img {
        max-width: 160px;
        height: 36px;
    }

    .rl-footer-logo img {
        max-width: 150px;
        height: 34px;
    }

    .rl-brand-mark {
        width: 36px;
        height: 36px;
    }

    .rl-hero {
        padding: 68px 0 60px;
    }

    .rl-hero h1 {
        font-size: 42px;
        line-height: 1.08;
    }

    .rl-hero-copy {
        font-size: 17px;
    }

    .rl-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .rl-btn {
        width: 100%;
    }

    .rl-hero-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .rl-ai-card {
        padding: 22px;
    }

    .rl-section,
    .rl-final-cta {
        padding: 64px 0;
    }

    .rl-section-heading {
        margin-bottom: 28px;
    }

    .rl-section-heading h2,
    .rl-final-inner h2 {
        font-size: 32px;
    }

    .rl-path-grid,
    .rl-why-grid,
    .rl-course-grid,
    .rl-steps {
        grid-template-columns: 1fr;
    }

    .rl-path-card,
    .rl-why-card,
    .rl-step {
        min-height: 0;
    }

    .rl-course-footer,
    .rl-course-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .rl-course-body p {
        min-height: 0;
    }

    .rl-final-inner {
        padding: 38px 22px;
        border-radius: 20px;
    }

    .rl-footer {
        padding-top: 50px;
    }
}
