/*
 * Brand layer for the public site. Colors come from Brand Studio tokens
 * (components/brand/tokens.blade.php). Shape rule: interactive controls are
 * full pill, cards are 18px, inputs are 14px.
 */

:root {
    --font-family: "Brand Body", system-ui, sans-serif;
    --font-display: "Brand Display", "Brand Body", system-ui, sans-serif;
    --text-color: var(--brand-muted);
    --color-2: var(--brand-ink);
    --bg-white: var(--brand-surface);
    --box-shadow: var(--brand-shadow);
    --box-shadow-2: var(--brand-shadow);
    --brand-radius: 18px;
    --brand-radius-sm: 14px;
    --brand-ease: cubic-bezier(.16, 1, .3, 1);
    --bs-body-font-family: var(--font-family);
    --bs-body-color: var(--brand-muted);
    --bs-body-bg: var(--brand-paper);
    --bs-border-color: var(--brand-line);
    --bs-emphasis-color: var(--brand-ink);
    --bs-heading-color: var(--brand-ink);
    --bs-secondary-bg: var(--brand-paper);
    --bs-tertiary-bg: var(--brand-paper);
}

.ticker {
    overflow: hidden;
    padding: 18px 0;
    direction: ltr;
    background: var(--brand-surface);
    border-bottom: 1px solid var(--brand-line);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: brand-ticker 38s linear infinite; }
[dir="rtl"] .ticker-track { animation-direction: reverse; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    font-weight: 800;
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    color: var(--ink, var(--brand-ink));
    font-family: "Cairo Brand", "Tajawal Brand", Cairo, Tajawal, system-ui, sans-serif;
}
.ticker-list li { display: inline-flex; align-items: center; gap: 28px; padding-inline-end: 28px; white-space: nowrap; }
.ticker-list li:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--muted, var(--brand-muted)); }
.ticker-list i { font-size: .8rem; color: var(--accent, var(--brand-accent)); -webkit-text-stroke: 0; animation: brand-ticker-spin 8s linear infinite; }
html[dir="rtl"] .ticker-list { direction: rtl; }
@keyframes brand-ticker { to { transform: translateX(-50%); } }
@keyframes brand-ticker-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
    .ticker-track,
    .ticker-list i { animation: none; }
}

::selection {
    background: color-mix(in srgb, var(--brand-accent) 26%, transparent);
    color: var(--brand-ink);
}

body.brand-shell {
    background: var(--brand-paper);
    color: var(--brand-muted);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.brand-shell :is(h1, h2, h3, h4, h5, h6) {
    color: var(--brand-ink);
    font-family: var(--font-display);
    letter-spacing: 0;
}

[dir="rtl"] body.brand-shell :is(h1, h2, h3, h4, h5, h6) {
    line-height: 1.45;
}

body.brand-shell a {
    color: inherit;
}

body.brand-shell :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
    box-shadow: none;
}

/* Header */
.bh-skip {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 1090;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--brand-accent);
    color: var(--brand-accent-ink) !important;
    font-weight: 700;
}

.bh-skip:focus {
    top: 12px;
}

.bh {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: color-mix(in srgb, var(--brand-surface) 88%, transparent);
    border-bottom: 1px solid var(--brand-line);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
}

.bh-in {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 1280px;
    height: 70px;
    margin: 0 auto;
    padding: 0 24px;
}

.bh-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    text-decoration: none;
}

.bh-brand img {
    width: auto;
    height: 40px;
    max-width: 156px;
    flex: 0 0 auto;
    object-fit: contain;
    object-position: center;
    background: transparent;
}

html.dark .bh-brand img {
    filter: invert(1);
}

.bh-brand > span {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.bh-name {
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.bh-brand small {
    color: var(--brand-muted);
    font-size: 12.5px;
    line-height: 1.3;
    white-space: nowrap;
}

.bh-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline-start: 12px;
}

.bh-links a {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--brand-ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .25s var(--brand-ease), color .25s var(--brand-ease);
}

.bh-links a:hover,
.bh-links a[aria-current="page"] {
    background: var(--brand-accent-soft);
    color: var(--brand-accent);
}

.bh-search {
    position: relative;
    flex: 0 1 260px;
    margin-inline-start: auto;
}

.bh-search input {
    width: 100%;
    height: 42px;
    padding-inline: 18px 46px;
    border: 1px solid var(--brand-line);
    border-radius: 999px;
    background: var(--brand-paper);
    color: var(--brand-ink);
    font-size: 14px;
    transition: border-color .25s var(--brand-ease), background-color .25s var(--brand-ease);
}

.bh-search input::placeholder {
    color: var(--brand-muted);
    opacity: 1;
}

.bh-search input:focus {
    border-color: var(--brand-accent);
    background: var(--brand-surface);
    outline: none;
}

.bh-search button {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--brand-accent);
    color: var(--brand-accent-ink);
    font-size: 13px;
}

