/* ===== Guides Section Styles ===== */
/* Inherits design tokens from main site, adds guide-specific styles */

:root {
    --ivory: #f8f7f1;
    --mint: #d9ede4;
    --lavender: #e6e0f0;
    --peach: #fbe6d4;
    --dark: #333333;
    --primary: #6e57b2;
    --secondary: #7fc9aa;
    --accent: #f8c05a;
    --rejection: #e57373;
    --white: #ffffff;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--ivory);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) { .container { padding: 0 1.5rem; } }

.hidden { display: none !important; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.3s ease;
    padding: 1.25rem 0;
    background: rgba(248, 247, 241, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(110, 87, 178, 0.1);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft);
    padding: 0.75rem 0;
}

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

.logo { text-decoration: none; }
.logo-img { height: 2rem; width: auto; }
@media (min-width: 768px) { .logo-img { height: 2.5rem; } }

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}
@media (min-width: 768px) { .nav-desktop { display: flex; } }

.nav-link {
    color: var(--dark);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.btn-guide {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.btn-guide:hover {
    background: #5a4699;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(110, 87, 178, 0.3);
}

.burger-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    padding: 0.25rem;
}
@media (min-width: 768px) { .burger-btn { display: none; } }

/* ===== Mobile Menu ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 100;
    overflow-y: auto;
    padding: 1.5rem;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-nav-link {
    color: var(--dark);
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.mobile-nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-telegram-full {
    display: block;
    text-align: center;
    background: var(--secondary);
    color: var(--white);
    padding: 0.875rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ===== Main Content Area ===== */
.guide-main {
    padding-top: 5rem;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: #aaa; }
.breadcrumbs .current { color: var(--dark); font-weight: 500; }

/* ===== Guide Article ===== */
.guide-article {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.guide-header {
    margin-bottom: 2rem;
}

.guide-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.guide-stage {
    background: var(--lavender);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.guide-badge {
    background: var(--peach);
    color: #c26d3a;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
}

.guide-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .guide-header h1 { font-size: 2.25rem; }
}

.guide-intro {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
    background: var(--mint);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--secondary);
}

/* ===== Table of Contents ===== */
.guide-toc {
    background: var(--white);
    border: 1px solid rgba(110, 87, 178, 0.15);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}

.guide-toc h2 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.guide-toc ol {
    padding-left: 1.25rem;
}

.guide-toc li {
    margin-bottom: 0.4rem;
}

.guide-toc a {
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.guide-toc a:hover { color: var(--primary); text-decoration: underline; }

/* ===== Guide Content ===== */
.guide-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--dark);
}

.guide-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
    scroll-margin-top: 6rem;
}

.guide-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.guide-content p { margin-bottom: 1rem; }

.guide-content ul,
.guide-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.guide-content li { margin-bottom: 0.4rem; }

.guide-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.guide-content strong { font-weight: 600; }

/* ===== Steps ===== */
.steps-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    padding: 1rem 1rem 1rem 3.5rem;
    margin-bottom: 1rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    box-shadow: var(--shadow-soft);
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Nested list items inside steps — no counter badge, no card styling */
.steps-list ul,
.steps-list ol ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.steps-list ul li,
.steps-list ol ul li {
    counter-increment: none;
    padding: 0.25rem 0;
    margin-bottom: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: static;
}

.steps-list ul li::before,
.steps-list ol ul li::before {
    content: none;
    display: none;
}

