/* [VARS] CSS-переменные */
:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --card-radius: 40px;
    --card-radius-mobile: 24px;
    --modal-pad-top: 0rem;
    --modal-pad-bottom: 0rem;
    --modal-pad-side: 1.5rem;
    --modal-pad-top-pc: 3rem;
    --modal-pad-bottom-pc: 2rem;
    --modal-pad-side-pc: 3rem;
}

/* [UTILS] Вспомогательные классы */
.modal-content-custom-padding {
    padding-top: var(--modal-pad-top);
    padding-bottom: var(--modal-pad-bottom);
    padding-left: var(--modal-pad-side);
    padding-right: var(--modal-pad-side);
}

/* [BASE] Базовые стили */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
.navbar-brand {
    font-family: 'Playfair Display', serif;
}

/* [NAV] Навигация */
.navbar {
    background-color: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid #222;
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 1.4rem;
    color: #fff !important;
    border: none !important;
}

.navbar-brand img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* === Модальные окна — заголовки === */
.modal-title {
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.4rem 1.5rem;
}

/* === Контакты в модальном окне === */
.modal-contacts {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

.modal-contact-row {
    margin-bottom: 0.5rem;
    color: #ffffff !important;
    text-decoration: none !important;
    pointer-events: none;
    cursor: default !important;
}

.contact-phone {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0; 
}

.contact-phone:hover {
    color: #ffc107 !important;
    text-decoration: none;
}

.badge.bg-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-weight: 500;
    background: transparent;
}

/* Глобальные стили .nav-link — только для десктопа */
@media (min-width: 992px) {
    .nav-link {
        color: rgba(255, 255, 255, 0.85) !important; /* ✅ !important для гарантии */
        font-family: 'Montserrat', sans-serif;
        font-weight: 500;
        font-size: 1rem;
        padding: 0.5rem 1.2rem;
        transition: all 0.3s ease;
        cursor: pointer;
        text-decoration: none !important; /* ✅ Убираем подчёркивание */
    }

    /* Наведение */
    .nav-link:hover {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }

    /* ✅ Фокус, клик, посещённая ссылка — принудительно белый */
    .nav-link:focus,
    .nav-link:active,
    .nav-link:visited {
        color: rgba(255, 255, 255, 0.85) !important;
        background: transparent;
    }

    /* ✅ Наведение на активную/посещённую ссылку */
    .nav-link:focus:hover,
    .nav-link:active:hover,
    .nav-link:visited:hover {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Плавное появление модальных окон */
.modal.fade .modal-dialog {
    transition: transform 0.2s ease-out;
}

/* Стили ссылок в модальных окнах */
#modalContacts .list-unstyled li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#modalContacts .list-unstyled li:last-child {
    border-bottom: none;
}

#modalContacts .list-unstyled a {
    color: #fff;
    font-weight: 500;
}

#modalContacts .list-unstyled a:hover {
    color: #ffc107;
    /* Bootstrap warning color */
    text-decoration: none;
}

/* === Разделитель между адресами === */
.modal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    margin: 1.5rem 0;
}

/* === Элементы контактов с иконками === */
.contact-item {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem; 
}