.bh-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bh-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--brand-line);
    border-radius: 50%;
    background: var(--brand-surface);
    color: var(--brand-ink) !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .25s var(--brand-ease), transform .2s var(--brand-ease);
}

.bh-icon:hover {
    border-color: var(--brand-accent);
    color: var(--brand-accent) !important;
}

.bh-icon:active,
.bh-btn:active {
    transform: scale(.97);
}

.bh-count span {
    position: absolute;
    top: -3px;
    inset-inline-end: -3px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--brand-accent);
    color: var(--brand-accent-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
}

.bh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .25s var(--brand-ease), border-color .25s var(--brand-ease), transform .2s var(--brand-ease);
}

.bh-btn-ghost {
    border-color: var(--brand-line);
    color: var(--brand-ink) !important;
}

.bh-btn-ghost:hover {
    border-color: var(--brand-accent);
    color: var(--brand-accent) !important;
}

.bh-btn-solid {
    background: var(--brand-accent);
    color: var(--brand-accent-ink) !important;
}

.bh-btn-solid:hover {
    background: var(--brand-accent-deep);
    transform: translateY(-1px);
}

.bh-avatar {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid var(--brand-accent-soft);
    border-radius: 50%;
    background: var(--brand-surface);
    overflow: hidden;
}

.bh-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bh-menu {
    min-width: 250px;
    margin-top: 10px !important;
    padding: 8px;
    border: 1px solid var(--brand-line);
    border-radius: var(--brand-radius);
    background: var(--brand-surface);
    box-shadow: var(--brand-shadow);
}

.bh-menu-head {
    display: grid;
    gap: 2px;
    padding: 8px 12px 12px;
}

.bh-menu-head strong {
    color: var(--brand-ink);
    font-size: 15px;
}

.bh-menu-head span {
    color: var(--brand-muted);
    font-size: 13px;
    text-align: start;
}

.bh-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--brand-ink);
    font-size: 14.5px;
}

.bh-menu .dropdown-item i {
    color: var(--brand-muted);
    line-height: 1;
}

.bh-menu .dropdown-item:hover,
.bh-menu .dropdown-item:focus {
    background: var(--brand-accent-soft);
    color: var(--brand-accent);
}

.bh-menu .dropdown-item:hover i {
    color: var(--brand-accent);
}

.bh-menu .dropdown-divider {
    border-color: var(--brand-line);
}

.bh-burger {
    display: none;
}

.bh-drawer {
    --bs-offcanvas-width: min(360px, 88vw);
    --bs-offcanvas-bg: var(--brand-surface);
    --bs-offcanvas-color: var(--brand-ink);
    border-color: var(--brand-line) !important;
}

.bh-drawer .offcanvas-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--brand-line);
}

.bh-drawer .offcanvas-body {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 20px;
}

.bh-drawer .btn-close {
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--brand-line);
    border-radius: 50%;
    background-size: 12px;
    box-shadow: none;
    opacity: .8;
}

html.dark .bh-drawer .btn-close {
    filter: invert(1) grayscale(1);
}

.bh-search-drawer {
    flex: none;
    margin: 0;
}

.bh-drawer-links {
    display: grid;
    gap: 4px;
}

.bh-drawer-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--brand-radius-sm);
    color: var(--brand-ink);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.bh-drawer-links a:hover,
.bh-drawer-links a[aria-current="page"] {
    background: var(--brand-accent-soft);
    color: var(--brand-accent);
}

.bh-drawer-links hr {
    margin: 8px 0;
    border-color: var(--brand-line);
    opacity: 1;
}

.bh-drawer-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 1199.98px) {
    .bh-search {
        flex-basis: 200px;
    }
}

@media (max-width: 991.98px) {
    .bh-links,
    .bh .bh-search {
        display: none;
    }

    .bh-actions {
        margin-inline-start: auto;
    }

    .bh-burger {
        display: inline-grid;
    }
}

