/* Анимации для меню */
.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Улучшенные анимации для скролла */
[data-aos] {
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Анимация уплывания в края */
[data-aos="fade-out-left"] {
    transform: translateX(0);
    opacity: 1;
    transition-property: transform, opacity;
}

[data-aos="fade-out-left"].aos-animate {
    transform: translateX(-100px);
    opacity: 0;
}

[data-aos="fade-out-right"] {
    transform: translateX(0);
    opacity: 1;
    transition-property: transform, opacity;
}

[data-aos="fade-out-right"].aos-animate {
    transform: translateX(100px);
    opacity: 0;
}

[data-aos="fade-out-up"] {
    transform: translateY(0);
    opacity: 1;
    transition-property: transform, opacity;
}

[data-aos="fade-out-up"].aos-animate {
    transform: translateY(-100px);
    opacity: 0;
}

[data-aos="fade-out-down"] {
    transform: translateY(0);
    opacity: 1;
    transition-property: transform, opacity;
}

[data-aos="fade-out-down"].aos-animate {
    transform: translateY(100px);
    opacity: 0;
}

/* Анимация для галереи */
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Анимация для модальных окон */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* .close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s ease;
} */

/* .close:hover {
    color: var(--sage);
} */

/* Анимация для карточек локаций */
.location-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Анимация для кнопок */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Анимация для картинок в локациях */
.location-image img {
    transition: transform 0.5s ease;
}

.location-card:hover .location-image img {
    transform: scale(1.1);
}

/* Стили для галереи */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Стили для галереи локаций в модальном окне */
.location-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.location-gallery-item {
    border-radius: 8px;
    overflow: hidden;
    height: 150px;
}

.location-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Анимация параллакса для героя */
.hero-background {
    transform: translateY(0);
    transition: transform 0.3s ease-out;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Мобильные анимации */
@media (max-width: 768px) {
    [data-aos] {
        /* Отключаем AOS на мобильных, используем кастомные анимации */
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .mobile-fade-in {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .mobile-fade-in.animate-in {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Более плавные анимации для мобильных */
    .gallery-item,
    .location-card {
        transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease !important;
    }
    
    /* Уменьшаем масштаб при hover на мобильных */
    .gallery-item:active,
    .location-card:active {
        transform: scale(0.98);
    }
}



/* Стили для промо-попапа */
.promo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.promo-popup.active {
    opacity: 1;
    visibility: visible;
}

.promo-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.promo-popup-content {
    position: relative;
    background: var(--white);
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.promo-popup.active .promo-popup-content {
    transform: scale(1) translateY(0);
}

.promo-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.promo-popup-close:hover {
    background: var(--cream);
    color: var(--sage);
}

.promo-popup-image {
    height: 250px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.promo-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-popup-info {
    padding: 30px;
    text-align: center;
}

.promo-popup-info h3 {
    color: var(--sage);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.promo-popup-info h4 {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.promo-popup-info p {
    color: var(--gray);
    margin-bottom: 25px;
    line-height: 1.5;
}

.promo-popup-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.promo-popup-actions .btn {
    min-width: 150px;
}

.btn-secondary {
    background: transparent;
    color: var(--sage);
    border: 2px solid var(--sage);
}

.btn-secondary:hover {
    background: var(--sage);
    color: var(--white);
}

.promo-popup-dont-show {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.9rem;
    cursor: pointer;
}

.promo-popup-dont-show input {
    margin: 0;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .promo-popup-content {
        max-width: 95%;
        margin: 20px;
    }
    
    .promo-popup-actions {
        flex-direction: column;
    }
    
    .promo-popup-actions .btn {
        min-width: auto;
        width: 100%;
    }
    
    .promo-popup-info {
        padding: 20px;
    }
}

/* Обновленные стили для модального окна локации */
#location-modal .modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh; /* Ограничиваем высоту */
    position: relative;
    animation: slideIn 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Скрываем переполнение контейнера */
}

#location-modal .modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 60px);
}

/* #location-modal .modal-body h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--sage);
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 10px 0;
    z-index: 10;
    border-bottom: 2px solid var(--cream);
} */

#location-modal .modal-content-inner {
    padding: 0 20px 20px 20px;
}

#location-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 20px 0;
    padding: 10px 0;
    border-bottom: 2px solid var(--cream);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

#location-modal .modal-header h2 {
    margin: 0;
    color: var(--sage);
    font-size: 1.8rem;
    flex: 1;
    padding-right: 20px; /* Отступ для крестика */
}

#location-modal .modal-header .close {
    position: static;
    font-size: 40px;
    font-weight: bold;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 20px
    /* margin-left: 10px; */
}

/* #location-modal .modal-header .close:hover {
    color: var(--sage);
    transform: scale(1.1);
} */

/* Улучшаем скроллбар для модального окна */
#location-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#location-modal .modal-body::-webkit-scrollbar-track {
    background: var(--cream);
    border-radius: 3px;
}

#location-modal .modal-body::-webkit-scrollbar-thumb {
    background: var(--sage);
    border-radius: 3px;
}

#location-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* Галерея внутри модального окна */
#location-modal .location-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

#location-modal .location-gallery-item {
    border-radius: 8px;
    overflow: hidden;
    height: 150px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#location-modal .location-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#location-modal .location-gallery-item:hover img {
    transform: scale(1.05);
}

/* Описание локации */
#location-modal .location-description {
    margin-top: 25px;
    line-height: 1.6;
    color: var(--gray);
}

#location-modal .location-description p {
    margin-bottom: 15px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    #location-modal .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 90vh;
    }
    
    #location-modal .modal-body {
        max-height: calc(90vh - 60px);
        padding: 15px;
    }
    
    #location-modal .location-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    #location-modal .location-gallery-item {
        height: 120px;
    }
}

@media (max-width: 768px) {
    #location-modal .modal-header {
        padding: 15px 15px 10px 15px;
        margin: 0 0 15px 0;
    }
    
    #location-modal .modal-header h2 {
        font-size: 1.5rem;
        padding-right: 30px;
    }
    
    #location-modal .modal-header .close {
        font-size: 25px;
        width: 25px;
        height: 25px;
    }
    
    #location-modal .modal-content-inner {
        padding: 0 15px 15px 15px;
    }
}


@media (max-width: 480px) {
    #location-modal .location-gallery {
        grid-template-columns: 1fr;
    }
    
    #location-modal .location-gallery-item {
        height: 150px;
    }
}

@media (max-width: 480px) {
    #location-modal .modal-header h2 {
        font-size: 1.3rem;
    }
    
    #location-modal .modal-header .close {
        font-size: 22px;
    }
}

.header.scrolled .logo-image {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

@keyframes pulseLogo {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.logo-image.loaded {
    animation: pulseLogo 1.5s ease-in-out;
}
