/**
 * MarwaLegal — Service Pages (shared + labor-cases)
 * Reusable patterns across optimized service pages (Apr 2026 doc).
 *
 * Shared section types (all 5 pages):
 * - sp-intro          — opening H2 + paragraphs
 * - sp-highlight      — accent panel + checklist
 * - sp-cards-grid     — H3 service/type cards
 * - sp-split          — two-column rights & obligations
 * - sp-process        — numbered process flow
 * - sp-timeline       — timeline / phased list
 * - sp-challenges     — challenge bullet grid
 * - sp-why            — why choose + feature list
 * - sp-approach-grid  — step cards (mirrors homepage ml-approach)
 * - sp-faq            — accordion FAQ
 * - sp-cta-inline     — bottom consultation CTA
 */

/* ── Tokens ── */
.sp-content {
    --sp-green: #173f38;
    --sp-green-dark: #132824;
    --sp-gold: #bf9364;
    --sp-gold-light: #c19b76;
    --sp-text: #5d6663;
    --sp-text-dark: #132824;
    --sp-smoke: #f5f7f6;
    --sp-smoke2: #eef2f0;
    --sp-border: rgba(22, 58, 50, 0.1);
    --sp-radius: 18px;
    --sp-radius-lg: 24px;
    --sp-shadow: 0 14px 40px rgba(19, 40, 36, 0.07);
    --sp-shadow-hover: 0 22px 50px rgba(19, 40, 36, 0.12);
}

/* ── Reveal animation ── */
.sp-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sp-reveal[data-delay="1"] { transition-delay: 0.08s; }
.sp-reveal[data-delay="2"] { transition-delay: 0.16s; }
.sp-reveal[data-delay="3"] { transition-delay: 0.24s; }
.sp-reveal[data-delay="4"] { transition-delay: 0.32s; }
.sp-reveal[data-delay="5"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .sp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Generic section blocks ── */
.sp-section-block {
    padding: 34px 32px;
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
}

.sp-section-block--alt {
    background: var(--sp-smoke);
    border-color: transparent;
    box-shadow: none;
}

.sp-inline-heading {
    font-size: 21px;
    line-height: 1.35;
    color: var(--sp-green);
    margin: 28px 0 14px;
}

.sp-inline-heading:first-of-type {
    margin-top: 8px;
}

.sp-faq-section .sp-faq {
    margin-top: 8px;
}

.sp-case-section .sp-case-list,
.sp-approach-section .sp-approach-grid,
.sp-process-section .sp-process,
.sp-split-section .sp-split {
    margin-top: 20px;
}

/* ── Base section ── */
.sp-section {
    margin-bottom: 56px;
}

.sp-section:last-child {
    margin-bottom: 0;
}

.sp-section__title {
    color: var(--sp-text-dark);
    font-family: var(--title-font);
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.25;
    margin-bottom: 20px;
    position: relative;
}

.sp-section__title::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 14px;
    background: linear-gradient(90deg, var(--sp-gold), transparent);
    border-radius: 2px;
}

.sp-section__lead,
.sp-section p {
    color: var(--sp-text);
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 16px;
}

.sp-section__lead:last-child,
.sp-section p:last-child {
    margin-bottom: 0;
}

/* ── 1. Intro (shared) ── */
.sp-intro {
    padding: 36px 38px;
    background: #fff;
    border: 1px solid var(--sp-border);
    border-left: 4px solid var(--sp-gold);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
}

.sp-intro p + p {
    margin-top: 14px;
}

/* ── 2. Highlight panel + checklist (shared) ── */
.sp-highlight {
    padding: 40px 38px;
    background: linear-gradient(135deg, var(--sp-green-dark) 0%, var(--sp-green) 100%);
    border-radius: var(--sp-radius-lg);
    color: #fff;
    box-shadow: 0 20px 50px rgba(23, 63, 56, 0.2);
    overflow: hidden;
    position: relative;
}

