/* ═══════════════════════════════════════════════════════════
   Education Hub — Minimal Premium (مشاور املاک)
   ═══════════════════════════════════════════════════════════ */

.edu-page {
    --edu-radius: 12px;
    --edu-radius-lg: 16px;
    --edu-border: var(--mk-pub-border, rgba(148, 163, 184, 0.12));
    --edu-card: var(--mk-pub-card, rgba(15, 23, 42, 0.5));
    --edu-text: var(--mk-text, #f8fafc);
    --edu-muted: var(--mk-text-muted, #94a3b8);
    --edu-accent: var(--mk-purple, #a78bfa);
    --edu-gap: 1.25rem;
}

/* ─── Hero ─── */
.edu-hero {
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--edu-border);
}

.edu-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 400px);
    gap: 2.5rem;
    align-items: center;
}

.edu-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--edu-accent);
    margin-bottom: 0.75rem;
}

.edu-hero h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    line-height: 1.45;
    color: var(--edu-text);
    margin: 0 0 0.85rem;
    letter-spacing: -0.02em;
}

.edu-lead {
    font-size: 0.92rem;
    line-height: 1.85;
    color: var(--edu-muted);
    margin: 0 0 1.5rem;
    max-width: 42ch;
}

.edu-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.edu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.15rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.edu-btn:active { transform: scale(0.98); }

.edu-btn--primary {
    background: var(--edu-accent);
    color: #fff;
    border-color: transparent;
}

.edu-btn--primary:hover {
    filter: brightness(1.08);
    color: #fff;
}

.edu-btn--ghost {
    background: transparent;
    border-color: var(--edu-border);
    color: var(--edu-text);
}

.edu-btn--ghost:hover {
    background: rgba(148, 163, 184, 0.06);
    color: var(--edu-text);
}

.edu-btn--sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
}

.edu-hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.55rem;
    min-height: 280px;
}

.edu-hero-shot {
    margin: 0;
    border-radius: var(--edu-radius);
    overflow: hidden;
    border: 1px solid var(--edu-border);
    background: var(--edu-card);
}

.edu-hero-shot--1 { grid-column: 1 / 3; }

.edu-hero-shot figcaption {
    padding: 0.35rem 0.55rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--edu-muted);
    text-align: center;
    border-top: 1px solid var(--edu-border);
}

/* ─── Stats ─── */
.edu-stats {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.edu-stat {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--edu-border);
    background: var(--edu-card);
    font-size: 0.78rem;
}

.edu-stat strong {
    font-weight: 800;
    color: var(--edu-accent);
}

.edu-stat span {
    color: var(--edu-muted);
}

/* ─── Sections ─── */
.edu-section {
    padding: 3rem 0;
}

.edu-section--alt {
    background: rgba(148, 163, 184, 0.03);
    border-block: 1px solid var(--edu-border);
}

.edu-section-head {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto 2rem;
}

.edu-section-head h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--edu-text);
    margin: 0 0 0.45rem;
    letter-spacing: -0.02em;
}

.edu-section-head p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.75;
    color: var(--edu-muted);
}

/* ─── Image buttons ─── */
.edu-shot-btn,
.edu-path-cover-btn,
.edu-featured-visual,
.edu-module-cover,
.edu-gallery-shot,
.edu-lesson-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
    position: relative;
    font: inherit;
    color: inherit;
}

.edu-shot-btn img,
.edu-path-cover-btn img,
.edu-featured-visual img,
.edu-module-cover img,
.edu-gallery-shot img,
.edu-lesson-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.edu-shot-zoom {
    position: absolute;
    inset-inline-end: 0.45rem;
    bottom: 0.45rem;
    width: 1.65rem;
    height: 1.65rem;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 0.65rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.edu-shot-btn:hover .edu-shot-zoom,
.edu-path-cover-btn:hover .edu-shot-zoom,
.edu-featured-visual:hover .edu-shot-zoom,
.edu-module-cover:hover .edu-shot-zoom {
    opacity: 1;
}

/* ─── Paths ─── */
.edu-path-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 1.5rem;
}

.edu-path-tab {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.95rem;
    border-radius: var(--edu-radius);
    border: 1px solid var(--edu-border);
    background: var(--edu-card);
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    color: var(--edu-text);
    transition: border-color 0.2s, background 0.2s;
}

.edu-path-tab:hover { border-color: rgba(148, 163, 184, 0.28); }

.edu-path-tab.is-active {
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(124, 58, 237, 0.08);
}

