/* ============================================
   DEFERRED CSS - Некритические стили
   Загружается асинхронно после первого экрана
   ============================================ */

/* Секции */
section {
    padding: 80px 0;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-top: 20px;
}

.section-cta {
    text-align: center;
    margin-top: 50px;
}

section h2 {
    text-align: center;
    font-size: 42px;
    margin-bottom: 40px;
    color: var(--text-dark);
    font-weight: 800;
}

/* Секция статистики */
.stats-section {
    background: var(--bg-gradient);
    color: var(--bg-white);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 500;
}

/* Сетка услуг */
.services-preview,
.additional-services {
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(5deg);
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 700;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Список услуг */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.service-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.service-item-icon {
    font-size: 40px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.service-item:hover .service-item-icon {
    transform: scale(1.15);
}

.service-item-content {
    flex: 1;
}

.service-item h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 700;
}

.service-item p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
}

/* О компании */
.about-preview .lead {
    font-size: 22px;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-medium);
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.benefit {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
}

.benefit:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background-color: var(--bg-white);
}

.benefit-icon {
    font-size: 36px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.benefit:hover .benefit-icon {
    transform: scale(1.2) rotate(-10deg);
}

.benefit-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-medium);
    margin: 0;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(0, 63, 136, 0.05), rgba(214, 40, 40, 0.05));
    border-left: 5px solid var(--primary-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.highlight {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.6;
}

/* Подвал */
.site-footer {
    background-color: var(--header-accent);
    color: var(--bg-white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section p {
    margin-bottom: 10px;
    color: rgba(255,255,255,0.8);
}

.footer-section a {
    color: var(--bg-white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* Стили для таблиц */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

table thead th {
    padding: 15px;
    text-align: center;
    vertical-align: top;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 2px solid var(--secondary-color);
}

table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

table tbody tr:hover {
    background-color: var(--bg-light);
}

table tbody tr:last-child {
    border-bottom: none;
}

table tbody td {
    padding: 12px 15px;
    color: var(--text-dark);
}

table tbody td strong {
    color: var(--primary-color);
    font-weight: 600;
}

table[border="1"] {
    border: 1px solid var(--border-color);
}

table[border="1"] th,
table[border="1"] td {
    border: 1px solid var(--border-color);
}

table[border="1"] thead {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

table[border="1"] thead th {
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

/* Мета информация страницы */
.page-meta {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    font-size: 16px;
}

.page-meta time,
.page-meta .author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page-featured-image {
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.page-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-medium);
}

.page-content h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin-top: 50px;
    margin-bottom: 20px;
    font-weight: 700;
    text-align: left;
}

.page-content h3 {
    font-size: 26px;
    color: var(--text-dark);
    margin-top: 40px;
    margin-bottom: 16px;
    font-weight: 700;
}

.page-content h4 {
    font-size: 22px;
    color: var(--text-dark);
    margin-top: 30px;
    margin-bottom: 14px;
    font-weight: 700;
}

.page-content p {
    margin-bottom: 20px;
}

.page-content ul,
.page-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.page-content li {
    margin-bottom: 10px;
}

.page-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s;
}

.page-content a:hover {
    color: var(--secondary-color);
}

.post-navigation {
    text-align: center;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
}

.post-navigation .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    border: none;
    cursor: pointer;
}

.post-navigation .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: var(--shadow-sm);
}

/* Стили для локаций в недвижимости */
.page-content p:has(img[src*="navigation"]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(214, 40, 40, 0.08) 0%, rgba(0, 63, 136, 0.08) 100%);
    padding: 12px 20px;
    border-radius: 30px;
    margin: 15px 8px 15px 0;
    border: 1.5px solid rgba(214, 40, 40, 0.25);
    transition: all 0.3s ease;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-content p:has(img[src*="navigation"]):hover {
    background: linear-gradient(135deg, rgba(214, 40, 40, 0.12) 0%, rgba(0, 63, 136, 0.12) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: rgba(214, 40, 40, 0.4);
}

.page-content p:has(img[src*="navigation"]) img {
    width: 22px;
    height: 22px;
    margin: 0;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.page-content p:has(img[src*="navigation"]) strong {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    margin: 0 4px;
}

/* Fallback для браузеров без :has() */
@supports not selector(:has(*)) {
    .page-content p img[src*="navigation"] {
        width: 22px;
        height: 22px;
        vertical-align: middle;
        margin-right: 10px;
        margin-top: 0;
        margin-bottom: 0;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    }
}

.page-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 30px 0;
    background-color: var(--bg-light);
    border-radius: 8px;
    font-style: italic;
}

.page-content code {
    background-color: var(--bg-light);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.page-content pre {
    background-color: var(--text-dark);
    color: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
}

.page-content pre code {
    background-color: transparent;
    padding: 0;
    color: var(--bg-white);
}

.page-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.page-navigation a {
    flex: 1;
    padding: 20px 30px;
    background-color: var(--bg-light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.page-navigation a:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

/* Стили для контактных иконок мессенджеров */
.page-content p:has(a[href*="whatsapp"] img),
.page-content p:has(a[href*="viber"] img),
.page-content p:has(a[href*="telegram"] img),
.page-content p:has(a[href*="tg://"] img),
.page-content p:has(a[href*="messenger"] img) {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.page-content p a[href*="whatsapp"]:has(img),
.page-content p a[href*="viber"]:has(img),
.page-content p a[href*="telegram"]:has(img),
.page-content p a[href*="tg://"]:has(img),
.page-content p a[href*="messenger"]:has(img),
.page-content p a[href*="facebook"]:has(img) {
    text-decoration: none !important;
}

.page-content p a[href*="whatsapp"] img,
.page-content p a[href*="viber"] img,
.page-content p a[href*="telegram"] img,
.page-content p a[href*="tg://"] img,
.page-content p a[href*="messenger"] img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    padding: 10px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 2px solid transparent !important;
    margin: 0 !important;
    object-fit: contain !important;
    display: block !important;
}

.page-content p a[href*="whatsapp"]:hover img {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(37, 211, 102, 0.3);
}

.page-content p a[href*="viber"]:hover img {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(124, 79, 190, 0.4);
    background: linear-gradient(135deg, rgba(124, 79, 190, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(124, 79, 190, 0.3);
}

.page-content p a[href*="telegram"]:hover img,
.page-content p a[href*="tg://"]:hover img {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 150, 190, 0.4);
    background: linear-gradient(135deg, rgba(37, 150, 190, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(37, 150, 190, 0.3);
}

.page-content p a[href*="messenger"]:hover img,
.page-content p a[href*="facebook"]:hover img {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 132, 255, 0.4);
    background: linear-gradient(135deg, rgba(0, 132, 255, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(0, 132, 255, 0.3);
}

/* Контейнер для контактов */
.page-content p:has(a[href*="mailto"]),
.page-content p:has(a[href*="whatsapp"]):not(:has(img)),
.page-content p:has(a[href*="tel"]) {
    margin: 20px 0;
    line-height: 1.8;
    font-size: 16px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(214, 40, 40, 0.05) 0%, rgba(0, 63, 136, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

/* Плавная прокрутка */
* {
    scroll-behavior: smooth;
}

/* Анимации появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.benefit,
.stat-item {
    animation: fadeIn 0.6s ease-out both;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* ================================
   Карусель изображений
   ================================ */

.image-gallery {
    position: relative;
    max-width: 100%;
    margin: 30px 0;
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.gallery-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%;
    overflow: hidden;
}

.gallery-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text-dark);
}

.gallery-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.gallery-nav:hover {
    background: rgba(214, 40, 40, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-indent: -9999px;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
}

.gallery-indicator:hover {
    background: var(--text-medium);
    transform: scale(1.2);
}

.gallery-indicator.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.3);
}

.gallery-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.page-content > p > img {
    display: inline-block;
}

/* ============================================
   Поиск (модальное окно)
   ============================================ */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: relative;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    margin: 10vh auto;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 56px 30px 30px 30px;
    overflow-y: auto;
    z-index: 10001;
    animation: searchModalSlideIn 0.3s ease-out;
}

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

.search-modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0 12px 0 8px;
    cursor: pointer;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 10002;
}

.search-modal-close:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.search-modal-close svg {
    width: 20px;
    height: 20px;
}

body.search-open {
    overflow: hidden;
}

#search {
    width: 100%;
}

.search-container {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 45px 12px 16px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-medium);
    pointer-events: none;
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-item {
    display: block;
    padding: 16px;
    margin-bottom: 12px;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background-color: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(214, 40, 40, 0.1);
    transform: translateY(-2px);
}

.search-result-title {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.search-result-description {
    color: var(--text-medium);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.search-result-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.search-result-section {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
}

.search-message {
    padding: 20px;
    text-align: center;
    color: var(--text-medium);
}

.search-loading,
.search-error {
    padding: 20px;
    text-align: center;
    color: var(--text-medium);
}

.search-error {
    color: var(--error-color, #d62828);
}

#search mark {
    background-color: var(--accent-color);
    color: var(--text-dark);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Затемнение для мобильного меню */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 280px);
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

body.menu-open .menu-overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

body.menu-open {
    overflow: hidden;
}

/* Мобильная адаптивность - некритические стили */
@media (max-width: 768px) {
    .main-nav a:hover {
        color: var(--header-accent);
        background-color: rgba(255, 255, 255, 0.15);
    }

    .main-nav a:last-child {
        border-bottom: none !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-number {
        font-size: 36px;
    }

    .services-grid,
    .benefits,
    .services-list {
        grid-template-columns: 1fr;
    }

    .service-item {
        flex-direction: column;
        text-align: center;
    }

    .benefit {
        flex-direction: column;
        text-align: center;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table thead th,
    table tbody td {
        padding: 10px 8px;
        font-size: 14px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .gallery-indicator {
        width: 10px;
        height: 10px;
    }

    .gallery-counter {
        font-size: 12px;
        padding: 6px 12px;
    }

    .page-content p:has(a[href*="whatsapp"] img),
    .page-content p:has(a[href*="viber"] img),
    .page-content p:has(a[href*="telegram"] img),
    .page-content p:has(a[href*="tg://"] img),
    .page-content p:has(a[href*="messenger"] img) {
        gap: 10px;
        justify-content: center;
    }

    .page-content p a[href*="whatsapp"] img,
    .page-content p a[href*="viber"] img,
    .page-content p a[href*="telegram"] img,
    .page-content p a[href*="tg://"] img,
    .page-content p a[href*="messenger"] img {
        width: 50px !important;
        height: 50px !important;
        padding: 8px !important;
    }

    .search-modal-content {
        width: 95%;
        margin: 5vh auto;
        max-height: 90vh;
        padding: 52px 20px 20px 20px;
        border-radius: 8px;
    }

    .search-modal-close {
        top: 0;
        right: 0;
        width: 44px;
        height: 44px;
        border-radius: 0 8px 0 4px;
    }
}
