/* ═══════════════════════════════════════════════════════════════════════════
   وکیل سهیلی — Premium RTL Design System
   Palette: #1A3C5E navy  #2C5F7C teal  #FFFFFF white
            #333333 text  #F7F8FA surface  #E8E8E8 divider
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ── Reset & Base ───────────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:     #1A3C5E;
    --teal:     #2C5F7C;
    --teal-lt:  #3D7A9A;
    --white:    #FFFFFF;
    --gray-txt: #333333;
    --gray-2:   #555555;
    --gray-3:   #777777;
    --surface:  #F7F8FA;
    --surface2: #EEF2F6;
    --divider:  #E8E8E8;
    --navy-12:  rgba(26,60,94,.12);
    --navy-08:  rgba(26,60,94,.08);

    /* semantic aliases */
    --primary:    #1A3C5E;
    --text:       #333333;
    --text-muted: #555555;

    /* shadows */
    --sh-card:  0 1px 2px rgba(26,60,94,.06),
                0 6px 18px rgba(26,60,94,.09),
                0 20px 48px rgba(26,60,94,.08);
    --sh-hover: 0 2px 4px rgba(26,60,94,.08),
                0 12px 32px rgba(26,60,94,.16),
                0 32px 72px rgba(26,60,94,.14);
    --sh-nav:   0 2px 24px rgba(26,60,94,.10);

    /* radius */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-xl: 32px;

    /* type */
    --font: 'Vazirmatn', Tahoma, Arial, sans-serif;
    --ts-display: clamp(1.9rem, 4vw, 2.75rem);
    --ts-h1:      clamp(1.7rem, 3.5vw, 2.4rem);
    --ts-h2:      clamp(1.4rem, 2.8vw, 2rem);
    --ts-h3:      clamp(1.1rem, 2vw, 1.4rem);
    --ts-body:    1rem;
    --ts-sm:      0.875rem;
    --ts-xs:      0.78rem;
    --lh-head:    1.5;
    --lh-body:    2.0;

    /* spacing */
    --sp-xs: 8px;
    --sp-sm: 16px;
    --sp-md: 24px;
    --sp-lg: 40px;
    --sp-xl: clamp(56px,10vw,96px);
    --sp-2xl:clamp(72px,12vw,140px);
    --max-w: 1200px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: var(--ts-body);
    line-height: var(--lh-body);
    color: var(--gray-txt);
    background: var(--white);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(26,60,94,.18); }

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: clamp(16px,4vw,48px);
}
.sr-only {
    position:absolute;clip:rect(0,0,0,0);
    width:1px;height:1px;overflow:hidden;white-space:nowrap;
}
.eyebrow {
    display: inline-block;
    font-size: var(--ts-xs);
    font-weight: 600;
    color: var(--teal);
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: var(--sp-sm);
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: var(--ts-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all .22s ease;
    border: 2px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
}
.btn-primary {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
    box-shadow: 0 4px 14px rgba(26,60,94,.28);
}
.btn-primary:hover {
    background: var(--teal);
    border-color: var(--teal);
    box-shadow: var(--sh-hover);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-1px);
}
.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.7);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,.15);
    border-color: var(--white);
}
.btn:focus-visible {
    outline: 3px solid var(--teal-lt);
    outline-offset: 3px;
}

