/* ============================================
   Программа освоения ПК для Ангелины
   Educational Website Styles
   ============================================ */

/* CSS Variables for Theme */
:root {
    /* Warm, encouraging color palette */
    --primary-color: #e8927c;
    --primary-dark: #d67b65;
    --primary-light: #f5b5a8;
    --secondary-color: #7cb9a8;
    --secondary-dark: #5a9a89;
    --accent-color: #f4d03f;
    --accent-dark: #d4ac0d;

    /* Background colors */
    --bg-primary: #fff9f5;
    --bg-secondary: #ffffff;
    --bg-card: #fff5f0;
    --bg-stage-1: #e8f4f8;
    --bg-stage-2: #f0e8f4;
    --bg-stage-3: #e8f8f0;
    --bg-stage-4: #f8f4e8;
    --bg-stage-5: #f4e8e8;

    /* Text colors */
    --text-primary: #4a4a4a;
    --text-secondary: #6b6b6b;
    --text-light: #8a8a8a;

    /* Border and shadow */
    --border-color: #e0d5d0;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 6px 30px rgba(0, 0, 0, 0.12);

    /* Typography */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', 'Times New Roman', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

h4 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '✂️';
    position: absolute;
    font-size: 8rem;
    opacity: 0.1;
    top: -20px;
    left: 5%;
    transform: rotate(-15deg);
}

.header::after {
    content: '🧵';
    position: absolute;
    font-size: 6rem;
    opacity: 0.1;
    bottom: -10px;
    right: 10%;
    transform: rotate(15deg);
}

.header h1 {
    color: white;
    margin-bottom: var(--spacing-xs);
    position: relative;
    z-index: 1;
}

.header .subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.header .personal-note {
    margin-top: var(--spacing-sm);
    font-style: italic;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Navigation */
.nav {
    background-color: var(--bg-secondary);
    padding: var(--spacing-sm) var(--spacing-xl);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    list-style: none;
}

.nav-link {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    background-color: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* Progress Overview */
.progress-overview {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-soft);
}

.progress-bar-container {
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    height: 30px;
    overflow: hidden;
    margin-top: var(--spacing-sm);
}

.progress-bar {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    height: 100%;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: width 0.5s ease;
}

/* Stage Cards */
.stages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.stage-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary-color);
    position: relative;
}

.stage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stage-card.stage-1 {
    border-left-color: #3498db;
}

.stage-card.stage-2 {
    border-left-color: #9b59b6;
}

.stage-card.stage-3 {
    border-left-color: #27ae60;
}

.stage-card.stage-4 {
    border-left-color: #f39c12;
}

.stage-card.stage-5 {
    border-left-color: #e74c3c;
}

.stage-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
}

.stage-card.stage-1 .stage-number {
    background-color: #3498db;
}

.stage-card.stage-2 .stage-number {
    background-color: #9b59b6;
}

.stage-card.stage-3 .stage-number {
    background-color: #27ae60;
}

.stage-card.stage-4 .stage-number {
    background-color: #f39c12;
}

.stage-card.stage-5 .stage-number {
    background-color: #e74c3c;
}

.stage-duration {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

.stage-title {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
}

.stage-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.stage-topics {
    list-style: none;
    margin-bottom: var(--spacing-sm);
}

.stage-topics li {
    padding: var(--spacing-xs) 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.stage-topics li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.stage-link {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: all 0.3s ease;
}

.stage-link:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
    transform: scale(1.05);
}

/* Stage Page Styles */
.stage-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.stage-header.stage-1-bg {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.stage-header.stage-2-bg {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.stage-header.stage-3-bg {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
}

.stage-header.stage-4-bg {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
}

.stage-header.stage-5-bg {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.stage-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.stage-header h1 {
    color: white;
    margin-bottom: var(--spacing-xs);
}

.stage-header .duration {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Content Sections */
.content-section {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
}

.section-icon {
    font-size: 1.5rem;
}

/* Lesson Items */
.lesson-list {
    list-style: none;
}

.lesson-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    transition: all 0.3s ease;
}

.lesson-item:hover {
    background-color: var(--bg-primary);
}

.lesson-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.lesson-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.lesson-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.lesson-content {
    margin-left: 2.5rem;
    color: var(--text-secondary);
}

.lesson-tips {
    background-color: #fff8e1;
    border-left: 4px solid var(--accent-color);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-xs);
    margin-left: 2.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
}

.lesson-tips::before {
    content: '💡 Совет: ';
    font-weight: 600;
    color: var(--accent-dark);
}

/* Practice Exercises */
.exercise-box {
    background-color: #e8f5e9;
    border: 2px dashed var(--secondary-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.exercise-title {
    color: var(--secondary-dark);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.exercise-list {
    list-style: none;
    counter-reset: exercise;
}

.exercise-list li {
    padding: var(--spacing-xs) 0;
    padding-left: 2rem;
    position: relative;
}

.exercise-list li::before {
    counter-increment: exercise;
    content: counter(exercise);
    position: absolute;
    left: 0;
    width: 24px;
    height: 24px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Connection Box */
.connection-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-card) 100%);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
    border: 2px solid var(--primary-color);
}

.connection-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

/* Diagram Placeholder */
.diagram-placeholder {
    background-color: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-light);
    margin: var(--spacing-md) 0;
}

.diagram-placeholder .icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

/* Info Boxes */
.info-box {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: var(--spacing-md);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: var(--spacing-md) 0;
}

.warning-box {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: var(--spacing-md);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: var(--spacing-md) 0;
}

.success-box {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: var(--spacing-md);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: var(--spacing-md) 0;
}

/* Keyboard Keys */
kbd {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 0 #ccc;
    font-family: monospace;
    font-size: 0.9em;
    padding: 2px 8px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.data-table th,
.data-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.data-table tr:hover {
    background-color: var(--bg-card);
}

/* Code Blocks */
.code-block {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: var(--spacing-sm) 0;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--border-color);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
    transform: scale(1.05);
}

.nav-btn.prev::before {
    content: '←';
}

.nav-btn.next::after {
    content: '→';
}

.nav-btn:only-child {
    margin-left: auto;
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-light);
    margin-top: var(--spacing-xl);
}

.footer .heart {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: var(--spacing-md);
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .container {
        padding: var(--spacing-sm);
    }

    .stages-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .nav-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .nav-btn {
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Print Styles */
@media print {

    .nav,
    .nav-buttons {
        display: none;
    }

    .stage-card {
        break-inside: avoid;
    }

    body {
        background-color: white;
    }
}