/* ================================== */
/* === 1. Variables & Reset === */
/* ================================== */
:root {
    /* Unified with the main site's exact blue accent (#066ac9) for site-wide consistency */
    --primary-green: #066ac9;
    --primary-green-glow: rgba(6, 106, 201, 0.30);
    --primary-blue: #066ac9;
    --primary-deep: #0555a1;
    --text-main: #1a1d21;
    --text-secondary: #565a60;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --bg-body: #f6f8fb;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --section-spacing: 80px;
}

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

html {
    scroll-behavior: smooth;
    color-scheme: light;
}

/* ---- a11y: visible keyboard focus (replaces removed outlines) ---- */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Anchor targets (TOC, in-page nav) must clear sticky nav */
:where(h1, h2, h3, h4, h5, h6, section, article)[id] {
    scroll-margin-top: 96px;
}

/* Honor user motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.8;
    direction: rtl;
    font-weight: 400;
    font-size: 16px;
}

/* ================================== */
/* === 2. Ambient Background === */
/* ================================== */
.ambient-light {
    position: fixed;
    top: -15%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(6, 106, 201, 0.07), transparent 60%);
    filter: blur(80px);
    z-index: -1;
    animation: float 12s infinite ease-in-out;
}

.ambient-light-2 {
    position: fixed;
    bottom: -15%;
    left: -10%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(122, 69, 232, 0.06), transparent 60%);
    filter: blur(80px);
    z-index: -1;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(15px, 30px);
    }
}

/* ================================== */
/* === 3. Utilities === */
/* ================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul,
ol {
    list-style: none;
}

strong {
    font-weight: 700;
    color: var(--text-main);
}
/* keep bold readable on the dark CTA box (was forced near-black) */
.cta-box strong { color: #fff; }

/* ================================== */
/* === 4. Buttons === */
/* ================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: none;
    gap: 8px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 4px 16px var(--primary-green-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-green-glow);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid white;
    color: var(--primary-blue);
}

.btn-glass:hover {
    background: white;
    transform: translateY(-2px);
}

/* ================================== */
/* === 5. Navigation === */
/* ================================== */
.glass-nav {
    position: sticky;
    top: 0;
    margin: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    padding: 10px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.logo-text .academy {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-item {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: var(--text-main);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: rgba(245, 245, 247, 0.8);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    z-index: 1002;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(235, 235, 240, 0.9);
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav CTA Buttons */
.nav-cta-mobile {
    display: none;
}

/* Nav Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ================================== */
/* === 6. Breadcrumb === */
/* ================================== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 22px 0 4px;
    padding: 10px 16px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line, #ebedf0);
    border-radius: 999px;
    width: fit-content;
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.breadcrumb a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.breadcrumb a:first-of-type::before {
    content: "\f015"; /* fa home */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.78rem;
    margin-left: 6px;
    color: var(--primary-blue);
}

.breadcrumb a:hover {
    color: var(--primary-blue);
    background: rgba(6, 106, 201, 0.08);
}

/* the literal "/" separators become muted chevrons */
.breadcrumb > span:not(:last-child) {
    font-size: 0;
    display: inline-flex;
    width: 14px;
    justify-content: center;
    color: var(--muted, #8a8f96);
}
.breadcrumb > span:not(:last-child)::before {
    content: "\f104"; /* fa chevron-left (RTL forward) */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7rem;
    opacity: 0.55;
}

/* current page = last span */
.breadcrumb > span:last-child {
    color: var(--text-main);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60vw;
}

/* ================================== */
/* === 7. Article Header === */
/* ================================== */
.article-header {
    padding: 40px 0 60px;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--primary-green);
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(6, 106, 201, 0.1);
    color: var(--primary-green);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: normal;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-main);
}

.article-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 2;
}

/* ================================== */
/* === 8. Featured Image === */
/* ================================== */
.featured-image {
    max-width: 900px;
    margin: 0 auto 60px;
}

.featured-image-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
    backdrop-filter: blur(30px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.image-placeholder i {
    font-size: 3rem;
    color: var(--primary-blue);
    opacity: 0.5;
    margin-bottom: 10px;
}

.image-placeholder span {
    font-size: 0.9rem;
}

/* ================================== */
/* === 9. Article Content === */
/* ================================== */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 20px;
    color: var(--text-main);
    position: relative;
    padding-bottom: 12px;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), transparent);
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.article-content p {
    margin-bottom: 16px;
    color: var(--text-main);
    line-height: 2;
}