@media (max-width: 575.98px) {
    .bh-in {
        gap: 10px;
        height: 64px;
        padding: 0 14px;
    }

    .bh-brand small,
    .bh-actions > .bh-btn {
        display: none;
    }

    .bh-name {
        font-size: 15px;
    }

    .bh-actions {
        gap: 6px;
    }

    .bh-icon,
    .bh-avatar {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
}

/* Footer */
.bf {
    margin-top: 88px;
    border-top: 1px solid var(--brand-line);
    background: var(--brand-surface);
}

.bf-in {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 36px;
}

.bf-tagline {
    margin: 18px 0 6px;
    color: var(--brand-accent);
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
}

.bf-note {
    max-width: 36ch;
    margin: 0;
    color: var(--brand-muted);
    font-size: 15px;
    line-height: 1.7;
}

.bf-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.bf-col h2 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
}

.bf-col a:not(.bh-btn) {
    padding: 4px 0;
    color: var(--brand-muted);
    font-size: 15px;
    text-decoration: none;
    transition: color .2s var(--brand-ease);
}

.bf-col a:not(.bh-btn):hover {
    color: var(--brand-accent);
}

.bf-support {
    margin-top: 12px;
}

.bf-base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 26px;
    border-top: 1px solid var(--brand-line);
    color: var(--brand-muted);
    font-size: 13.5px;
}

@media (max-width: 991.98px) {
    .bf-in {
        grid-template-columns: 1fr 1fr;
    }

    .bf-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .bf {
        margin-top: 64px;
    }

    .bf-in {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 40px 18px 28px;
    }

    .bf-base {
        padding-inline: 18px;
    }
}

/* Buttons */
body.brand-shell .eBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 700;
    transition: background-color .25s var(--brand-ease), transform .2s var(--brand-ease), box-shadow .25s var(--brand-ease);
}

body.brand-shell .gradient {
    background: var(--brand-accent);
    background-image: none;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--brand-accent) 24%, transparent);
    color: var(--brand-accent-ink) !important;
}

body.brand-shell .gradient:hover {
    background: var(--brand-accent-deep);
    color: var(--brand-accent-ink) !important;
    transform: translateY(-1px);
}

body.brand-shell .eBtn:active {
    transform: scale(.98);
}

body.brand-shell .btn-primary {
    --bs-btn-bg: var(--brand-accent);
    --bs-btn-border-color: var(--brand-accent);
    --bs-btn-color: var(--brand-accent-ink);
    --bs-btn-hover-bg: var(--brand-accent-deep);
    --bs-btn-hover-border-color: var(--brand-accent-deep);
    --bs-btn-hover-color: var(--brand-accent-ink);
    --bs-btn-active-bg: var(--brand-accent-deep);
    --bs-btn-active-border-color: var(--brand-accent-deep);
    border-radius: 999px;
}

body.brand-shell .btn-outline-primary {
    --bs-btn-color: var(--brand-accent);
    --bs-btn-border-color: var(--brand-accent);
    --bs-btn-hover-bg: var(--brand-accent);
    --bs-btn-hover-border-color: var(--brand-accent);
    --bs-btn-hover-color: var(--brand-accent-ink);
    border-radius: 999px;
}

/* Cards */
body.brand-shell .Ecard {
    border: 1px solid var(--brand-line);
    border-radius: var(--brand-radius);
    background: var(--brand-surface);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--brand-ink) 4%, transparent);
    transition: transform .45s var(--brand-ease), box-shadow .45s var(--brand-ease), border-color .3s var(--brand-ease);
}

body.brand-shell a.Ecard:hover,
body.brand-shell .Ecard:hover {
    border-color: color-mix(in srgb, var(--brand-accent) 35%, var(--brand-line));
    box-shadow: var(--brand-shadow);
    transform: translateY(-4px);
}

body.brand-shell .eBar-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
    color: var(--brand-muted);
}

body.brand-shell .courses-img {
    border-radius: var(--brand-radius-sm);
    background: var(--brand-accent-soft);
}

body.brand-shell .eBar-card .courses-img::after {
    display: none;
}

img.course-logo-fallback {
    object-fit: contain !important;
    object-position: center;
    background: #fffaf6;
    padding: 12%;
    box-sizing: border-box;
}

body.brand-shell .eBar-card:hover .courses-img img.course-logo-fallback,
body.brand-shell .g-card:hover .card-head img.course-logo-fallback {
    transform: none;
}

body.brand-shell .eBar-card .courses-img img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: var(--brand-radius-sm);
    transition: transform .6s var(--brand-ease);
}