.contact-icon {
    font-size: 1rem;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.contact-label {
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}


/* === Плавная анимация мобильного меню*/
@media (max-width: 991px) {

    /* 0. Фиксируем навбар, чтобы не сдвигал контент */
    .navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    /* 1. Цвет ссылок — всегда белый */
    .navbar-collapse .nav-link {
        color: #ffffff !important;
    }

    /* 2. Контейнер меню — ПОВЕРХ контента, стиль как у навбара */
    .navbar-collapse {
        position: absolute !important;
        /* ✅ РАСКОММЕНТИРОВАНО */
        top: 100% !important;
        left: 0;
        right: 0;
        z-index: 999;

        /* ✅ Фон точно как у навбара (или чуть темнее для читаемости) */
        background-color: rgba(5, 5, 5, 0.9) !important;
        backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid #222 !important;

        /* ✅ Отступы */
        margin-top: 0 !important;
        padding: 0 2.5rem !important;
        border-radius: 0 0 12px 12px;
        overflow: hidden;
    }

    /* 3. Скрытое состояние */
    .navbar-collapse.collapse:not(.show) {
        height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        opacity: 0;
        border: none !important;
    }

    /* 4. Состояние анимации (для плавности) */
    .navbar-collapse.collapsing {
        transition: height 0.35s ease !important;
    }

    /* 5. Раскрытое состояние */
    .navbar-collapse.show {
        opacity: 1;
    }

    /* 6. Анимация пунктов */
    .navbar-collapse .nav-link {
        opacity: 0;
        transition: opacity 0.15s ease;
        pointer-events: none;
    }

    .navbar-collapse.show .nav-link {
        opacity: 1;
        pointer-events: auto;
    }

    /* Каскадная задержка */
    .navbar-collapse.show .nav-link:nth-child(1) {
        transition-delay: 0.03s;
    }

    .navbar-collapse.show .nav-link:nth-child(2) {
        transition-delay: 0.06s;
    }

    .navbar-collapse.show .nav-link:nth-child(3) {
        transition-delay: 0.09s;
    }

    .navbar-collapse.show .nav-link:nth-child(4) {
        transition-delay: 0.12s;
    }

    /* 7. Отступы навигации */
    .navbar-nav {
        padding: 0.5rem 0 !important;
    }

    .navbar-nav .nav-link {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 0.7rem 0 !important;
        transition: color 0.2s ease, padding-left 0.2s ease, background 0.2s ease;
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none !important;
    }

    .navbar-nav .nav-link:hover {
        color: #ffc107 !important;
        background: rgba(255, 255, 255, 0.1) !important;
        padding-left: 8px !important;
        border-radius: 8px;
    }

    /* 8. Компенсация отступа для контента (чтобы не прятался под навбаром) */
    body {
        padding-top: 70px !important;
        /* Подберите под высоту вашего навбара */
    }
}

/* На ПК убираем отступ у body */
@media (min-width: 992px) {
    body {
        padding-top: 0 !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        max-height: 35px;
    }

    .navbar {
        padding: 0.5rem 0;
    }
}

/* [FILTERS] Форма фильтров */
.filter-section {
    background: transparent;
    padding: 1rem 0 2rem 0;
}

.form-select {
    border-radius: 16px;
    border: 1px solid #333;
    padding: 0.8rem 1rem;
    background-color: #1a1a1a;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    transition: border-color 0.3s, background-color 0.3s;
}

.form-select:focus {
    background-color: #252525;
    border-color: #666;
    box-shadow: none;
    color: #fff;
}

.btn-reset {
    border: 1px solid #fff;
    color: #fff;
    border-radius: 16px;
    padding: 0rem 1.5rem;
    background: transparent;
    transition: all 0.3s;
    font-weight: 500;
    height: 46px;
}

.btn-reset:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

/* [GRID] Сетка проектов */
.projects-container {
    padding-bottom: 5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

/* [CARD] Карточка проекта */
.project-card {
    position: relative;
    width: 100%;
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease, opacity 0.4s ease;
    background-color: #111;
    opacity: 0;
    transform: translateY(20px);
}

.project-card.hidden {
    display: none;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.08);
    z-index: 10;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
    /*filter: brightness(0.85);*/
}

.project-card:hover .project-img {
    transform: scale(1.1);
    filter: brightness(1);
}

/* [RESPONSIVE] Адаптивность сетки + фиксы для Telegram */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        touch-action: pan-y;
    }

    body {
        overflow-x: clip !important;
    }

    /* Отключение анимаций для стабильности в Telegram WebView */
    .project-card {
        transform: none !important;
        -webkit-transform: none !important;
        transition: none !important;
        -webkit-transition: none !important;
        touch-action: manipulation;
        will-change: auto !important;
        -webkit-backface-visibility: visible !important;
        backface-visibility: visible !important;
        -webkit-perspective: none !important;
        perspective: none !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        box-shadow: none !important;
        contain: layout style paint !important;
        opacity: 1 !important;
    }

    .project-card:hover,
    .project-card:active,
    .project-card:focus,
    .project-card.visible:hover,
    .project-card.touching {
        transform: none !important;
        -webkit-transform: none !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
        margin: 0 !important;
        padding: 0 !important;
        top: auto !important;
        left: auto !important;
        z-index: auto !important;
    }

    .project-card img,
    .project-card .project-img {
        transform: none !important;
        -webkit-transform: none !important;
        transition: none !important;
        filter: none !important;
        -webkit-filter: none !important;
        will-change: auto !important;
        -webkit-backface-visibility: visible !important;
        backface-visibility: visible !important;
    }

    /*.navbar {
        position: sticky !important;
        top: 0 !important;
    }*/

    .like-btn-wrapper {
        will-change: auto !important;
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 5px;
    }

    .project-card {
        border-radius: var(--card-radius-mobile);
        transform: none !important;
        transition: none !important;
    }

    .project-card:hover,
    .project-card:active {
        transform: none !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }

    .project-card .project-img {
        filter: none !important;
    }
}

@media (max-width: 360px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Оставляем 2 колонки */
        gap: 6px;
        /* Минимальный отступ */
        padding: 0 2px;
    }

    .project-card {
        border-radius: 12px;
        /* Чуть меньше скругление, чтобы влезло */
    }
}

/* [FOOTER] */
footer {
    border-top: 1px solid #222;
    padding: 3rem 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* [BTN] Кнопка менеджера */
.manager-btn {
    transition: all 0.3s ease;
    z-index: 1055;
    text-decoration: none;
}

.manager-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
    color: #fff !important;
}

