/* ОБЩИЕ СТИЛИ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* Хедер с плавным переходом */
.header-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(245,245,245,0) 50%,
        rgba(245,245,245,1) 100%);
    z-index: 2;
}

.header-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Верхняя панель с контактами */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: var(--header-top-bg);
    text-shadow: 1px 1px 2px var(--light-color);
    color: var(--header-top-color);
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-links a {
    font-size: 23px;
    color: var(--header-top-color);
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* Основное содержимое хедера */
.header-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 0 13%;
    padding-bottom: 90px;
}

.header-inner {
    display: flex;
    width: 100%;
    align-items: center;
}

.logo-container {
    flex: 0 0 auto;
    max-width: 300px;
    margin-right: 50px;
}

.logo-container img {
    filter: 
        drop-shadow(0 0 3px white)
        drop-shadow(0 0 10px white);
}

.header-text {
    flex: 1;
    color: var(--main-color);
    text-align: right;
    padding-right: 12px;
    padding-top: 15px;
}

.header-text h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    text-shadow: 0 0 5px rgba(245,245,245,1);
}

/* Основной контент */
.content_container {
    max-width: 1200px;
    margin: -80px auto 50px;
    padding: 0 5%;
    position: relative;
    z-index: 4;
}

.content-box {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: clamp(20px, 5%, 40px);
    margin-bottom: 40px;
}

/* Футер с плавным переходом */
.footer-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    overflow: hidden;
    margin-top: 80px;
}

.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,  
        rgba(245,245,245,0) 50%,
        rgba(245,245,245,1) 100%);
    z-index: 2;
}

.footer-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5% 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    text-shadow: 0 0 10px #fff, 0 0 10px #fff;
}

/* Левая часть - контакты и меню */
.footer-left-wrapper {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-columns-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: var(--main-color);
    font-size: 1.3rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--main-color);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--text-color);
}

.footer-column ul li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column ul li i {
    width: 20px;
    text-align: center;
    color: var(--main-color);
}

.footer-column ul li a {
    transition: all 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--main-color);
    text-decoration: underline;
}

/* Правая часть - карта */
.footer-map-column {
    flex: 1;
    min-width: 350px;
    max-width: 600px;
}
.footer-map-column h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: var(--main-color);
    font-size: 1.3rem;
}

.footer-map-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--main-color);
}

.yandex-map-container {
    position: relative;
    height: 87%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: #f5f5f5;
}

.yandex-map-container iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: none;
}