body.brand-shell .eBar-card:hover .courses-img img {
    transform: scale(1.04);
}

body.brand-shell .eBar-card .heart {
    top: 10px;
    inset-inline-end: 10px;
    width: 36px;
    height: 36px;
    background: color-mix(in srgb, var(--brand-surface) 92%, transparent);
    color: var(--brand-ink);
    line-height: 36px;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-ink) 14%, transparent);
}

body.brand-shell .eBar-card .heart:hover,
body.brand-shell .eBar-card .heart.inList {
    background: var(--brand-accent);
    color: var(--brand-accent-ink);
}

body.brand-shell .eBar-card .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px 6px 6px;
    background: transparent;
}

body.brand-shell .info-card {
    margin-bottom: 10px !important;
}

body.brand-shell .creator {
    gap: 10px;
}

body.brand-shell .creator img {
    width: 30px;
    height: 30px;
    margin: 0;
    border: 2px solid var(--brand-accent-soft);
}

body.brand-shell .eBar-card .creator h5 {
    margin: 0;
    color: var(--brand-muted);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
}

body.brand-shell .eBar-card .entry-title h3 {
    width: auto;
    margin-bottom: 14px;
    color: var(--brand-ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.55;
}

body.brand-shell .eBar-card ul {
    gap: 16px;
    justify-content: flex-start;
    margin-top: auto;
}

body.brand-shell .eBar-card ul li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-muted);
    font-size: 14px;
}

body.brand-shell .eBar-card ul li span {
    color: var(--brand-ink);
}

body.brand-shell .eBar-card ul li svg,
body.brand-shell .eBar-card ul li i {
    margin: 0;
}

[dir="ltr"] body.brand-shell .eBar-card [dir="auto"] { text-align: left; }
[dir="rtl"] body.brand-shell .eBar-card [dir="auto"] { text-align: right; }

.course-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 6px 4px;
    padding-top: 12px;
    border-top: 1px solid var(--brand-line);
}

.course-price {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
}

.course-price del {
    color: var(--brand-muted);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
}

body.brand-shell .eBar-card .course-foot .learn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--brand-accent);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

body.brand-shell .eBar-card .course-foot .learn-more::after {
    display: none;
}

body.brand-shell .eBar-card .course-foot .learn-more i {
    font-size: 13px;
    transition: translate .35s var(--brand-ease);
}

body.brand-shell .eBar-card:hover .course-foot .learn-more i {
    translate: 4px 0;
}

[dir="rtl"] body.brand-shell .eBar-card:hover .course-foot .learn-more i {
    translate: -4px 0;
}

/* List view price sits on a scrim so it stays readable */
body.brand-shell .cText {
    padding: 6px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-ink) 72%, transparent);
}

body.brand-shell .cText h4,
body.brand-shell .cText del {
    margin: 0;
    font-size: 15px;
}

/* Forms */
body.brand-shell :is(.form-control, .form-select, .nice-select) {
    min-height: 48px;
    border: 1px solid var(--brand-line);
    border-radius: var(--brand-radius-sm);
    background-color: var(--brand-surface);
    color: var(--brand-ink);
    font-size: 15px;
    box-shadow: none;
    transition: border-color .2s var(--brand-ease), box-shadow .2s var(--brand-ease);
}

body.brand-shell textarea.form-control {
    min-height: 120px;
}

body.brand-shell :is(.form-control, .form-select)::placeholder {
    color: color-mix(in srgb, var(--brand-muted) 82%, transparent);
    opacity: 1;
}

body.brand-shell :is(.form-control, .form-select, .nice-select):focus,
body.brand-shell .nice-select.open {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-accent) 16%, transparent);
    outline: none;
}

body.brand-shell .nice-select .list {
    border: 1px solid var(--brand-line);
    border-radius: var(--brand-radius-sm);
    background: var(--brand-surface);
    box-shadow: var(--brand-shadow);
}

body.brand-shell .nice-select .option:hover,
body.brand-shell .nice-select .option.selected.focus {
    background: var(--brand-accent-soft);
    color: var(--brand-accent);
}

body.brand-shell .form-label,
body.brand-shell label {
    color: var(--brand-ink);
    font-weight: 600;
}

body.brand-shell .form-check-input:checked {
    border-color: var(--brand-accent);
    background-color: var(--brand-accent);
}

body.brand-shell .form-check-input:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-accent) 16%, transparent);
}