/* Плавающая мобильная кнопка */
.mobile-float-btn {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    z-index: 1055 !important;
    margin: 0 !important;
    padding: 14px 20px !important;
    background-color: rgba(240, 240, 240, 0.2) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    border-radius: 50px !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.mobile-float-btn:hover {
    background-color: rgba(200, 200, 200, 0.2) !important;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9) !important;
    color: #000 !important;
}

.mobile-float-btn:active {
    transform: scale(0.95);
}

@media (max-width: 991px) {
    .manager-btn {
        background: #ffffff24 !important;
        border: none !important;
    }
}

@media (max-width: 400px) {
    .mobile-float-btn span {
        display: none;
    }

    .mobile-float-btn {
        padding: 16px !important;
        border-radius: 50% !important;
        width: 56px;
        height: 56px;
        justify-content: center;
    }
}

/* [MODAL] Модальное окно товара */
.modal-content {
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 40px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
}

.modal-backdrop {
    background-color: #000;
    opacity: 0.85 !important;
    backdrop-filter: blur(5px);
}

.btn-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;

    /* ✅ Более светлый фон для контраста с #0a0a0a */
    background: rgba(255, 255, 255, 0.15) !important;

    /* ✅ Белая обводка для чёткости */
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

/* ✅ SVG внутри кнопки — ярко-белый, жирный */
.btn-close-modal svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-close-modal svg path {
    stroke: #ffffff !important;
    stroke-width: 2.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* ✅ Ховер: фон светлеет, кнопка чуть увеличивается */
.btn-close-modal:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    transform: scale(1.05);
}

.btn-close-modal:active {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.4) !important;
}

.modal-image-col {
    min-height: 300px;
    background: #111;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.modal-image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.modal-info-col {
    background-color: #0a0a0a;
    color: #fff;
}

/* Анимация появления модального окна */
.modal.fade .modal-dialog {
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

/* Порядок элементов в модальном окне */
#modalTitle {
    order: 1;
}

#modalBtn {
    order: 2;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.modal-specs {
    order: 3;
}

.modal-desc-wrapper {
    order: 4;
}

.action-btn {
    font-size: 0.7rem;
    padding: 10px 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s;
    width: auto;
    display: inline-block;
    border: 1px solid #fff !important;
    background: transparent !important;
    color: #fff !important;
    box-shadow: none;
    align-self: flex-start;
    margin-left: 0;
}

.action-btn:hover {
    background-color: #ffffff2d !important;
    transform: translateY(-2px);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: none;
    background-color: #cccccc !important;
}

/* Адаптив модального окна (ТОЛЬКО МОБИЛЬНЫЕ) */
@media (max-width: 991px) {
    .modal-dialog {
        margin: 0px;
        max-height: 95vh;
        display: flex;
        flex-direction: column;
    }

    .modal-content {
        border-radius: 0 !important;
        /* Убираем фиксированную высоту, пусть растет по контенту */
        height: auto;
        max-height: 95vh;
        display: flex;
        flex-direction: column;
        /* Убрать нижнюю границу, если окно на весь экран */
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    .btn-close-modal {
        position: absolute;
        /* Абсолютно внутри .modal-image-col */
        top: auto !important;
        bottom: 25px !important;
        /* Отступ от низа картинки */
        right: 25px !important;
        /* Отступ от правого края картинки */
        left: auto !important;

        z-index: 25;
        /* Поверх картинки, но внутри её контейнера */

        /* Стили для видимости на любом фоне */
        width: 45px;
        height: 45px;
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s;
        opacity: 0.9;
    }

    .btn-close-modal:hover {
        background: rgba(0, 0, 0, 0.8) !important;
        opacity: 1;
        transform: scale(1.1);
    }

    /* Контейнер внутри модалки делаем прокручиваемым */
    .modal-body {
        overflow-y: auto;
        /* Включаем скролл */
        padding: 0 !important;
        max-height: 95vh;
        -webkit-overflow-scrolling: touch;
        /* Плавный скролл на iOS */
    }

    /* Картинка: на всю ширину, без обрезки */
    .modal-image-col {
        width: 100%;
        aspect-ratio: 9 / 12;
        /* ЗАДАЕМ СООТНОШЕНИЕ */
        height: auto;
        /* Высота подстроится под ширину и пропорцию */
        flex-shrink: 0;
        position: relative;
        /* Для крестика */
        overflow: hidden;
    }

    .modal-image-col img {
        width: 100%;
        height: 100%;
        /* Растягиваем на всю высоту контейнера */
        object-fit: cover;
        /* ГЛАВНОЕ: Заполняет блок, обрезая края */
        object-position: center;
        /* ЦЕНТРИРОВАНИЕ: Обрезка равномерно сверху и снизу */
        display: block;
        background-color: #000;
    }

    /* Текстовый контент: просто идет следом */
    .modal-info-col {
        padding: 1rem 1rem !important;
        flex-shrink: 0;
        /* Чтобы текст не сжимался, а уходил вниз */
        width: 100%;
    }

    #modalTitle {
        font-size: 1.6rem !important;
        margin-top: 1rem;
    }
}

