/* Location Page - Step-by-step Navigation Guide */

/* Intro Section */
.location-intro {
    padding: var(--spacing-md) var(--spacing-sm) var(--spacing-sm);
    background-color: var(--bg-color);
    text-align: center;
}

.location-address-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s ease;
}

.location-address-link:hover {
    opacity: 0.7;
}

.location-address {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
}

.location-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

/* Override map-section padding for location page */
.location-intro + .map-section {
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-md);
}

/* Peek-эффект: карта не занимает весь экран, виден заголовок следующей секции */
.location-intro + .map-section .map-iframe {
    height: calc(100dvh - 280px);
    min-height: 200px;
    max-height: 350px;
}

@media (max-width: 767px) {
    .location-intro + .map-section .map-iframe {
        height: calc(100dvh - 420px); /* header + address + link + action bar + title peek */
        min-height: 150px;
        max-height: 220px;
    }
}

/* Steps Section */
.steps-section {
    padding: var(--spacing-md) var(--spacing-sm);
    background-color: var(--section-bg);
}

.steps-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

/* Timeline Container */
.steps-timeline {
    max-width: 450px;
    margin: 0 auto;
    position: relative;
    padding-left: 70px;
}

/* Vertical Line - hidden, each step has its own connector */
.steps-timeline::before {
    display: none;
}

/* Line connector from each step to next */
.step-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 50%;
    height: calc(100% + var(--spacing-lg));
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--success-color));
    border-radius: 2px;
}

/* Hide line after last step */
.step-item:last-child::before {
    display: none;
}

/* Step Item */
.step-item {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.step-item:last-child {
    margin-bottom: 0;
}

/* Step Number */
.step-number {
    position: absolute;
    left: -70px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 4px 12px var(--primary-color-30);
}

/* Last step - green */
.step-item:last-child .step-number {
    background: linear-gradient(135deg, var(--success-color), #059669);
    box-shadow: var(--shadow-md);
}

/* Step Content Card */
.step-content {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-content:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Last step highlight */
.step-item:last-child .step-content {
    border: 2px solid var(--success-color);
}

/* Step Image Container */
.step-image-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}

/* Step Image */
.step-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: block;
}

.step-image:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

/* Step Text */
.step-text {
    padding: var(--spacing-sm) var(--spacing-md);
}

.step-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
}

.step-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .steps-timeline {
        padding-left: 56px;
    }

    .step-item::before {
        left: -38px;
        height: calc(100% + var(--spacing-md));
    }

    .step-number {
        left: -56px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-image-wrapper {
        aspect-ratio: 3 / 4;
    }

    .step-text {
        padding: var(--spacing-sm);
    }

    .step-text h3 {
        font-size: 1rem;
    }

    .step-text p {
        font-size: 0.875rem;
    }

    .step-item {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .steps-timeline {
        padding-left: 50px;
    }

    .step-item::before {
        left: -32px;
        width: 2px;
    }

    .step-number {
        left: -50px;
        width: 34px;
        height: 34px;
        font-size: 0.875rem;
    }

    .step-image-wrapper {
        aspect-ratio: 3 / 4;
    }
}
