:root {
    --bg: #FFFFFF;
    --bg-alt: #F8FAFC;
    --bg-card: #FFFFFF;
    --text: #0F172A;
    --text-muted: #64748B;
    --text-faint: #94A3B8;
    --green: #00D4C0;
    --green-light: #E6FAF9;
    --green-mid: #00B5A3;
    --border: #E2E8F0;
    --gold: #C9A84C;
}

html { direction: rtl; scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: Tajawal, Arial, sans-serif;
    line-height: 1.8;
}

body .site,
body .site-main { background: var(--bg); }

a { color: var(--green-mid); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--text); }

.ertaqi-container {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}

.ertaqi-section { padding: 76px 0; background: var(--bg); }
.ertaqi-section-alt,
.ertaqi-band { background: var(--bg-alt); }

.ertaqi-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 5px 13px;
    border: 1px solid var(--green);
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green-mid);
    font-size: 13px;
    font-weight: 800;
}

.ertaqi-section-head {
    max-width: 720px;
    margin-bottom: 32px;
}

.ertaqi-section-head--split,
.ertaqi-page-head__grid {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    max-width: none;
}

.ertaqi-section-head h2,
.ertaqi-page-head h1,
.ertaqi-home-hero h1,
.ertaqi-instructor-hero h1,
.ertaqi-form-shell h1 {
    margin: 12px 0;
    color: var(--text);
    line-height: 1.25;
    font-weight: 900;
}

.ertaqi-home-hero h1,
.ertaqi-instructor-hero h1 { font-size: clamp(34px, 5vw, 58px); }

.ertaqi-section-head h2,
.ertaqi-page-head h1,
.ertaqi-form-shell h1 { font-size: clamp(28px, 4vw, 44px); }

.ertaqi-page-head p,
.ertaqi-hero-copy,
.ertaqi-lead {
    color: var(--text-muted);
    font-size: 19px;
}

.ertaqi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 8px;
    border: 1px solid var(--green);
    background: var(--green);
    color: #FFFFFF;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.ertaqi-btn:hover {
    background: var(--green-mid);
    border-color: var(--green-mid);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.ertaqi-btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}

.ertaqi-btn-secondary:hover {
    background: var(--green-light);
    color: var(--green-mid);
    border-color: var(--green);
}

.ertaqi-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.ertaqi-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 20px;
}

.ertaqi-course-card,
.ertaqi-mini-card,
.ertaqi-content-card,
.ertaqi-sidebar-card,
.ertaqi-profile-card,
.ertaqi-form,
.ertaqi-student-hero,
.ertaqi-profile-overview article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .055);
}

.ertaqi-course-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ertaqi-course-card img,
.ertaqi-course-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.ertaqi-course-placeholder {
    display: grid;
    place-items: center;
    background: var(--green-light);
    color: var(--green-mid);
    font-weight: 900;
    font-size: 24px;
}

.ertaqi-course-card > div,
.ertaqi-mini-card,
.ertaqi-content-card,
.ertaqi-sidebar-card,
.ertaqi-profile-card { padding: 24px; }

.ertaqi-course-card h2,
.ertaqi-course-card h3,
.ertaqi-mini-card h3,
.ertaqi-profile-card h2,
.ertaqi-content-card h2,
.ertaqi-sidebar-card h2 {
    margin: 0 0 10px;
    color: var(--text);
    line-height: 1.4;
}

.ertaqi-course-card p,
.ertaqi-mini-card p,
.ertaqi-content-card,
.ertaqi-muted,
.ertaqi-empty {
    color: var(--text-muted);
}

.ertaqi-empty {
    padding: 22px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--bg-alt);
}

.ertaqi-pill,
.ertaqi-tags span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green-mid);
    border: 1px solid var(--green);
    font-size: 12px;
    font-weight: 800;
}

.ertaqi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ertaqi-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 16px;
}

.ertaqi-card-footer strong { color: var(--text); }
.ertaqi-card-footer a,
.ertaqi-mini-card a { font-weight: 800; }

.ertaqi-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) minmax(180px, .8fr) auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-alt);
    direction: rtl;
}

.ertaqi-filter-bar label {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-weight: 800;
}

.ertaqi-filter-bar label span {
    font-size: 13px;
    color: var(--text-muted);
}

.ertaqi-filter-bar input,
.ertaqi-filter-bar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    padding: 8px 12px;
    font-family: inherit;
}

.ertaqi-filter-bar button { align-self: end; }

.ertaqi-courses-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    direction: rtl;
}

.ertaqi-courses-toolbar p {
    margin: 0;
    color: var(--text-muted);
    font-weight: 700;
}

.ertaqi-courses-toolbar a { font-weight: 800; }

.ertaqi-pagination {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    direction: rtl;
}

.ertaqi-pagination a,
.ertaqi-pagination span {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    text-decoration: none;
    font-weight: 800;
}

.ertaqi-pagination .current {
    background: var(--green);
    border-color: var(--green);
    color: #FFFFFF;
}

.ertaqi-page-head {
    position: relative;
    overflow: hidden;
    padding: 72px 0 52px;
    background:
        linear-gradient(90deg, rgba(0, 212, 192, .10) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0, 212, 192, .08) 1px, transparent 1px),
        linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 58%, #E6FAF9 100%);
    background-size: 42px 42px, 42px 42px, auto;
    border-bottom: 1px solid var(--border);
}

.ertaqi-page-head::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 38%;
    height: 6px;
    background: var(--green);
}

.ertaqi-page-head__grid {
    position: relative;
    z-index: 1;
}

.ertaqi-page-head__grid > div:first-child {
    max-width: 720px;
}

.ertaqi-hero-panel {
    min-width: 190px;
    padding: 18px;
    border: 1px solid rgba(0, 181, 163, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 16px 35px rgba(15, 23, 42, .07);
}

.ertaqi-hero-panel strong {
    display: block;
    color: var(--green-mid);
    font-size: 30px;
    line-height: 1.2;
}

.ertaqi-hero-panel span {
    color: var(--text-muted);
    font-weight: 800;
}

.ertaqi-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
}

.ertaqi-sidebar-card {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 12px;
}

.ertaqi-sidebar-card a:not(.ertaqi-btn) {
    color: var(--green-mid);
    font-weight: 800;
    text-decoration: none;
}

.ertaqi-clean-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ertaqi-clean-list li {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-alt);
}

.ertaqi-rich-text p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
    .ertaqi-two-col { grid-template-columns: 1fr; }
    .ertaqi-sidebar-card { position: static; }
    .ertaqi-section-head--split,
    .ertaqi-page-head__grid { align-items: start; flex-direction: column; }
    .ertaqi-hero-panel { width: 100%; }
}

@media (max-width: 820px) {
    .ertaqi-container { width: min(100% - 28px, 1160px); }
    .ertaqi-section { padding: 54px 0; }
    .ertaqi-card-footer { align-items: start; flex-direction: column; }
    .ertaqi-filter-bar { grid-template-columns: 1fr; }
    .ertaqi-filter-bar button { align-self: stretch; }
    .ertaqi-courses-toolbar { align-items: start; flex-direction: column; }
}
