@font-face {
    font-family: 'SF Pro Text';
    src: url('assets/fonts/SFProText-Medium.ttf') format('truetype');
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'SF Pro Text', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Видео-фон */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Навбар */
.navbar {
    position: fixed;
    top: 30px;
    left: 30px;
    right: 30px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    z-index: 10;
}

.nav-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #fff;
    border-radius: 30px;
    transition: left 0.3s ease-out, width 0.3s ease-out;
    z-index: 0;
}

.nav-link {
    position: relative;
    z-index: 1;
    padding: 0 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease-out;
}

.nav-link.active {
    color: #000;
}

.nav-link:not(.active):hover {
    color: #ccc;
}

/* Основной контент */
#main-content {
    position: relative;
}

.main-wrapper {
    position: relative;
    flex: 1 0 auto;
    padding-top: 120px;
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 30px;
    box-sizing: border-box;
    transition: height 0.8s cubic-bezier(0.6, 0, 0.4, 1);
    overflow: hidden;
    /* height будет меняться из JS */
}

/* Секции */
.content-section {
    position: absolute;
    top: 0;
    /* Added to fix vertical shifting */
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
    /* Updated for smoother transitions */
    z-index: 1;
    background: transparent;
    padding-bottom: 30px;
    color: #fff !important;
}

.content-section.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 2;
    position: relative;
}

.to-left {
    transform: translateX(-100%);
    opacity: 0;
}

.to-right {
    transform: translateX(100%);
    opacity: 0;
}

.from-left {
    transform: translateX(0);
    opacity: 1;
}

.from-right {
    transform: translateX(0);
    opacity: 1;
}

/* Карточки */
.cards {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    justify-content: center;
    align-items: center;
    height: calc(100% - 2rem);
}

.card {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    overflow: hidden;
    width: 300px;
}

.card img {
    width: 100%;
    display: block;
}

.card p {
    margin: 1rem;
    text-align: center;
    color: #ffffff;
}

/* Контактная информация */
.contact-info {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid #fff;
    border-radius: 1rem;
    padding: 20px;
    max-width: 600px;
    margin: 1rem auto;
    text-align: center;
    color: #fff;
}

/* Form container styling */
.contact-form {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid #fff;
    border-radius: 1rem;
    padding: 20px;
    margin: 1rem auto;
    max-width: 600px;
    color: #fff;
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 0.5rem;
    padding: 0.75rem 20px;
    color: #fff;
    font-family: 'SF Pro Text', sans-serif;
    box-sizing: border-box;
}

.contact-form textarea {
    min-height: 100px;
    max-height: 400px;
    resize: none;
    overflow-y: auto;
}

.submit-btn {
    display: block;
    margin: 1rem auto 0;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid #fff;
    border-radius: 1rem;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

/*Сервисы*/
.services-list {
    margin: 2rem auto;
    max-width: 600px;
}

.service-item {
    margin-bottom: 1.3rem;
}

.service-accordion.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-radius: 1.2rem;
    box-shadow: 0 2px 18px 0 rgba(0, 0, 0, 0.13);
    overflow: hidden;
    transition: background 0.25s;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
}

.service-toggle {
    width: 100%;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.08rem;
    font-weight: bold;
    padding: 1.2rem 1.6rem 1.2rem 1.6rem;
    border-radius: 0;
    cursor: pointer;
    outline: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.16s;
}

.service-toggle:after {
    content: '▼';
    font-size: 1rem;
    margin-left: 1.2rem;
    transition: transform 0.34s cubic-bezier(0.6, 0, 0.4, 1);
}

.service-item.open .service-toggle:after {
    transform: rotate(-180deg);
}

.service-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.48s cubic-bezier(0.6, 0, 0.4, 1), opacity 0.33s cubic-bezier(0.6, 0, 0.4, 1);
    padding: 0 1.6rem;
}

.service-item.open .service-panel {
    padding: 1rem 1.6rem 1.2rem 1.6rem;
    max-height: 200px;
    /* Увеличь, если текст длиннее */
    opacity: 1;
    transition: max-height 0.6s cubic-bezier(0.6, 0, 0.4, 1), opacity 0.38s cubic-bezier(0.6, 0, 0.4, 1);
}

.service-panel p {
    margin: 0;
    color: #fff;
    font-size: 1.02rem;
}

/* Мобильная адаптация */
@media (max-width: 600px) {
    .services-list {
        margin: 1rem 0.1rem;
        max-width: 99vw;
    }

    .service-toggle,
    .service-panel {
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 1rem;
    }

    .service-item.open .service-panel {
        padding: 0.7rem 1rem 1rem 1rem;
        max-height: 400px;
    }
}

/*Карты*/
.map-container {
    width: 100%;
    max-width: 520px;
    margin: 1.5rem auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 16px 2px rgba(0, 0, 0, 0.20);
    border: 5px solid #fff;
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 350px;
    min-height: 200px;
    border: none;
}

/* Контактное лицо */
.owner {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid #fff;
    border-radius: 1rem;
    padding: 20px;
    max-width: 600px;
    margin: 1rem auto;
}

.owner-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
    border: 2px solid #fff;
}

.owner-info .owner-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.owner-info .owner-role {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    text-align: center;
    width: calc(100% - 60px);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

.footer-content {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.footer-content a,
.footer-copy {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 900px) {
    .main-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .footer {
        width: calc(100% - 20px);
        padding-left: 10px;
        padding-right: 10px;
    }

    .navbar {
        left: 10px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        height: 50px;
        padding: 0 10px;
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0 10px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .nav-indicator {
        height: 3px;
        top: auto;
        bottom: 0;
        border-radius: 0;
    }

    .main-wrapper {
        padding-top: 90px;
        padding-bottom: 20px;
    }

    .cards {
        flex-direction: column;
        align-items: stretch;
    }

    .card {
        width: 90%;
        margin: 0 auto;
    }

    .owner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .owner-photo {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .footer-content {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .contact-form {
        padding: 20px 10px;
    }

    .contact-info {
        padding: 20px 10px;
    }
}

@media (max-width: 600px) {
    .map-container {
        max-width: 100%;
        margin: 1rem 0;
        border-radius: 0.7rem;
        border-width: 3px;
    }

    .map-container iframe {
        height: 200px;
        min-height: 150px;
    }
}