/* ============================================================
   CORE SERVICES — minimal wireframe table
   Title block separate, board separate; site font, gray rules
   ============================================================ */

.core-services-section {
    --cs-line: var(--line-strong);
    --cs-ink: var(--text-muted);
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

.core-services-section,
.core-services-section .container,
.core-services-section .inner {
    overflow: visible !important;
}

/* خطوط و نقطه‌های سکشن، هم‌رنگ بقیه سایت */
.core-services-section::before,
.core-services-section::after,
.core-services-section .inner::before,
.core-services-section .inner::after {
    background: var(--line-px) !important;
}

.core-services-section .dot {
    background: var(--dot-empty) !important;
    border-color: var(--cs-line) !important;
    box-shadow: none !important;
}

/* ============================================================
   HEADER — کادر خط‌کشی جدا برای تایتل
   ============================================================ */
#services .cs-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 34px !important;
    padding: 22px 32px !important;
    position: relative !important;
    text-align: center !important;
    overflow: visible !important;
}

#services .cs-header::before {
    content: '' !important;
    position: absolute !important;
    left: calc(-1 * var(--line-ext)) !important;
    right: calc(-1 * var(--line-ext)) !important;
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    border: 0 !important;
    border-top: 1px solid var(--cs-line) !important;
    border-bottom: 1px solid var(--cs-line) !important;
    background: none !important;
    pointer-events: none;
}

#services .cs-header::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    border: 0 !important;
    border-left: 1px solid var(--cs-line) !important;
    border-right: 1px solid var(--cs-line) !important;
    background: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

#services .cs-header h2 {
    margin: 0 0 6px !important;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 2rem !important;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
}

#services .cs-header p {
    max-width: 560px;
    margin: 0 auto !important;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.82rem !important;
    opacity: 0.45;
}

/* ============================================================
   BOARD
   ============================================================ */
.cs-board {
    position: relative;
    border: 1px solid var(--cs-line);
    z-index: 2;
}

.cs-board::before,
.cs-board::after {
    content: '';
    position: absolute;
    top: -1px;
    height: 1px;
    background: var(--cs-line);
    pointer-events: none;
    z-index: 3;
}

.cs-board::before { left: 100%; right: calc(-1 * var(--line-ext)); }
.cs-board::after { right: 100%; left: calc(-1 * var(--line-ext)); }

/* خط پایین برد تا لبه‌های صفحه */
.cs-board-edge {
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: -1px;
    height: 1px;
    background: var(--cs-line);
    pointer-events: none;
    z-index: 3;
}

.cs-board-edge::before,
.cs-board-edge::after {
    content: '';
    position: absolute;
    top: 0;
    height: 1px;
    background: var(--cs-line);
    pointer-events: none;
}

.cs-board-edge::before { left: 100%; right: calc(-1 * var(--line-ext)); }
.cs-board-edge::after { right: 100%; left: calc(-1 * var(--line-ext)); }

.cs-grid {
    display: block;
}

/* ============================================================
   LIST — group rows + service rows
   ============================================================ */
.cs-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cs-group-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--cs-line);
    background: rgba(255, 255, 255, 0.008);
}

[data-theme="light"] .cs-group-row {
    background: rgba(0, 0, 0, 0.008);
}

.cs-group-num {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--cs-ink);
    opacity: 0.55;
}

.cs-group-name {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cs-ink);
}

.cs-row {
    display: grid;
    grid-template-columns: 46px 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 13px 24px;
    border-bottom: 1px solid var(--cs-line);
    transition: background 0.25s ease;
}

/* هر خط افقی این بخش تا دو لبه‌ی صفحه کشیده می‌شود */
.cs-group-row,
.cs-row {
    position: relative;
}

.cs-group-row::before,
.cs-group-row::after,
.cs-row::before,
.cs-row::after {
    content: '';
    position: absolute;
    bottom: -1px;
    height: 1px;
    background: var(--cs-line);
    pointer-events: none;
    z-index: 3;
}

.cs-group-row::before,
.cs-row::before { right: 100%; left: calc(-1 * var(--line-ext)); }

.cs-group-row::after,
.cs-row::after { left: 100%; right: calc(-1 * var(--line-ext)); }

.cs-row:last-child {
    border-bottom: 0;
}

.cs-row:hover {
    background: rgba(255, 255, 255, 0.014);
}

[data-theme="light"] .cs-row:hover {
    background: rgba(0, 0, 0, 0.016);
}

.cs-num {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--cs-ink);
    opacity: 0.55;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.cs-row:hover .cs-num {
    opacity: 1;
    color: var(--text);
}

.cs-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    color: var(--cs-ink);
    opacity: 0.55;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.cs-row:hover .cs-icon {
    opacity: 0.9;
    color: var(--text);
}

.cs-info h3 {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 3px;
    letter-spacing: -0.2px;
}

.cs-info p {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.79rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.cs-tag {
    justify-self: end;
    align-self: center;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cs-ink);
    border: 1px solid var(--cs-line);
    padding: 5px 12px;
    white-space: nowrap;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.cs-row:hover .cs-tag {
    color: var(--text);
    border-color: var(--line-border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    #services .cs-header {
        padding: 18px 20px !important;
        margin-bottom: 24px !important;
    }

    #services .cs-header h2 { font-size: 1.5rem !important; }

    .cs-row {
        grid-template-columns: 38px 26px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 12px 18px;
    }

    .cs-info h3 { font-size: 0.9rem; }
    .cs-info p { font-size: 0.76rem; }

    .cs-group-row { padding: 12px 18px; }
}

@media (max-width: 560px) {
    .core-services-section { padding: 40px 0; }

    #services .cs-header::before {
        left: -1200px !important;
        right: -1200px !important;
    }

    #services .cs-header h2 { font-size: 1.2rem !important; }

    .cs-row {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 10px;
        padding: 12px 16px;
    }

    .cs-icon,
    .cs-tag {
        display: none;
    }

    .cs-num { font-size: 0.7rem; }
    .cs-info h3 { font-size: 0.88rem; }
    .cs-info p { font-size: 0.75rem; }
}