.sp-highlight::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: rgba(191, 147, 100, 0.12);
    border-radius: 50%;
    pointer-events: none;
}

.sp-highlight .sp-section__title {
    color: #fff;
}

.sp-highlight .sp-section__title::after {
    background: linear-gradient(90deg, var(--sp-gold), transparent);
}

.sp-highlight p,
.sp-highlight .sp-section__lead,
.sp-highlight li {
    color: rgba(255, 255, 255, 0.88);
}

.sp-highlight .sp-inline-heading,
.sp-highlight h3:not(.sp-section__title) {
    color: #ffffff;
}

.sp-highlight .sp-inline-heading:first-of-type {
    margin-top: 8px;
}

.sp-checklist {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.sp-checklist li {
    position: relative;
    padding: 14px 18px 14px 48px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.6;
    transition: background 0.25s ease, transform 0.25s ease;
}

.sp-checklist li:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.sp-checklist li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--sp-green-dark);
    background: var(--sp-gold);
    border-radius: 50%;
}

/* Light checklist variant (split columns) */
.sp-checklist--light li {
    background: #fff;
    border-color: var(--sp-border);
    color: var(--sp-text);
    box-shadow: 0 4px 16px rgba(19, 40, 36, 0.04);
}

.sp-checklist--light li::before {
    color: #fff;
    background: var(--sp-green);
}

/* ── 3. Cards grid (shared) ── */
.sp-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.sp-card {
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 28px 26px;
    box-shadow: var(--sp-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.sp-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sp-shadow-hover);
    border-color: rgba(191, 147, 100, 0.35);
}

.sp-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--sp-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    padding: 12px;
}

.sp-card__icon img {
    max-width: 24px;
    max-height: 24px;
    filter: brightness(0) invert(1);
}

.sp-card h3 {
    font-size: 20px;
    line-height: 1.35;
    color: var(--sp-text-dark);
    margin-bottom: 10px;
}

.sp-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
}

.sp-card--wide {
    grid-column: 1 / -1;
}

/* ── 4. Case types — alternating rows ── */
.sp-case-list {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-case-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    align-items: start;
    padding: 24px 26px;
    background: var(--sp-smoke);
    border-radius: var(--sp-radius);
    border: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.sp-case-item:nth-child(even) {
    background: #fff;
    border-color: var(--sp-border);
    box-shadow: var(--sp-shadow);
}

.sp-case-item:hover {
    transform: translateX(6px);
    border-color: rgba(191, 147, 100, 0.3);
}

.sp-case-item__num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--sp-gold);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-case-item h3 {
    font-size: 19px;
    color: var(--sp-text-dark);
    margin-bottom: 8px;
    line-height: 1.35;
}

.sp-case-item p {
    margin: 0;
    font-size: 15px;
}

/* ── 5. Split columns (shared) ── */
.sp-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.sp-split__col {
    padding: 30px 28px;
    border-radius: var(--sp-radius);
    background: #fff;
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow);
}

.sp-split__col--accent {
    background: linear-gradient(160deg, var(--sp-smoke2) 0%, #fff 100%);
    border-top: 3px solid var(--sp-green);
}

.sp-split__col h3 {
    font-size: 21px;
    color: var(--sp-green);
    margin-bottom: 14px;
}

.sp-split__col > p {
    font-size: 15px;
    margin-bottom: 14px;
}

/* ── 6. Process steps (shared) ── */
.sp-process {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 18px 22px;
    margin-top: 28px;
    position: relative;
}

/* Intro paragraph must span full row (HTML may place it inside .sp-process) */
.sp-process > p {
    flex: 0 0 100%;
    width: 100%;
    text-align: left;
    margin: 0 0 28px;
    color: var(--sp-text);
    font-size: 16px;
    line-height: 1.85;
}

.sp-process__step {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 10px 0;
}

/* Connector lines between step dots (desktop) */
@media (min-width: 1200px) {
    .sp-process__step:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 42px;
        left: calc(50% + 22px);
        width: calc(100% - 44px + 22px);
        height: 2px;
        background: linear-gradient(90deg, var(--sp-gold), var(--sp-green), var(--sp-gold));
        opacity: 0.35;
        pointer-events: none;
        z-index: 0;
    }
}