/* ── Header / Nav ───────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--divider);
    box-shadow: var(--sh-nav);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: var(--sp-md);
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.site-logo svg {
    width: 36px;
    height: 36px;
}
.site-logo .logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}
.site-logo .logo-sub {
    font-size: 0.7rem;
    color: var(--gray-3);
    display: block;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav a {
    font-size: var(--ts-sm);
    font-weight: 500;
    color: var(--gray-2);
    padding: 8px 14px;
    border-radius: var(--r-sm);
    transition: color .18s, background .18s;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--navy);
    background: var(--navy-08);
}
.nav-cta {
    margin-right: var(--sp-sm);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cart-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    color: var(--navy);
    transition: background .18s;
    border: none;
    background: transparent;
    cursor: pointer;
}
.cart-icon-btn:hover { background: var(--navy-08); }
.cart-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--teal);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--navy);
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .22s, opacity .22s;
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(26,60,94,.6);
    backdrop-filter: blur(4px);
}
.mobile-menu.open { display: flex; align-items: flex-start; justify-content: flex-end; }
.mobile-menu-panel {
    background: var(--white);
    width: min(320px, 90vw);
    min-height: 100dvh;
    padding: var(--sp-lg) var(--sp-md);
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    box-shadow: -8px 0 32px rgba(26,60,94,.18);
}
.mobile-menu-panel a {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-txt);
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
}
.mobile-menu-panel a:last-child { border-bottom: none; }
.mobile-close {
    align-self: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--navy);
    margin-bottom: var(--sp-sm);
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: clamp(480px, 85vh, 780px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}
.hero-photo {
    position: relative;
    overflow: hidden;
}
.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: heroZoom 14s ease-in-out infinite alternate;
}
@keyframes heroZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.06); }
}
.hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        rgba(26,60,94,.08) 0%,
        rgba(26,60,94,.18) 100%
    );
}
.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px,6vw,80px) clamp(32px,5vw,72px);
    background: var(--white);
    position: relative;
}
.hero-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--navy), var(--teal));
}
.hero-eyebrow {
    font-size: var(--ts-xs);
    font-weight: 600;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 16px;
}
.hero-title {
    font-size: var(--ts-display);
    font-weight: 700;
    color: var(--navy);
    line-height: var(--lh-head);
    margin-bottom: 20px;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--gray-2);
    line-height: 2;
    margin-bottom: 36px;
    max-width: 46ch;
}
.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
/* Decorative orb */
.hero-content::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44,95,124,.12) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Quick links ribbon ─────────────────────────────────────────────────────── */
.quick-links {
    background: var(--surface);
    border-bottom: 1px solid var(--divider);
    padding: 14px 0;
}
.quick-links-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.quick-links-label {
    font-size: var(--ts-xs);
    font-weight: 600;
    color: var(--gray-3);
    white-space: nowrap;
    padding-left: 12px;
    border-left: 2px solid var(--divider);
}
.quick-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--divider);
    border-radius: var(--r-xl);
    font-size: var(--ts-xs);
    font-weight: 500;
    color: var(--gray-2);
    background: var(--white);
    transition: all .18s;
    white-space: nowrap;
}
.quick-link-chip:hover {
    border-color: var(--navy);
    color: var(--navy);
    background: var(--navy-08);
    transform: translateY(-1px);
}

/* ── Section generic ────────────────────────────────────────────────────────── */
.section {
    padding: var(--sp-2xl) 0;
}
.section-alt { background: var(--surface); }
.section-dark {
    background: var(--navy);
    color: var(--white);
}
.section-header {
    text-align: center;
    margin-bottom: clamp(32px,5vw,56px);
}
.section-title {
    font-size: var(--ts-h2);
    font-weight: 700;
    color: var(--navy);
    line-height: var(--lh-head);
    margin-bottom: 12px;
}
.section-dark .section-title { color: var(--white); }
.section-intro {
    font-size: 1rem;
    color: var(--gray-2);
    max-width: 60ch;
    margin-inline: auto;
    line-height: 2;
}
.section-dark .section-intro { color: rgba(255,255,255,.75); }