@media (min-width: 992px) {
    #modalTitle {
        order: 1;
    }

    .modal-specs {
        order: 2;
    }

    .modal-desc-wrapper {
        order: 3;
    }

    #modalBtn {
        order: 4;
        margin-top: 2rem;
        margin-bottom: 0;
        align-self: flex-start !important;
        margin-left: 0 !important;
    }

    .modal-info-col .d-flex {
        justify-content: flex-start;
    }

    .modal-content-custom-padding {
        padding-top: var(--modal-pad-top-pc);
        padding-bottom: var(--modal-pad-bottom-pc);
        padding-left: var(--modal-pad-side-pc);
        padding-right: var(--modal-pad-side-pc);
    }
}

/* [LIKE] Кнопка лайка (исследование) */
.like-btn-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    will-change: opacity, transform;
    pointer-events: none;
    isolation: isolate;
    contain: layout;
}

.like-btn-wrapper.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.like-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0.95;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    outline: none;
    padding: 0;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    contain: layout style;
    isolation: isolate;
}

@media (hover: hover) {
    .like-btn:hover {
        background: #ffffff;
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }
}

.like-btn svg {
    width: 22px;
    height: 22px;
    fill: transparent;
    stroke: #333333;
    stroke-width: 2.5;
    transition: all 0.2s ease;
    display: block;
    flex-shrink: 0;
    transform-origin: center;
}

/* Состояние лайка */
.like-btn.liked {
    background: #ff4757 !important;
    border-color: #ff4757 !important;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4) !important;
    transform: none !important;
}

@media (hover: hover) {
    .like-btn.liked:hover {
        transform: none !important;
    }
}

.like-btn.liked svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    animation: heart-pulse 0.4s ease-in-out;
}

@keyframes heart-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 576px) {
    .like-btn-wrapper {
        top: 10px;
        right: 10px;
    }

    .like-btn {
        width: 36px;
        height: 36px;
    }

    .like-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* [LIGHTBOX] Лайтбокс для изображений — ТОЛЬКО НА ДЕСКТОПЕ (≥992px) */

@media (min-width: 992px) {
    #lightboxModal .modal-backdrop {
        background-color: #000 !important;
        opacity: 1 !important;
        z-index: 2000 !important;
        backdrop-filter: blur(8px);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    #lightboxModal .modal-dialog {
        z-index: 2001;
        margin: 0 auto;
        pointer-events: none;
    }

    #lightboxModal .modal-content {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        pointer-events: auto;
    }

    #lightboxModal .modal-body {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 90vh;
        padding: 0;
        position: relative;
        overflow: visible;
    }

    #lightboxImage {
        max-height: 90vh;
        max-width: 100%;
        object-fit: contain;
        cursor: zoom-out;
        /* ✅ Показывает, что можно кликнуть для закрытия */
        border-radius: 4px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        animation: zoomIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        display: block;
        user-select: none;
        /* Запрет выделения изображения */
    }

    /* Подсказка "клик для закрытия" — видна только на десктопе */
    #lightboxModal .text-center.text-white-50 {
        display: block !important;
        opacity: 0.75;
        margin-top: 1rem;
    }
}

/* 📱 На мобильных — скрываем подсказку и убираем курсор */
@media (max-width: 991px) {
    #lightboxImage {
        cursor: default;
        /* ❌ Нет зум-аута, так как клик не работает */
        user-select: auto;
    }

    #lightboxModal .text-center.text-white-50 {
        display: none !important;
    }
}

/* Анимация увеличения */
@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* Курсоры для интерактивных элементов */
.project-img {
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.8s ease;
}

.project-card:hover .project-img {
    transform: scale(1.1);
    filter: brightness(1);
}

#modalImg {
    cursor: zoom-in;
    transition: filter 0.3s ease;
}

#modalImg:hover {
    filter: brightness(1.1);
}

/* Фикс позиционирования бэкдропа лайтбокса */
#lightboxModal .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}


#modalContacts .btn-close-modal,
#modal3DTour .btn-close-modal {
    top: 20px !important;
    bottom: auto !important;
    right: 20px !important;
    left: auto !important;
}

/* Чуть меньше отступ на очень маленьких экранах */
@media (max-width: 576px) {

    #modalContacts .btn-close-modal,
    #modal3DTour .btn-close-modal {
        top: 15px !important;
        right: 15px !important;
    }
}