/* يُحمَّل بعد site.css — يصلح المتغيرات المفقودة ويضيف أنماط لوحة الإدارة */
:root {
    --syria-green: #007a3d;
}

.page-section {
    padding: 120px 0 80px;
    min-height: 70vh;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid rgba(0,122,61,.3);
    border-radius: 50px;
    background: transparent;
    color: var(--syria-green);
    font: 800 .85rem 'Cairo', sans-serif;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--syria-green);
    color: #fff;
}

.form-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 10px 35px rgba(0,0,0,.04);
}

.form-panel.narrow {
    max-width: 460px;
    margin: 0 auto;
}

.panel-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.panel-sub {
    color: var(--muted);
    margin-bottom: 24px;
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 11px 14px;
    border-color: rgba(0,0,0,.12);
}

.form-control:focus, .form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0,122,61,.12);
}

.admin-alert {
    border-radius: 12px;
}

.article-noimg {
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: rgba(0,122,61,.35);
    background: rgba(0,122,61,.06);
}

.card-admin {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

    .card-admin .btn {
        border-radius: 50px;
        font-weight: 700;
    }

.article-full {
    max-width: 780px;
    margin: 0 auto;
}

    .article-full h1 {
        font-weight: 900;
        line-height: 1.5;
        margin: 14px 0 8px;
        font-size: clamp(1.7rem, 4vw, 2.5rem);
    }

.article-meta {
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: 24px;
}

.article-cover {
    width: 100%;
    border-radius: 18px;
    margin-bottom: 28px;
}

.article-text {
    line-height: 2.1;
    font-size: 1.05rem;
}

.article-category.static {
    position: static;
    display: inline-block;
}

.articles-header {
    gap: 16px;
    flex-wrap: wrap;
}

.article-text.plain {
    white-space: pre-line;
}

.article-text blockquote {
    border-right: 4px solid var(--green);
    padding: 4px 16px;
    color: var(--muted);
}

.article-text h2, .article-text h3 {
    font-weight: 900;
    margin: 1.5em 0 .5em;
}

/* محرر المقال */
#editor {
    min-height: 320px;
    background: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}

.ql-toolbar.ql-snow {
    border-radius: 12px 12px 0 0;
}

.ql-container.ql-snow {
    border-radius: 0 0 12px 12px;
}

.ql-editor {
    direction: rtl;
    text-align: right;
    line-height: 2;
    min-height: 320px;
}

    .ql-editor.ql-blank::before {
        right: 15px;
        left: auto;
    }

.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
    content: attr(data-value) !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before {
    content: '16px' !important;
}

.member-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 8px 6px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

    .member-search > i {
        color: var(--muted);
        padding-inline: 8px;
    }

    .member-search input[type="search"] {
        flex: 1;
        min-width: 0;
        padding: 8px 4px;
        border: 0;
        outline: 0;
        background: transparent;
        font: 600 .95rem 'Cairo', sans-serif;
    }

    .member-search button {
        padding: 8px 22px;
        border: 0;
        border-radius: 50px;
        color: #fff;
        font: 800 .85rem 'Cairo', sans-serif;
        background: linear-gradient(135deg, var(--green), var(--green-light));
    }

    .member-search .clear {
        color: var(--red);
        font-weight: 800;
        font-size: .85rem;
        padding: 0 8px;
        white-space: nowrap;
    }

/* ===== VIDEO SECTION ===== */
.video-section {
    background: var(--light);
}

.video-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    align-items: start;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    box-shadow: 0 25px 60px rgba(0,0,0,.18);
}

    .video-frame iframe, .video-poster {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

.video-poster {
    padding: 0;
    background: #000;
    cursor: pointer;
    display: block;
}

    .video-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: .85;
        transition: opacity .3s, transform .6s;
    }

    .video-poster:hover img {
        opacity: 1;
        transform: scale(1.03);
    }

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    color: #fff;
    background: var(--green);
    box-shadow: 0 0 0 10px rgba(0,122,61,.28);
    transition: transform .3s, box-shadow .3s;
}

.video-poster:hover .video-play {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 0 16px rgba(0,122,61,.22);
}

.video-poster:focus-visible, .video-item:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 3px;
}

.video-title {
    margin: 18px 4px 0;
    font-size: 1.2rem;
    font-weight: 900;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding: 2px;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    text-align: right;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    font: 700 .88rem/1.6 'Cairo', sans-serif;
    color: var(--dark);
    transition: var(--transition);
}

.video-item img {
    width: 110px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 9px;
    flex-shrink: 0;
}

.video-item:hover {
    transform: translateX(-4px);
    border-color: rgba(0,122,61,.3);
}

.video-item.active {
    border-color: var(--green);
    background: rgba(0,122,61,.06);
}

/* ===== STATS STRIP ===== */
.stats-strip {
    position: relative;
    z-index: 30;
    margin-top: -70px;
    padding-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0,122,61,.12);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,.10);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(0,0,0,.14);
}

.stat-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--green), var(--green-light));
    box-shadow: 0 10px 22px rgba(0,122,61,.28);
}

.stat-num {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 900;
    line-height: 1;
    color: var(--dark);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    margin-top: 6px;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}

.stat-cta {
    justify-content: space-between;
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, var(--green-dark), var(--green));
}

    .stat-cta:hover {
        color: #fff;
    }

.stat-cta-title {
    font-size: 1.35rem;
    font-weight: 900;
}

.stat-cta .stat-label {
    color: rgba(255,255,255,.8);
}

.stat-cta > i {
    font-size: 2rem;
    transition: transform .3s ease;
}

.stat-cta:hover > i {
    transform: translateX(-6px);
}

@media (max-width: 767px) {
    .stats-strip {
        margin-top: -40px;
    }

    .stat-card {
        padding: 16px 18px;
    }

    .stat-icon {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }
}

@media (max-width: 991px) {
    .video-layout {
        grid-template-columns: 1fr;
    }

    .video-list {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .video-item {
        flex: 0 0 240px;
        flex-direction: column;
        align-items: stretch;
    }

        .video-item img {
            width: 100%;
        }
}

@media (max-width: 575px) {
    .video-play {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }
}