.article-content ul,
.article-content ol {
    margin: 16px 0;
    padding-right: 24px;
    list-style: none;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 12px;
    position: relative;
    padding-right: 28px;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary-green);
    border-radius: 50%;
}

.article-content ol {
    counter-reset: item;
}

.article-content ol li {
    counter-increment: item;
}

.article-content ol li::before {
    content: counter(item);
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================== */
/* === 10. Lead Paragraph === */
/* ================================== */
.lead {
    font-size: 1.1rem;
    color: var(--text-main);
    padding: 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border-right: 4px solid var(--primary-green);
    margin-bottom: 32px;
    line-height: 2;
}

/* ================================== */
/* === 11. Table of Contents === */
/* ================================== */
.toc {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 1);
    margin: 32px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.toc h2 {
    font-size: 1.1rem;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc h2::after {
    display: none;
}

.toc h2 i {
    color: var(--primary-blue);
}

.toc ul {
    padding: 0;
    margin: 0;
}

.toc li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.toc li:last-child {
    border-bottom: none;
}

.toc li::before {
    display: none;
}

.toc a {
    color: var(--text-main);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-blue);
    border-radius: 50%;
    flex-shrink: 0;
}

.toc a:hover {
    color: var(--primary-blue);
}

/* ================================== */
/* === 12. Glass Tables === */
/* ================================== */
.glass-table-wrapper {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 1);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

/* keep multi-word names (e.g. «آکادمی متین لب‌خندق») from shattering inside cells */
.glass-table-wrapper table td,
.glass-table-wrapper table th {
    word-break: normal;
    overflow-wrap: normal;
}

th,
td {
    padding: 16px 20px;
    text-align: right;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
    background: rgba(6, 106, 201, 0.08);
    font-weight: 700;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(6, 106, 201, 0.04);
}

/* ================================== */
/* === 13. Info Boxes === */
/* ================================== */
.info-box {
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    margin: 24px 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.info-box i {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box.blue {
    background: rgba(6, 106, 201, 0.07);
    border: 1px solid rgba(6, 106, 201, 0.2);
    color: #0555a1;
}

.info-box.green {
    background: rgba(0, 214, 100, 0.08);
    border: 1px solid rgba(0, 214, 100, 0.2);
    color: #15803D;
}

.info-box.gold {
    background: rgba(255, 214, 10, 0.15);
    border: 1px solid rgba(255, 214, 10, 0.3);
    color: #92400E;
}

/* ================================== */
/* === 14. Content Images === */
/* ================================== */
.content-image {
    margin: 32px 0;
    text-align: center;
}

.content-image .image-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 245, 247, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content-image .caption {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ================================== */
/* === 15. Video Placeholder === */
/* ================================== */
.video-placeholder {
    margin: 32px 0;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(29, 29, 31, 0.95), rgba(29, 29, 31, 0.85));
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: white;
    position: relative;
    overflow: hidden;
}

.video-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s, background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.play-btn:hover {
    transform: scale(1.1);
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.video-placeholder span {
    font-size: 0.9rem;
    opacity: 0.7;
    z-index: 2;
}

/* ================================== */
/* === 16. FAQ Section === */
/* ================================== */
.faq-section {
    margin-top: 48px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.glass-accordion {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid #EAEAEA;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-accordion:hover {
    border-color: #d1d1d1;
}

.glass-accordion summary {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    color: var(--text-main);
}

.glass-accordion summary::-webkit-details-marker {
    display: none;
}

.q-icon {
    width: 36px;
    height: 36px;
    background: #F2F2F7;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: 0.3s;
}

.glass-accordion[open] .q-icon {
    background: var(--primary-blue);
    color: white;
}

.glass-accordion summary .arrow {
    margin-right: auto;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.glass-accordion[open] summary .arrow {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

.glass-accordion[open] {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    border-color: transparent;
}

.faq-content {
    padding: 0 24px 24px;
    padding-right: 72px;
    color: var(--text-secondary);
    line-height: 2;
}

/* ================================== */
/* === 17. CTA Box === */
/* ================================== */
.cta-box {
    background: linear-gradient(135deg, #066ac9 0%, #074ea6 45%, #6f42c1 110%);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    color: white;
    margin: 48px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 60px -12px rgba(6, 106, 201, 0.38);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.cta-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}

.cta-box p {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 24px;
    position: relative;
}

.cta-box .btn {
    background: white;
    color: #066ac9;
    font-weight: 700;
    position: relative;
}

.cta-box .btn:hover {
    transform: scale(1.05);
}

/* ================================== */
/* === 18. Summary Box === */
/* ================================== */
.summary-box {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-green);
    margin: 32px 0;
}

.summary-box h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-green);
}

.summary-box ul {
    margin-bottom: 0;
}

/* ================================== */
/* === 19. Author Box === */
/* ================================== */
.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 1);
    margin-top: 48px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.author-info .role {
    font-size: 0.85rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.author-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.author-info .links {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}

.author-info .links a {
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 500;
}

.author-info .links a:hover {
    text-decoration: underline;
}

/* ================================== */
/* === 20. Footer === */
/* ================================== */
.dark-footer {
    background: #0b0b0b;
    color: #86868B;
    padding: 60px 0 48px;
    border-top: 1px solid #1f1f1f;
    margin-top: 80px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
}

.logo-group.inverted .logo-icon {
    background: white;
    color: black;
}

.logo-group.inverted .logo-text .name {
    color: white;
}

.logo-group.inverted .logo-text .academy {
    color: #86868B;
}

.social-col {
    display: flex;
    gap: 12px;
}

.social-glass {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: 0.3s;
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-glass:hover {
    background: white;
    color: black;
    transform: translateY(-3px);
}

.copyright {
    margin-top: 12px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ================================== */
/* === 21. RESPONSIVE - Tablet === */
/* ================================== */
@media (max-width: 900px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .instructor-card {
        flex-direction: column;
        padding: 32px;
        gap: 32px;
    }

    .inst-img-wrapper {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .compare-grid {
        flex-direction: column;
    }

    .glass-card {
        min-width: auto;
        max-width: none;
    }

    .timeline-container {
        padding-right: 0;
    }

    .timeline-line,
    .marker {
        display: none;
    }

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

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

/* ================================== */
/* === 22. RESPONSIVE - Mobile === */
/* ================================== */
@media (max-width: 768px) {
    :root {
        --section-spacing: 60px;
    }

    body {
        font-size: 15px;
    }

    /* === MOBILE NAVIGATION === */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-cta-desktop {
        display: none;
    }

    .nav-cta-mobile {
        display: inline-flex;
        width: 100%;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-cta-mobile .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        margin-right: -16px;
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        width: min(416px, 85vw);
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 80px 24px 32px;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        overflow-y: auto;
        z-index: 1001;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-item {
        padding: 16px 20px;
        border-radius: var(--radius-md);
        background: rgba(245, 245, 247, 0.6);
        margin-bottom: 10px;
        font-size: 0.95rem;
        text-align: center;
        transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        border: 1px solid rgba(0, 0, 0, 0.03);
    }

    .nav-item:hover,
    .nav-item.active {
        background: var(--primary-green);
        color: white;
        transform: translateX(-4px);
    }

    .logo-text .name {
        font-size: 0.9rem;
    }

    .logo-text .academy {
        font-size: 0.75rem;
    }

    /* === Buttons === */
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    /* === Hero Section === */
    .hero {
        padding: 60px 0 48px;
    }

    .hero-title {
        font-size: 1.9rem;
        line-height: 1.35;
    }

    .hero h2 {
        font-size: 1.25rem;
        margin: 20px 0 10px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-desc {
        font-size: 0.92rem;
        margin-bottom: 28px;
        line-height: 1.9;
    }

    .hero-actions {
        gap: 10px;
        margin-bottom: 40px;
    }

    .video-glass-card {
        border-radius: var(--radius-md);
    }

    .play-button-glass {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }

    /* === Section Heads === */
    .section-head {
        margin-bottom: 36px;
    }

    .section-head h2 {
        font-size: 1.6rem;
    }

    .section-head p {
        font-size: 0.92rem;
    }

    /* === Glass Cards === */
    .glass-card {
        padding: 28px 22px;
    }

    .check-list li {
        font-size: 0.9rem;
        margin-bottom: 14px;
        gap: 10px;
    }

    .icon-circle {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    /* === Audience Grid === */
    .audience-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .audience-cell {
        padding: 16px 10px;
    }

    .aud-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .aud-title {
        font-size: 0.8rem;
    }

    .aud-desc {
        display: none;
    }

    /* === Specs === */
    .spec-row {
        padding: 14px 18px;
    }

    .spec-label {
        font-size: 0.82rem;
        gap: 8px;
    }

    .spec-label i {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .spec-value {
        font-size: 0.85rem;
    }

    /* === Timeline === */
    .timeline-content {
        padding: 20px;
    }

    .timeline-content h3 {
        font-size: 1rem;
    }

    .timeline-row {
        margin-bottom: 16px;
    }

    .pill-tag {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    /* === Instructor Card === */
    .instructor-card {
        padding: 24px;
        border-radius: var(--radius-lg);
    }

    .inst-details h3 {
        font-size: 1.5rem;
    }

    .inst-details .role {
        font-size: 0.9rem;
    }

    .inst-details .bio {
        font-size: 0.9rem;
    }

    .creds-row {
        flex-direction: column;
        gap: 12px;
    }

    .cred-pill {
        width: 100%;
    }

    .floating-badge {
        bottom: -16px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: 90%;
        padding: 12px 18px;
    }

    /* === FAQ === */
    .glass-accordion summary {
        padding: 16px 20px;
        font-size: 0.9rem;
    }

    .faq-content {
        padding: 0 20px 16px;
        padding-right: 24px;
        font-size: 0.85rem;
    }

    /* === Gradient Glass Box === */
    .gradient-glass-box {
        padding: 48px 20px;
        border-radius: var(--radius-lg);
    }

    .gradient-glass-box h2 {
        font-size: 1.6rem;
    }

    .gradient-glass-box>p {
        font-size: 0.92rem;
        margin-bottom: 32px;
    }

    .icon-float {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

    /* === Steps === */
    .steps-row {
        flex-direction: column;
        gap: 20px;
    }

    .line {
        width: 2px;
        height: 30px;
        margin: 0;
    }

    .step-circle {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .step {
        font-size: 0.85rem;
    }

    /* === Final CTA === */
    .final-cta {
        padding: 60px 0;
    }

    .final-content h2 {
        font-size: 1.8rem;
    }

    .final-content p {
        font-size: 0.95rem;
    }

    /* === Stats === */
    .stats-grid {
        gap: 14px;
        margin-top: 40px;
    }

    .stat-card {
        padding: 24px 12px;
        border-radius: var(--radius-md);
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.78rem;
    }

    /* === Footer === */
    .dark-footer {
        padding: 48px 0 36px;
    }

    .footer-grid {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .social-glass {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    /* === Article === */
    .article-title {
        font-size: 1.8rem;
    }

    .article-subtitle {
        font-size: 1rem;
    }

    .article-meta {
        gap: 12px;
    }

    .article-content h2 {
        font-size: 1.4rem;
    }

    .article-content h3 {
        font-size: 1.15rem;
    }

    .toc {
        padding: 20px;
    }

    th,
    td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-info .links {
        justify-content: center;
    }

    .cta-box {
        padding: 32px 20px;
    }

    .cta-box h3 {
        font-size: 1.3rem;
    }

    .logo-text {
        display: none;
    }
}

/* ================================== */
/* === 23. RESPONSIVE - Small Mobile === */
/* ================================== */
@media (max-width: 480px) {
    .article-title {
        font-size: 1.5rem;
    }

    .featured-image-wrapper {
        border-radius: var(--radius-md);
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 1.65rem;
    }

    .hero h2 {
        font-size: 1.15rem;
    }

    .section-head h2 {
        font-size: 1.45rem;
    }

    .final-content h2 {
        font-size: 1.55rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

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

    .nav-links {
        width: 100%;
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-btn span {
        width: 18px;
    }
}
/* ================================== */
/* === Related Articles Section === */
/* ================================== */
.related-articles {
    margin: 60px 0 40px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(6, 106, 201, 0.05), rgba(122, 69, 232, 0.05));
    border: 1px solid rgba(6, 106, 201, 0.14);
    border-radius: var(--radius-lg, 28px);
}
.related-articles h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--text-main, #1D1D1F);
}
.related-articles > p {
    color: var(--text-secondary, #6e6e73);
    margin-bottom: 24px;
}
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}
.related-list li {
    border-radius: var(--radius-sm, 14px);
}
.related-list a {
    display: block;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-sm, 14px);
    color: var(--text-main, #1D1D1F);
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.7;
}
.related-list a:hover {
    background: #fff;
    border-color: rgba(6, 106, 201, 0.3);
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(6, 106, 201, 0.1);
}
.related-list a strong {
    color: var(--primary-blue, #066ac9);
    margin-left: 6px;
}
@media (max-width: 600px) {
    .related-articles { padding: 24px 18px; margin: 40px 0 30px; }
    .related-articles h2 { font-size: 1.3rem; }
    .related-list a { padding: 14px 16px; font-size: 0.95rem; }
}

/* ============================================================
   Mobile readability fix — keep wide content inside the viewport.
   Without this, <pre> code blocks (white-space:pre) force the
   article to ~1350-1800px wide on phones; body{overflow-x:hidden}
   then clips the RTL text on the left. Wrap code + cap widths.
   ============================================================ */
.article-content pre,
article pre,
pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow-x: auto;
    max-width: 100%;
}
.article-content code,
article code {
    word-break: break-word;
    overflow-wrap: anywhere;
}
.article-content img,
.article-content table,
article img,
article table {
    max-width: 100%;
    height: auto;
}
.article-content {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ============================================================
   Mobile consistency + overflow hardening (matches main site)
   - keep the brand name visible (was hidden -> looked like just "م")
   - wrap CTA button + cap widths so nothing spills off-screen
   - footer + all article blocks stay inside the viewport
   ============================================================ */
@media (max-width: 768px) {
    .logo-text { display: flex !important; flex-direction: column; }
    .logo-text .name { font-size: .95rem; }
    .logo-text .academy { font-size: .72rem; }

    .cta-box .btn,
    .article-content .btn,
    .glass-nav .btn {
        white-space: normal;
        max-width: 100%;
        word-break: break-word;
    }
    .cta-box { max-width: 100%; }

    .dark-footer .container,
    .footer-grid,
    .footer-grid > * { max-width: 100%; min-width: 0; }
    .footer-grid { align-items: center; }

    .article-content, .article-content * { max-width: 100%; }
    .article-content { overflow-wrap: anywhere; }
}

/* ============================================================
   READING RHYTHM  —  fixes the "نامنظم و چسبیده" mobile feeling.
   Comfortable Persian body size, looser line-height, consistent
   vertical spacing between headings / paragraphs / blocks, and a
   bit more breathing room from the screen edges. Lives last so it
   is authoritative over earlier mobile rules.
   ============================================================ */

/* Desktop: gentle rhythm refinements */
.article-content > * + * { margin-top: 4px; }
.article-content p { line-height: 1.95; }
.article-content h2 { margin-top: 52px; }
.article-content h2 + p,
.article-content h3 + p { margin-top: 0; }

@media (max-width: 768px) {
    /* keep the body readable on phones (was dropping to 15px) */
    body { font-size: 16px; }

    .container { padding-left: 18px; padding-right: 18px; }

    /* article header breathes */
    .article-header { padding: 24px 0 36px; }
    .article-meta { gap: 10px 14px; row-gap: 10px; margin-bottom: 18px; }
    .meta-item { font-size: 0.8rem; }
    .article-title { font-size: 1.7rem; line-height: 1.4; margin-bottom: 16px; letter-spacing: normal; }
    .article-subtitle { font-size: 1rem; line-height: 1.9; }

    /* body copy: bigger, looser, evenly spaced */
    .article-content { font-size: 1rem; }
    .article-content p {
        font-size: 1rem;
        line-height: 1.95;
        margin-bottom: 18px;
    }

    /* clear, consistent heading spacing so sections stop colliding */
    .article-content h2 {
        font-size: 1.4rem;
        line-height: 1.45;
        margin-top: 40px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }
    .article-content h3 {
        font-size: 1.18rem;
        line-height: 1.5;
        margin-top: 30px;
        margin-bottom: 12px;
    }

    /* lists: more room, comfortable indent */
    .article-content ul,
    .article-content ol { margin: 18px 0; padding-right: 6px; }
    .article-content ul li,
    .article-content ol li { margin-bottom: 14px; line-height: 1.9; padding-right: 26px; }

    /* blocks get even outer spacing */
    .lead { padding: 20px; font-size: 1.02rem; line-height: 1.95; margin-bottom: 28px; }
    .info-box { padding: 16px 18px; margin: 22px 0; }
    .toc { padding: 22px 20px; margin: 28px 0; }
    .glass-table-wrapper { margin: 22px 0; }
    /* wide tables scroll horizontally on phones instead of squeezing columns
       (which shattered multi-word names like «آکادمی متین لب‌خندق») */
    .glass-table-wrapper table { min-width: 540px; font-size: .88rem; }
    .glass-table-wrapper th,
    .glass-table-wrapper td { padding: 12px 14px; }
    .cta-box { padding: 34px 22px; margin: 36px 0; }
    .faq-content { padding-right: 20px; line-height: 1.9; }

    /* breadcrumb sits tighter under the bar */
    .breadcrumb { margin: 16px 0 2px; padding: 8px 14px; font-size: 0.8rem; }
}

@media (max-width: 400px) {
    .article-title { font-size: 1.5rem; }
    .container { padding-left: 16px; padding-right: 16px; }
}
