/*@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');*/

:root {
    --guide-primary: #00897b;
    --guide-primary-dark: #00695c;
    --guide-primary-soft: #e0f2f1;
    --guide-card: rgba(255, 255, 255, 0.96);
    --guide-text: #2c3e50;
    --guide-muted: #607d8b;
    --guide-border: #cfd8dc;
    --guide-shadow: 0 14px 35px rgba(0, 0, 0, 0.10);
}

.guide-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3.5rem;
    color: var(--guide-text);
}

.guide-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding: 1.6rem 1.8rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    box-shadow: var(--guide-shadow);
}

.guide-hero-icon {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 2rem;
    font-family: "Noto Color Emoji", "Segoe UI Emoji", sans-serif;
}

.guide-eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    opacity: 0.86;
}

.guide-hero h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.15;
    color: white;
}

.guide-hero > div:last-child > p:last-child {
    margin: 0.45rem 0 0;
    max-width: 850px;
    font-size: 0.98rem;
    line-height: 1.55;
    opacity: 0.93;
}

.guide-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.guide-sidebar {
    position: sticky;
    top: 1rem;
}

.guide-toc-card {
    background: var(--guide-card);
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    box-shadow: var(--guide-shadow);
    padding: 1rem;
}

.toc-title {
    color: var(--guide-primary-dark);
    font-size: 0.88rem;
    font-weight: 800;
    margin-bottom: 0.7rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--guide-border);
}

.guide-toc {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.guide-toc a {
    display: block;
    padding: 0.48rem 0.55rem;
    border-radius: 7px;
    color: var(--guide-muted);
    text-decoration: none;
    font-size: 0.78rem;
    line-height: 1.35;
    transition: background 0.2s, color 0.2s;
}

.guide-toc a:hover,
.guide-toc a.active {
    background: var(--guide-primary-soft);
    color: var(--guide-primary-dark);
}

.guide-toc a.toc-sub {
    padding-left: 1rem;
    font-size: 0.73rem;
}

.guide-content {
    min-width: 0;
}

.guide-language-note {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid #b2dfdb;
    border-radius: 10px;
    background: #f3fbfa;
    color: #41666a;
    font-size: 0.86rem;
    line-height: 1.55;
}

.guide-language {
    background: var(--guide-card);
    border: 1px solid var(--guide-border);
    border-radius: 16px;
    box-shadow: var(--guide-shadow);
    padding: clamp(1.25rem, 3vw, 2.2rem);
}

.guide-language[hidden] {
    display: none;
}

.guide-language > p:first-child {
    margin-top: 0;
}

.guide-language h2 {
    margin: 2.4rem 0 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid var(--guide-primary-soft);
    color: var(--guide-primary-dark);
    font-size: clamp(1.35rem, 2.5vw, 1.7rem);
    line-height: 1.3;
    scroll-margin-top: 1rem;
}

.guide-language h2:first-child {
    margin-top: 0;
}

.guide-language h3 {
    margin: 2rem 0 0.8rem;
    color: var(--guide-primary);
    font-size: 1.15rem;
    line-height: 1.35;
    scroll-margin-top: 1rem;
}

.guide-language h4.example-heading {
    margin: 1.6rem 0 0.55rem;
    padding: 0.65rem 0.8rem;
    border-left: 4px solid var(--guide-primary);
    background: #f7fafb;
    color: var(--guide-text);
    font-size: 0.98rem;
    line-height: 1.45;
}

.guide-paragraph {
    margin: 0 0 0.9rem;
    font-size: 0.94rem;
    line-height: 1.78;
    text-align: left;
}

.guide-paragraph.rtl {
    direction: rtl;
    text-align: right;
    font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
}

.guide-bullet {
    position: relative;
    margin: 0.45rem 0;
    padding-left: 1.15rem;
    font-size: 0.94rem;
    line-height: 1.7;
}

.guide-bullet::before {
    content: "•";
    position: absolute;
    left: 0.15rem;
    color: var(--guide-primary);
    font-weight: 800;
}

.table-wrap {
    width: 100%;
    margin: 1.15rem 0 1.45rem;
    overflow-x: auto;
    border: 1px solid var(--guide-border);
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}

.guide-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    background: white;
    font-size: 0.86rem;
}

.guide-table th,
.guide-table td {
    padding: 0.7rem 0.8rem;
    border: 1px solid #dfe6e9;
    vertical-align: top;
    line-height: 1.55;
}

.guide-table th {
    background: var(--guide-primary-soft);
    color: var(--guide-primary-dark);
    font-weight: 800;
    text-align: left;
}

.guide-table td:first-child {
    font-weight: 650;
}

.guide-table .rtl-cell,
.guide-table .rtl-cell .cell-paragraph {
    direction: rtl;
    text-align: right;
    font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
}

.cell-paragraph + .cell-paragraph {
    margin-top: 0.35rem;
}

.guide-figure {
    margin: 1.1rem auto 1.5rem;
    max-width: 100%;
    text-align: center;
    overflow-x: auto;
}

.guide-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--guide-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.guide-language em {
    font-style: italic;
}

.guide-language strong {
    font-weight: 750;
}

@media (max-width: 900px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }

    .guide-sidebar {
        position: static;
    }

    .guide-toc-card {
        padding: 0.8rem;
    }

    .guide-toc {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .guide-page {
        padding: 1rem 0.75rem 2rem;
    }

    .guide-hero {
        padding: 1.15rem;
        gap: 0.85rem;
        border-radius: 12px;
    }

    .guide-hero-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 11px;
        font-size: 1.45rem;
    }

    .guide-hero h1 {
        font-size: 1.45rem;
    }

    .guide-hero > div:last-child > p:last-child {
        font-size: 0.84rem;
    }

    .guide-toc {
        grid-template-columns: 1fr;
    }

    .guide-language {
        padding: 1rem;
        border-radius: 12px;
    }

    .guide-paragraph,
    .guide-bullet {
        font-size: 0.9rem;
    }

    .guide-table {
        min-width: 500px;
    }
}
