/* =========================================================
   MOBILE.CSS — POPCAR (консолидированная версия)
   Подключать после style.css / admin.css
   ========================================================= */

:root { --header-h: 72px; }

@media (max-width: 900px) {
    html { scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
    body { overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
    img, video, iframe { max-width: 100%; height: auto; }
}

@supports (padding: max(0px)) {
    :root {
        --safe-top:    env(safe-area-inset-top, 0px);
        --safe-bottom: env(safe-area-inset-bottom, 0px);
        --safe-left:   env(safe-area-inset-left, 0px);
        --safe-right:  env(safe-area-inset-right, 0px);
    }
}

@media (max-width: 768px) { .container { padding-left: 16px; padding-right: 16px; } }
@media (max-width: 400px) { .container { padding-left: 12px; padding-right: 12px; } }

/* =========================================================
   ШАПКА
   ========================================================= */
@media (max-width: 900px) {
    .header-inner {
        height: var(--header-h);
        gap: 10px;
        justify-content: space-between;
        position: relative;
    }
    .logo-link { flex-shrink: 0; display: flex; align-items: center; height: 100%; }
    .header-logo { height: 130px; width: auto; max-width: none; max-height: none; margin: -25px 0; transform: scale(1.05); }
    .logo-link:hover .header-logo { transform: scale(1.08); }

    .header-right {
        position: static;
        margin-left: auto;
        gap: 8px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    .header-right > .btn { display: none; }
    .theme-toggle { width: 40px; height: 40px; flex-shrink: 0; }
    .theme-toggle .theme-icon { font-size: 18px; }
}
@media (max-width: 560px) {
    :root { --header-h: 72px; }
    .header-logo { height: 110px; margin: -19px 0; }
    .theme-toggle { width: 38px; height: 38px; }
    .theme-toggle .theme-icon { font-size: 17px; }
}
@media (max-width: 400px) {
    :root { --header-h: 64px; }
    .header-logo { height: 96px; margin: -16px 0; }
    .theme-toggle { width: 34px; height: 34px; }
    .theme-toggle .theme-icon { font-size: 15px; }
}

/* =========================================================
   СКРЫТИЕ ШАПКИ ПРИ СКРОЛЛЕ
   (translate -150% + opacity — гарантированно прячет логотип,
    вылезающий за пределы шапки; безопасно для iOS Safari)
   ========================================================= */
header {
    transition: transform 0.3s ease, opacity 0.25s ease,
                background 0.4s ease, border-color 0.4s ease;
}
header.header-hidden {
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    header { transition: none; }
}

/* =========================================================
   МОБИЛЬНОЕ МЕНЮ (drawer) — открывается под шапкой
   ========================================================= */
.mobile-nav-toggle {
    display: none;
    width: 40px; height: 40px;
    padding: 0;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
    z-index: 1001; /* поверх drawer, чтобы крестик был доступен */
}
.mobile-nav-toggle:hover { border-color: var(--primary-blue); }
.mobile-nav-toggle span {
    display: block;
    width: 18px; height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.mobile-nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(300px, 82vw);
    height: calc(100dvh - var(--header-h));
    background: var(--bg-card);
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 999;
    transform: translateX(105%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px 18px calc(20px + var(--safe-bottom, 0px));
    overflow-y: auto;
    box-shadow: -20px 0 40px rgba(0,0,0,0.3);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: block;
}
.mobile-nav a:hover, .mobile-nav a:active { background: rgba(0,119,255,0.1); color: var(--primary-blue); }
.mobile-nav .btn { margin-top: 18px; text-align: center; padding: 14px 20px; }

.mobile-nav-overlay {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(2px);
}
.mobile-nav-overlay.show { opacity: 1; visibility: visible; }

[data-theme="light"] .mobile-nav { background: #fff; border-left-color: rgba(0,0,0,0.08); }
[data-theme="light"] .mobile-nav-toggle { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }

@media (max-width: 900px) { .mobile-nav-toggle { display: flex; } }
@media (max-width: 400px) {
    .mobile-nav-toggle { width: 36px; height: 36px; }
    .mobile-nav-toggle span { width: 16px; }
}

/* =========================================================
   HERO
   ========================================================= */
@media (max-width: 768px) {
    .hero { height: auto; min-height: auto; padding: 110px 0 60px; }
    .hero h1 { font-size: 32px; line-height: 1.15; margin-bottom: 16px; }
    .hero p { font-size: 16px; margin-bottom: 28px; max-width: 100%; }
    .hero-content .btn { width: 100%; text-align: center; padding: 14px 24px !important; font-size: 16px !important; }
}
.hero-text-mobile { display: none; }

@media (max-width: 768px) {
    .hero-text-desktop { display: none; }
    .hero-text-mobile { display: inline; }
}
@media (max-width: 480px) {
    .hero { padding: 100px 0 40px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; }
}
@media (max-width: 360px) { .hero h1 { font-size: 23px; } }

/* СЕКЦИИ */
@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .section-title { font-size: 26px; margin-bottom: 28px; line-height: 1.2; }
    .page-header { padding: 110px 0 30px; }
    .legal-page { padding: 110px 0 50px; }
    .legal-content { padding: 28px 18px; }
    .legal-content h1 { font-size: 22px; }
}
@media (max-width: 480px) {
    .section { padding: 40px 0; }
    .section-title { font-size: 22px; }
    .page-header { padding: 100px 0 24px; }
    .legal-page { padding: 100px 0 40px; }
}

/* КНОПКИ / ФОРМЫ */
@media (max-width: 768px) {
    .btn { min-height: 44px; padding: 12px 20px; }
    .btn-sm { min-height: 38px; padding: 9px 14px; }
    .view-all-wrapper .btn { width: 100%; text-align: center; }
    .modern-form { gap: 14px; max-width: 100%; }
    .modern-form input[type="text"],
    .modern-form input[type="tel"],
    .modern-form input[type="email"],
    .modern-form textarea { font-size: 16px !important; padding: 14px 16px; }
    .form-field label { font-size: 12px; }
    .form-submit-btn { padding: 16px 20px; font-size: 16px; width: 100%; }
    .consent-checkbox label { font-size: 12.5px; }
}

/* КАРТОЧКИ АВТО */
@media (max-width: 600px) {
    .cars-grid { gap: 18px; grid-template-columns: 1fr; }
    .car-img { height: 180px; }
    .car-info { padding: 18px; }
    .car-title { font-size: 18px; }
    .car-price { font-size: 20px; }
}

/* =========================================================
   КАТАЛОГ
   ========================================================= */
.catalog-date-badge { display: none; }

@media (max-width: 700px) {
    /* Фильтры */
    .filter-panel { flex-direction: column; align-items: stretch; gap: 14px; }
    .search-box { max-width: 100%; }
    .search-box input { font-size: 16px; padding: 12px 16px; }
    .filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .filter-tabs::-webkit-scrollbar { display: none; }
    .filter-btn { flex-shrink: 0; padding: 9px 16px; font-size: 13px; }

    /* Карточка */
    .catalog-item { position: relative; }

    .catalog-item.has-date .catalog-item-row { padding-top: 40px; }

    /* Дата — верхний правый угол */
    .catalog-date-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 3;
        padding: 4px 10px;
        border-radius: 20px;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.12));
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        color: #93C5FD;
        border: 1px solid rgba(59, 130, 246, 0.35);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.2px;
        white-space: nowrap;
        box-shadow: 0 2px 10px rgba(59, 130, 246, 0.15);
    }
    .catalog-item-chips .date-chip { display: none; }

    /* Строка карточки — вертикальный стек */
    .catalog-item-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    /* Верхняя часть: фото + инфо + цена */
    .catalog-item-main {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        align-items: flex-start;
    }

    /* Фото — крупнее */
    .catalog-thumb {
        flex: 0 0 100px;
        width: 100px;
        height: 75px;
        object-fit: cover;
        border-radius: 6px;
    }

    .catalog-item-info {
        flex: 1 1 calc(100% - 110px);
        min-width: 0;
        order: 2;
    }

    .catalog-item-title {
        font-size: 15px;
        line-height: 1.3;
        margin-bottom: 4px;
    }

    .catalog-item-chips {
        max-height: none;
        overflow: visible;
        gap: 4px;
        margin-top: 4px;
        flex-wrap: wrap;
    }
    .catalog-item-chips span {
        font-size: 10.5px;
        padding: 3px 7px;
    }

    /* Цена — на своей строке, крупнее */
    .catalog-item-price {
        flex: 1 1 100%;
        order: 3;
        text-align: left;
        margin: 0;
        padding-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.06);
    }
    .catalog-item-price .price-value {
        font-size: 20px;
        font-weight: 800;
    }
    .catalog-item-price .price-note {
        font-size: 11px;
        margin-top: 2px;
    }

    /* Статус + стрелка — отдельной строкой */
    .catalog-item-side {
        order: 0;
        margin: 0;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.06);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .catalog-item-side .status-tag {
        font-size: 11px;
        padding: 5px 10px;
    }
    .catalog-expand-btn {
        width: 36px;
        height: 36px;
    }

    /* Детали */
    .details-specs {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .spec-item { padding: 8px 10px; }
    .spec-item span { font-size: 10px; }
    .spec-item strong { font-size: 13px; }
    .details-actions .btn { width: 100%; text-align: center; }

    /* Пагинация — компактная */
    .pagination { gap: 4px; margin-top: 28px; flex-wrap: nowrap; }
    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12.5px;
        padding: 0 6px;
        border-radius: 6px;
        flex-shrink: 0;
    }
    .page-arrow { font-size: 11px; min-width: 32px; padding: 0 4px; }
    .page-dots {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 32px;
        color: var(--text-muted);
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 1px;
        flex-shrink: 0;
        user-select: none;
    }

@media (max-width: 400px) {
    .catalog-thumb {
        flex: 0 0 88px;
        width: 88px;
        height: 66px;
    }
    .catalog-item-info {
        flex: 1 1 calc(100% - 98px);
    }
    .catalog-item-title { font-size: 14px; }
    .catalog-item-price .price-value { font-size: 18px; }
    .catalog-item-price .price-note { font-size: 10.5px; }
    .catalog-date-badge { font-size: 10px; padding: 3px 8px; }
    .page-btn { min-width: 30px; height: 30px; font-size: 12px; padding: 0 5px; }
    .page-arrow { min-width: 30px; }
    .page-dots { min-width: 16px; height: 30px; font-size: 13px; }
    .pagination { gap: 3px; }
}

/* ОТЗЫВЫ */
@media (max-width: 768px) {
    .review-card { padding: 24px 20px; }
    .review-text { font-size: 14px; }
    .review-card::before { font-size: 70px; top: 5px; right: 12px; }
    .tabs-container { gap: 10px; flex-wrap: wrap; }
    .tab-btn { font-size: 14px; padding: 9px 14px; flex: 1; min-width: 0; white-space: nowrap; }
    .reviews-grid-page { grid-template-columns: 1fr; gap: 14px; }
    .review-page-card { padding: 20px; }
    .video-grid { gap: 18px; }
}
@media (max-width: 480px) { .tab-btn { font-size: 12px; padding: 8px 10px; } }

/* КОНТАКТЫ */
@media (max-width: 768px) {
    .contacts-wrapper { gap: 18px; }
    .contact-block { padding: 22px 16px; border-radius: 12px; }
    .contact-block-title { font-size: 19px; margin-bottom: 20px; padding-bottom: 14px; }
    .contact-card { padding: 12px; gap: 12px; }
    .contact-card .contact-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
    .contact-card .contact-text p { font-size: 15px; }
    .contact-card .contact-text h4 { font-size: 11px; }
    .working-hours { padding: 16px; }
    .hours-list li { padding: 8px 0; font-size: 14px; }
    .hours-time { font-size: 14px; }
    .online-note { padding: 12px; }
    .online-note p { font-size: 12.5px; }
    .messengers-block h4 { font-size: 11px; }
    .messenger-btn { font-size: 13px; padding: 10px 12px; min-width: 0; flex: 1 1 30%; }
}

@media (max-width: 768px) {
    #form .section-title { font-size: 22px; }
    #form p { font-size: 15px !important; margin-bottom: 24px !important; }
}

/* ПОДВАЛ */
@media (max-width: 768px) {
    footer.site-footer { padding: 40px 0 24px; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-brand { align-items: center; display: flex; flex-direction: column; }
    .footer-brand .footer-logo {
        height: 200px; width: auto; max-width: none; max-height: none;
        margin: -55px 0 -35px !important;
        transform: scale(1.05);
        align-self: center;
    }
    .footer-col h4 { font-size: 14px; margin-bottom: 16px; }
    .footer-desc { max-width: 100%; margin: 0 auto 18px; font-size: 13.5px; }
    .footer-links { gap: 10px; align-items: center; }
    .footer-links a { font-size: 14px; }
    .footer-links a:hover { transform: none; }
    .footer-requisites { margin-top: 28px; padding-top: 20px; }
    .footer-requisites p { font-size: 12px; line-height: 1.5; }
    .footer-legal-links { font-size: 11px; }
}
@media (max-width: 480px) {
    .footer-brand .footer-logo { height: 170px; margin: -45px 0 -30px !important; }
}

/* МОДАЛКИ */
@media (max-width: 768px) {
    .modal { padding: 12px; align-items: flex-start; padding-top: 60px; }
    .modal-content { padding: 28px 18px; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); border-radius: 12px; width: 100%; }
    .modal-content h2 { font-size: 20px; margin-bottom: 12px; }
    .modal .close-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; top: 6px; right: 8px; font-size: 32px; line-height: 1; border-radius: 8px; }
    .contact-modal-info { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 0 4px; }
    .contact-modal-messengers { flex-direction: column; gap: 8px; margin-bottom: 20px; padding-bottom: 20px; }
    .contact-modal-messengers .messenger-btn { width: 100%; }
}

