/* Общие стили */
:root {
    --primary-color: #e63946;
    --primary-hover: #d62f3d;
    --secondary-color: #457b9d;
    --light-color: #f1faee;
    --dark-color: #1d3557;
    --gray-color: #8d99ae;
    --light-gray: #f8f9fa;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Шапка сайта */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    transition: var(--transition);
}

.header.header--scrolled {
    padding: 15px 0;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo__link {
    font-weight: 800;
    font-size: 28px;
    color: var(--primary-color);
    letter-spacing: 1px;
    position: relative;
    display: flex;
    align-items: center;
}

.logo__image {
    max-height: 50px;
    width: auto;
    display: block;
}

.logo__link::after {
    content: none;
}

.header__contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header__phone {
    font-weight: 600;
    font-size: 18px;
    color: var(--dark-color);
}

.header__schedule {
    font-size: 14px;
    color: var(--gray-color);
}

.header__callback-btn {
    background-color: transparent;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    transition: var(--transition);
}

.header__callback-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.header__callback-btn:hover::after {
    transform: scaleX(1);
}

.menu-items {
    display: flex;
}

.nav__item:not(:last-child) {
    margin-right: 20px;
}

.menu-item-link {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
}

.menu-item-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu-item-link:hover {
    color: var(--primary-color);
}

.menu-item-link:hover::after {
    transform: scaleX(1);
}

.burger-menu {
    display: none;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .header {
        padding: 15px 0;
    }
    
    .header__inner {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .logo {
        order: 1;
    }
    
    .burger-menu {
        order: 3;
        display: block;
        margin-left: auto;
    }
    
    .header__contact {
        order: 2;
        margin-left: auto;
    }
    
    .header__callback-btn {
        order: 4;
        width: 100%;
        margin-top: 10px;
        text-align: center;
        display: none;
    }
    
    .menu-bar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: #fff;
        padding: 80px 20px 20px;
        transition: right 0.4s ease;
        overflow-y: auto;
        z-index: 1001;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .logo__image {
        max-height: 40px;
    }
    
    .menu-bar.active {
        right: 0;
    }
    
    .menu-items {
        flex-direction: column;
    }
    
    .nav__item {
        margin: 0 0 20px 0;
    }
    
    .menu-item-link {
        font-size: 14px;
        display: block;
        padding: 10px 0;
    }
    
    .burger-menu {
        position: relative;
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 1000;
        display: block;
    }
    
    .burger-menu span, 
    .burger-menu::before, 
    .burger-menu::after {
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: var(--dark-color);
        transition: all 0.3s ease;
    }
    
    .burger-menu span {
        top: 50%;
        transform: translateY(-50%);
    }
    
    .burger-menu::before {
        content: '';
        top: 0;
    }
    
    .burger-menu::after {
        content: '';
        bottom: 0;
    }
    
    .burger-menu.active span {
        opacity: 0;
    }
    
    .burger-menu.active::before {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }
    
    .burger-menu.active::after {
        bottom: 50%;
        transform: translateY(50%) rotate(-45deg);
    }
    
    /* Добавляем затемнение при открытом меню */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 480px) {
    .header__phone {
        font-size: 16px;
    }
    
    .header__schedule {
        font-size: 12px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Заголовок секции */
.section-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--dark-color);
}

/* Карта с вкладками */
.locations {
    background-color: #fff;
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.locations::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.1) 0%, rgba(230, 57, 70, 0) 70%);
}

.locations__tabs {
    max-width: 1100px;
    margin: 0 auto;
}

.locations__tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.locations__tab-btn {
    padding: 15px 40px;
    background-color: transparent;
    border: 2px solid #464450;
    color: #464450;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 0;
}

.locations__tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #464450;
    transition: left 0.3s ease;
    z-index: -1;
}

.locations__tab-btn:hover::before {
    left: 0;
}

.locations__tab-btn:hover {
    color: #fff;
}

.locations__tab-btn.active {
    background-color: #464450;
    color: #fff;
}

.locations__tab-btn:first-child {
    border-radius: 0;
}

.locations__tab-btn:last-child {
    border-radius: 0;
}

.locations__tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.locations__tab-pane.active {
    display: block;
}

.locations__address {
    text-align: center;
    margin-bottom: 25px;
    background-color: #fff;
    padding: 20px;
    border-radius: 0;
    box-shadow: var(--shadow);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.locations__address h3 {
    margin-bottom: 0;
    color: var(--dark-color);
    font-size: 18px;
}

.locations__map {
    height: 500px;
    background-color: #eee;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.locations__map iframe,
.locations__map .ymaps-2-1-79-map {
    width: 100% !important;
    height: 100% !important;
}

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

/* Мобильная версия */
@media (max-width: 768px) {
    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .locations {
        padding: 60px 0;
    }
    
    .locations__tab-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .locations__tab-btn:first-child,
    .locations__tab-btn:last-child {
        border-radius: 0;
    }
    
    .locations__address {
        padding: 15px;
    }
    
    .locations__address h3 {
        font-size: 16px;
    }
    
    .locations__map {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .locations {
        padding: 50px 0;
    }
    
    .locations__tab-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .locations__address {
        padding: 12px;
    }
    
    .locations__address h3 {
        font-size: 14px;
    }
    
    .locations__map {
        height: 350px;
    }
}