/* ===== Warning / Info Blocks ===== */
.guide-warning {
    background: #fff8e6;
    border: 1px solid #f8c05a;
    border-left: 4px solid #f8c05a;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.guide-warning-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }

.guide-warning-title {
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #8a6800;
}

.guide-warning p { margin-bottom: 0.4rem; color: #6b5000; }
.guide-warning p:last-child { margin-bottom: 0; }

.guide-tip {
    background: var(--mint);
    border: 1px solid var(--secondary);
    border-left: 4px solid var(--secondary);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.guide-tip-icon { font-size: 1.25rem; flex-shrink: 0; }
.guide-tip p { margin-bottom: 0.4rem; color: #2e6b50; }
.guide-tip p:last-child { margin-bottom: 0; }

.guide-important {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 4px solid var(--rejection);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.guide-important-title {
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-important ul { color: #7f1d1d; }

/* ===== Images ===== */
.guide-figure {
    margin: 1.5rem 0;
}

.guide-figure img {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: var(--shadow-soft);
    display: block;
}

.guide-figure figcaption {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

/* ===== Tables ===== */
.guide-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.guide-table th {
    background: var(--lavender);
    color: var(--primary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid rgba(110, 87, 178, 0.2);
}

.guide-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    vertical-align: top;
}

.guide-table tr:last-child td { border-bottom: none; }
.guide-table tr:nth-child(even) td { background: rgba(248, 247, 241, 0.5); }

/* ===== Document Checklist ===== */
.doc-checklist {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.doc-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.95rem;
}

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

.doc-checklist li::before {
    content: '☐';
    font-size: 1.1rem;
    color: var(--secondary);
    flex-shrink: 0;
    margin-top: 0.05rem;
}

/* Nested list inside checklist — plain bullets, no checkbox */
.doc-checklist ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-top: 0.4rem;
    width: 100%;
}

.doc-checklist ul li {
    display: list-item;
    align-items: unset;
    gap: 0;
    padding: 0.15rem 0;
    border-bottom: none;
    font-size: 0.9rem;
}

.doc-checklist ul li::before {
    content: none;
    display: none;
}

/* ===== CTA Block ===== */
.guide-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #5a4699 100%);
    color: var(--white);
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0 2rem;
    text-align: center;
}

.guide-cta h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.guide-cta p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-cta {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.875rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    background: var(--ivory);
}

/* ===== Guide Navigation ===== */
.guide-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 2rem;
}

.guide-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--white);
    border: 1px solid rgba(110, 87, 178, 0.15);
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.2s ease;
}

.guide-nav-link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.guide-nav-link .nav-arrow { color: var(--primary); font-size: 1.1rem; font-weight: 700; }
.guide-nav-link .nav-label { font-size: 0.8rem; color: #888; margin-top: 0.25rem; }
.guide-nav-link .nav-title { font-size: 0.9rem; font-weight: 600; margin-top: 0.35rem; }

.guide-nav-prev { text-align: left; }
.guide-nav-next { text-align: right; }

.guide-nav-back {
    grid-column: 1 / -1;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.guide-nav-back:hover { text-decoration: underline; }

/* When only back link (no prev/next) */
.guide-nav.single { grid-template-columns: 1fr; }

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    padding: 2.5rem 0;
    margin-top: 4rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo-img { height: 1.75rem; width: auto; filter: brightness(10); margin-bottom: 0.5rem; }
.footer-logo p { font-size: 0.875rem; opacity: 0.7; }

.footer-links { display: flex; gap: 1rem; align-items: center; }
.footer-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-link:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.25rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.privacy-link {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
}
.privacy-link:hover { color: rgba(255,255,255,0.9); }

/* ===== Index Page: Stage Cards ===== */
.guides-hero {
    background: linear-gradient(135deg, var(--lavender) 0%, var(--mint) 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    margin-top: 4rem;
}

.guides-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .guides-hero h1 { font-size: 2.5rem; }
}

.guides-hero p {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ===== Stage Progress Indicator ===== */
.stages-progress {
    padding: 2.5rem 0;
    background: var(--white);
}

.stages-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 1rem;
}

.stage-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
}

.stage-dot-num {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--lavender);
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 2px solid var(--primary);
}

.stage-dot:hover .stage-dot-num {
    background: var(--primary);
    color: var(--white);
}

.stage-dot-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    margin-top: 0.4rem;
    text-align: center;
    max-width: 100px;
    line-height: 1.2;
}

.stage-connector {
    flex: 1;
    height: 2px;
    background: rgba(110, 87, 178, 0.2);
    min-width: 1.5rem;
    max-width: 4rem;
}

/* ===== Guide Cards Grid ===== */
.guides-section {
    padding: 3rem 0;
}

.guides-section:nth-child(even) { background: var(--white); }

.stage-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stage-num {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stage-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

@media (min-width: 768px) {
    .stage-header h2 { font-size: 1.5rem; }
}

.guides-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 480px) {
    .guides-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
    .guides-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

@media (min-width: 1024px) {
    .guides-grid { grid-template-columns: repeat(4, 1fr); }
}

.guide-card {
    background: var(--white);
    border: 1px solid rgba(110, 87, 178, 0.12);
    border-radius: 14px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-soft);
}

.guide-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-medium);
    transform: translateY(-3px);
}

.guide-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.guide-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.guide-card p {
    font-size: 0.83rem;
    color: #777;
    line-height: 1.5;
    flex: 1;
}

.guide-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.guide-card-arrow {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
}

.guide-card-badge {
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--peach);
    color: #c26d3a;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
}

/* ===== Main CTA Section ===== */
.guides-cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #5a4699 100%);
    padding: 3.5rem 0;
    text-align: center;
    color: var(--white);
}

.guides-cta-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .guides-cta-section h2 { font-size: 2rem; }
}

.guides-cta-section p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 550px;
    margin: 0 auto 1.75rem;
    line-height: 1.65;
}

/* ===== Checklist box on detail page ===== */
.checklist-box {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.checklist-box h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}
