/* ============================================
   سایت وکالت - استایل اصلی
   رنگ‌ها: سفید | سبز صدری | سرمه‌ای
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --light-gray: #E9ECEF;
    --medium-gray: #6C757D;
    --dark-gray: #343A40;
    --teal: #008080;
    --teal-light: #009B9B;
    --teal-dark: #006666;
    --teal-bg: rgba(0, 128, 128, 0.05);
    --teal-bg-hover: rgba(0, 128, 128, 0.1);
    --navy: #1B2A4A;
    --navy-light: #2C3E6B;
    --navy-dark: #0F1A30;
    --navy-bg: rgba(27, 42, 74, 0.05);
    --gold: #C9A84C;
    --gold-light: #D4B85E;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
    --header-h: 75px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* overflow-x: hidden یک کانتینر اسکرول می‌سازد و position: sticky
       را می‌شکند. clip همان جلوی سرریز افقی را می‌گیرد بدون این عارضه.
       مقدار hidden برای مرورگرهای قدیمی به‌عنوان جایگزین می‌ماند. */
    overflow-x: hidden;
    /* فضای بالا هنگام پرش به لنگرها، تا زیر هدر چسبان پنهان نشوند */
    scroll-padding-top: calc(var(--header-h) + 14px);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--white);
    color: var(--dark-gray);
    direction: rtl;
    line-height: 1.8;
    font-size: 15px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

@supports (overflow: clip) {
    html, body { overflow-x: clip; }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ============= GLOBAL RESPONSIVE SAFETY NETS ============= */
img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
}

input,
select,
textarea {
    max-width: 100%;
    box-sizing: border-box;
}

/* Long Persian words / URLs should wrap rather than force overflow */
h1, h2, h3, h4, p, span, a, li {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============= HEADER ============= */
.top-bar {
    background: var(--navy-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-phone,
.top-bar-hours {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.top-bar-phone {
    color: var(--white);
    transition: color 0.2s ease;
}

.top-bar-phone:hover {
    color: var(--teal-light);
}

.top-bar-phone svg,
.top-bar-hours svg {
    color: var(--teal-light);
    flex-shrink: 0;
}

.top-bar-phone span:first-of-type {
    opacity: 0.7;
    font-size: 12.5px;
}

.top-bar-phone-num {
    font-weight: 700;
    direction: ltr;
    letter-spacing: 0.5px;
}

.top-bar-hours {
    opacity: 0.78;
    font-size: 12.5px;
}

/* Main Header */
.main-header {
    background: color-mix(in srgb, var(--white) 92%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--teal);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

@supports not (backdrop-filter: blur(1px)) {
    .main-header { background: var(--white); }
}

/* پس از اسکرول، هدر جمع‌تر می‌شود تا فضای عمودی کمتری بگیرد */
.main-header.is-compact .header-inner { height: 60px; }
.main-header.is-compact .logo-icon { width: 40px; height: 40px; font-size: 19px; }
.main-header.is-compact .logo-name { font-size: 17px; }
/* span درون‌خطی است؛ height روی آن اثر ندارد و opacity فضا را آزاد نمی‌کند */
.main-header.is-compact .logo-text span:last-child { display: none; }

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-h);
    transition: height 0.25s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--navy), var(--teal));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.logo-text h1,
.logo-text .logo-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.3;
    display: block;
}

.logo-text > span {
    font-size: 11px;
    color: var(--teal);
    font-weight: 500;
}

.logo-text .logo-name + span {
    font-size: 11px;
    color: var(--teal);
    font-weight: 500;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-links li a {
    padding: 10px 16px;
    color: var(--navy);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--teal);
    background: var(--teal-bg);
}

.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 20px;
    height: 2px;
    background: var(--teal);
    border-radius: 2px;
}

.nav-cta {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark)) !important;
    color: var(--white) !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-md) !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 12px rgba(0, 128, 128, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.4) !important;
    background: linear-gradient(135deg, var(--teal-light), var(--teal)) !important;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--navy);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============= HERO SECTION ============= */
.hero {
    background: linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 50%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    max-width: 90vw;
    max-height: 90vw;
    background: radial-gradient(circle, rgba(0, 128, 128, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    max-width: 80vw;
    max-height: 80vw;
    background: radial-gradient(circle, rgba(0, 128, 128, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.hero-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 128, 128, 0.2);
    border: 1px solid rgba(0, 128, 128, 0.3);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--teal-light);
}

.hero-badge::before {
    content: '⚖';
    font-size: 16px;
}

.hero h1,
.hero h2 {
    font-size: 44px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero h1 .highlight,
.hero h2 .highlight {
    color: var(--teal-light);
    position: relative;
}

.hero p {
    font-size: 16px;
    line-height: 2;
    opacity: 0.85;
    margin-bottom: 36px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--white);
    padding: 14px 36px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.35);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Vazirmatn', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 128, 128, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    padding: 14px 36px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Vazirmatn', sans-serif;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.hero-card-header {
    text-align: center;
    margin-bottom: 30px;
}

.hero-card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.hero-card-header h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.hero-card-header p {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 0;
}

.hero-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-number {
    font-size: 28px;
    font-weight: 900;
    color: var(--teal-light);
    display: block;
}

.stat-label {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

/* ============================================================
   کارت اعتبارنامه هیرو — جایگزین عکس
   ایده: به‌جای پرتره، یک «سربرگ رسمی» با حس سند حقوقی ساخته‌ایم.
   ============================================================ */
.credential-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 30px 28px 26px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    isolation: isolate;
}

/* بافت ظریف «کاغذ امنیتی» پشت کارت */
.credential-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 7px),
        radial-gradient(120% 80% at 100% 0%, rgba(0, 155, 155, 0.16), transparent 60%);
    pointer-events: none;
}

/* خط طلایی متحرک بالای کارت */
.credential-card::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--teal-light), transparent);
    background-size: 220% 100%;
    animation: credential-sheen 7s linear infinite;
}

@keyframes credential-sheen {
    0% { background-position: 200% 0; }
    100% { background-position: -20% 0; }
}

/* --- سربرگ: مهر و کانون --- */
.credential-seal-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
}

.credential-seal {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 23px;
    color: var(--navy-dark);
    border-radius: 14px;
    background: linear-gradient(140deg, var(--gold-light), var(--gold) 55%, #A8842F);
    box-shadow: 0 8px 22px -8px rgba(201, 168, 76, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.credential-seal-text {
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    min-width: 0;
}

.credential-seal-text strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--white);
}

.credential-seal-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
}

.credential-verified {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 5px 11px;
    border-radius: 30px;
    font-size: 11.5px;
    font-weight: 800;
    color: #9FF0D8;
    background: rgba(0, 155, 155, 0.16);
    border: 1px solid rgba(0, 155, 155, 0.4);
}

/* --- نام و عنوان --- */
.credential-name {
    font-size: clamp(26px, 3.4vw, 33px);
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 5px;
    background: linear-gradient(120deg, var(--white) 20%, var(--teal-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-wrap: balance;
}

.credential-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 18px;
    line-height: 1.9;
}

/* --- جمله شخصی وکیل --- */
.credential-statement {
    position: relative;
    font-size: 14px;
    line-height: 2.05;
    color: rgba(255, 255, 255, 0.9);
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.18);
    border-inline-start: 3px solid var(--gold);
}

/* --- ارقام کلیدی --- */
.credential-facts {
    list-style: none;
    display: grid;
    gap: 9px;
    margin-bottom: 18px;
}

.credential-facts li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
}

.credential-facts b {
    flex-shrink: 0;
    min-width: 46px;
    font-size: 18px;
    font-weight: 900;
    color: var(--teal-light);
    font-variant-numeric: tabular-nums;
}

/* --- حوزه‌های تخصصی --- */
.credential-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.16);
}

.credential-areas a,
.credential-areas span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.credential-areas a:hover,
.credential-areas a:focus-visible {
    background: rgba(0, 155, 155, 0.22);
    border-color: rgba(0, 155, 155, 0.55);
    transform: translateY(-2px);
}

/* ============= SECTIONS GENERAL ============= */
.section {
    padding: 80px 20px;
}

.section-dark {
    background: var(--off-white);
}

.section-navy {
    background: linear-gradient(165deg, var(--navy-dark), var(--navy));
    color: var(--white);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header .overline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.section-header .overline::before,
.section-header .overline::after {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--teal);
    border-radius: 2px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 16px;
}

.section-navy .section-header h2 {
    color: var(--white);
}

.section-header p {
    font-size: 16px;
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 2;
}

.section-navy .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

/* ============= SERVICES ============= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    border: 1px solid var(--light-gray);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--navy));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--teal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 13px;
    color: var(--medium-gray);
    line-height: 1.9;
}

/* ============= ABOUT SECTION ============= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    background: linear-gradient(135deg, var(--navy), var(--teal-dark));
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.about-image::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(0, 128, 128, 0.15);
    border-radius: 50%;
}

.about-image .large-icon {
    font-size: 120px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.about-image h3 {
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.about-image p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.about-experience {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    z-index: 2;
}

.about-experience .number {
    font-size: 36px;
    font-weight: 900;
    color: var(--teal);
    line-height: 1;
}

.about-experience .label {
    font-size: 12px;
    color: var(--medium-gray);
    font-weight: 600;
}

.about-content h3 {
    font-size: 14px;
    color: var(--teal);
    font-weight: 700;
    margin-bottom: 8px;
}

.about-content h2 {
    font-size: 30px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 20px;
    line-height: 1.5;
}

.about-content > p {
    color: var(--medium-gray);
    margin-bottom: 30px;
    line-height: 2;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--teal-bg);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

.about-feature .check {
    color: var(--teal);
    font-size: 18px;
    flex-shrink: 0;
}

/* ============= ARTICLES ============= */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.article-card:hover .article-thumb img {
    transform: scale(1.045);
}