/* ── Services cards ─────────────────────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    border: 1px solid var(--divider);
    border-radius: var(--r-md);
    padding: 36px 28px 32px;
    background: var(--white);
    transition: box-shadow .25s, transform .25s, border-color .25s;
    display: flex;
    flex-direction: column;
}
.service-card:hover {
    box-shadow: var(--sh-card);
    transform: translateY(-4px);
    border-color: rgba(26,60,94,.2);
}
.service-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-sm);
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    margin-bottom: 20px;
    transition: background .2s;
}
.service-card:hover .service-icon {
    background: var(--navy);
    color: var(--white);
}
.service-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 10px;
    line-height: 1.5;
}
.service-desc {
    font-size: var(--ts-sm);
    color: var(--gray-3);
    line-height: 1.9;
    flex: 1;
    margin-bottom: 20px;
}
.service-link {
    font-size: var(--ts-sm);
    font-weight: 600;
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap .18s, color .18s;
    margin-top: auto;
}
.service-link:hover { color: var(--navy); gap: 10px; }

/* ── AI Search ──────────────────────────────────────────────────────────────── */
.ai-section {
    background: #EEF3F8;
    padding: var(--sp-2xl) 0;
    position: relative;
    overflow: hidden;
}
.ai-section::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,60,94,.07) 0%, transparent 65%);
    pointer-events: none;
}
.ai-inner {
    text-align: center;
    max-width: 680px;
    margin-inline: auto;
    position: relative;
    z-index: 1;
}
.ai-title {
    font-size: var(--ts-h2);
    font-weight: 700;
    color: var(--navy);
    line-height: var(--lh-head);
    margin-bottom: 12px;
}
.ai-sub {
    color: var(--gray-2);
    margin-bottom: 32px;
    line-height: 2;
}
.ai-form {
    display: flex;
    gap: 0;
    border-radius: var(--r-sm);
    overflow: hidden;
    box-shadow: var(--sh-card);
    background: var(--white);
    border: 1px solid var(--divider);
}
.ai-form input[type="text"] {
    flex: 1;
    padding: 16px 20px;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--gray-txt);
    background: transparent;
    direction: rtl;
}
.ai-form input::placeholder { color: #aaa; }
.ai-form button {
    padding: 0 24px;
    background: var(--navy);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-size: var(--ts-sm);
    font-weight: 600;
    transition: background .18s;
    flex-shrink: 0;
}
.ai-form button:hover { background: var(--teal); }
.ai-phone-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.ai-phone-row input {
    padding: 10px 16px;
    border: 1px solid var(--divider);
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: var(--ts-sm);
    background: var(--white);
    outline: none;
    width: 200px;
    direction: rtl;
}
.ai-phone-row input:focus { border-color: var(--teal); }
.ai-note {
    font-size: var(--ts-xs);
    color: var(--gray-3);
    margin-top: 12px;
}

/* ── Lawyers ────────────────────────────────────────────────────────────────── */
.lawyers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.lawyer-card {
    text-align: center;
}
.lawyer-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    border: 3px solid var(--divider);
    transition: border-color .22s, box-shadow .22s;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lawyer-card:hover .lawyer-avatar {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(44,95,124,.15);
}
.lawyer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lawyer-avatar-initials {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
}
.lawyer-name {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
    font-size: 0.95rem;
}
.lawyer-spec {
    font-size: var(--ts-sm);
    color: var(--gray-3);
    line-height: 1.7;
}
.lawyers-city {
    display: inline-block;
    font-size: var(--ts-xs);
    color: var(--teal);
    background: rgba(44,95,124,.08);
    padding: 2px 10px;
    border-radius: 20px;
    margin-top: 6px;
}
.section-more {
    text-align: center;
    margin-top: 36px;
}
.section-more a {
    font-size: var(--ts-sm);
    font-weight: 600;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--navy);
    padding-bottom: 2px;
    transition: gap .18s, color .18s, border-color .18s;
}
.section-more a:hover { color: var(--teal); border-color: var(--teal); gap: 12px; }

