* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    background-color: #E6D8F2; /* Нежно-фиолетовый фон */
    font-family: Arial, sans-serif;
    overflow-x: hidden; /* Убираем горизонтальную прокрутку */
    overscroll-behavior-x: contain; /* Запрещаем горизонтальное смахивание */
}

html {
    scroll-behavior: smooth;
}

.nav {
    background-color: #6B4E9B;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 80px; /* Увеличен для логотипа 90px */
    position: relative;
    justify-content: space-between; /* Цветок слева, меню справа */
}

.nav-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-height: 90px; /* Увеличенный логотип */
    object-fit: contain;
    z-index: 11;
}

.flower-icon {
    display: flex;
    align-items: center;
}

.flower-image {
    width: 32px;
    height: 32px;
    transition: transform 0.5s ease;
}

.flower-icon:hover .flower-image {
    transform: rotate(360deg); /* Вращение при ховере */
}

.menu {
    margin-left: 16px; /* Фиксированный отступ от логотипа */
}

.menu-items {
    display: flex;
    gap: 32px;
}

.menu-link {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 18px;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    position: relative;
}

.menu-link:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background-color: #C3A8E1;
    opacity: 0.3;
}

.menu-link:hover {
    color: #C3A8E1;
}

.burger {
    display: none;
    margin-left: 8px; /* Уменьшенный отступ для мобильных */
}

.burger-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.burger-icon {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
}

.burger-btn:hover .burger-icon {
    color: #C3A8E1;
}

.mobile-menu {
    display: none;
}

@media (max-width: 640px) {
    .nav-container {
        height: 64px; /* Меньше для мобильных */
    }

    .nav-logo {
        max-height: 60px; /* Увеличенный логотип для мобильных */
    }

    .flower-icon {
        display: none; /* Скрываем цветок */
    }

    .menu {
        display: none;
    }

    .burger {
        display: block;
    }

    .mobile-menu {
        display: none;
        padding: 8px 16px;
        background-color: #6B4E9B;
    }

    .mobile-menu.hidden {
        display: none;
    }

    .mobile-menu:not(.hidden) {
        display: block;
    }

    .mobile-link {
        display: block;
        color: #FFFFFF;
        text-decoration: none;
        padding: 12px 16px;
        font-size: 16px;
        font-family: 'Playfair Display', serif;
        font-weight: 500;
    }

    .mobile-link:hover {
        color: #C3A8E1;
    }
}

/* Стили для секции с мастером */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden; /* Убираем горизонтальную прокрутку */
    padding: 40px 16px;
    margin: 0;
    margin-top: 80px;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    z-index: 1;
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    background-color: rgba(107, 78, 155, 0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-text {
    flex: 1.2;
    padding: 40px;
    color: #FFFFFF;
    min-width: 0; /* Предотвращаем расширение */
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-title.fade-in--active {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease forwards;
}

.hero-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: 0.2s;
}

.hero-subtitle.fade-in--active {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease 0.2s forwards;
}

.hero-description {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: 0.4s;
}

.hero-description.fade-in--active {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease 0.4s forwards;
}

.hero-description-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #C3A8E1;
}

.hero-description-list,
.hero-certificates-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.hero-description-list li,
.hero-certificates-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    line-height: 1.8;
}

.hero-description-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #C3A8E1;
}

.hero-certificates-list li {
    background-color: rgba(195, 168, 225, 0.1);
    padding: 8px 12px 8px 24px;
    border-radius: 4px;
}

.hero-certificates-list li::before {
    content: '★';
    position: absolute;
    left: 8px;
    color: #C3A8E1;
}

.hero-image-container {
    flex: 1;
    position: relative;
    max-width: 800px;
    padding: 20px;
    min-width: 0; /* Предотвращаем расширение */
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: 0.6s;
}

.hero-image.fade-in--active {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease 0.6s forwards;
}

.hero-image-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: calc(100% - 40px);
    height: 200px;
    background: linear-gradient(to top, rgba(107, 78, 155, 0.9), transparent);
    z-index: 3;
}

.hero-btn {
    display: inline-block;
    margin-top: 40px;
    padding: 12px 24px;
    background-color: #C3A8E1;
    color: #6B4E9B;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
    transition-delay: 0.8s;
    z-index: 2;
}

.hero-btn.fade-in--active {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease 0.8s forwards;
}

.hero-btn:hover {
    background-color: #F3EBF9;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для секции с услугами */
.services {
    position: relative;
    padding: 60px 16px 80px;
    min-height: auto;
    display: flex;
    justify-content: center;
    margin: 0;
    overflow-x: hidden; /* Убираем горизонтальную прокрутку */
    z-index: 2;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('orchid.png');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    z-index: 1;
    overflow: hidden;
}

.services-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: rgba(243, 235, 249, 0.9);
    border-radius: 16px;
}

.service-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    animation: fadeIn 2s ease-in-out;
}

.service-item:not(:last-child) {
    border-bottom: 1px solid rgba(195, 168, 225, 0.3);
}

.service-text {
    flex: 1;
    padding-left: 20px;
}

.service-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 500;
    color: #6B4E9B;
    margin-bottom: 10px;
}

.service-description {
    font-size: 16px;
    line-height: 1.6;
    color: #6B4E9B;
    margin-bottom: 10px;
}

.service-details {
    display: flex;
    gap: 20px;
}