.sp-process__dot {
    width: 44px;
    height: 44px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--sp-green);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px var(--sp-smoke2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sp-process__step:hover .sp-process__dot {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(191, 147, 100, 0.25);
}

.sp-process__step h3 {
    font-size: 16px;
    line-height: 1.4;
    color: var(--sp-text-dark);
    margin-bottom: 8px;
}

.sp-process__step p {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ── 7. Timeline (shared) ── */
.sp-timeline-section > p {
    color: var(--sp-text);
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 16px;
}

.sp-timeline {
    margin-top: 12px;
    padding-left: 28px;
    border-left: 2px solid var(--sp-gold);
}

.sp-timeline__item {
    position: relative;
    padding: 0 0 28px 24px;
}

.sp-timeline__item:last-child {
    padding-bottom: 0;
}

.sp-timeline__item::before {
    content: "";
    position: absolute;
    left: -33px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--sp-green);
    box-shadow: 0 0 0 4px rgba(23, 63, 56, 0.15);
}

.sp-timeline__item p {
    margin: 0;
    font-size: 15px;
}

.sp-timeline__item p strong {
    display: block;
    color: var(--sp-text-dark);
    font-size: 16px;
    margin-bottom: 4px;
}

/* ── 8. Challenges pills (shared) ── */
.sp-challenges {
    padding: 36px 34px;
    background: var(--sp-smoke);
    border-radius: var(--sp-radius-lg);
    border: 1px solid var(--sp-border);
}

.sp-challenges__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 20px;
}

.sp-challenges__tag {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--sp-text-dark);
    line-height: 1.4;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.sp-challenges__tag:hover {
    background: var(--sp-green);
    border-color: var(--sp-green);
    color: #fff;
    transform: translateY(-2px);
}

/* ── 9. Why choose (shared) ── */
.sp-why {
    padding: 38px 36px;
    background: #fff;
    border-radius: var(--sp-radius-lg);
    border: 1px solid var(--sp-border);
    box-shadow: var(--sp-shadow);
}

.sp-why__list {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.sp-why__list li {
    position: relative;
    padding: 14px 16px 14px 42px;
    background: var(--sp-smoke);
    border-radius: 12px;
    font-size: 15px;
    color: var(--sp-text-dark);
    line-height: 1.55;
    transition: background 0.25s ease;
}

.sp-why__list li:hover {
    background: var(--sp-smoke2);
}

.sp-why__list li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 18px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sp-gold);
}

/* ── 10. Approach grid (shared — mirrors homepage ml-approach) ── */
.sp-approach-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.ml-approach-step {
    position: relative;
    background: var(--sp-green);
    border-radius: var(--sp-radius);
    padding: 28px 22px 24px;
    color: #fff;
    overflow: hidden;
    min-height: 220px;
    box-shadow: 0 18px 40px rgba(23, 63, 56, 0.12);
}

.ml-approach-step::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 86px;
    height: 86px;
    background: rgba(191, 147, 100, 0.18);
    border-bottom-left-radius: 86px;
}

.ml-approach-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--sp-gold);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 18px;
}

.ml-approach-step h3 {
    color: #fff;
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 12px;
}

.ml-approach-step p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    line-height: 1.75;
}

/* ── 11. FAQ accordion (shared) ── */
.sp-faq {
    margin-top: 8px;
}

.sp-faq__item {
    border: 1px solid var(--sp-border);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.sp-faq__item:hover {
    border-color: rgba(191, 147, 100, 0.35);
}

.sp-faq__item.is-open {
    box-shadow: var(--sp-shadow);
    border-color: rgba(23, 63, 56, 0.2);
}

.sp-faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--title-font);
    font-size: 17px;
    line-height: 1.45;
    color: var(--sp-text-dark);
    transition: color 0.2s ease;
}