.article-thumb {
    height: 200px;
    background: linear-gradient(135deg, var(--navy), var(--teal-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.article-thumb .thumb-icon {
    font-size: 64px;
    opacity: 0.3;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.55s ease;
}

/* کاور طراحی‌شده مقاله — جایگزین عکس‌ها */
.article-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 55%, var(--teal-dark) 100%);
}

.article-cover--criminal  { background: linear-gradient(135deg, #251b2e 0%, var(--navy) 60%, #6d3030 130%); }
.article-cover--family    { background: linear-gradient(135deg, #12363a 0%, var(--teal-dark) 55%, var(--teal) 125%); }
.article-cover--cyber     { background: linear-gradient(135deg, #101d3a 0%, #253a6e 60%, #009b9b 145%); }
.article-cover--medical   { background: linear-gradient(135deg, #241b36 0%, #423065 65%, var(--teal-dark) 140%); }
.article-cover--economic  { background: linear-gradient(135deg, #2b2312 0%, #4a3b1c 55%, #a07830 135%); }
.article-cover--procedure { background: linear-gradient(135deg, #1c2733 0%, #33465c 60%, var(--teal-dark) 140%); }

.article-cover-watermark {
    position: absolute;
    bottom: -34%;
    left: -10%;
    color: rgba(255, 255, 255, 0.06);
    transform: rotate(-14deg);
    line-height: 0;
}

.article-cover-badge {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(201, 168, 76, 0.4);
    backdrop-filter: blur(3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.55s ease;
}

.article-card:hover .article-cover-badge {
    transform: scale(1.08) rotate(-3deg);
}

.article-hero-image .article-cover {
    position: relative;
    aspect-ratio: 3 / 1.4;
}

.article-hero-image .article-cover-badge {
    width: 116px;
    height: 116px;
}

.article-category {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--teal);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.article-body {
    padding: 24px;
}

.article-body h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 10px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-body p {
    font-size: 13px;
    color: var(--medium-gray);
    line-height: 1.9;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--light-gray);
}

.article-date {
    font-size: 12px;
    color: var(--medium-gray);
}

.article-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-link:hover {
    color: var(--teal-dark);
    gap: 8px;
}

.view-all {
    text-align: center;
    margin-top: 40px;
}

/* ============= RULINGS SECTION ============= */
.rulings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ruling-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.ruling-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-4px);
}

.ruling-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.ruling-number {
    font-weight: 800;
    color: var(--teal-light);
    font-size: 16px;
}

.ruling-date {
    font-size: 13px;
    opacity: 0.6;
}

.ruling-subject {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ruling-excerpt {
    font-size: 14px;
    opacity: 0.75;
    line-height: 2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ruling-category-badge {
    display: inline-block;
    background: rgba(0, 128, 128, 0.2);
    color: var(--teal-light);
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 12px;
}

/* ============= STATS ============= */
.stats-section {
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    padding: 60px 20px;
    color: var(--white);
}

.stats-grid {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-box .stat-number {
    font-size: 42px;
    font-weight: 900;
    display: block;
    margin-bottom: 4px;
    color: var(--white);
}

.stat-box .stat-label {
    font-size: 14px;
    opacity: 0.85;
    font-weight: 500;
    color: var(--white);
}

/* ============= CTA SECTION ============= */
.cta-section {
    padding: 80px 20px;
    text-align: center;
    background: var(--white);
}

.cta-box {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: rgba(0, 128, 128, 0.15);
    border-radius: 50%;
}

.cta-box h2 {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.cta-box p {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ============= FOOTER ============= */
.main-footer {
    background: var(--navy-dark);
    color: var(--white);
    padding: 60px 20px 0;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-about h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
}

.footer-about p {
    font-size: 14px;
    opacity: 0.7;
    line-height: 2;
    margin-bottom: 20px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    opacity: 0.8;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--teal);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul li a {
    font-size: 14px;
    opacity: 0.7;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--teal-light);
    padding-right: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
}

/* ============= PAGE BANNER ============= */
.page-banner {
    background: linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 60%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.page-banner h1 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.page-banner .breadcrumb {
    font-size: 14px;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.page-banner .breadcrumb a {
    color: var(--teal-light);
    opacity: 1;
}

/* ============= FILTER TABS ============= */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-tab {
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    background: var(--light-gray);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--teal);
    color: var(--white);
}

.filter-tab a {
    color: inherit;
}

/* ============= ARTICLE DETAIL ============= */
.article-detail {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 20px;
}

.article-detail .article-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.article-detail .article-meta span {
    font-size: 13px;
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-detail h1,
.article-detail > h2 {
    font-size: 32px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 30px;
    line-height: 1.6;
}

.article-hero-image {
    margin: 0 0 36px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--navy), var(--teal-dark));
    box-shadow: var(--shadow-lg);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    display: block;
    object-fit: cover;
}

.article-content {
    line-height: 2.2;
    color: var(--dark-gray);
}

.article-content h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    margin: 36px 0 16px;
    padding-right: 16px;
    border-right: 4px solid var(--teal);
}

.article-content p {
    margin-bottom: 18px;
    font-size: 15px;
}

.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--light-gray);
}

.related-articles h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 24px;
}

/* ============= RESUME PAGE ============= */
.resume-section {
    padding: 60px 20px;
}

.resume-container {
    max-width: 900px;
    margin: 0 auto;
}

.resume-block {
    margin-bottom: 48px;
}

.resume-block h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--teal);
    display: inline-block;
}

.timeline {
    position: relative;
    padding-right: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--teal), var(--navy));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
    padding-right: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -36px;
    top: 8px;
    width: 14px;
    height: 14px;
    background: var(--teal);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--teal);
}

.timeline-item h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.timeline-item .date {
    font-size: 13px;
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-item p {
    font-size: 14px;
    color: var(--medium-gray);
    line-height: 1.9;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.skill-item {
    background: var(--teal-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 128, 128, 0.1);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.skill-item .skill-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.skill-item h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

/* ============= LAWS PAGE ============= */
.laws-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.law-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 28px;
    border-right: 4px solid var(--teal);
    transition: var(--transition);
}

.law-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(-4px);
}

.law-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.law-name {
    font-weight: 800;
    color: var(--navy);
    font-size: 15px;
}

.law-article-num {
    background: var(--navy);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.law-content {
    font-size: 14px;
    line-height: 2;
    color: var(--dark-gray);
    margin-bottom: 12px;
    padding: 16px;
    background: var(--off-white);
    border-radius: var(--radius-sm);
}

.law-note {
    font-size: 13px;
    color: var(--teal-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.law-category-badge {
    display: inline-block;
    background: var(--teal-bg);
    color: var(--teal);
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.law-card-title {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.8;
}

.law-card-title a { color: var(--navy); }
.law-card-title a:hover { color: var(--teal); }

.law-detail-link {
    display: inline-flex;
    margin-top: 16px;
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 800;
}

.law-detail-link:hover { color: var(--navy); }

/* ============= RULINGS PAGE (White bg) ============= */
.rulings-page-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rulings-archive-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin: 0 auto 24px;
    padding: 18px 22px;
    border: 1px solid color-mix(in srgb, var(--teal) 24%, var(--light-gray));
    border-radius: var(--radius-md);
    background: var(--teal-bg-hover);
    color: var(--navy);
}

.rulings-archive-note strong,
.rulings-archive-note span {
    display: block;
}

.rulings-archive-note strong { margin-bottom: 5px; }
.rulings-archive-note > div > span { color: var(--dark-gray); font-size: 13px; line-height: 1.9; }
.rulings-latest { white-space: nowrap; color: var(--teal); font-size: 13px; font-weight: 700; }
.rulings-search { max-width: 720px; }
.rulings-result-count { margin: 4px 0 18px; color: var(--medium-gray); font-size: 13px; }

.ruling-page-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 28px;
    border-right: 4px solid var(--navy);
    transition: var(--transition);
}

.ruling-page-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(-4px);
}

.ruling-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.ruling-page-number {
    font-weight: 800;
    color: var(--teal);
    font-size: 16px;
}

.ruling-page-date {
    font-size: 13px;
    color: var(--medium-gray);
}

.ruling-page-subject {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.ruling-page-subject a { color: inherit; }
.ruling-page-subject a:hover { color: var(--teal); }

.ruling-page-content {
    font-size: 14px;
    line-height: 2.2;
    color: var(--dark-gray);
    padding: 16px;
    background: var(--off-white);
    border-radius: var(--radius-sm);
}

.ruling-full-text {
    margin-top: 12px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    overflow: clip;
}

.ruling-full-text summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    color: var(--teal);
    background: var(--white);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    list-style: none;
}

.ruling-full-text summary::-webkit-details-marker { display: none; }
.ruling-full-text[open] summary { border-bottom: 1px solid var(--light-gray); }
.ruling-full-text-body {
    padding: 22px;
    background: var(--off-white);
    color: var(--dark-gray);
    font-size: 14px;
    line-height: 2.2;
    white-space: pre-line;
    max-height: 70vh;
    overflow: auto;
}

.ruling-page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.ruling-source-link { color: var(--teal); font-size: 12px; font-weight: 700; }
.ruling-page-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ruling-detail-link { color: var(--navy); font-size: 13px; font-weight: 800; }
.ruling-detail-link:hover { color: var(--teal); }

.public-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}

.public-pagination a,
.public-pagination span {
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}

.public-pagination a:hover { border-color: var(--teal); color: var(--teal); }
.public-pagination .disabled { color: var(--medium-gray); opacity: 0.55; }

@media (max-width: 640px) {
    .rulings-archive-note {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .rulings-latest { white-space: normal; }
    .rulings-search { flex-wrap: wrap; }
    .rulings-search input,
    .rulings-search button { width: 100%; }
    .ruling-page-card { padding: 18px 14px; }
    .ruling-page-content,
    .ruling-full-text-body { padding: 16px 13px; }
    .ruling-page-footer { align-items: flex-start; flex-direction: column; }
    .public-pagination { gap: 6px; }
    .public-pagination a,
    .public-pagination span { padding: 9px 8px; font-size: 11px; }
}

/* ============= RULING DETAIL / INDEXABLE DOCUMENT ============= */
.ruling-detail-banner h1 {
    max-width: 1000px;
    margin-inline: auto;
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.65;
}

.ruling-detail-page { padding: 64px 20px 84px; background: var(--off-white); }
.ruling-detail-container { max-width: 980px; }
.ruling-detail-header {
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    border-inline-start: 5px solid var(--teal);
    box-shadow: var(--shadow-sm);
}
.ruling-detail-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; }
.ruling-detail-meta span { display: inline-flex; align-items: center; gap: 7px; color: var(--medium-gray); font-size: 13px; }
.ruling-detail-header h2 { margin: 0 0 12px; color: var(--navy); font-size: clamp(22px, 3vw, 32px); line-height: 1.75; }
.ruling-detail-header > p { margin: 0; color: var(--dark-gray); line-height: 2; }

.ruling-detail-image { height: 330px; margin: 26px 0; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.ruling-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.ruling-toc { margin: 0 0 26px; }

.ruling-document {
    padding: clamp(22px, 5vw, 54px);
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.ruling-document h2 {
    margin: 44px 0 18px;
    padding: 13px 18px;
    color: var(--navy);
    background: var(--off-white);
    border-inline-start: 4px solid var(--teal);
    border-radius: var(--radius-sm);
    font-size: 20px;
    line-height: 1.8;
    scroll-margin-top: calc(var(--header-h) + 18px);
}
.ruling-document h2:first-child { margin-top: 0; }
.ruling-document p { margin: 0 0 20px; color: var(--dark-gray); font-size: 15px; line-height: 2.35; text-align: justify; }

.ruling-source-box {
    display: flex;
    gap: 18px;
    margin: 26px 0;
    padding: 24px;
    background: #eef8f7;
    border: 1px solid color-mix(in srgb, var(--teal) 25%, var(--light-gray));
    border-radius: var(--radius-lg);
}
.ruling-source-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; color: var(--white); background: var(--teal); border-radius: 14px; }
.ruling-source-box strong { color: var(--navy); }
.ruling-source-box p { margin: 7px 0; color: var(--dark-gray); font-size: 13px; line-height: 2; }
.ruling-source-box a { color: var(--teal); font-size: 13px; font-weight: 800; }

.ruling-sequence { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 12px; margin: 28px 0; }
.ruling-sequence > a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 70px;
    padding: 12px 16px;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-md);
}
.ruling-sequence > a:hover { border-color: var(--teal); color: var(--teal); }
.ruling-sequence span { color: var(--medium-gray); font-size: 11px; }
.ruling-sequence .ruling-archive-back { text-align: center; color: var(--teal); font-weight: 800; }

.related-rulings { margin-top: 44px; }
.related-rulings > h2 { margin-bottom: 18px; color: var(--navy); font-size: 22px; }
.related-rulings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.related-rulings-grid a { display: flex; flex-direction: column; gap: 8px; padding: 18px; color: var(--navy); background: var(--white); border: 1px solid var(--light-gray); border-radius: var(--radius-md); }
.related-rulings-grid a:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.related-rulings-grid span { color: var(--teal); font-size: 12px; font-weight: 700; }
.related-rulings-grid strong { font-size: 14px; line-height: 1.9; }

@media (max-width: 640px) {
    .ruling-detail-page { padding: 38px 14px 58px; }
    .ruling-detail-header { padding: 21px 17px; }
    .ruling-detail-image { height: 220px; }
    .ruling-document { padding: 24px 16px; }
    .ruling-document h2 { margin-top: 32px; padding: 11px 13px; font-size: 17px; }
    .ruling-document p { font-size: 14px; line-height: 2.2; text-align: start; }
    .ruling-source-box { flex-direction: column; padding: 20px 17px; }
    .ruling-sequence { grid-template-columns: 1fr 1fr; }
    .ruling-sequence .ruling-archive-back { grid-column: 1 / -1; grid-row: 2; }
    .related-rulings-grid { grid-template-columns: 1fr; }
}

/* ============= CONTACT PAGE ============= */
.contact-section {
    padding: 60px 20px;
}

.contact-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h2 {
    font-size: 26px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--medium-gray);
    margin-bottom: 30px;
    line-height: 2;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-info-icon {
    width: 48px;
    height: 48px;
    background: var(--teal-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-info-text h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 2px;
}

.contact-info-text p {
    font-size: 14px;
    color: var(--medium-gray);
}

.contact-form-wrapper {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-md);
}

.contact-form-wrapper h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 24px;
    text-align: center;
}

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

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    color: var(--dark-gray);
    transition: var(--transition);
    background: var(--white);
    direction: rtl;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.1);
}

.form-group textarea {
    min-height: 130px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.35);
}

/* Flash Messages */
.flash-message {
    max-width: 800px;
    margin: 20px auto;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
}

.flash-success {
    background: rgba(0, 128, 128, 0.1);
    color: var(--teal-dark);
    border: 1px solid rgba(0, 128, 128, 0.2);
}

/* ============= SCROLL TO TOP ============= */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    background: var(--teal);
    transform: translateY(-3px);
}

/* ============= SCROLL PROGRESS BAR ============= */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--teal-light), var(--teal), var(--gold));
    background-size: 200% 100%;
    z-index: 9999;
    box-shadow: 0 0 12px rgba(0, 155, 155, 0.6);
    transition: width 0.05s linear;
    animation: progress-shimmer 3s linear infinite;
}