/* ПЛАВАЮЩИЕ КНОПКИ */
@media (max-width: 768px) {
    .floating-buttons { bottom: calc(20px + var(--safe-bottom, 0px)); right: calc(16px + var(--safe-right, 0px)); gap: 12px; }
    .floating-btn { width: 48px; height: 48px; }
    .floating-btn svg { width: 22px; height: 22px; }
}

/* COOKIE-БАННЕР */
@media (max-width: 768px) {
    .cookie-banner { padding: 16px; padding-bottom: calc(16px + var(--safe-bottom, 0px)); }
    .cookie-banner-content { flex-direction: column; gap: 12px; text-align: center; }
    .cookie-banner-content p { font-size: 13px; line-height: 1.5; }
    .cookie-banner-buttons { width: 100%; gap: 8px; }
    .cookie-banner-buttons .btn { flex: 1; padding: 12px 16px; }
}

/* СТРАНИЦА АВТО */
@media (max-width: 768px) {
    .car-detail-layout { gap: 20px; margin-bottom: 30px; }
    .main-image { height: 240px; }
    .car-info-panel { padding: 20px 16px; }
    .car-badge { font-size: 12px; padding: 4px 12px; }
    #carTitle { font-size: 26px !important; margin-bottom: 10px !important; }
    .detail-price { font-size: 24px; margin: 14px 0; padding-bottom: 14px; }
    .detail-price span { font-size: 13px !important; }
    #carOrderBtn { padding: 14px !important; font-size: 16px !important; }
    .specs-table td { padding: 10px 6px; font-size: 14px; }
    .specs-table td:first-child { width: 45%; }
    .thumb { width: 80px; height: 56px; }
    .car-description { padding: 24px 18px !important; margin-top: 24px !important; }
    .car-description h2 { font-size: 20px !important; margin-bottom: 14px !important; }
}
@media (max-width: 480px) {
    #carTitle { font-size: 22px !important; }
    .detail-price { font-size: 20px; }
    .main-image { height: 200px; }
}