.edu-path-tab-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.edu-path-tab-icon--emerald { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.edu-path-tab-icon--violet { background: rgba(124, 58, 237, 0.12); color: #a78bfa; }
.edu-path-tab-icon--sky { background: rgba(14, 165, 233, 0.12); color: #38bdf8; }

.edu-path-tab-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.edu-path-tab-text strong {
    font-size: 0.84rem;
    font-weight: 700;
}

.edu-path-tab-text span {
    font-size: 0.7rem;
    color: var(--edu-muted);
}

.edu-path-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.edu-path-badge--emerald { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }
.edu-path-badge--violet { background: rgba(124, 58, 237, 0.14); color: #c4b5fd; }
.edu-path-badge--sky { background: rgba(14, 165, 233, 0.14); color: #7dd3fc; }

.edu-path-panel[hidden] { display: none; }

.edu-path-panel {
    animation: edu-in 0.3s ease;
}

@keyframes edu-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.edu-path-layout {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.edu-path-cover {
    margin: 0;
    border-radius: var(--edu-radius-lg);
    overflow: hidden;
    border: 1px solid var(--edu-border);
    background: var(--edu-card);
    position: sticky;
    top: 1rem;
}

.edu-path-cover-btn { aspect-ratio: 4 / 3; }

.edu-path-cover figcaption {
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
    color: var(--edu-muted);
    text-align: center;
    border-top: 1px solid var(--edu-border);
}

.edu-path-intro {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--edu-muted);
    margin: 0 0 1rem;
}

.edu-path-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.edu-path-step {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: var(--edu-radius);
    border: 1px solid var(--edu-border);
    background: var(--edu-card);
    transition: border-color 0.2s;
}

.edu-path-step:hover { border-color: rgba(148, 163, 184, 0.22); }

.edu-path-step-num {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.12);
    color: var(--edu-accent);
    font-size: 0.78rem;
    font-weight: 800;
}

.edu-path-step-content { flex: 1; min-width: 0; }

.edu-path-step-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.edu-path-step-head strong {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--edu-text);
}

.edu-path-step-content p {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--edu-muted);
}

.edu-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--edu-accent);
    text-decoration: none;
}

.edu-link:hover { gap: 0.45rem; }

.edu-lock { font-size: 0.7rem; color: var(--edu-muted); opacity: 0.7; }

/* ─── Modules ─── */
.edu-modules {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 880px;
    margin-inline: auto;
}

.edu-module {
    border-radius: var(--edu-radius-lg);
    border: 1px solid var(--edu-border);
    background: var(--edu-card);
    overflow: hidden;
}

.edu-module-cover {
    aspect-ratio: 21 / 8;
    overflow: hidden;
    border-bottom: 1px solid var(--edu-border);
}

.edu-module-cover-label {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 0.45rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.88));
    text-align: right;
    pointer-events: none;
}

.edu-module-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--edu-border);
}

.edu-module-head-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.edu-module-head-icon--emerald { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.edu-module-head-icon--violet { background: rgba(124, 58, 237, 0.12); color: #a78bfa; }
.edu-module-head-icon--sky { background: rgba(14, 165, 233, 0.12); color: #38bdf8; }
.edu-module-head-icon--amber { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.edu-module-head-icon--rose { background: rgba(244, 63, 94, 0.12); color: #fb7185; }

.edu-module-head-copy { flex: 1; min-width: 0; }

.edu-module-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    margin-bottom: 0.25rem;
}

.edu-module-badge--emerald { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
.edu-module-badge--violet { background: rgba(124, 58, 237, 0.12); color: #c4b5fd; }
.edu-module-badge--sky { background: rgba(14, 165, 233, 0.12); color: #7dd3fc; }
.edu-module-badge--amber { background: rgba(245, 158, 11, 0.12); color: #fcd34d; }
.edu-module-badge--rose { background: rgba(244, 63, 94, 0.12); color: #fda4af; }

.edu-module-head-copy h3 {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--edu-text);
}

.edu-module-head-copy p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--edu-muted);
}

.edu-module-count {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--edu-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--edu-border);
}

.edu-lessons {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
}

.edu-lesson {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    transition: background 0.15s;
}

.edu-lesson:last-child { border-bottom: none; }
.edu-lesson:hover { background: rgba(148, 163, 184, 0.03); }

.edu-lesson-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--edu-border);
}

.edu-lesson-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.edu-lesson-body strong {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--edu-text);
}

.edu-lesson-body span {
    font-size: 0.74rem;
    line-height: 1.5;
    color: var(--edu-muted);
}

.edu-lesson-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.edu-lesson-time {
    font-size: 0.65rem;
    color: var(--edu-muted);
    white-space: nowrap;
}

.edu-lesson-go {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    border: 1px solid var(--edu-border);
    color: var(--edu-muted);
    text-decoration: none;
    font-size: 0.65rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.edu-lesson-go:hover {
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.3);
    color: var(--edu-accent);
}

/* ─── Gallery ─── */
.edu-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.edu-gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--edu-border);
    background: transparent;
    color: var(--edu-muted);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.edu-gallery-filter.is-active {
    border-color: rgba(167, 139, 250, 0.4);
    background: rgba(124, 58, 237, 0.1);
    color: var(--edu-accent);
}

.edu-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.65rem;
}