@keyframes progress-shimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* ============= HERO PARTICLES ============= */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-particles span {
    position: absolute;
    display: block;
    width: 8px;
    height: 8px;
    background: rgba(0, 155, 155, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(0, 155, 155, 0.7);
    animation: particle-float 20s linear infinite;
    bottom: -20px;
}

.hero-particles span:nth-child(1)  { left: 8%;  width: 6px;  height: 6px;  animation-duration: 22s; animation-delay: 0s;   }
.hero-particles span:nth-child(2)  { left: 18%; width: 12px; height: 12px; animation-duration: 28s; animation-delay: 2s;   }
.hero-particles span:nth-child(3)  { left: 28%; width: 4px;  height: 4px;  animation-duration: 18s; animation-delay: 4s;   }
.hero-particles span:nth-child(4)  { left: 38%; width: 10px; height: 10px; animation-duration: 24s; animation-delay: 0s;   }
.hero-particles span:nth-child(5)  { left: 48%; width: 6px;  height: 6px;  animation-duration: 30s; animation-delay: 6s;   }
.hero-particles span:nth-child(6)  { left: 58%; width: 8px;  height: 8px;  animation-duration: 26s; animation-delay: 1s;   }
.hero-particles span:nth-child(7)  { left: 68%; width: 5px;  height: 5px;  animation-duration: 20s; animation-delay: 3s;   }
.hero-particles span:nth-child(8)  { left: 78%; width: 14px; height: 14px; animation-duration: 32s; animation-delay: 5s;   }
.hero-particles span:nth-child(9)  { left: 88%; width: 7px;  height: 7px;  animation-duration: 23s; animation-delay: 2s;   }
.hero-particles span:nth-child(10) { left: 95%; width: 9px;  height: 9px;  animation-duration: 27s; animation-delay: 4s;   }

@keyframes particle-float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-110vh) translateX(60px) rotate(360deg);
        opacity: 0;
    }
}

/* ============= ANIMATED HERO BACKGROUND ============= */
.hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 35%, var(--teal-dark) 70%, var(--navy) 100%);
    background-size: 300% 300%;
    animation: gradient-shift 18s ease infinite;
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero typing highlight */
.hero h1 .highlight,
.hero h2 .highlight {
    display: inline-block;
    min-width: 6ch;
    border-left: 3px solid var(--teal-light);
    padding-left: 4px;
    animation: caret-blink 0.9s steps(2) infinite;
    text-shadow: 0 0 24px rgba(0, 155, 155, 0.4);
}

@keyframes caret-blink {
    0%, 100% { border-left-color: var(--teal-light); }
    50%      { border-left-color: transparent; }
}

/* Hero Card glow */
.hero-card {
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}


.hero-card-avatar {
    box-shadow: 0 0 0 0 rgba(0, 155, 155, 0.6);
    animation: avatar-pulse 2.4s ease-in-out infinite;
}

@keyframes avatar-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 155, 155, 0.55); }
    50%      { box-shadow: 0 0 0 14px rgba(0, 155, 155, 0); }
}

/* ============= 3D SERVICE CARDS ============= */
.services-grid {
    perspective: 1200px;
}

.service-card {
    transform-style: preserve-3d;
    transition: transform 0.25s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    will-change: transform;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--teal), var(--gold), var(--navy));
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    animation: gradient-shift 6s ease infinite;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover .service-icon {
    box-shadow: 0 12px 30px rgba(0, 128, 128, 0.45),
                0 0 0 6px rgba(0, 128, 128, 0.08);
}

.service-card h3,
.service-card p,
.service-card .service-icon {
    transform: translateZ(0);
    transition: transform 0.25s ease;
}

.service-card:hover h3 {
    transform: translateZ(30px);
}

.service-card:hover .service-icon {
    transform: translateZ(40px) scale(1.1);
}

/* ============= TESTIMONIALS ============= */
.testimonials-section {
    background: linear-gradient(180deg, var(--white), var(--off-white));
}

.testimonials-slider {
    overflow: hidden;
    position: relative;
    padding: 10px 0 20px;
}

.testimonials-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.testimonials-track::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    flex: 0 0 calc((100% - 48px) / 3);
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--light-gray);
    position: relative;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 128, 128, 0.3);
}

.testimonial-quote {
    position: absolute;
    top: -10px;
    right: 24px;
    font-family: 'Georgia', serif;
    font-size: 90px;
    color: var(--teal);
    opacity: 0.18;
    line-height: 1;
    font-weight: 900;
}

.testimonial-text {
    font-size: 14.5px;
    line-height: 2;
    color: var(--dark-gray);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px dashed var(--light-gray);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-info h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 2px;
}

.author-info span {
    font-size: 12px;
    color: var(--medium-gray);
}

.testimonial-rating {
    color: var(--gold);
    font-size: 14px;
    letter-spacing: 1px;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 36px;
}

.slider-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--light-gray);
    background: var(--white);
    color: var(--navy);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Vazirmatn', sans-serif;
}

.slider-btn:hover {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 128, 128, 0.3);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--light-gray);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.slider-dot.active {
    background: var(--teal);
    width: 28px;
    border-radius: 6px;
}

/* ============= FAQ ============= */
.faq-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(0, 128, 128, 0.3);
    box-shadow: var(--shadow-sm);
}

.faq-item[open] {
    border-color: var(--teal);
    box-shadow: 0 6px 24px rgba(0, 128, 128, 0.12);
}

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    list-style: none;
    transition: var(--transition);
    user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover {
    background: var(--teal-bg);
}

.faq-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal-bg);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 12px;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}

.faq-item[open] .faq-icon {
    transform: rotate(135deg);
    background: var(--teal);
    color: var(--white);
}

.faq-answer {
    padding: 0 24px 22px;
    color: var(--medium-gray);
    line-height: 2;
    font-size: 14px;
    animation: faq-slide 0.4s ease;
}

@keyframes faq-slide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============= 404 ERROR PAGE ============= */
.error-section {
    min-height: 80vh;
    background: linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 50%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 60px 20px 80px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.error-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.error-particles span {
    position: absolute;
    display: block;
    width: 6px;
    height: 6px;
    background: rgba(212, 174, 94, 0.45);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(212, 174, 94, 0.6);
    animation: error-particle 18s linear infinite;
    bottom: -20px;
}

.error-particles span:nth-child(1) { left: 12%; animation-duration: 20s; animation-delay: 0s; }
.error-particles span:nth-child(2) { left: 28%; animation-duration: 24s; animation-delay: 3s; }
.error-particles span:nth-child(3) { left: 45%; animation-duration: 18s; animation-delay: 1s; width: 8px; height: 8px; }
.error-particles span:nth-child(4) { left: 62%; animation-duration: 22s; animation-delay: 5s; }
.error-particles span:nth-child(5) { left: 78%; animation-duration: 26s; animation-delay: 2s; }
.error-particles span:nth-child(6) { left: 90%; animation-duration: 19s; animation-delay: 4s; width: 5px; height: 5px; }

@keyframes error-particle {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}

.error-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    text-align: center;
    width: 100%;
}