/* АДМИНКА */
@media (max-width: 900px) {
    .admin-header { padding: 12px 16px; gap: 12px; }
    .admin-header h1 { font-size: 15px; }
    .mobile-menu-btn { width: 40px; height: 40px; }
    .content-wrapper { padding: 16px 14px; }
    .section-toolbar { gap: 10px; margin-bottom: 14px; }
    .section-toolbar > div:last-child { width: 100%; justify-content: stretch; }
    .section-toolbar > div:last-child > .btn { flex: 1; min-width: 0; font-size: 12px; padding: 10px 12px; }
    .section-count { font-size: 20px; }
    .section-label { font-size: 12px; }
    .sidebar { width: min(280px, 85vw); padding: 16px 12px; }
    .admin-modal-content { max-width: 100%; }
    .modal-footer { padding: 12px 16px; gap: 8px; }
    .modal-footer .btn { flex: 1; min-height: 42px; font-size: 13px; }
    .admin-table th, .admin-table td { padding: 10px; }
}
@media (max-width: 600px) {
    .admin-table th:nth-child(5), .admin-table td:nth-child(5) { display: none; }
    .admin-table img { width: 48px; height: 34px; }
}
@media (max-width: 480px) {
    .admin-table th, .admin-table td { font-size: 11px; padding: 8px 6px; }
    .actions-cell { gap: 4px; }
    .btn-icon { width: 30px; height: 30px; font-size: 13px; }
    .photo-item { flex-wrap: wrap; gap: 8px; padding: 10px; }
    .photo-fields { flex: 1 1 100%; }
    .photo-preview { width: 56px; height: 40px; }
    .photo-url { font-size: 12px; padding: 8px 10px; }
    .form-row { grid-template-columns: 1fr !important; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; }
    .admin-modal { padding: 8px; }
    .admin-modal-content { max-height: calc(100vh - 16px); }
    .modal-header { padding: 14px 16px; }
    .modal-header h2 { font-size: 15px; }
    .modal-body { padding: 14px 16px; }
    .modal-close { width: 34px; height: 34px; }
}