.edu-gallery-card {
    border-radius: var(--edu-radius);
    overflow: hidden;
    border: 1px solid var(--edu-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.edu-gallery-card.is-hidden { display: none; }

.edu-gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.4);
}

.edu-gallery-shot {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.edu-gallery-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.45;
    color: #fff;
    background: linear-gradient(transparent 30%, rgba(15, 23, 42, 0.9));
    opacity: 0;
    transition: opacity 0.2s;
    text-align: right;
}

.edu-gallery-shot:hover .edu-gallery-caption { opacity: 1; }

/* ─── Featured ─── */
.edu-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin-inline: auto;
}

.edu-featured-card {
    border-radius: var(--edu-radius-lg);
    border: 1px solid var(--edu-border);
    background: var(--edu-card);
    overflow: hidden;
}

.edu-featured-visual {
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid var(--edu-border);
}

.edu-featured-body { padding: 1.1rem 1.15rem 1.15rem; }

.edu-featured-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.edu-featured-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
}

.edu-featured-icon--emerald { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.edu-featured-icon--violet { background: rgba(124, 58, 237, 0.12); color: #a78bfa; }

.edu-featured-time {
    font-size: 0.7rem;
    color: var(--edu-muted);
}

.edu-featured-card h3 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--edu-text);
}

.edu-featured-card p {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--edu-muted);
}

/* ─── FAQ ─── */
.edu-faq-wrap { max-width: 640px; margin-inline: auto; }

.edu-faq {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.edu-faq-item {
    border-radius: var(--edu-radius);
    border: 1px solid var(--edu-border);
    background: var(--edu-card);
    overflow: hidden;
}

.edu-faq-item summary {
    padding: 0.85rem 1rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--edu-text);
    cursor: pointer;
    list-style: none;
}

.edu-faq-item summary::-webkit-details-marker { display: none; }

.edu-faq-item p {
    margin: 0;
    padding: 0 1rem 0.9rem;
    font-size: 0.82rem;
    line-height: 1.75;
    color: var(--edu-muted);
}

/* ─── CTA ─── */
.edu-cta {
    padding: 3rem 0;
    border-top: 1px solid var(--edu-border);
    text-align: center;
}

.edu-cta-inner h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.45rem;
    color: var(--edu-text);
}

.edu-cta-inner p {
    margin: 0 0 1.25rem;
    font-size: 0.86rem;
    line-height: 1.75;
    color: var(--edu-muted);
    max-width: 40ch;
    margin-inline: auto;
}

.edu-cta-inner .edu-hero-actions {
    justify-content: center;
}

/* ─── Lightbox ─── */
.edu-lightbox {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.edu-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.edu-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 11, 23, 0.92);
    backdrop-filter: blur(8px);
    border: none;
    cursor: zoom-out;
}

.edu-lightbox-panel {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    height: calc(100dvh - 2rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow: hidden;
}

.edu-lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
}

.edu-lightbox-title {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #fff;
    flex: 1;
}

.edu-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.edu-lightbox-btn {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: inherit;
    cursor: pointer;
}

.edu-lightbox-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.edu-lightbox-counter {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
}

.edu-lightbox-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--edu-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    padding: 0.5rem;
}

.edu-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
}

body.edu-lightbox-open { overflow: hidden; }

/* ─── Light theme ─── */
html.mk-public[data-theme="light"] .edu-page {
    --edu-card: #fff;
}

html.mk-public[data-theme="light"] .edu-path-badge--emerald,
html.mk-public[data-theme="light"] .edu-module-badge--emerald { color: #047857; }
html.mk-public[data-theme="light"] .edu-path-badge--violet,
html.mk-public[data-theme="light"] .edu-module-badge--violet { color: #6d28d9; }
html.mk-public[data-theme="light"] .edu-path-badge--sky,
html.mk-public[data-theme="light"] .edu-module-badge--sky { color: #0369a1; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .edu-hero-grid { grid-template-columns: 1fr; }
    .edu-hero-visual { max-width: 380px; margin-inline: auto; }
    .edu-path-layout { grid-template-columns: 1fr; }
    .edu-path-cover { position: static; }
    .edu-featured-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .edu-path-tabs { grid-template-columns: 1fr; }
    .edu-section { padding: 2.25rem 0; }
    .edu-lesson-time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .edu-path-panel { animation: none; }
    .edu-gallery-card,
    .edu-path-step { transition: none; }
}