.service-price,
.service-duration {
    font-size: 18px;
    font-weight: 500;
    color: #6B4E9B;
    background-color: rgba(195, 168, 225, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

.service-image {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Стили для контактной секции */
.contact-section {
    position: relative;
    padding: 40px 16px;
    min-height: auto;
    display: flex;
    justify-content: center;
    margin: 0;
    overflow-x: hidden; /* Убираем горизонтальную прокрутку */
    z-index: 3;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('cabinet1.png');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    z-index: 1;
    overflow: hidden;
}

.contact-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 16px;
    background-color: rgba(243, 235, 249, 0.9);
    border-radius: 16px;
}

.booking-block {
    margin-bottom: 40px;
}

.booking-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 500;
    color: #6B4E9B;
    margin-bottom: 40px;
    animation: fadeIn 2s ease-in-out;
}

.booking-note {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: #6B4E9B;
    margin: 20px 0;
    text-align: center;
}

.booking-button {
    position: relative;
    display: inline-block;
    width: 200px;
    height: 50px;
}

.button-half {
    position: absolute;
    width: 100px;
    height: 50px;
    background-color: #C3A8E1;
    border-radius: 0px;
    transition: transform 0.5s ease-in-out, background-color 0.3s ease;
}

.button-half-left {
    left: 0;
    transform: translateX(-200px);
}

.button-half-left--active {
    transform: translateX(0);
    animation: mergeButton 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.button-half-right {
    right: 0;
    transform: translateX(200px);
}

.button-half-right--active {
    transform: translateX(0);
    animation: mergeButton 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.button-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6B4E9B;
    font-size: 16px;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 3;
}

.button-text--active {
    opacity: 1;
    animation: textFadeIn 0.3s ease-in-out forwards;
}

.booking-button:hover .button-half {
    background-color: #F3EBF9;
}

.contact-icon {
    position: absolute;
    width: 32px;
    height: 32px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.7s ease;
    z-index: 3;
}

.contact-icon--instagram {
    left: -60px;
    transform: translateX(-200px) translateY(-50%) rotate(0deg);
}

.contact-icon--telegram {
    right: -60px;
    transform: translateX(200px) translateY(-50%) rotate(0deg);
    transition: opacity 0.5s ease, transform 0.7s ease;
}

.contact-icon--active {
    opacity: 1;
    animation: iconSlideIn 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s forwards;
}

.contact-icon:hover svg {
    stroke: #F3EBF9;
}

@keyframes iconSlideIn {
    0% { transform: translateX(-200px) translateY(-50%) rotate(0deg); }
    100% { transform: translateX(0) translateY(-50%) rotate(360deg); }
}

@keyframes mergeButton {
    0% { transform: translateX(-200px); }
    100% { transform: translateX(0); }
}

@keyframes textFadeIn {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.section-divider {
    border: none;
    height: 1px;
    background-color: #C3A8E1;
    opacity: 0.3;
    margin: 40px 0;
}

.certificates-block {
    margin-bottom: 40px;
}

.certificates-title,
.contact-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 500;
    color: #6B4E9B;
    margin-bottom: 20px;
}

.footer-certificates {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.certificate-diploma {
    max-width: 400px;
    max-height: 500px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.certificate-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.certificate-image {
    max-width: 300px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.contact-block {
    color: #6B4E9B;
}

.footer-contact {
    font-size: 16px;
    line-height: 1.6;
}

.footer-contact a {
    color: #C3A8E1;
    text-decoration: none;
}

.footer-contact a:hover {
    color: #F3EBF9;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 960px) {
    .hero-container {
        flex-direction: column;
    }

    .hero-text {
        flex: 1;
        padding: 24px;
    }

    .hero-image-container {
        max-width: 100%;
        height: 600px;
        padding: 16px;
    }

    .hero-image-overlay {
        bottom: 16px;
        left: 16px;
        width: calc(100% - 32px);
    }

    .service-item {
        flex-direction: column;
        align-items: center;
    }

    .service-text {
        padding-left: 0;
        text-align: center;
    }

    .service-details {
        justify-content: center;
    }

    .service-image {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 20px 8px;
        margin-top: 64px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-description-title {
        font-size: 16px;
    }

    .hero-image-container {
        height: 400px;
    }

    .services {
        padding: 20px 8px 40px;
    }

    .service-title {
        font-size: 20px;
    }

    .service-description {
        font-size: 14px;
    }

    .service-price,
    .service-duration {
        font-size: 16px;
    }

    .service-image {
        height: 150px;
    }

    .contact-section {
        padding: 20px 8px;
    }

    .booking-title,
    .certificates-title,
    .contact-title {
        font-size: 28px;
    }

    .booking-note {
    font-size: 16px;
    margin: 16px 0;
    }

    .contact-icon--instagram {
        left: -48px;
        transform: translateX(-100px) translateY(-50%) rotate(0deg);
    }

    .contact-icon--telegram {
    right: -48px;
    transform: translateX(100px) translateY(-50%) rotate(0deg);
    transition: opacity 0.5s ease, transform 0.7s ease;
    }

    .certificate-diploma {
        max-width: 300px;
        max-height: 400px;
    }

    .certificate-image {
        max-width: 250px;
    }

    .footer-contact {
        font-size: 14px;
    }

    .section-divider {
        margin: 20px 0;
    }
}