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

:root {
    --color-bg: #f5f3f0;
    --color-text: #2a2520;
    --color-text-light: #8b7b6f;
    --color-accent: #d4af37;
    --color-accent-dark: #aa8c2c;
    --color-border: #e8dfd5;
    --color-step-bg: #faf9f7;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--color-border);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    color: var(--color-accent-dark);
}

header p {
    font-size: 1rem;
    color: var(--color-text-light);
    font-weight: 300;
}

.timeline-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    transform: translateX(-50%);
    transform-origin: top;
    animation: growLine 3s ease-out forwards;
}

@keyframes growLine {
    from {
    scaleY(0);
        opacity: 0;
    }
    to {
    scaleY(1);
        opacity: 1;
    }
}

.timeline-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--color-accent);
    transform: translateX(-50%);
    z-index: 10;
}

.timeline-step {
    margin-bottom: 4rem;
    position: relative;
    opacity: 0;
    animation: fadeInStep 0.6s ease-out forwards;
}

.timeline-step:nth-child(1) { animation-delay: 0.2s; }
.timeline-step:nth-child(2) { animation-delay: 0.4s; }
.timeline-step:nth-child(3) { animation-delay: 0.6s; }
.timeline-step:nth-child(4) { animation-delay: 0.8s; }
.timeline-step:nth-child(5) { animation-delay: 1s; }
.timeline-step:nth-child(6) { animation-delay: 1.2s; }
.timeline-step:nth-child(7) { animation-delay: 1.4s; }
.timeline-step:nth-child(8) { animation-delay: 1.6s; }
.timeline-step:nth-child(9) { animation-delay: 1.8s; }
.timeline-step:nth-child(10) { animation-delay: 2s; }

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--color-bg);
    border: 3px solid var(--color-accent);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 20;
    transition: all 0.3s ease;
}

.timeline-step:hover .step-marker {
    width: 28px;
    height: 28px;
    background: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
    top: -4px;
}

.step-number {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent-dark);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-step:hover .step-number {
    opacity: 1;
}

.step-content {
    display: flex;
    gap: 3rem;
    margin-top: -20px;
}

.timeline-step:nth-child(even) .step-content {
    flex-direction: row-reverse;
}

.step-text {
    flex: 1;
    padding: 2rem;
    background: var(--color-step-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-step:hover .step-text {
    background: white;
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.step-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-accent-dark);
}

.step-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-light);
}

.step-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 250px;
    background: var(--color-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.timeline-step:hover .step-image img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.step-image::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.timeline-step:hover .step-image::after {
    opacity: 0.8;
}

/* Лайтбокс */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 37, 32, 0.96);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-info {
    margin-top: 2rem;
    text-align: center;
    color: white;
}

.lightbox-counter {
    font-size: 0.9rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.lightbox-title {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 0.9rem;
}

footer p {
    margin: 0.4rem 0;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    body {
        padding: 1rem;
    }

    .timeline-wrapper {
        padding: 0 1rem;
    }

    .timeline-line {
        left: 20px;
    }

    .step-marker {
        left: 20px;
    }

    .step-content {
        flex-direction: column !important;
        gap: 1.5rem;
    }

    .step-text {
        padding: 1.5rem;
    }

    .step-image {
        height: 200px;
        margin-left: 3rem;
    }

    .step-text {
        margin-left: 3rem;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-close {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
        letter-spacing: 0.5px;
    }

    header p {
        font-size: 0.9rem;
    }

    body {
        padding: 0.8rem;
    }

    .timeline-wrapper {
        padding: 0;
    }

    .timeline-line {
        left: 15px;
    }

    .step-marker {
        left: 15px;
    }

    .timeline-step {
        margin-bottom: 2.5rem;
    }

    .step-text {
        padding: 1.2rem;
        font-size: 0.9rem;
        margin-left: 2.5rem;
    }

    .step-image {
        height: 180px;
        margin-left: 2.5rem;
    }

    .step-title {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .step-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .step-description {
        font-size: 0.85rem;
    }

    .lightbox-image {
        max-height: 60vh;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: 0.8rem;
        right: 0.8rem;
    }

    .lightbox-info {
        margin-top: 1rem;
    }

    .lightbox-title {
        font-size: 1.1rem;
    }

    footer {
        margin-top: 2rem;
    }
}