/* ── Product cards ───────────────────────────────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    border: 1px solid var(--divider);
    border-radius: var(--r-md);
    background: var(--white);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s;
}
.product-card:hover {
    box-shadow: var(--sh-card);
    transform: translateY(-4px);
}
.product-photo {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--surface);
}
.product-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.product-card:hover .product-photo img { transform: scale(1.05); }
.product-body {
    padding: 18px 20px 20px;
}
.product-cat {
    font-size: var(--ts-xs);
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 6px;
}
.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-txt);
    line-height: 1.6;
    margin-bottom: 12px;
}
.product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 14px;
}
.product-actions {
    display: flex;
    gap: 8px;
}
.btn-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1.5px solid var(--navy);
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: var(--ts-xs);
    font-weight: 600;
    color: var(--navy);
    background: transparent;
    cursor: pointer;
    transition: all .18s;
}
.btn-cart:hover {
    background: var(--navy);
    color: var(--white);
}

/* ── Documents ───────────────────────────────────────────────────────────────── */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.doc-card {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--divider);
    border-radius: var(--r-md);
    padding: 20px 22px;
    background: var(--white);
    transition: box-shadow .22s, border-color .22s;
}
.doc-card:hover {
    box-shadow: var(--sh-card);
    border-color: rgba(26,60,94,.2);
}
.doc-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    flex-shrink: 0;
}
.doc-info { flex: 1; }
.doc-title {
    font-size: var(--ts-sm);
    font-weight: 600;
    color: var(--gray-txt);
    line-height: 1.5;
    margin-bottom: 6px;
}
.doc-price {
    font-size: var(--ts-xs);
    font-weight: 700;
    color: var(--teal);
    background: rgba(44,95,124,.08);
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
}
.doc-dl {
    color: var(--navy);
    transition: color .18s;
}
.doc-dl:hover { color: var(--teal); }

