/* Trading Psychology Guide CSS */

/* Root Variables */
:root {
    --primary-color: #C9A961;
    --dark-bg: #0F0F12;
    --text-light: #E5E5E7;
    --text-muted: #A1A1A6;
    --border-color: #3A3A3F;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;
    --accent: #64B5F6;
}

/* Inline SVG Icon System (replaces emoji icons) */
.icon-svg {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.18em;
    color: inherit;
}

.icon-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.icon-svg.icon-success {
    color: var(--success);
}

.icon-svg.icon-danger {
    color: var(--danger);
}

.icon-svg.icon-accent {
    color: var(--accent);
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.psychology-hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1f 0%, #0f0f12 100%);
}

.brain-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

#brain-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    top: 0;
    left: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #e8c547);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 1s ease;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    animation: fadeIn 1s ease 0.4s backwards;
}

.stat {
    background: rgba(201, 169, 97, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 4px;
    background: var(--border-color);
    width: 100%;
    z-index: 999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #64B5F6);
    width: 0%;
    transition: width 0.3s ease;
}

/* TOC Section */
.toc-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.toc-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(201, 169, 97, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.toc-item:hover {
    background: rgba(201, 169, 97, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.toc-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--dark-bg);
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
}

.toc-title {
    font-weight: 600;
    font-size: 1rem;
}

/* Main Guide Content */
.guide-main {
    padding: 4rem 0;
}

.chapter {
    margin-bottom: 5rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.chapter.revealed {
    opacity: 1;
}

.chapter-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
}

.chapter-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.chapter-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.content-col h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Feature Box */
.feature-box {
    background: rgba(201, 169, 97, 0.08);
    border-right: 3px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.feature-box h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Solution List */
.solution-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.solution-item {
    background: rgba(52, 199, 89, 0.08);
    border-right: 3px solid var(--success);
    padding: 1.5rem;
    border-radius: 8px;
}

.solution-item strong {
    color: var(--success);
    display: block;
    margin-bottom: 0.5rem;
}

.solution-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Comparison Box */
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.comparison-item {
    border-radius: 12px;
    padding: 2rem;
}

.comparison-item.negative {
    background: rgba(255, 59, 48, 0.1);
    border: 2px solid rgba(255, 59, 48, 0.5);
}

.comparison-item.positive {
    background: rgba(52, 199, 89, 0.1);
    border: 2px solid rgba(52, 199, 89, 0.5);
}

.comparison-item h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.comparison-item ul {
    list-style: none;
}

.comparison-item li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    position: relative;
    padding-right: 1.5rem;
}

.comparison-item.positive li::before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--success);
    font-weight: bold;
}

.comparison-item.negative li::before {
    content: "✕";
    position: absolute;
    right: 0;
    color: var(--danger);
    font-weight: bold;
}

/* Tip Box */
.tip-box {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15) 0%, rgba(201, 169, 97, 0.1) 100%);
    border-left: 4px solid var(--accent);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.tip-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.tip-box p {
    color: var(--text-muted);
}

/* Steps Container */
.steps-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.step {
    background: rgba(201, 169, 97, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.step:hover {
    border-color: var(--primary-color);
    background: rgba(201, 169, 97, 0.2);
    transform: translateY(-5px);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--dark-bg);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Discipline Tips */
.discipline-tips h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tip-item {
    background: rgba(201, 169, 97, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.tip-item h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.tip-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Bias Grid */
.bias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.bias-card {
    background: rgba(201, 169, 97, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.bias-card:hover {
    border-color: var(--primary-color);
    background: rgba(201, 169, 97, 0.15);
    box-shadow: 0 10px 30px rgba(201, 169, 97, 0.1);
}

.bias-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.bias-card p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.bias-solution {
    background: rgba(52, 199, 89, 0.1);
    border-right: 3px solid var(--success);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.bias-solution strong {
    color: var(--success);
}

/* Techniques Container */
.techniques-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.technique-card {
    background: rgba(201, 169, 97, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.technique-card:hover {
    border-color: var(--primary-color);
    background: rgba(201, 169, 97, 0.15);
    transform: translateY(-5px);
}

.technique-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.technique-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.technique-card:hover .technique-icon {
    color: var(--accent);
    transform: scale(1.08);
}

.technique-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.technique-card p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Mantras Collection */
.mantras-collection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.mantra {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.1) 0%, rgba(100, 181, 246, 0.05) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.mantra-text {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.mantra-explain {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
}

/* Journal Checklist */
.journal-checklist {
    list-style: none;
}

.journal-checklist li {
    padding: 0.7rem 0;
    padding-right: 1.5rem;
    position: relative;
    color: var(--text-muted);
}

.journal-checklist li::before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--success);
    font-weight: bold;
}

/* Benefits List */
.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    background: rgba(52, 199, 89, 0.08);
    border-right: 3px solid var(--success);
    padding: 1.5rem;
    border-radius: 8px;
    color: var(--text-muted);
}

.benefit-item strong {
    color: var(--success);
    display: block;
    margin-bottom: 0.3rem;
}

/* Template Box */
.template-box {
    background: rgba(44, 44, 46, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.template-box h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.template-code {
    background: #0F0F12;
    border-left: 3px solid var(--primary-color);
    color: #34C759;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Stories Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.story-card {
    background: rgba(201, 169, 97, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.story-card:hover {
    border-color: var(--primary-color);
    background: rgba(201, 169, 97, 0.15);
    box-shadow: 0 10px 30px rgba(201, 169, 97, 0.1);
}

.story-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.story-header h4 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.story-meta {
    color: var(--accent);
    font-size: 0.9rem;
}

.story-body p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.story-lessons {
    background: rgba(100, 181, 246, 0.1);
    border-right: 3px solid var(--accent);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.story-lessons strong {
    color: var(--accent);
}

/* Conclusion Section */
.conclusion-section {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15) 0%, rgba(100, 181, 246, 0.08) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    padding: 3rem;
    margin: 3rem 0;
}

.conclusion-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.conclusion-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    text-align: center;
}

.conclusion-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.conclusion-step {
    background: rgba(201, 169, 97, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.conclusion-step:hover {
    border-color: var(--primary-color);
    background: rgba(201, 169, 97, 0.2);
    transform: translateY(-5px);
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--dark-bg);
    border-radius: 50%;
    font-weight: bold;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
}

.conclusion-step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

.conclusion-step strong {
    color: var(--primary-color);
}

/* CTA Section */
.cta-psychology {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e8c547 100%);
    border-radius: 16px;
    padding: 4rem;
    margin: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(15, 15, 18, 0.8);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-btn.primary {
    background: var(--dark-bg);
    color: var(--primary-color);
}

.cta-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cta-btn.secondary {
    background: transparent;
    color: var(--dark-bg);
    border: 2px solid var(--dark-bg);
}

.cta-btn.secondary:hover {
    background: rgba(15, 15, 18, 0.1);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .toc-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-column,
    .comparison-box,
    .steps-container,
    .tips-grid,
    .conclusion-steps {
        grid-template-columns: 1fr;
    }

    .techniques-container {
        grid-template-columns: 1fr;
    }

    .mantras-collection {
        grid-template-columns: 1fr;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .chapter-header h2 {
        font-size: 1.5rem;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .psychology-hero {
        height: 400px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .toc-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .conclusion-section {
        padding: 1.5rem;
    }

    .cta-psychology {
        padding: 2rem;
    }

    .technique-icon {
        width: 44px;
        height: 44px;
    }
}