.error-scales-wrapper {
    margin: 0 auto 24px;
    width: 220px;
    max-width: 60vw;
    filter: drop-shadow(0 18px 40px rgba(212, 174, 94, 0.25));
}

.error-scales {
    width: 100%;
    height: auto;
    display: block;
}

.error-beam {
    transform-origin: 160px 84px;
    animation: error-beam-sway 4.5s ease-in-out infinite;
}

@keyframes error-beam-sway {
    0%, 100% { transform: rotate(-2deg); }
    50%      { transform: rotate(2deg); }
}

.error-code {
    font-size: 96px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #E8C97A 0%, #D4AE5E 50%, #A37E2D 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 6px;
    direction: ltr;
    display: inline-block;
    animation: error-code-glow 2.6s ease-in-out infinite;
    filter: drop-shadow(0 6px 24px rgba(212, 174, 94, 0.45));
}

@keyframes error-code-glow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 6px 22px rgba(212, 174, 94, 0.35));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 8px 32px rgba(232, 201, 122, 0.7));
    }
}

.error-inner h1 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--white);
}

.error-message {
    font-size: 15px;
    line-height: 2.1;
    opacity: 0.85;
    margin-bottom: 30px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.error-redirect-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 155, 155, 0.12);
    border: 1px solid rgba(0, 155, 155, 0.3);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 14px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.error-redirect-icon {
    font-size: 16px;
    color: var(--teal-light);
}

.error-redirect-note strong {
    color: var(--gold-light);
    font-weight: 800;
    margin: 0 4px;
    display: inline-block;
    min-width: 1.5ch;
    text-align: center;
}

.error-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: center;
    margin-bottom: 36px;
}

.error-cancel {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 12px;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.error-cancel:hover {
    color: var(--white);
    text-decoration-color: var(--white);
}

.error-helpful-links {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

.error-helpful-title {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 14px;
}

.error-link-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.error-link-chips a {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.error-link-chips a:hover {
    background: rgba(0, 155, 155, 0.18);
    border-color: rgba(0, 155, 155, 0.4);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============= TOOLS / CALCULATORS ============= */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    perspective: 1500px;
}

.tool-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
}

.tool-card:hover {
    box-shadow: 0 20px 50px rgba(0, 128, 128, 0.15);
    border-color: rgba(0, 128, 128, 0.3);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--teal-bg), var(--navy-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    transition: var(--transition);
}

.tool-card:hover .tool-card-icon {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    transform: scale(1.05);
    box-shadow: 0 10px 28px rgba(0, 128, 128, 0.35);
}

.tool-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.6;
}

.tool-card p {
    font-size: 13.5px;
    color: var(--medium-gray);
    line-height: 2;
}

.tool-card-meta {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-tag {
    background: var(--teal-bg);
    color: var(--teal);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.tool-arrow {
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
}

.tools-disclaimer {
    margin-top: 50px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(0, 128, 128, 0.04));
    padding: 26px 30px;
    border-radius: var(--radius-lg);
    border-right: 4px solid var(--gold);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.tools-disclaimer h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 8px;
}

.tools-disclaimer p {
    font-size: 14px;
    color: var(--medium-gray);
    line-height: 2;
}

/* Tool detail page (calculators) */
.tool-container {
    max-width: 1100px;
}

.tool-intro {
    background: var(--off-white);
    padding: 22px 26px;
    border-radius: var(--radius-md);
    border-right: 4px solid var(--teal);
    margin-bottom: 36px;
}

.tool-intro p {
    font-size: 14.5px;
    color: var(--dark-gray);
    line-height: 2;
}

.tool-app {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: flex-start;
}

.tool-form {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
}

.tool-form h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--teal);
    display: inline-block;
}

/* جعبه منبع خبر در صفحه مصاحبه */
.interview-source {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0;
    padding: 16px 20px;
    background: var(--teal-bg);
    border: 1px solid var(--teal);
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.9;
}

.interview-source-icon {
    color: var(--teal-dark);
    flex-shrink: 0;
}

.interview-source a {
    color: var(--teal-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    word-break: break-all;
}


/* دکمه‌های انتخاب نوع مهریه (سکه / وجه رایج) */
.mehr-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    background: var(--gray-bg, #f4f6f8);
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    padding: 5px;
}

.mehr-mode {
    flex: 1;
    padding: 11px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--dark-gray);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.mehr-mode.active {
    background: var(--white);
    color: var(--teal-dark);
    box-shadow: 0 2px 10px rgba(27, 42, 74, 0.12);
}

.tool-result {
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 60%, var(--teal-dark) 100%);
    color: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    box-shadow: 0 18px 50px rgba(27, 42, 74, 0.25);
    position: relative;
    overflow: hidden;
}

.tool-result::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 155, 155, 0.18), transparent 70%);
    border-radius: 50%;
}

.tool-result-icon {
    font-size: 48px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.tool-result h3 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.tool-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    position: relative;
    z-index: 1;
}

.result-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.result-value-small {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--teal-light);
}

.tool-result-main {
    background: rgba(0, 155, 155, 0.12);
    border: 1px solid rgba(0, 155, 155, 0.25);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-top: 22px;
    position: relative;
    z-index: 1;
}

.tool-result-main .result-label {
    display: block;
    margin-bottom: 8px;
}

.result-value-big {
    display: block;
    font-size: 26px;
    font-weight: 900;
    color: var(--white);
    line-height: 1.3;
    word-break: break-word;
}

.tool-result-note {
    font-size: 13px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 22px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.tool-result-note a {
    color: var(--teal-light);
    border-bottom: 1px solid var(--teal-light);
    font-weight: 700;
}

.tool-result .btn-primary {
    position: relative;
    z-index: 1;
}

/* ============= SERVICE DETAIL PAGE ============= */
.service-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.service-card-link .service-arrow {
    margin-top: auto;
    padding-top: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
    border-top: 1px dashed transparent;
    transition: var(--transition);
}

.service-card-link:hover .service-arrow {
    border-top-color: rgba(0, 128, 128, 0.25);
    color: var(--teal-dark);
}

.service-hero {
    background: linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 50%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.service-hero-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.service-hero-content h1 {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 10px;
    line-height: 1.4;
}

.service-hero-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--teal-light);
    margin-bottom: 20px;
}

.service-hero-content p {
    font-size: 15px;
    line-height: 2.1;
    opacity: 0.86;
    margin-bottom: 28px;
}

.service-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 155, 155, 0.18);
    border: 1px solid rgba(0, 155, 155, 0.3);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--teal-light);
    margin-bottom: 22px;
}

.service-hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.service-hero-icon-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-hero-icon {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 155, 155, 0.25), rgba(0, 155, 155, 0.05) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 110px;
    border: 2px solid rgba(0, 155, 155, 0.3);
    box-shadow: 0 0 0 30px rgba(0, 155, 155, 0.05),
                0 0 0 60px rgba(0, 155, 155, 0.025);
    animation: service-icon-pulse 3s ease-in-out infinite;
}

@keyframes service-icon-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

.service-detail-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 1100px;
    margin: 0 auto;
}

.service-detail-grid .service-card {
    text-align: right;
    padding: 32px 28px;
}

.service-detail-grid .service-icon {
    margin: 0 0 18px;
}

/* Process Grid */
.service-process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.service-process-step {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    backdrop-filter: blur(8px);
    position: relative;
    transition: var(--transition);
}

.service-process-step:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-6px);
    border-color: rgba(0, 155, 155, 0.4);
}

.service-process-num {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 18px;
    box-shadow: 0 8px 22px rgba(0, 128, 128, 0.4);
}

.service-process-step h3 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--white);
}

.service-process-step p {
    font-size: 13.5px;
    line-height: 1.95;
    color: rgba(255, 255, 255, 0.75);
}

/* ============= CASE STUDIES ============= */
.cases-intro {
    background: var(--white);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    perspective: 1500px;
}

.case-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 28px 26px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    transform-style: preserve-3d;
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-card:hover {
    box-shadow: 0 20px 50px rgba(27, 42, 74, 0.15);
    border-color: rgba(0, 128, 128, 0.3);
}

.case-card:hover::before {
    transform: scaleX(1);
}

.case-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal-bg), var(--navy-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: var(--transition);
}

.case-card:hover .case-icon {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    transform: scale(1.05);
    box-shadow: 0 8px 22px rgba(0, 128, 128, 0.3);
}

.case-tag {
    background: var(--teal-bg);
    color: var(--teal);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.case-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-summary {
    font-size: 13.5px;
    color: var(--medium-gray);
    line-height: 1.95;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
    background: linear-gradient(135deg, var(--off-white), var(--white));
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-md);
}

.case-metric {
    text-align: center;
}

.case-metric-value {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: var(--teal);
    line-height: 1.2;
}

.case-metric-label {
    display: block;
    font-size: 11.5px;
    color: var(--medium-gray);
    margin-top: 3px;
}

.case-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px dashed var(--light-gray);
    margin-top: auto;
}

.case-role {
    font-size: 12px;
    color: var(--navy);
    font-weight: 700;
    background: var(--navy-bg);
    padding: 4px 10px;
    border-radius: 12px;
}

.case-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
    transition: gap 0.2s ease;
}

.case-card:hover .case-link {
    color: var(--teal-dark);
}

/* Disclaimer */
.cases-disclaimer {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--light-gray);
    border-right: 4px solid var(--gold);
    max-width: 900px;
    margin: 0 auto;
}

.disclaimer-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.cases-disclaimer h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 8px;
}

.cases-disclaimer p {
    font-size: 14px;
    color: var(--medium-gray);
    line-height: 2;
}

/* ============= CASE DETAIL PAGE ============= */
.case-detail-hero {
    background: linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 50%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 60px 20px 80px;
    position: relative;
    overflow: hidden;
}

.case-detail-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}

.case-detail-hero .container {
    position: relative;
    z-index: 1;
    max-width: 980px;
}

.case-detail-meta {
    margin-bottom: 18px;
}

.back-link {
    color: var(--teal-light);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--white);
}