/* ── Contact bar ─────────────────────────────────────────────────────────────── */
.contact-bar {
    background: var(--navy);
    padding: 24px 0;
}
.contact-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.contact-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.88);
    font-size: var(--ts-sm);
}
.contact-bar-item svg { color: rgba(255,255,255,.6); flex-shrink: 0; }
.contact-bar-item a { color: inherit; transition: color .18s; }
.contact-bar-item a:hover { color: var(--white); }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--divider);
    padding: clamp(40px,8vw,80px) 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: clamp(32px,5vw,56px);
}
.footer-brand .logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.footer-brand p {
    font-size: var(--ts-sm);
    color: var(--gray-3);
    line-height: 2;
    max-width: 38ch;
    margin-bottom: 20px;
}
.footer-socials {
    display: flex;
    gap: 10px;
}
.social-link {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    border: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-3);
    transition: all .18s;
}
.social-link:hover {
    border-color: var(--navy);
    color: var(--navy);
    background: var(--navy-08);
}
.footer-col h4 {
    font-size: var(--ts-sm);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--divider);
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
    font-size: var(--ts-sm);
    color: var(--gray-3);
    transition: color .18s;
    display: inline-block;
}
.footer-col ul a:hover { color: var(--navy); transform: translateX(-4px); }
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--ts-sm);
    color: var(--gray-3);
    margin-bottom: 12px;
    line-height: 1.7;
}
.footer-contact li svg { color: var(--teal); flex-shrink: 0; margin-top: 3px; }
.footer-bottom {
    border-top: 1px solid var(--divider);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-bottom p {
    font-size: var(--ts-xs);
    color: var(--gray-3);
}
.footer-trust {
    display: flex;
    align-items: center;
    gap: 16px;
}
.trust-badge {
    font-size: var(--ts-xs);
    color: var(--teal);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Flash message ───────────────────────────────────────────────────────────── */
.flash {
    padding: 14px 20px;
    border-radius: var(--r-sm);
    font-size: var(--ts-sm);
    font-weight: 500;
    margin-bottom: 24px;
}
.flash-success {
    background: rgba(44,95,124,.1);
    color: var(--teal);
    border: 1px solid rgba(44,95,124,.25);
}
.flash-error {
    background: rgba(180,30,30,.08);
    color: #b41e1e;
    border: 1px solid rgba(180,30,30,.2);
}

/* ── Stub pages ───────────────────────────────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
    padding: clamp(48px,8vw,96px) 0;
    border-bottom: 1px solid var(--divider);
}
.page-hero h1 {
    font-size: var(--ts-h1);
    font-weight: 700;
    color: var(--navy);
    line-height: var(--lh-head);
    margin-bottom: 12px;
}
.page-hero p {
    color: var(--gray-2);
    font-size: 1.05rem;
    line-height: 2;
    max-width: 56ch;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--ts-sm);
    color: var(--gray-3);
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--gray-3); transition: color .18s; }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb span { color: var(--divider); }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: var(--ts-sm);
    font-weight: 600;
    color: var(--gray-txt);
    margin-bottom: 8px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--divider);
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: var(--ts-sm);
    color: var(--gray-txt);
    background: var(--white);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    direction: rtl;
}
.form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(44,95,124,.12);
}
.form-control::placeholder { color: #bbb; }
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ── 404 ─────────────────────────────────────────────────────────────────────── */
.not-found {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    padding: var(--sp-2xl) var(--sp-md);
}
.not-found h1 {
    font-size: clamp(4rem,12vw,8rem);
    font-weight: 700;
    color: var(--divider);
    line-height: 1;
}
.not-found h2 { font-size: var(--ts-h2); color: var(--navy); }
.not-found p  { color: var(--gray-3); max-width: 40ch; line-height: 2; }

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .main-nav, .nav-cta { display: none; }
    .hamburger { display: flex; }
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-photo {
        height: clamp(200px,45vw,340px);
        order: -1;
    }
    .hero-content { padding: 36px 24px 40px; }
    .hero-content::before { display: none; }
    .services-grid { grid-template-columns: repeat(2,1fr); }
    .lawyers-grid { grid-template-columns: repeat(2,1fr); }
    .products-grid { grid-template-columns: repeat(2,1fr); }
    .docs-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .contact-bar-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
    .lawyers-grid  { grid-template-columns: repeat(2,1fr); }
    .products-grid { grid-template-columns: repeat(2,1fr); }
    .docs-grid     { grid-template-columns: 1fr; }
    .footer-grid   { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .hero-actions  { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .ai-form { flex-direction: column; }
    .ai-form button { width: 100%; padding: 14px; justify-content: center; }
    .ai-phone-row { flex-direction: column; align-items: stretch; }
    .ai-phone-row input { width: 100%; }
    .quick-links-inner { gap: 8px; }
}

@media (max-width: 390px) {
    body { font-size: 15px; }
    .header-inner { height: 58px; }
    .products-grid { grid-template-columns: 1fr; }
    .lawyers-grid  { grid-template-columns: 1fr; }
}

/* ── Checkout / Register ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .page-checkout .container > div[style*="grid-template-columns:1fr 380px"],
    .page-product  .container > div[style*="grid-template-columns:1fr 1fr"],
    .page-about    .section   .container > div[style*="grid-template-columns:1fr 1fr"],
    .page-contact  .section   .container > div[style*="grid-template-columns:3fr 2fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════════════════════ */

.admin-body {
    background: #F0F2F5;
    min-height: 100vh;
}

.admin-wrap {
    display: flex;
    min-height: 100vh;
    /* RTL: sidebar naturally on right side */
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.admin-sidebar {
    width: 240px;
    background: var(--navy);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    order: 2; /* RTL: render sidebar on the right */
}

.admin-logo {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.admin-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 700;
}

.admin-nav {
    flex: 1;
    padding: 12px 0;
}

.admin-nav-section {
    display: block;
    padding: 8px 20px 4px;
    font-size: .7rem;
    font-weight: 600;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,.72);
    text-decoration: none;
    font-size: .875rem;
    transition: background .15s, color .15s;
    border-right: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255,255,255,.1);
    color: #fff;
    border-right-color: rgba(255,255,255,.8);
}

.admin-nav-divider {
    height: 1px;
    background: rgba(255,255,255,.1);
    margin: 8px 20px;
}

.admin-sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
}

.admin-sidebar-footer span { color: rgba(255,255,255,.65); }

.admin-sidebar-footer a {
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: color .15s;
}

.admin-sidebar-footer a:hover { color: #fff; }

/* ── Main area ───────────────────────────────────────────────────────────────── */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    order: 1;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--divider);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--divider);
}

