/*
 * ============================================
 * أنماط الخط الزمني — التقارير السنوية
 * ============================================
 */

/* --- الحاوية --- */
.qm-ar-wrap {
    direction: rtl;
    text-align: right;
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 16px;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* --- العناوين --- */
.qm-ar-title {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
    color: #1a1a2e;
}

.qm-ar-subtitle {
    font-size: 14px;
    text-align: center;
    color: #6b7280;
    margin: 0 0 28px;
    line-height: 1.6;
}


/* ============================================
   شريط الخط الزمني
   ============================================ */
.qm-ar-track {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 0 auto 24px;
    padding: 14px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* الخط الأفقي */
.qm-ar-line {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-5px);
    z-index: 0;
}

/* زر كل سنة */
.qm-ar-dot-btn {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.qm-ar-dot-btn:hover {
    transform: scale(1.1);
}

/* النقطة */
.qm-ar-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid #c9cdd3;
    background: #fff;
    transition: all 0.3s ease;
}

.qm-ar-dot-btn.active .qm-ar-dot {
    background: var(--clr, #1D9E75);
    border-color: var(--clr, #1D9E75);
    box-shadow: 0 0 0 5px rgba(29,158,117,0.15);
    transform: scale(1.15);
}

.qm-ar-dot-btn:not(.active):hover .qm-ar-dot {
    border-color: var(--clr, #1D9E75);
}

/* تسمية السنة */
.qm-ar-yr {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    transition: color 0.2s;
}

.qm-ar-dot-btn.active .qm-ar-yr {
    color: var(--clr, #1D9E75);
    font-weight: 700;
}


/* ============================================
   بطاقة التقرير
   ============================================ */
.qm-ar-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 24px;
    margin: 0 auto;
    max-width: 680px;
    border: 1px solid rgba(0,0,0,0.06);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.35s, transform 0.35s;
}

.qm-ar-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* شارة السنة */
.qm-ar-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    padding: 3px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
}

/* عنوان التقرير */
.qm-ar-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.7;
    margin: 0 0 6px;
}

/* الملخص */
.qm-ar-card-summary {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.8;
    margin: 0 0 18px;
}


/* ============================================
   أقسام التقرير (Accordion)
   ============================================ */
.qm-ar-sec {
    background: #fff;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
    /* أنيميشن الظهور */
    animation: qmFadeUp 0.3s ease both;
}

.qm-ar-sec:nth-child(2) { animation-delay: 0.05s; }
.qm-ar-sec:nth-child(3) { animation-delay: 0.1s; }
.qm-ar-sec:nth-child(4) { animation-delay: 0.15s; }
.qm-ar-sec:nth-child(5) { animation-delay: 0.2s; }
.qm-ar-sec:nth-child(6) { animation-delay: 0.25s; }

.qm-ar-sec:hover {
    border-color: rgba(0,0,0,0.12);
}

/* رأس القسم */
.qm-ar-sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: right;
    direction: rtl;
    font-family: inherit;
}

.qm-ar-sec-head:hover {
    background: rgba(0,0,0,0.015);
}

/* نقطة اللون */
.qm-ar-sec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* عنوان القسم */
.qm-ar-sec-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
}

/* سهم الطي */
.qm-ar-sec-arrow {
    font-size: 11px;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.qm-ar-sec.open .qm-ar-sec-arrow {
    transform: rotate(180deg);
}

/* محتوى القسم */
.qm-ar-sec-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.qm-ar-sec.open .qm-ar-sec-body {
    max-height: 800px;
}

.qm-ar-sec-inner {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.qm-ar-sec-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 2;
    margin-top: 12px;
}

.qm-ar-sec-text p {
    margin: 0 0 10px;
}
.qm-ar-sec-text p:last-child {
    margin: 0;
}


/* ============================================
   أزرار التنقل
   ============================================ */
.qm-ar-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.qm-ar-nav-btn {
    background: transparent;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.qm-ar-nav-btn:hover {
    background: #f1f5f9;
    color: #1a1a2e;
    border-color: #9ca3af;
}


/* ============================================
   أنيميشن
   ============================================ */
@keyframes qmFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================
   تجاوب الموبايل
   ============================================ */
@media (max-width: 768px) {
    .qm-ar-title { font-size: 21px; }
    .qm-ar-subtitle { font-size: 13px; margin-bottom: 20px; }
    .qm-ar-track { justify-content: flex-start; }
    .qm-ar-card { padding: 18px; border-radius: 12px; }
    .qm-ar-card-title { font-size: 15px; }
    .qm-ar-sec-name { font-size: 13px; }
    .qm-ar-sec-text { font-size: 13px; line-height: 1.9; }
    .qm-ar-nav-btn { padding: 6px 14px; font-size: 12px; }
}

@media (max-width: 480px) {
    .qm-ar-wrap { padding: 20px 12px; }
    .qm-ar-title { font-size: 19px; }
    .qm-ar-dot { width: 14px; height: 14px; }
    .qm-ar-yr { font-size: 10px; }
}