.case-detail-tag-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.case-detail-tag-row .case-tag {
    background: rgba(0, 155, 155, 0.2);
    color: var(--teal-light);
    border: 1px solid rgba(0, 155, 155, 0.3);
}

.case-role-pill,
.case-duration-pill {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.case-detail-hero h1 {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.55;
    margin-bottom: 18px;
}

.case-detail-summary {
    font-size: 16px;
    line-height: 2.1;
    opacity: 0.85;
    max-width: 800px;
    margin-bottom: 32px;
}

.case-detail-metric-banner {
    display: inline-block;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 155, 155, 0.3);
    border-radius: var(--radius-lg);
    padding: 18px 28px;
    backdrop-filter: blur(8px);
}

.case-detail-metric {
    display: flex;
    gap: 16px;
    align-items: center;
}

.case-detail-metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 8px 22px rgba(0, 128, 128, 0.4);
}

.case-detail-metric-value {
    display: block;
    font-size: 26px;
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
}

.case-detail-metric-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.case-detail-body {
    max-width: 900px;
}

/* Timeline */
.case-timeline {
    position: relative;
    padding-right: 40px;
}

.case-timeline::before {
    content: '';
    position: absolute;
    top: 16px;
    bottom: 16px;
    right: 16px;
    width: 3px;
    background: linear-gradient(to bottom, var(--teal), var(--gold));
    border-radius: 3px;
}

.case-step {
    position: relative;
    margin-bottom: 50px;
    padding-right: 30px;
}

.case-step:last-child {
    margin-bottom: 0;
}

.case-step-marker {
    position: absolute;
    right: -16px;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--white);
    border: 3px solid var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.25);
}

.case-step-marker-success {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    border-color: var(--teal-dark);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.4);
}

.case-step-num {
    font-size: 15px;
    font-weight: 900;
    color: var(--teal);
}

.case-step-marker-success .case-step-num {
    color: var(--white);
    font-size: 18px;
}

.case-step-content {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.case-step:hover .case-step-content {
    box-shadow: var(--shadow-md);
    transform: translateX(-4px);
    border-color: rgba(0, 128, 128, 0.2);
}

.case-step-label {
    display: inline-block;
    background: var(--teal-bg);
    color: var(--teal);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 12px;
}

.case-step-final .case-step-label {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
}

.case-step-content h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 14px;
}

.case-step-content p {
    font-size: 14.5px;
    line-height: 2.1;
    color: var(--dark-gray);
}

.case-result-highlight {
    margin-top: 22px;
    display: flex;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, var(--teal-bg), var(--navy-bg));
    padding: 18px 22px;
    border-radius: var(--radius-md);
    border: 2px dashed rgba(0, 128, 128, 0.3);
}

.case-result-icon {
    font-size: 36px;
}

.case-result-value {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: var(--teal-dark);
    line-height: 1.1;
}

.case-result-label {
    display: block;
    font-size: 13px;
    color: var(--medium-gray);
    margin-top: 3px;
}

/* Case CTA */
.case-cta {
    margin-top: 60px;
    text-align: center;
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: var(--white);
    padding: 48px 32px;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.case-cta::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 155, 155, 0.18), transparent 70%);
    border-radius: 50%;
}

.case-cta h3 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.case-cta p {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 24px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.case-cta .btn-primary {
    position: relative;
    z-index: 1;
}

/* ============= Q&A FLIP CARDS ============= */
.qa-section {
    background: linear-gradient(180deg, var(--off-white), var(--white));
    position: relative;
    overflow: hidden;
}

.qa-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 128, 128, 0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.qa-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.06), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    perspective: 1500px;
    position: relative;
    z-index: 1;
}

.qa-card {
    width: 100%;
    height: 280px;
    cursor: pointer;
    outline: none;
}

.qa-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transform-style: preserve-3d;
}

/* فقط کلاس .flipped کارت را می‌چرخاند.
   قبلاً `:focus` هم اینجا بود: کلیک به کارت focus می‌داد، پس کلیک دوم
   کلاس را برمی‌داشت ولی :focus هنوز کارت را باز نگه می‌داشت و کارت
   هرگز بسته نمی‌شد. برای کیبورد، هندلر Enter/Space در JS همین کلاس را
   جابه‌جا می‌کند، پس چیزی از دست نمی‌رود. */
.qa-card.flipped .qa-card-inner {
    transform: rotateY(180deg);
}

/* حلقه فوکوس برای کاربر کیبورد، بدون چرخاندن کارت */
.qa-card:focus-visible {
    outline: 3px solid var(--teal-light);
    outline-offset: 4px;
    border-radius: var(--radius-lg);
}

.qa-card-front,
.qa-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 24px rgba(27, 42, 74, 0.08);
    transition: box-shadow 0.4s ease;
}

.qa-card-front {
    background: var(--white);
    border: 1px solid var(--light-gray);
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden;
}

.qa-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.qa-card:hover .qa-card-front::before {
    transform: scaleX(1);
}

.qa-card:hover .qa-card-front {
    box-shadow: 0 14px 38px rgba(0, 128, 128, 0.18);
    border-color: rgba(0, 128, 128, 0.3);
}

.qa-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--teal-bg), var(--navy-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: var(--transition);
}

.qa-card:hover .qa-icon {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    transform: scale(1.08) rotate(-6deg);
    box-shadow: 0 8px 22px rgba(0, 128, 128, 0.35);
}

.qa-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--teal-bg);
    color: var(--teal);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.qa-card-front h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.7;
    margin-top: 16px;
    margin-bottom: 12px;
}

.qa-flip-hint {
    font-size: 12px;
    font-weight: 700;
    color: var(--teal);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: var(--transition);
}

.qa-card:hover .qa-flip-hint {
    gap: 12px;
    color: var(--teal-dark);
}

.qa-card-back {
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 60%, var(--teal-dark) 100%);
    color: var(--white);
    transform: rotateY(180deg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.qa-card-back::before {
    content: '”';
    position: absolute;
    top: -10px;
    right: 14px;
    font-family: 'Georgia', serif;
    font-size: 110px;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
}

.qa-back-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 155, 155, 0.2);
    color: var(--teal-light);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    align-self: flex-start;
    border: 1px solid rgba(0, 155, 155, 0.3);
}

.qa-back-label::before {
    content: '⚖';
    font-size: 13px;
}

.qa-card-back p {
    font-size: 13px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.88);
    overflow-y: auto;
    flex: 1;
    padding-left: 4px;
}

.qa-card-back p::-webkit-scrollbar {
    width: 4px;
}

.qa-card-back p::-webkit-scrollbar-thumb {
    background: rgba(0, 155, 155, 0.5);
    border-radius: 2px;
}

.qa-detail-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    margin-top: 10px;
    color: var(--teal-light);
    font-size: 12px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.qa-detail-link:hover { color: var(--white); }

.qa-note {
    text-align: center;
    margin-top: 40px;
    color: var(--medium-gray);
    font-size: 14px;
}

.qa-note a {
    color: var(--teal);
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.qa-note a:hover {
    border-bottom-color: var(--teal);
}

/* ============= Q&A PAGE TOOLBAR ============= */
.qa-page-section {
    background: var(--off-white);
}

.qa-toolbar {
    max-width: 1100px;
    margin: 0 auto 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.qa-search {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.qa-search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    opacity: 0.6;
}

.qa-search input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14.5px;
    background: var(--white);
    color: var(--dark-gray);
    transition: var(--transition);
    direction: rtl;
}

.qa-search input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.12);
}

.qa-filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.qa-filter {
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    background: var(--white);
    border: 1.5px solid var(--light-gray);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition);
}

.qa-filter:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.qa-filter.active {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--white);
    border-color: var(--teal);
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.3);
}

.qa-page-grid {
    grid-template-columns: repeat(3, 1fr);
}

.qa-card.hidden {
    display: none;
}

.qa-empty {
    text-align: center;
    padding: 60px 20px;
}

.qa-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.qa-empty h3 {
    font-size: 20px;
    color: var(--navy);
    font-weight: 800;
    margin-bottom: 10px;
}

.qa-empty p {
    color: var(--medium-gray);
    margin-bottom: 24px;
}

/* ============= FOOTER WAVE + NEWSLETTER ============= */
.footer-wave {
    color: var(--navy-dark);
    line-height: 0;
    margin-top: -1px;
}

.footer-wave svg {
    width: 100%;
    height: 90px;
    display: block;
}

.main-footer {
    padding-top: 0;
}

.footer-newsletter {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    padding: 50px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 40px;
}

.newsletter-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.newsletter-text h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--white);
}

.newsletter-text p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.8;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 6px;
    position: relative;
}

.newsletter-form input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 18px;
    color: var(--white);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    outline: none;
    direction: rtl;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-form button {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--white);
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.3);
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.45);
}

.newsletter-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: var(--teal);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.newsletter-success.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: success-fade 3s ease forwards;
}

@keyframes success-fade {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    15%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
}

/* ============= RESPONSIVE ============= */