.sp-faq__question:hover {
    color: var(--sp-green);
}

.sp-faq__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sp-smoke);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--sp-green);
    transition: transform 0.35s ease, background 0.25s ease;
}

.sp-faq__item.is-open .sp-faq__icon {
    transform: rotate(45deg);
    background: var(--sp-gold);
    color: #fff;
}

.sp-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-faq__answer-inner {
    padding: 0 24px 22px;
}

.sp-faq__answer-inner p {
    font-size: 15px;
    margin-bottom: 12px;
}

.sp-faq__answer-inner .sp-checklist--light {
    margin-top: 8px;
}

.sp-faq__answer-inner .sp-checklist--light li {
    padding-left: 20px;
}

.sp-faq__answer-inner .sp-checklist--light li::before {
    display: none;
}

.sp-faq__answer-inner .sp-checklist--light li {
    list-style: disc;
    margin-left: 18px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 0;
}

/* ── 12. Inline CTA (shared) ── */
.sp-cta-inline {
    position: relative;
    overflow: hidden;
    padding: 40px 38px;
    border-radius: var(--sp-radius-lg);
    background: linear-gradient(120deg, var(--sp-green-dark) 0%, #1a4a42 50%, var(--sp-green) 100%);
    box-shadow: 0 22px 55px rgba(19, 40, 36, 0.18);
}

.sp-cta-inline::after {
    content: "";
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    background: rgba(191, 147, 100, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.sp-cta-inline .sp-section__title {
    color: #fff;
    margin-bottom: 16px;
}

.sp-cta-inline .sp-section__title::after {
    background: linear-gradient(90deg, var(--sp-gold), transparent);
}

.sp-cta-inline p,
.sp-cta-inline .sp-section__lead,
.sp-cta-inline li {
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.sp-cta-inline .sp-inline-heading,
.sp-cta-inline h3:not(.sp-section__title) {
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.sp-cta-inline p + p {
    margin-top: 14px;
}

/* ── Service page wrapper ── */
.service-content.sp-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--sp-text);
}

/* ── Service page layout: full-width content, sidebar at bottom ── */
.marwa-service-layout__main {
    margin-bottom: 0;
}

.marwa-service-layout__sidebar {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--sp-border, rgba(22, 58, 50, 0.1));
}

.marwa-service-sidebar {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    align-items: start;
}

.marwa-service-sidebar .widget {
    margin-bottom: 0;
}

.marwa-service-sidebar .widget_nav_menu {
    background: #fff;
    border: 1px solid var(--sp-border, rgba(22, 58, 50, 0.1));
    border-radius: var(--sp-radius, 18px);
    padding: 32px 28px;
    box-shadow: 0 14px 40px rgba(19, 40, 36, 0.06);
}

.marwa-service-sidebar .widget_cta {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── Responsive ── */
@media (max-width: 1199px) {
    .sp-approach-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sp-process__step {
        flex: 1 1 calc(50% - 11px);
    }

    .sp-process__step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 991px) {
    .marwa-service-sidebar {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .marwa-service-layout__sidebar {
        margin-top: 40px;
        padding-top: 36px;
    }

    .sp-cards-grid,
    .sp-split,
    .sp-why__list {
        grid-template-columns: 1fr;
    }

    .sp-approach-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sp-intro,
    .sp-highlight,
    .sp-challenges,
    .sp-why,
    .sp-cta-inline {
        padding: 28px 24px;
    }
}

@media (max-width: 767px) {
    .sp-section {
        margin-bottom: 40px;
    }

    .sp-process__step {
        flex: 1 1 100%;
    }

    .sp-case-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sp-approach-grid {
        grid-template-columns: 1fr;
    }

    .sp-faq__question {
        font-size: 15px;
        padding: 16px 18px;
    }
}