/* Соцсети */
.footer-social {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-social a {
    font-size: 27px;
    color: var(--main-color);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    transform: scale(1.1);
}

/* Нижняя часть футера */
.footer-bottom {
    text-align: center;
    padding: 25px 5%;
    margin-top: 40px;
    border-top: 1px solid rgba(127, 67, 36, 0.15);
    color: var(--main-color);
    position: relative;
    z-index: 3;
    font-size: 0.9rem;
}

/* АДАПТИВНАЯ ВЕРСТКА */
@media (max-width: 1024px) {
    .header-main {
        padding: 0 10%;
        padding-bottom: 70px;
    }
    
    .logo-container {
        max-width: 250px;
        margin-right: 30px;
    }

    .footer-content {
        gap: 30px;
    }
    
    .yandex-map-container {
        height: 86%;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: auto;
        min-height: 350px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
        padding: 15px 5%;
    }
    
    .contact-info {
        width: 100%;
        justify-content: space-around;
    }
    
    .social-links {
        width: 100%;
        justify-content: center;
    }
    
    .header-main {
        padding: 30px 5% 50px;
        justify-content: center;
    }
    
    .header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        margin-right: 0;
        margin-bottom: 10px;
        max-width: 200px;
    }
    
    .header-text {
        display: none;
    }
    
    .content_container {
        margin-top: -60px;
    }
    
    .footer-content {
        flex-direction: column;
        padding: 40px 8% 20px;
    }
    
    .footer-left-wrapper,
    .footer-map-column {
        min-width: 100%;
        max-width: 100%;
    }
    
    .footer-columns-wrapper {
        flex-direction: column;
        gap: 25px;
    }
    
    .yandex-map-container {
        height: 250px;
        margin-top: 10px;
    }

    .footer-column h3,
    .footer-map-column h3{
        display: flex;
        justify-content: space-around;
    }

    .footer-column h3::after,
    .footer-map-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-column ul {
        text-align: center;
    }
    
    .footer-column ul li {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-container {
        min-height: 300px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .contact-item {
        white-space: normal;
        text-align: center;
    }
    
    .content_container {
        margin-top: -40px;
    }
    
    .content-box {
        padding: 20px;
    }
    
    .logo-container {
        max-width: 180px;
    }
    
    .footer-content {
        padding: 30px 5% 15px;
    }
    
    .yandex-map-container {
        height: 220px;
    }
    
    .footer-bottom {
        padding: 20px 5%;
        margin-top: 30px;
    }
}

.m-tit {
    position: relative;
    font-size: 2.5rem;
    font-weight: 700 !important;
    color: var(--text-color);
    text-align: center;
    margin: 0 auto 1.5rem !important;
    padding-bottom: 15px !important;
    width: fit-content;
    border-bottom: none !important;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.m-tit::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--light-color) 0%, var(--secondary-color) 50%, var(--light-color) 110%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.m-tit.secondary::after {
    background: linear-gradient(90deg, var(--light-color) 0%, var(--secondary-color) 50%, var(--light-color) 110%);
}

.m-tit.accent::after {
    background: linear-gradient(90deg, var(--light-color) 0%, var(--secondary-color) 50%, var(--light-color) 110%);
}

.m-tit.m-tit-viewport {
    color: var(--main-color);
}

.m-tit.m-tit-viewport::after {
    width: 100%;
}

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

.m-tit:nth-child(1) { animation-delay: 0.1s; }
.m-tit:nth-child(2) { animation-delay: 0.3s; }
.m-tit:nth-child(3) { animation-delay: 0.5s; }

@media (max-width: 768px) {
    .m-tit {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .m-tit {
        font-size: 1.8rem;
        padding-bottom: 10px;
    }
    
    .m-tit::after {
        height: 3px;
        width: 60px;
    }
}

/* Стили Меню */

.flipout-menu {
    position: sticky;
    top: 20px;
    margin-bottom: 20px;
    z-index: 100;
}
.flipout-menu-header {
    background: var(--menu-main-color);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    width: 250px;
}
.flipout-menu-header i {
    margin-right: 10px;
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}
.flipout-menu-header.active i {
    transform: rotate(0deg);
}
.flipout-menu-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    margin-top: 10px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 0 10px rgba(0,0,0,0.07);
}
.flipout-menu-item, .flipout-submenu-item, .flipout-menu-link {
    transition: all 0.2s ease;
}
.flipout-menu-item {
    position: relative;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    margin: 5px;
}
@media (pointer: fine) {
    .flipout-menu-item:hover {
        background-color: var(--menu-hover-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
}
.flipout-menu-item.active {
    background-color: var(--menu-active-color);
}
.flipout-menu-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    height: 60px;
    position: relative;
    z-index: 2;
}
@media (pointer: fine) {
    .flipout-menu-link:hover {
        color: var(--menu-main-color);
    }
}
.flipout-menu-icon {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--menu-main-color);
}
.flipout-subitem-mobile {
    display: none;
    padding: 10px 15px;
    color: #666;
    font-size: 0.85rem;
    text-decoration: none;
    border-top: 1px solid #eee;
}
.flipout-subitem-mobile i {
    margin-right: 8px;
    font-size: 14px;
    color: var(--menu-main-color);
}
.flipout-submenu-container-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}
.flipout-submenu-wrapper {
    display: none;
    pointer-events: none;
    position: absolute;
    padding: 10px 0;
    transform: translateY(5px);
    opacity: 0;
    transition: all 0.2s ease;
    min-width: 200px;
}
.flipout-submenu-wrapper.visible {
    display: block;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}
.flipout-submenu {
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 5px 0;
}
.flipout-submenu-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #333;
    font-size: 0.85rem;
}
.flipout-submenu-item i {
    margin-right: 8px;
    color: var(--menu-main-color);
    font-size: 14px;
}
.flipout-submenu-item:hover {
    background: var(--menu-hover-color);
    color: var(--menu-main-color);
}
.flipout-menu.scrolled {
    width: auto;
}
.flipout-menu.scrolled .flipout-menu-header {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    justify-content: center;
    padding: 0;
}
.flipout-menu.scrolled .flipout-menu-header span {
    display: none;
}
.flipout-menu.scrolled .flipout-menu-header i {
    margin: 0;
    font-size: 18px;
}
.flipout-menu.scrolled .flipout-menu-list {
    position: absolute;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.03);
    border-radius: 5px;
    margin-top: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.07);
}

/* Десктопные стили */
@media (min-width: 769px) {
    .flipout-menu-list {
        max-height: 500px;
    }
    .flipout-menu-list.collapsed {
        max-height: 0;
    }
    .flipout-menu.scrolled .flipout-menu-list {
        max-height: 0;
    }
    .flipout-menu.scrolled .flipout-menu-list.expanded {
        max-height: 500px;
    }
    .flipout-subitem-mobile {
        display: none !important;
    }
}
@media (max-width: 1200px) {
    .flipout-menu-list {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Мобильные стили */
@media (max-width: 768px) {
    .flipout-menu-list {
        grid-template-columns: 1fr;
        gap: 0;
        max-height: 0;
    }
    .flipout-menu-header i {
        transform: rotate(0);
    }
    .flipout-menu-header.active i {
        transform: rotate(180deg);
    }
    .flipout-menu-list.active {
        max-height: 600px;
    }
    .flipout-menu-item {
        height: auto;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #eee;
    }
    .flipout-menu-link {
        flex-direction: row;
        justify-content: flex-start;
        height: 50px;
        padding: 0 15px;
    }
    .flipout-menu-icon {
        margin: 0 10px 0 0;
        font-size: 14px;
    }
    .flipout-subitem-mobile {
        display: block;
        padding-left: 45px;
        background: #f9f9f9;
    }
    .flipout-subitem-mobile.active {
        background: var(--menu-active-color);
    }
    .flipout-menu.scrolled .flipout-menu-header {
        width: 40px;
        height: 40px;
    }
    .flipout-menu:not(.scrolled) .flipout-menu-header {
        width: 100%;
    }
    .flipout-submenu-wrapper {
        display: none !important;
    }
}