/* Compact nav for mid-size desktops (avoid overflow with many items) */
@media (max-width: 1180px) {
    .nav-links li a {
        padding: 8px 11px;
        font-size: 13px;
    }
    .nav-cta {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    .logo-text h1, .logo-text .logo-name { font-size: 16px; }
    .logo-text > span, .logo-text .logo-name + span { font-size: 10px; }
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonial-card {
        flex: 0 0 calc((100% - 24px) / 2);
    }

    .newsletter-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .qa-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .qa-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .service-hero-icon-wrap { display: none; }

    .service-process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-app {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    /* کارت اعتبارنامه متن است، نه عکس تزئینی — روی موبایل هم می‌ماند */
    .hero-visual {
        margin-top: 34px;
    }

    .credential-card {
        max-width: 100%;
        padding: 24px 20px 22px;
    }

    .hero h1,
    .hero h2 {
        font-size: 34px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image-wrapper {
        order: -1;
    }
}

/* Stack top-bar before hiding it for tablets so the layout never overflows */
@media (max-width: 900px) {
    .top-bar-inner {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
    }
    .top-bar-phone,
    .top-bar-hours {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* منوی موبایل به static/css/mobile.css منتقل شد (bottom sheet) */


    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 12px;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links li a {
        padding: 15px 18px;
        border-radius: var(--radius-sm);
        border-bottom: 1px solid var(--light-gray);
        display: flex;
        align-items: center;
        font-size: 15px;
        font-weight: 600;
        color: var(--navy);
        line-height: 1.5;
        white-space: normal;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .nav-links li a.active {
        background: var(--teal-bg);
        color: var(--teal-dark);
    }

    .nav-links li a.active::after {
        display: none;
    }

    /* CTA button stays visually distinct in mobile menu */
    .nav-links li a.nav-cta {
        margin: 16px 6px 4px;
        padding: 14px 18px !important;
        border-radius: var(--radius-md) !important;
        border: none !important;
        text-align: center;
        justify-content: center;
        font-size: 15px !important;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-overlay.active {
        display: block;
    }

    .hero {
        padding: 60px 20px;
        min-height: auto;
    }

    .hero h1,
    .hero h2 {
        font-size: 28px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        flex: 0 0 100%;
    }

    .newsletter-form {
        flex-direction: column;
        border-radius: var(--radius-md);
        padding: 8px;
    }

    .newsletter-form button {
        justify-content: center;
    }

    .footer-wave svg {
        height: 50px;
    }

    .faq-item summary {
        font-size: 14px;
        padding: 16px 18px;
    }

    .qa-grid,
    .qa-page-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .case-detail-hero h1 {
        font-size: 24px;
    }

    .service-hero-content h1 {
        font-size: 28px;
    }

    .service-process-grid {
        grid-template-columns: 1fr;
    }

    .service-detail-grid {
        grid-template-columns: 1fr !important;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tools-disclaimer {
        flex-direction: column;
        gap: 10px;
    }

    .case-step-content {
        padding: 20px 18px;
    }

    .case-timeline {
        padding-right: 30px;
    }

    .qa-card {
        height: 260px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 50px 20px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    /* Header / logo trim to prevent collision with hamburger */
    .header-inner {
        padding: 0 16px;
        height: 68px;
        gap: 10px;
    }
    .logo {
        gap: 10px;
        min-width: 0;
        flex: 1;
    }
    .logo-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
        flex-shrink: 0;
    }
    .logo-text { min-width: 0; }
    .logo-text h1,
    .logo-text .logo-name {
        font-size: 15px;
        line-height: 1.25;
    }
    .logo-text > span,
    .logo-text .logo-name + span {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    /* Hero tweaks */
    .hero {
        padding: 50px 18px;
    }
    .hero-inner {
        gap: 30px;
        padding: 0;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero p {
        font-size: 15px;
        line-height: 1.95;
    }
    .hero-badge {
        white-space: normal;
        line-height: 1.6;
    }

    /* Page banner & breadcrumbs */
    .page-banner {
        padding: 44px 18px;
    }
    .page-banner h1 {
        font-size: 26px;
    }

    /* Articles + content padding */
    .article-detail {
        padding: 40px 18px;
    }
    .article-detail h1,
    .article-detail > h2 {
        font-size: 24px;
    }
    .resume-section,
    .contact-section {
        padding: 40px 18px;
    }
    .contact-grid {
        gap: 30px;
    }
    .contact-form-wrapper {
        padding: 26px 20px;
    }

    /* Case detail hero */
    .case-detail-hero {
        padding: 40px 18px 60px;
    }
    .case-detail-hero h1 {
        font-size: 22px;
        line-height: 1.5;
    }
    .case-detail-summary { font-size: 14.5px; }
    .case-detail-metric-banner {
        display: block;
        padding: 14px 18px;
    }

    /* Service hero */
    .service-hero {
        padding: 50px 18px;
    }
    .service-hero-content h1 {
        font-size: 24px;
    }
    .service-hero-content h2 { font-size: 16px; }

    /* Tools / disclaimer */
    .tool-container {
        padding: 0 4px;
    }
    .tool-form,
    .tool-result {
        padding: 24px 18px;
    }
    .cases-disclaimer,
    .tools-disclaimer {
        flex-direction: column;
        gap: 14px;
        padding: 20px 18px;
    }

    /* Newsletter */
    .footer-newsletter {
        padding: 36px 18px;
    }
    .newsletter-form {
        border-radius: var(--radius-md);
    }
    .newsletter-form input {
        border-radius: var(--radius-sm);
    }
    .newsletter-form button {
        border-radius: var(--radius-sm);
    }

    /* Footer */
    .main-footer { padding: 40px 18px 0; }
    .footer-bottom { padding: 16px 0; }

    /* Case timeline — tighten so marker doesn't overflow */
    .case-timeline {
        padding-right: 22px;
    }
    .case-step {
        padding-right: 18px;
    }
    .case-step-marker {
        width: 30px;
        height: 30px;
        right: -10px;
    }
    .case-step-num { font-size: 13px; }
    .case-result-highlight {
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
        gap: 10px;
    }

    /* QA card */
    .qa-card {
        height: auto;
        min-height: 240px;
    }
    .qa-card-front,
    .qa-card-back {
        padding: 22px 18px;
    }

    /* CTA box */
    .cta-box {
        padding: 40px 22px;
    }
    .cta-section { padding: 50px 18px; }

    /* Filter tabs less squished */
    .filter-tab {
        padding: 7px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 16px;
    }

    .hero h1,
    .hero h2 {
        font-size: 24px;
        line-height: 1.4;
    }

    .hero p {
        font-size: 14.5px;
        margin-bottom: 28px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 5px 14px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-outline {
        width: 100%;
        justify-content: center;
        padding: 13px 24px;
        font-size: 14px;
    }

    .service-hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .service-hero-buttons .btn-primary,
    .service-hero-buttons .btn-outline,
    .cta-buttons .btn-primary,
    .cta-buttons .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-box .stat-number {
        font-size: 30px;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-banner h1 {
        font-size: 24px;
    }

    .page-banner .breadcrumb {
        font-size: 12.5px;
    }

    .article-detail h1,
    .article-detail > h2 {
        font-size: 22px;
    }

    .article-content h2 {
        font-size: 19px;
        padding-right: 12px;
    }

    /* Section header at narrow widths */
    .section-header h2 {
        font-size: 22px;
        line-height: 1.4;
    }
    .section-header p {
        font-size: 14px;
    }
    .section-header .overline {
        font-size: 12px;
    }

    /* Service cards at narrow widths */
    .service-card {
        padding: 28px 22px;
    }

    /* About */
    .about-image {
        padding: 30px 20px;
        min-height: 320px;
    }
    .about-image .large-icon { font-size: 90px; }
    .about-experience {
        bottom: -16px;
        left: 8px;
        padding: 14px 20px;
    }
    .about-experience .number { font-size: 28px; }
    .about-content h2 { font-size: 22px; }

    /* Articles */
    .article-thumb { height: 160px; }
    .article-body { padding: 18px; }

    /* Cases */
    .case-card { padding: 22px 20px 20px; }
    .case-card h3 { font-size: 16px; }

    /* Case detail tag row should wrap nicely */
    .case-detail-tag-row {
        gap: 8px;
    }
    .case-detail-hero h1 {
        font-size: 20px;
    }
    .case-detail-metric-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    .case-detail-metric-value { font-size: 22px; }

    /* Service hero */
    .service-hero {
        padding: 40px 16px;
    }
    .service-hero-content h1 { font-size: 22px; }

    /* QA flip card */
    .qa-card { min-height: 220px; }
    .qa-card-front h3 { font-size: 14.5px; }
    .qa-card-back p { font-size: 12.5px; }

    /* CTA box */
    .cta-box h2 { font-size: 24px; }
    .cta-box p { font-size: 14px; }
    .cta-box {
        padding: 36px 20px;
    }

    /* Sections + footer */
    .section { padding: 44px 16px; }
    .footer-inner { gap: 26px; }
    .footer-newsletter { padding: 30px 16px; }
    .newsletter-text h3 { font-size: 18px; }

    /* Filter tabs more compact */
    .filter-tab,
    .qa-filter {
        padding: 6px 14px;
        font-size: 12.5px;
    }

    /* Tool result big number wraps */
    .result-value-big { font-size: 22px; }

    /* Testimonials author wrap */
    .testimonial-card { padding: 30px 22px 24px; }
    .testimonial-quote {
        font-size: 70px;
        right: 18px;
    }
}

/* Extra-narrow phones (e.g. Galaxy S8/old iPhones at 360–375px) */
@media (max-width: 380px) {
    .header-inner {
        padding: 0 12px;
        height: 64px;
    }
    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    .logo-text h1, .logo-text .logo-name { font-size: 14px; }
    .logo-text > span, .logo-text .logo-name + span { font-size: 9.5px; }

    .hero h1, .hero h2 { font-size: 21px; }
    .hero { padding: 36px 14px; }

    .section { padding: 40px 14px; }
    .page-banner { padding: 36px 14px; }
    .page-banner h1 { font-size: 21px; }

    .section-header h2 { font-size: 20px; }

    .case-detail-hero h1 { font-size: 18px; }
    .service-hero-content h1 { font-size: 20px; }

    .case-timeline { padding-right: 18px; }
    .case-step { padding-right: 14px; }
    .case-step-marker { right: -8px; width: 26px; height: 26px; }
    .case-step-content { padding: 18px 14px; }

    .cta-box h2 { font-size: 20px; }

    .tool-form,
    .tool-result { padding: 20px 16px; }

    /* Stat numbers shrink so 2-col still fits */
    .stat-box .stat-number { font-size: 26px; }
    .stat-box .stat-label { font-size: 12px; }
}

/* ============================================================
   لایه مدرن — این بخش عمداً در انتهای فایل است تا بر قواعد
   قبلی اولویت داشته باشد. شامل: دسترس‌پذیری، کارایی، و
   اجزای جدید (واتساپ شناور، نوار سلب مسئولیت، خطاهای فرم).
   ============================================================ */

/* ---------- ۱) احترام به تنظیم «کاهش حرکت» سیستم‌عامل ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .hero-particles,
    .credential-card::after {
        display: none;
    }
}

/* ---------- ۲) حلقه فوکوس واضح برای کاربران کیبورد ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--teal-light);
    outline-offset: 3px;
    border-radius: 6px;
}

.section-navy :focus-visible,
.hero :focus-visible,
.main-footer :focus-visible {
    outline-color: var(--gold-light);
}

/* لینک پرش برای صفحه‌خوان و کیبورد */
.skip-to-content {
    position: absolute;
    inset-inline-start: -9999px;
    top: 10px;
    z-index: 10000;
    background: var(--navy);
    color: var(--white);
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
}

.skip-to-content:focus {
    inset-inline-start: 10px;
}

/* ---------- ۳) کارایی ----------
   نکته: از `content-visibility: auto` عمداً استفاده نشد. روی این صفحه
   سود ناچیزی دارد ولی متن بخش‌های پایین را از دسترس ابزارهای استخراج
   متن خارج می‌کند — برای سایتی که سئو اولویت اولش است، ریسکی است که
   ارزشش را ندارد. */

/* لنگرها زیر هدر چسبان پنهان نشوند */
:target,
section[id] {
    scroll-margin-top: 96px;
}

/* تیترها زیباتر بشکنند */
h1, h2, h3, .section-header h2, .hero h1 {
    text-wrap: balance;
}

p, .article-content p {
    text-wrap: pretty;
}

/* گذار بین صفحات در motion.css تعریف شده است */

/* ---------- ۴) کارت اعتبارنامه در حالت موبایل ---------- */
@media (max-width: 968px) {
    .credential-card {
        text-align: right;
        margin-inline: auto;
    }
}

/* ---------- ۵) دکمه شناور تماس سریع ---------- */
.quick-contact {
    position: fixed;
    inset-inline-start: 20px;
    bottom: 22px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-contact-btn {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    font-size: 22px;
    box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.quick-contact-btn:hover,
.quick-contact-btn:focus-visible {
    transform: scale(1.08) translateY(-2px);
}

.quick-contact-whatsapp { background: linear-gradient(140deg, #34C56E, #128C7E); }
.quick-contact-phone { background: linear-gradient(140deg, var(--teal-light), var(--teal-dark)); }

/* حلقه تپنده برای جلب توجه، فقط یک‌بار در چند ثانیه */
.quick-contact-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    animation: quick-pulse 3.5s ease-out infinite;
    pointer-events: none;
}

@keyframes quick-pulse {
    0%   { opacity: 0.55; transform: scale(1); }
    55%  { opacity: 0; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(1.5); }
}

.quick-contact-label {
    position: absolute;
    inset-inline-start: 62px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    white-space: nowrap;
    background: var(--navy);
    color: var(--white);
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 13px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.quick-contact-btn:hover .quick-contact-label,
.quick-contact-btn:focus-visible .quick-contact-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 768px) {
    .quick-contact {
        inset-inline-start: 14px;
        bottom: 16px;
    }
    .quick-contact-btn { width: 48px; height: 48px; font-size: 20px; }
    .quick-contact-label { display: none; }
}

/* ---------- ۶) نوار سلب مسئولیت حقوقی ---------- */
.legal-disclaimer {
    max-width: 1100px;
    margin: 0 auto 40px;
    padding: 16px 20px;
    display: flex;
    gap: 13px;
    align-items: flex-start;
    background: var(--off-white);
    border: 1px solid var(--light-gray);
    border-inline-start: 4px solid var(--gold);
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 2;
    color: var(--medium-gray);
}

.legal-disclaimer strong {
    color: var(--dark-gray);
    display: block;
    margin-bottom: 2px;
    font-size: 13.5px;
}

.legal-disclaimer-icon {
    font-size: 19px;
    line-height: 1.4;
    flex-shrink: 0;
}

.footer-disclaimer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 20px;
    font-size: 12px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* ---------- ۷) وضعیت خطا در فرم‌ها ---------- */
.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
    border-color: #E0574B;
    background: rgba(224, 87, 75, 0.04);
}

.field-error {
    display: block;
    color: #C0392B;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

/* تله ربات — باید برای انسان کاملاً نامرئی باشد ولی برای ربات پرکردنی */
.hp-field {
    position: absolute !important;
    inset-inline-start: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---------- ۸) نوار جستجوی مقالات ---------- */
.search-bar {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto 26px;
}

.search-bar input {
    flex: 1;
    padding: 13px 18px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px var(--teal-bg-hover);
}

.search-bar button {
    padding: 13px 26px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--white);
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover { filter: brightness(1.08); }

/* ---------- ۹) نتیجه خالی پرسش و پاسخ ---------- */
.qa-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--medium-gray);
}

.qa-empty-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ---------- ۱۰) اصلاحات چاپ ---------- */
@media print {
    .top-bar,
    .main-header,
    .main-footer,
    .quick-contact,
    .scroll-top,
    .scroll-progress,
    .hero-particles,
    .cta-section {
        display: none !important;
    }

    body { font-size: 12pt; color: #000; background: #fff; }
    .article-content a::after { content: ' (' attr(href) ')'; font-size: 10pt; }
}

/* ---------- ۱۱) اجزای اضافه‌شده در بازطراحی ---------- */

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* فوتر: شبکه‌های اجتماعی */
.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

/* دکمه‌های آیکنی — مربعِ گردگوشه با آیکن وسط، نه متن */
.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: var(--transition);
}

.footer-socials a svg {
    width: 20px;
    height: 20px;
}

.footer-socials a:hover {
    background: rgba(0, 155, 155, 0.25);
    border-color: rgba(0, 155, 155, 0.55);
    color: #fff;
    transform: translateY(-2px);
}

/* فوتر: فراخوان به‌جای فرم خبرنامه قدیمی */
.newsletter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.newsletter-form .btn-primary,
.newsletter-form .btn-outline {
    padding: 13px 28px;
    white-space: nowrap;
}

/* نقشه دفتر */
.contact-map {
    margin-top: 22px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--light-gray);
    box-shadow: var(--shadow-sm);
    line-height: 0;
}

.contact-map iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}

/* رزومه: مهارت‌های لینک‌دار */
a.skill-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.skill-item:hover {
    border-color: var(--teal);
    transform: translateY(-4px);
}

@media (max-width: 600px) {
    .newsletter-form {
        width: 100%;
    }
    .newsletter-form .btn-primary,
    .newsletter-form .btn-outline {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}

/* ---------- ۱۲) جعبه نویسنده و فهرست نوشته‌ها ---------- */

.author-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin: 40px 0 24px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--off-white), var(--white));
    border: 1px solid var(--light-gray);
    border-inline-start: 4px solid var(--teal);
    box-shadow: var(--shadow-sm);
}

.author-box-mark {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 26px;
    color: var(--white);
    border-radius: 16px;
    background: linear-gradient(140deg, var(--teal-light), var(--navy));
    box-shadow: 0 8px 20px -8px rgba(0, 128, 128, 0.6);
}

.author-box-body { min-width: 0; }

.author-box-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--teal-dark);
    background: var(--teal-bg);
    padding: 2px 10px;
    border-radius: 30px;
    margin-bottom: 8px;
}

.author-box h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 3px;
}

.author-box h3 a:hover { color: var(--teal); }

.author-box-title {
    font-size: 13px;
    color: var(--teal-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.author-box-bio {
    font-size: 13.5px;
    line-height: 2;
    color: var(--medium-gray);
    margin-bottom: 12px;
}

.author-box-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.author-box-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
}

.author-box-link:hover { color: var(--teal-dark); text-decoration: underline; }

.authored-list {
    list-style: none;
    display: grid;
    gap: 2px;
}

.authored-list a {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.authored-list a:hover {
    background: var(--teal-bg);
    transform: translateX(-4px);
}

.authored-cat {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--teal-dark);
    background: var(--teal-bg);
    padding: 2px 10px;
    border-radius: 30px;
    min-width: 74px;
    text-align: center;
}

.authored-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray);
    line-height: 1.85;
}

.authored-list a:hover .authored-title { color: var(--teal-dark); }

/* فهرست مطالب خودکار داخل مقاله */
.article-toc {
    margin: 26px 0 32px;
    padding: 20px 22px;
    background: var(--off-white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
}

.article-toc-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 12px;
}

.article-toc ol {
    margin: 0;
    padding-inline-start: 20px;
    display: grid;
    gap: 7px;
}

.article-toc a {
    font-size: 13.5px;
    color: var(--dark-gray);
    line-height: 1.9;
}

.article-toc a:hover { color: var(--teal); text-decoration: underline; }

@media (max-width: 600px) {
    .author-box { flex-direction: column; gap: 14px; padding: 20px 16px; }
    .authored-list a { flex-direction: column; gap: 5px; }
    .authored-cat { min-width: 0; align-self: flex-start; }
}

/* ============================================================
   ۱۳) آیکن‌ها — SVG درون‌خطی به‌جای ایموجی
   ایموجی روی هر سیستم‌عامل شکل و رنگ متفاوتی دارد، خط پایه‌اش
   با متن جور نیست و در چاپ خراب می‌شود. SVG درون‌خطی رنگش را
   از currentColor می‌گیرد، پس همه‌جا با متن کنارش هماهنگ است.
   ============================================================ */

.icon {
    display: inline-block;
    vertical-align: -0.18em;
    flex-shrink: 0;
    stroke: currentColor;
}

/* آیکن‌های داخل حباب‌های رنگی: رنگ از والد می‌آید */
.service-icon,
.tool-card-icon,
.skill-icon,
.qa-icon,
.case-icon,
.thumb-icon,
.large-icon,
.contact-info-icon,
.credential-seal,
.tool-result-icon,
.service-hero-icon,
.author-box-mark,
.case-detail-metric-icon,
.case-result-icon,
.disclaimer-icon,
.legal-disclaimer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.service-icon .icon,
.tool-card-icon .icon,
.skill-icon .icon,
.qa-icon .icon,
.large-icon .icon,
.service-hero-icon .icon,
.author-box-mark .icon,
.tool-result-icon .icon {
    vertical-align: middle;
}

/* آیکن‌های داخل دکمه و لینک، با متن فاصله بگیرند */
.btn-primary .icon,
.btn-outline .icon,
.form-submit .icon,
.service-arrow .icon,
.article-link .icon,
.case-link .icon {
    margin-inline-start: 6px;
    vertical-align: -0.2em;
}

/* آیکن کنار عنوان بخش‌ها و تیترها */
h1 .icon, h2 .icon, h3 .icon, h4 .icon {
    vertical-align: -0.12em;
    margin-inline-end: 8px;
    color: var(--teal);
}

.section-navy h2 .icon,
.hero h2 .icon,
.main-footer h3 .icon,
.main-footer h4 .icon {
    color: var(--teal-light);
}

/* فهرست اطلاعات تماس در فوتر */
.footer-contact-info .icon {
    color: var(--teal-light);
    margin-inline-end: 7px;
    vertical-align: -0.2em;
}

/* نوار بالایی */
.top-bar .icon { vertical-align: -0.15em; }

/* بلوک ویژگی‌های «درباره ما» — تیک‌ها */
.about-feature .check .icon,
.about-feature .icon { color: var(--teal); vertical-align: -0.18em; }

/* دکمه بازگشت به بالا */
.scroll-top .icon { vertical-align: middle; }

@media print {
    .icon { stroke: #000; }
}

/* ============================================================
   ۱۴) هدر چسبان + موبایل افقی
   ============================================================ */

/* --- ارتفاع هدر در اندازه‌های مختلف --- */
@media (max-width: 768px) {
    :root { --header-h: 64px; }
    .main-header.is-compact .header-inner { height: 54px; }
}

/*
   موبایل افقی: ارتفاع دید حدود ۳۷۵ پیکسل است. هدر ۶۴ پیکسلی یعنی
   ۱۷٪ صفحه فقط هدر. اینجا هدر را باریک می‌کنیم و منوی کشویی هم
   فضای بالای خودش را کم می‌کند تا آیتم‌ها جا بشوند.
*/
@media (max-height: 480px) and (orientation: landscape) {
    :root { --header-h: 50px; }

    .main-header.is-compact .header-inner { height: 46px; }
    .logo-icon { width: 34px; height: 34px; font-size: 16px; }
    .logo-name { font-size: 15px; }
    .logo-text span:last-child { display: none; }

    .main-nav { padding: 58px 0 16px; }
    .main-nav::before { top: 18px; font-size: 12px; }
    .nav-links li a { padding: 10px 16px; font-size: 14px; }
    .nav-links li a.nav-cta { margin: 10px 6px 4px; padding: 11px 16px !important; }

    /* هیرو نباید کل صفحه را بگیرد */
    .hero { min-height: auto; padding: 40px 18px; }
    .hero-inner { gap: 26px; }
    .section { padding: 40px 18px; }
    .page-banner { padding: 30px 16px; }

    /* دکمه تماس شناور نباید روی محتوا بیفتد */
    .quick-contact { bottom: 10px; }
    .quick-contact-btn { width: 42px; height: 42px; }
    .scroll-top { width: 40px; height: 40px; }
}

/* --- منوی موبایل روی هدر بماند و لایه تیره درست بنشیند --- */
@media (max-width: 768px) {
    .main-nav { z-index: 1200; }
    .nav-overlay { z-index: 1100; }

    /* منوی باز نباید پشت نوار مرورگر موبایل گم شود */
    .main-nav {
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        overscroll-behavior: contain;
    }
}

/* --- فاصله لنگرها از هدر چسبان --- */
:target,
section[id],
.article-content h2[id] {
    scroll-margin-top: calc(var(--header-h) + 16px);
}

/* روی گوشی افقی (۳۷۵ تا ۴۳۰ پیکسل ارتفاع) هدر چسبان می‌ماند — با ارتفاع
   ۴۶ تا ۵۰ پیکسل فقط حدود ۱۳٪ صفحه را می‌گیرد و دکمه «درخواست مشاوره»
   همیشه در دسترس است. فقط روی صفحات به‌شدت کوتاه غیرچسبان می‌شود. */
@media (max-height: 330px) {
    .main-header { position: static; }
}

/* ============================================================
   ۱۵) اصلاحات لمس و خوانایی روی موبایل
   معیار: هدف لمسی حداقل ۴۴×۴۴ و متن بدنه حداقل ۱۲ پیکسل.
   ============================================================ */

@media (max-width: 768px) {

    /* --- دکمه همبرگر: ناحیه لمس واقعی ۴۴ پیکسل --- */
    .hamburger {
        width: 44px;
        height: 44px;
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    /* --- آیتم‌های منو: ارتفاع لمس‌پذیر --- */
    .nav-links li a {
        min-height: 48px;
        padding: 13px 18px;
    }

    .nav-links li a.nav-cta { min-height: 50px; }

    /* --- زیرعنوان لوگو زیر ۱۰ پیکسل خوانا نیست --- */
    .logo-text span:last-child { font-size: 11.5px; }

    /* --- برچسب‌های ریز کارت‌ها --- */
    .case-metric-label,
    .credential-verified,
    .qa-tag,
    .qa-back-label,
    .article-date,
    .tool-tag { font-size: 12px; }

    /* --- نقطه‌های اسلایدر: دیده کوچک، لمس بزرگ --- */
    .slider-dot {
        position: relative;
        min-width: 9px;
        min-height: 9px;
    }

    .slider-dot::after {
        content: '';
        position: absolute;
        inset: -14px;          /* ۹ + ۲۸ = ۳۷ ... با gap کنار هم ≥۴۴ */
    }

    .slider-controls { gap: 14px; }

    .slider-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* --- دکمه بازگشت به بالا و تماس سریع تداخل نکنند --- */
    .scroll-top { bottom: 78px; }

    /* --- فیلترها: اسکرول افقی به‌جای شکستن در چند خط --- */
    .filter-tabs,
    .qa-filter-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 6px;
    }

    .filter-tabs::-webkit-scrollbar,
    .qa-filter-tabs::-webkit-scrollbar { display: none; }

    .filter-tab,
    .qa-filter {
        flex: 0 0 auto;
        scroll-snap-align: start;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    /* --- ورودی‌های فرم: زیر ۱۶px باعث زوم خودکار iOS می‌شود --- */
    input[type="text"], input[type="tel"], input[type="email"],
    input[type="number"], input[type="search"], input[type="password"],
    select, textarea { font-size: 16px; }
}

/* بلوک‌های قدیمی «موبایل افقی» و «گوشی در حالت افقی» حذف شدند —
   کل ناوبری موبایل (عمودی و افقی) اکنون در static/css/mobile.css است. */

/* Editorial imagery added during the content audit */
.page-feature-media {
    width: 100%;
    margin: 0 auto 38px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 16 / 6;
    background: var(--navy-bg);
    box-shadow: 0 22px 55px rgba(27, 42, 74, 0.14);
}

.page-feature-media img,
.service-hero-media img,
.case-card-image,
.case-detail-hero-image,
.tool-card-image,
.hero-editorial-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.tool-feature { max-width: 1080px; }
.contact-feature { grid-column: 1 / -1; margin-bottom: 8px; }

.service-hero-media {
    height: 370px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.tool-card-image,
.case-card-image {
    height: 160px;
    margin: -32px -26px 4px;
    width: calc(100% + 52px);
    max-width: none;
}

.case-card-image { margin-top: -28px; }

.case-detail-hero-image {
    height: 330px;
    border-radius: var(--radius-xl);
    margin-bottom: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.case-educational-notice {
    max-width: 800px;
    margin: -14px 0 28px;
    padding: 12px 16px;
    border: 1px solid rgba(244, 184, 96, 0.35);
    border-radius: var(--radius-md);
    color: #ffe0a8;
    background: rgba(244, 184, 96, 0.08);
    font-size: 13px;
    line-height: 1.9;
}

.law-update-note {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff8e8;
    color: #7a5a15;
    font-size: 12px;
    line-height: 1.8;
}

.hero-visual {
    position: relative;
    min-height: 540px;
    align-items: flex-end;
}

.hero-editorial-image {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    opacity: 0.78;
    box-shadow: 0 30px 75px rgba(0, 0, 0, 0.45);
}

.hero-visual .credential-card {
    margin: 0 22px 22px;
    background: linear-gradient(180deg, rgba(15, 34, 55, 0.9), rgba(9, 25, 43, 0.94));
}

@media (max-width: 900px) {
    .service-hero-media { height: 300px; }
    .page-feature-media { aspect-ratio: 16 / 8; }
    .hero-visual { min-height: 500px; }
}

@media (max-width: 600px) {
    .page-feature-media { aspect-ratio: 4 / 3; margin-bottom: 26px; }
    .service-hero-media { height: 240px; }
    .case-detail-hero-image { height: 230px; }
    .tool-card-image,
    .case-card-image { height: 145px; margin-inline: -20px; width: calc(100% + 40px); }
    .hero-visual { min-height: 470px; }
    .hero-visual .credential-card { margin: 0 12px 12px; }
}

/* ============= STANDALONE KNOWLEDGE PAGES ============= */
.knowledge-detail-banner h1 {
    max-width: 1040px;
    margin-inline: auto;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.65;
}

.knowledge-detail-page {
    padding: 64px 20px 84px;
    background: var(--off-white);
}

.knowledge-detail-container { max-width: 980px; }

.knowledge-detail-header {
    padding: 28px 30px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-right: 4px solid var(--teal);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.knowledge-detail-header > p {
    margin: 12px 0 0;
    color: var(--dark-gray);
    line-height: 2;
}

.knowledge-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.knowledge-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--medium-gray);
    font-size: 13px;
    font-weight: 700;
}

.knowledge-detail-image {
    height: 330px;
    margin: 26px 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.knowledge-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.legal-text-document,
.faq-answer-document {
    padding: clamp(25px, 5vw, 48px);
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.legal-text-label,
.faq-question-label,
.faq-answer-label {
    display: inline-flex;
    padding: 5px 14px;
    color: var(--teal-dark);
    background: var(--teal-bg);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.legal-text-document h2,
.faq-answer-document h2 {
    margin: 18px 0;
    color: var(--navy);
    font-size: clamp(22px, 3vw, 31px);
    line-height: 1.75;
}

.legal-text-document p,
.faq-answer-document p {
    margin: 0;
    color: var(--dark-gray);
    font-size: 17px;
    line-height: 2.25;
    white-space: pre-line;
}

.faq-answer-label { margin: 12px 0 16px; }

.knowledge-note,
.knowledge-source-box {
    display: flex;
    gap: 16px;
    margin-top: 22px;
    padding: 22px 24px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-md);
}

.knowledge-note { border-right: 4px solid var(--gold); }
.knowledge-source-box { border-right: 4px solid var(--teal); }
.knowledge-note h2 { margin: 0 0 7px; color: var(--navy); font-size: 18px; }
.knowledge-note p,
.knowledge-source-box p { margin: 0; color: var(--dark-gray); line-height: 2; }

.knowledge-related { margin-top: 44px; }
.knowledge-related > h2 { margin-bottom: 18px; color: var(--navy); font-size: 22px; }
.knowledge-related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.knowledge-related-grid a {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-md);
}
.knowledge-related-grid a:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.knowledge-related-grid span { color: var(--teal); font-size: 12px; font-weight: 700; }
.knowledge-related-grid strong { line-height: 1.9; }

.knowledge-cta {
    margin-top: 44px;
    padding: 30px;
    text-align: center;
    color: var(--white);
    background: linear-gradient(145deg, var(--navy-dark), var(--navy));
    border-radius: var(--radius-lg);
}
.knowledge-cta h2 { margin-bottom: 8px; color: var(--white); }
.knowledge-cta p { margin-bottom: 20px; color: rgba(255,255,255,.82); line-height: 2; }
.knowledge-back { margin-top: 32px; text-align: center; }
.knowledge-back a { color: var(--teal-dark); font-weight: 800; }

@media (max-width: 700px) {
    .knowledge-detail-page { padding: 38px 14px 58px; }
    .knowledge-detail-header { padding: 21px 17px; }
    .knowledge-detail-image { height: 220px; }
    .knowledge-related-grid { grid-template-columns: 1fr; }
    .legal-text-document p,
    .faq-answer-document p { font-size: 15px; }
}