.admin-topbar-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}

.admin-topbar-actions { display: flex; align-items: center; gap: 12px; }

.admin-page {
    padding: 24px;
    flex: 1;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.admin-page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

/* ── Stat cards ──────────────────────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--navy);
}

.stat-num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: .78rem;
    color: var(--gray-3);
}

/* ── Cards (tables, forms) ───────────────────────────────────────────────────── */
.admin-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 20px;
}

.admin-card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}

/* ── Data table ──────────────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.data-table th {
    background: var(--surface);
    padding: 10px 16px;
    text-align: right;
    font-weight: 600;
    color: var(--gray-2);
    border-bottom: 1px solid var(--divider);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--divider);
    color: var(--gray-txt);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface); }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-pending    { background: #FEF3C7; color: #92400E; }
.badge-processing { background: #DBEAFE; color: #1E40AF; }
.badge-ok,
.badge-replied,
.badge-active     { background: #D1FAE5; color: #065F46; }
.badge-inactive,
.badge-cancelled  { background: #FEE2E2; color: #991B1B; }

/* ── Buttons (admin extras) ──────────────────────────────────────────────────── */
.btn-sm {
    padding: 6px 14px;
    font-size: .8rem;
    border-radius: var(--radius-sm);
}

.btn-danger {
    background: #DC2626;
    color: #fff;
    border: none;
}
.btn-danger:hover { background: #B91C1C; color: #fff; transform: translateY(-1px); }

.btn-ghost {
    background: transparent;
    color: var(--gray-2);
    border: 1px solid var(--divider);
}
.btn-ghost:hover { background: var(--surface); color: var(--navy); border-color: var(--navy); }

.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }

/* ── Admin forms ─────────────────────────────────────────────────────────────── */
.admin-form-wrap {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 28px;
    max-width: 700px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.admin-form-full { grid-column: 1 / -1; }

.img-preview-wrap { margin-top: 8px; }

.img-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--divider);
}

/* ── Flash messages (admin) ──────────────────────────────────────────────────── */
.admin-flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: .875rem;
    border: 1px solid;
}

.admin-flash-success {
    background: #D1FAE5;
    color: #065F46;
    border-color: #A7F3D0;
}

.admin-flash-error {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FECACA;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .admin-sidebar { display: none; }
    .admin-page    { padding: 16px; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .admin-form-full { grid-column: 1; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-topbar { padding: 0 16px; }
}

/* t135-services-5col: services 5 per row on desktop */
@media(min-width:1025px){ .services-grid{ grid-template-columns:repeat(5,1fr) !important; } }

/* CR#418: shorter service boxes so row 1 + part of row 2 show above the fold */
.service-card{ padding:22px 24px 20px !important; }
.service-icon{ width:44px !important; height:44px !important; margin-bottom:12px !important; }
.service-title{ margin-bottom:6px !important; }
.service-desc{ line-height:1.7 !important; margin-bottom:12px !important; }

/* QA cart card layout — zero horizontal overflow, no hidden data */
@media (max-width: 768px) {
  .cart-grid { grid-template-columns: 1fr !important; }
  .cart-table, .cart-table tbody, .cart-table tr { display: block !important; width: 100%; }
  .cart-table thead { display: none !important; }
  .cart-table tr { border: 1px solid rgba(128,128,128,.28); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
  .cart-table td { display: flex !important; border: 0 !important; padding: 6px 0 !important; text-align: right !important; align-items: center; justify-content: space-between; gap: 12px; width: 100% !important; white-space: normal !important; }
  .cart-table td:first-child { display: block !important; }
  .cart-table td:nth-child(2)::before { content: "تعداد"; font-weight:700;color:#888;font-size:.82rem;flex:none; }
  .cart-table td:nth-child(3)::before { content: "قیمت"; font-weight:700;color:#888;font-size:.82rem;flex:none; }
}
