/* Modern Guide Styles */
:root {
    --guide-primary: #667eea;
    --guide-primary-dark: #5568d3;
    --guide-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --guide-bg: var(--bg-primary);
    --guide-card-bg: var(--card-bg);
    --guide-border: var(--border-color);
    --guide-text: var(--text-primary);
    --guide-text-secondary: var(--text-secondary);
}

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

/* Hero Section */
.guide-hero {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-bottom: 3rem;
}

.guide-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--guide-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.guide-hero p {
    font-size: 1.15rem;
    color: var(--guide-text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--guide-gradient);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-secondary-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--guide-card-bg);
    color: var(--guide-text);
    border: 2px solid var(--guide-border);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-secondary-hero:hover {
    border-color: var(--guide-primary);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

/* Progress Indicator */
.progress-indicator {
    position: sticky;
    top: 80px;
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    z-index: 10;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.25rem;
    min-width: max-content;
}

.progress-step {
    flex: 1;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 15px;
    inset-inline-start: 60%;
    width: 80%;
    height: 2px;
    background: var(--guide-border);
    z-index: 0;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.completed::after {
    background: var(--guide-primary);
}

.progress-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--guide-card-bg);
    border: 2px solid var(--guide-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--guide-text-secondary);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.progress-step.completed .progress-circle {
    background: var(--guide-gradient);
    border-color: var(--guide-primary);
    color: white;
}

.progress-step.active .progress-circle {
    background: var(--guide-primary);
    border-color: var(--guide-primary);
    color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.progress-label {
    font-size: 0.65rem;
    color: var(--guide-text-secondary);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
}

.progress-step.completed .progress-label,
.progress-step.active .progress-label {
    color: var(--guide-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .progress-indicator { padding: 0.75rem 1rem; }
    .progress-step { min-width: 52px; }
    .progress-circle { width: 28px; height: 28px; font-size: 0.7rem; }
    .progress-step::after { top: 13px; }
}

/* Quick Start Section */
.quick-start-section {
    margin-bottom: 3rem;
}

.quick-start-steps {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.quick-start-step {
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-start-step::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: var(--guide-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.quick-start-step:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
    transform: translateY(-4px);
    border-color: var(--guide-primary);
}

.quick-start-step:hover::before {
    transform: scaleY(1);
}

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

.step-number-quick {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--guide-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.step-title-quick {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--guide-text);
    margin: 0;
}

.step-description {
    color: var(--guide-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 1rem;
}

.step-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--guide-gradient);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.step-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Telegram step-action variant */
.step-action--telegram {
    background: rgba(0, 136, 204, 0.1);
    border-color: rgba(0, 136, 204, 0.3);
    color: #0088cc;
}

.step-action--telegram:hover {
    background: rgba(0, 136, 204, 0.2);
    color: #006da3;
}

/* Advanced Guide Accordion */
.advanced-section {
    margin-bottom: 3rem;
}

.advanced-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.advanced-header:hover {
    border-color: var(--guide-primary);
    background: rgba(102, 126, 234, 0.05);
}

.advanced-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--guide-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.advanced-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.advanced-header.active .advanced-toggle {
    transform: rotate(180deg);
}

.advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.advanced-content.expanded {
    max-height: 5000px;
}

.accordion-item {
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: start;
    font-family: inherit;
}

.accordion-header:hover {
    background: rgba(102, 126, 234, 0.05);
}

.accordion-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--guide-text);
    margin: 0;
}

.accordion-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-content {
    max-height: 10000px;
}

.accordion-body {
    padding: 0 1.5rem 1.5rem;
    color: var(--guide-text-secondary);
    line-height: 1.7;
}

.accordion-body ul {
    margin: 1rem 0;
    padding-inline-start: 1.5rem;
}

.accordion-body li {
    margin: 0.5rem 0;
}

/* Glossary Section */
.glossary-section {
    margin-bottom: 3rem;
}

.glossary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.glossary-header:hover {
    border-color: var(--guide-primary);
    background: rgba(102, 126, 234, 0.05);
}

.glossary-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--guide-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.glossary-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.glossary-header.active .glossary-toggle {
    transform: rotate(180deg);
}

.glossary-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.glossary-content.expanded {
    max-height: 5000px;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.glossary-term {
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    border-inline-start: 4px solid var(--guide-primary);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.glossary-term:hover {
    border-color: var(--guide-primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
}

.glossary-term strong {
    color: var(--guide-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.glossary-term p {
    color: var(--guide-text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .guide-hero h1 {
        font-size: 2rem;
    }

    .guide-hero p {
        font-size: 1rem;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .progress-step::after {
        display: none;
    }

    .progress-label {
        font-size: 0.7rem;
    }

    .quick-start-step {
        padding: 1.5rem;
    }

    .step-title-quick {
        font-size: 1.25rem;
    }

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

    .progress-indicator {
        position: relative;
        top: 0;
    }
}

/* RTL Adjustments for Guide Page */
[dir="rtl"] .guide-container {
    direction: rtl;
    text-align: start;
}

[dir="rtl"] .guide-hero {
    text-align: center;
}

[dir="rtl"] .glossary-term:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .accordion-body {
    text-align: start;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for accessibility */
.step-action:focus,
.btn-primary-hero:focus,
.btn-secondary-hero:focus,
.accordion-header:focus,
.advanced-header:focus,
.glossary-header:focus {
    outline: 2px solid var(--guide-primary);
    outline-offset: 2px;
}