/* LANDSCAPE */
@media (orientation: landscape) and (max-height: 500px) {
    .hero { min-height: auto; padding: 80px 0 40px; }
    .hero h1 { font-size: 24px; }
    .modal { align-items: flex-start; padding-top: 8px; }
    .modal-content { max-height: calc(100vh - 16px); }
    .floating-buttons { bottom: 12px; right: 12px; }
    .floating-btn { width: 40px; height: 40px; }
    .cookie-banner { padding: 12px; }
}

@media (max-width: 360px) {
    .section-title { font-size: 20px; }
    .hero h1 { font-size: 21px; }
    .contact-block { padding: 18px 14px; }
    .contact-card .contact-icon { width: 40px; height: 40px; font-size: 18px; }
}

/* TAP */
@media (hover: none) and (pointer: coarse) {
    .car-card:hover, .step-card:hover, .direction-card:hover,
    .review-card:hover, .contact-block:hover, .video-card:hover { transform: none; }
    .footer-links a:hover { transform: none; }
}
/* =========================================================
   LIGHTBOX (галерея)
   ========================================================= */
[data-gallery-id] { cursor: zoom-in; }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 20px;
}
.lightbox.active { display: flex; opacity: 1; }

.lightbox-stage {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5002;
    transition: background 0.2s, border-color 0.2s;
}
.lightbox-close:hover {
    background: rgba(239,68,68,0.8);
    border-color: rgba(239,68,68,0.8);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5002;
    transition: background 0.2s, border-color 0.2s;
    padding-bottom: 4px;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0,119,255,0.7);
    border-color: rgba(0,119,255,0.9);
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 5002;
    backdrop-filter: blur(4px);
}
.lightbox-title {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 5002;
    backdrop-filter: blur(4px);
    text-align: center;
    max-width: calc(100% - 32px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .lightbox { padding: 8px; }
    .lightbox-img { max-height: 85vh; max-height: 85dvh; border-radius: 4px; }
    .lightbox-close {
        top: calc(12px + var(--safe-top, 0px));
        right: 12px;
        width: 42px;
        height: 42px;
        font-size: 24px;
    }
    .lightbox-prev, .lightbox-next { width: 44px; height: 44px; font-size: 26px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-counter { bottom: calc(16px + var(--safe-bottom, 0px)); }
    .lightbox-title { bottom: calc(52px + var(--safe-bottom, 0px)); font-size: 13px; }
}
/* =========================================================
   КОНТАКТЫ — 3 БЛОКА В РЯД
   (в конце файла + !important, чтобы гарантированно перебить style.css)
   ========================================================= */
.contacts-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .contacts-wrapper {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }
}

/* Иконки соцсетей — БЕЗ рамки, БЕЗ фона, БЕЗ тени */
.contact-card .contact-icon.social {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 52px;
    height: 52px;
    overflow: visible;
    flex-shrink: 0;
}
.contact-card .contact-icon.social svg {
    width: 46px;
    height: 46px;
    display: block;
    border-radius: 0;
    box-shadow: none;
    filter: none;
    transition: transform 0.25s ease;
}
.contact-card:hover .contact-icon.social svg {
    transform: scale(1.08);
}

/* Названия соцсетей — крупный контрастный шрифт */
.contact-card .contact-text h4:only-child {
    font-size: 17px !important;
    color: var(--text-main) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    line-height: 1.2;
}