/* Pagination and breadcrumb */
body.brand-shell .pagination {
    gap: 6px;
}

body.brand-shell .page-link {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    border: 1px solid var(--brand-line);
    border-radius: 999px !important;
    background: var(--brand-surface);
    color: var(--brand-ink);
}

body.brand-shell .page-item.active .page-link,
body.brand-shell .page-link:hover {
    border-color: var(--brand-accent);
    background: var(--brand-accent);
    color: var(--brand-accent-ink);
}

body.brand-shell .breadcrumb {
    --bs-breadcrumb-divider-color: var(--brand-muted);
    --bs-breadcrumb-item-active-color: var(--brand-accent);
}

body.brand-shell .breadcrumb a {
    color: var(--brand-muted);
}

/* Page title band */
body.brand-shell .breadcum-area {
    background: linear-gradient(180deg, var(--brand-accent-soft) 0%, var(--brand-paper) 100%);
}

body.brand-shell .breadcum-area::after {
    display: none;
}

body.brand-shell .eNtry-breadcum .breadcrumb-item a,
body.brand-shell .breadcrumb-item + .breadcrumb-item::before {
    color: var(--brand-muted);
}

body.brand-shell .eNtry-breadcum .breadcrumb-item.active {
    color: var(--brand-accent);
}

body.brand-shell .g-title {
    color: var(--brand-ink);
    font-size: 28px;
    font-weight: 800;
}

body.brand-shell .showing-text {
    color: var(--brand-muted);
}

body.brand-shell .tab-list ul {
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--brand-line);
    border-radius: 999px;
    background: var(--brand-surface);
}

body.brand-shell .tab-list ul li,
body.brand-shell .tab-list li.active {
    padding: 0;
    border-radius: 999px;
    background: none;
}

body.brand-shell .tab-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: none !important;
    box-shadow: none !important;
    color: var(--brand-muted) !important;
    -webkit-text-fill-color: currentColor;
    font-size: 14px;
    font-weight: 600;
}

body.brand-shell .tab-list li.active a {
    background: var(--brand-accent) !important;
    color: var(--brand-accent-ink) !important;
}

body.brand-shell .tab-list svg path {
    fill: currentColor;
}

/* Course details */
body.brand-shell .course-details {
    padding: 6px 28px 26px;
    border-radius: var(--brand-radius);
}

body.brand-shell .course-details h2.g-title {
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.4;
}

@media (max-width: 575.98px) {
    body.brand-shell .course-details {
        padding: 4px 18px 20px;
    }
}

/* Auth pages */
body.brand-shell .login-img {
    height: 100%;
}

body.brand-shell .brand-auth-photo {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 620px;
    border-radius: var(--brand-radius);
    object-fit: cover;
    object-position: center 30%;
    box-shadow: var(--brand-shadow);
}

/* Filter sidebar */
body.brand-shell .sidebar {
    border: 1px solid var(--brand-line);
    border-radius: var(--brand-radius);
    background: var(--brand-surface);
    box-shadow: none;
}

body.brand-shell .sidebar :is(h4, .title) {
    color: var(--brand-ink);
    font-size: 17px;
    font-weight: 700;
}

body.brand-shell .sidebar a,
body.brand-shell .sidebar label {
    color: var(--brand-muted);
    font-weight: 500;
}

body.brand-shell .sidebar a:hover,
body.brand-shell .sidebar .active > a,
body.brand-shell .sidebar a.active {
    color: var(--brand-accent);
}

body.brand-shell .sidebar input[type="radio"],
body.brand-shell .sidebar input[type="checkbox"] {
    accent-color: var(--brand-accent);
}

.brand-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    margin-bottom: 16px;
    border: 1px solid var(--brand-line);
    border-radius: 999px;
    background: var(--brand-surface);
    color: var(--brand-ink);
    font-weight: 700;
}

.brand-filter-toggle span {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--brand-accent);
    color: var(--brand-accent-ink);
    font-size: 12px;
    line-height: 22px;
}

.brand-filter-toggle[aria-expanded="true"] {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

#courseFilter .sidebar {
    margin-bottom: 24px;
}

