/* =========================================
   ШРИФТЫ (Локальное подключение Outfit)
========================================= */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300;
    src: url('/public/fonts/outfit-300.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    src: url('/public/fonts/outfit-400.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 600;
    src: url('/public/fonts/outfit-600.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 700;
    src: url('/public/fonts/outfit-700.woff2') format('woff2');
    font-display: swap;
}

/* =========================================
   КАСТОМНЫЕ СТИЛИ КОМПОНЕНТОВ
========================================= */
.hs-accordion-content {
    transition: height 0.3s ease-in-out;
}

.hs-accordion.active {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border-color: #f3f4f6;
    z-index: 10;
    position: relative;
}

/* =========================================
   КНОПКА ДЕМО
========================================= */
.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

.demo-btn:active {
    transform: scale(0.98);
}

.demo-btn-icon {
    font-size: 11px;
    opacity: 0.6;
}

/* =========================================
   ВИДЕО-МОДАЛКА
========================================= */
.video-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border: none;
    padding: 0;
    margin: 0;
    background: #000;
    z-index: 9999;
    overflow: hidden;
}

.video-modal::backdrop {
    display: none;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: #000;
}

.video-modal-body {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.video-modal-body video {
    background: #000;
    display: block;
    border-radius: 0;
}

/* Вертикальное видео */
.video-modal-body[data-orient="vertical"] video {
    height: 100vh;
    height: 100dvh;
    width: auto;
    max-width: 100vw;
}

/* Горизонтальное видео */
.video-modal-body[data-orient="horizontal"] video {
    width: 100vw;
    height: auto;
    max-height: 100vh;
    max-height: 100dvh;
}

.video-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
    .video-modal-close {
        top: 8px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* =========================================
   MEDIUM ZOOM
========================================= */
.medium-zoom-overlay {
    z-index: 9998 !important;
}

.medium-zoom-image--opened {
    z-index: 9998 !important;
}

/* =========================================
   СХЕМА-МОДАЛКА (только мобилка)
========================================= */
.schema-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border: none;
    padding: 0;
    margin: 0;
    background: #ffffff !important; /* <-- Сделали абсолютно белый фон вместо rgba */
    z-index: 9990;
    overflow: hidden;
}

.schema-modal::backdrop {
    background: #ffffff !important; /* <-- Сделали абсолютно белый фон */
}

.schema-modal-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
}

.schema-modal-body {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    height: 66vh;
    display: flex;
    flex-direction: column;
    background: #ffffff !important;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.schema-modal-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: center;
    background: #ffffff !important;
}

.schema-modal-scroll img {
    height: 90% !important;
    width: auto !important;
    max-width: none !important; /* ВАЖНО: убиваем лимит ширины от Tailwind */
    display: block;
    flex-shrink: 0;
    padding: 0 16px;
}

.schema-modal-footer {
    flex-shrink: 0;
    background: #ffffff !important;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f3f4f6;
}

.schema-modal-hint {
    font-size: 13px;
    color: #6b7280;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
}

.schema-modal-close {
    background: #f3f4f6;
    border: none;
    color: #374151;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Схема в обычном состоянии на мобилке */
@media (max-width: 767px) {
    .schema-preview {
        cursor: zoom-in;
    }
    .schema-preview img {
        pointer-events: none;
    }
}

/* На десктопе прячем модалку (работает medium-zoom) */
@media (min-width: 768px) {
    .schema-modal {
        display: none !important;
    }
}

/* Схема в обычном состоянии на мобилке — просто картинка */
@media (max-width: 767px) {
    .schema-preview {
        cursor: zoom-in;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #e5e7eb;
        background: #f9fafb;
    }

    .schema-preview img {
        width: 100%;
        height: auto;
        display: block;
        pointer-events: none;
    }
}

/* =========================================
   УБИРАЕМ СИНЮЮ РАМКУ ФОКУСА (TAB) В МОДАЛКЕ
========================================= */
.schema-modal:focus,
.schema-modal:focus-visible,
.schema-modal-body:focus,
.schema-modal-body:focus-visible,
.schema-modal-scroll:focus,
.schema-modal-scroll:focus-visible,
.schema-modal-scroll img:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Возвращаем тень самому телу модалки, чтобы box-shadow: none её не убил при фокусе */
.schema-modal-body:focus {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}