/* Inner page surfaces follow the theme in both modes */
body.brand-shell :is(.bg-white, .card, .modal-content, .dropdown-menu, .offcanvas, .accordion-item, .accordion-button, .list-group-item, .table) {
    --bs-card-bg: var(--brand-surface);
    --bs-table-bg: transparent;
    --bs-table-color: var(--brand-ink);
    --bs-accordion-bg: var(--brand-surface);
    --bs-accordion-color: var(--brand-ink);
    --bs-accordion-btn-color: var(--brand-ink);
    --bs-accordion-active-color: var(--brand-accent);
    --bs-accordion-active-bg: var(--brand-accent-soft);
    --bs-list-group-bg: var(--brand-surface);
    --bs-list-group-color: var(--brand-ink);
    --bs-dropdown-bg: var(--brand-surface);
    --bs-dropdown-link-color: var(--brand-ink);
    --bs-modal-bg: var(--brand-surface);
    --bs-modal-color: var(--brand-ink);
    border-color: var(--brand-line);
}

html.dark body.brand-shell .bg-white {
    background-color: var(--brand-surface) !important;
}

html.dark body.brand-shell :is(.text-dark, .text-black) {
    color: var(--brand-ink) !important;
}

html.dark body.brand-shell :is(.card, .Ecard, .modal-content, .accordion-item, .accordion-button) {
    background-color: var(--brand-surface);
    color: var(--brand-muted);
}

html.dark body.brand-shell .accordion-button::after {
    filter: invert(1) grayscale(1);
}

html.dark body.brand-shell .table {
    color: var(--brand-ink);
}

html.dark body.brand-shell .page-copy,
html.dark body.brand-shell .page-copy :is(h1, h2, h3, h4, h5, h6, p, div, li, span, strong) {
    color: #fff;
}

html.dark body.brand-shell .nav.nav-bordered .nav-link,
html.dark body.brand-shell .nav.nav-bordered .nav-link:hover,
html.dark body.brand-shell .nav.nav-bordered .nav-link.active {
    color: #fff;
}

body.brand-shell :is(.entry_panel, .privacy-policy) {
    background-color: var(--brand-surface);
    color: var(--brand-muted);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow);
}

body.brand-shell .cart-items .entry-title h3,
body.brand-shell .cart-items .en-title h3 {
    width: auto;
    max-width: 100%;
    color: var(--brand-ink);
}

body.brand-shell .cart-items .description,
body.brand-shell .cart-items .price_type,
body.brand-shell .cart-items .learn-more {
    color: var(--brand-muted);
}

body.brand-shell .cart-total-price h2,
body.brand-shell .cart-items .price_type.total,
body.brand-shell .cart-items .creator b {
    color: var(--brand-ink);
}

body.brand-shell .cart-items .form-control,
body.brand-shell .cart-items .input-group-text {
    background-color: var(--brand-paper);
    color: var(--brand-ink);
    border-color: var(--brand-line);
}

body.brand-shell .cart-items .input-group-text.eBtn,
body.brand-shell .cart-items input.eBtn {
    background-color: var(--brand-accent);
    background-image: none;
    color: var(--brand-accent-ink);
    border-color: transparent;
}

body.brand-shell .nav.nav-bordered {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.brand-shell .nav.nav-bordered .nav-link {
    color: var(--brand-ink);
}

body.brand-shell #pills-reviews .review,
body.brand-shell #pills-reviews .E-review,
body.brand-shell #pills-reviews .g-title,
body.brand-shell #pills-reviews .description,
body.brand-shell #pills-reviews .ins-designation h5 {
    color: var(--brand-ink);
}

body.brand-shell #pills-reviews .review {
    background: var(--brand-surface);
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    padding: 20px;
}

body.brand-shell #pills-reviews .E-review {
    border-bottom-color: var(--brand-line);
}

body.brand-shell #pills-reviews .re-star,
body.brand-shell #pills-reviews .rating-stars {
    color: var(--brand-accent);
}

body.brand-shell #pills-reviews .form-control {
    background: var(--brand-paper);
    color: var(--brand-ink);
    border-color: var(--brand-line);
}

body.brand-shell #pills-reviews .write-review input.eBtn {
    background: var(--brand-accent);
    color: var(--brand-accent-ink);
}

/* Scroll reveal for course cards */
@media (prefers-reduced-motion: no-preference) {
    .brand-will-reveal {
        opacity: 0;
        transform: translateY(18px);
    }

    .brand-will-reveal.is-in {
        opacity: 1;
        transform: none;
        transition: opacity .7s var(--brand-ease), transform .7s var(--brand-ease);
        transition-delay: calc(var(--reveal-index, 0) * 60ms);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.brand-shell *,
    body.brand-shell *::before,
    body.brand-shell *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
