html, body {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    scroll-behavior: smooth; /* Плавная прокрутка для всего сайта */
}

/* Оптимизация изображений: предотвращение layout shift */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Сохранение пропорций для изображений с width/height атрибутами */
img[width][height] {
    width: auto;
    height: auto;
}

/* =============================================== */
/*  Прогресс-бар прокрутки  */
/* =============================================== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-progress-bar.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 50%, #004085 100%);
    transition: width 0.1s ease-out;
    position: relative;
    overflow: hidden;
}

.scroll-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Темная тема для прогресс-бара */
@media (prefers-color-scheme: dark) {
    .scroll-progress-bar {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .scroll-progress-fill {
        background: linear-gradient(90deg, #0d6efd 0%, #0b5ed7 50%, #0a58ca 100%);
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .scroll-progress-bar {
        height: 3px;
    }
}

.main-content {
    min-height: 50vh; /* Чтобы было видно секцию, временно */
    background-color: #fff;
    padding: 40px 20px;
}

/* =============================================== */
/*  Форсированное исправление для калькулятора на ПК  */
/* =============================================== */
@media (min-width: 768px) {
    .calculator-container {
        display: flex;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
    }
}

.main-vertical-wrapper {
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 768px) {
    .main-vertical-wrapper {
        width: 100vw;
        min-width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
}

/* Отступ для секции "Кейсы работ" перед подвалом */
.cases-section {
    margin-bottom: 40px;
}

/* Кнопка "вверх" (scroll-to-top) */
.scroll-to-top {
    position: fixed;
    right: 24px;
    bottom: 32px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 50%;
    padding: 0;
}
.scroll-to-top--visible {
    opacity: 1;
    pointer-events: auto;
}
.scroll-to-top svg {
    display: block;
    width: 100%;
    height: 100%;
}
.scroll-to-top:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* =============================================== */
/*  Якорное меню для FAQ  */
/* =============================================== */
.faq-anchor-menu {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.anchor-menu-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
    text-align: center;
}

.anchor-menu-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.anchor-menu-link {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    color: #007bff;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid #007bff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.anchor-menu-link:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.anchor-menu-link:active {
    transform: translateY(0);
}

.anchor-menu-link.active {
    background: #007bff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .faq-anchor-menu {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .anchor-menu-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .anchor-menu-list {
        gap: 8px;
    }
    
    .anchor-menu-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

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

/* Подсветка активного якоря */
.faq-item:target {
    animation: highlight 2s ease-out;
}

@keyframes highlight {
    0% { background-color: rgba(0,123,255,0.1); }
    100% { background-color: transparent; }
}

/* =============================================== */
/*  Блокировка скролла при модальных окнах  */
/* =============================================== */

/* Блокировка скролла при открытом модальном окне */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Альтернативный способ блокировки для лучшей совместимости */
body.modal-open {
    overflow: hidden;
    padding-right: 15px; /* Компенсация исчезновения скроллбара */
}

/* Сохранение позиции скролла */
body.modal-open {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Предотвращение прокрутки на мобильных устройствах */
body.modal-open {
    -webkit-overflow-scrolling: auto;
    touch-action: none;
}

/* =============================================== */
/*  Мини-навигация по странице (боковая панель)  */
/* =============================================== */
body:not(.home-page) .page-navigation { display: none !important; }

.page-navigation {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-navigation.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-dot:hover {
    background: rgba(0, 123, 255, 0.6);
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.nav-dot.active {
    background: #007bff;
    border-color: #fff;
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.4);
}

.nav-dot::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.nav-dot::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-dot:hover::before,
.nav-dot:hover::after {
    opacity: 1;
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .nav-dot {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(0, 0, 0, 0.8);
    }
    
    .nav-dot:hover {
        background: rgba(13, 110, 253, 0.6);
    }
    
    .nav-dot.active {
        background: #0d6efd;
    }
}

/* Показываем только на ПК и планшетах */
@media (max-width: 768px) {
    .page-navigation {
        display: none;
    }
}

/* =============================================== */
/*  Микроинтеракции и подсказки  */
/* =============================================== */

/* Hover-эффекты для кнопок */
button,
.btn,
input[type="submit"],
input[type="button"],
a.btn {
    transition: all 0.2s ease;
    transform: translateZ(0); /* Включаем аппаратное ускорение */
}

button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.btn:hover {
    transform: scale(1.03) translateZ(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active,
.btn:active,
input[type="submit"]:active,
input[type="button"]:active,
a.btn:active {
    transform: scale(0.98) translateZ(0);
    transition: all 0.1s ease;
}

/* Подсветка инпутов при фокусе */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
    transform: translateY(-1px);
}

/* Анимации иконок */
.icon,
[class*="icon"],
svg,
i {
    transition: all 0.2s ease;
}

.icon:hover,
[class*="icon"]:hover,
svg:hover,
i:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Специальные эффекты для социальных иконок */
.social-icon:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Эффекты для карточек и блоков */
.card,
.service-card,
.case-card,
.review-card {
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.card:hover,
.service-card:hover,
.case-card:hover,
.review-card:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Анимации для ссылок */
a:not(.btn) {
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:not(.btn):hover {
    color: #007bff;
    text-decoration: underline;
}

/* Отключаем подчёркивание ссылок внутри карточек услуг/блоков */
.price-card a,
.price-card a:hover,
.service-card a,
.service-card a:hover,
.card a,
.card a:hover,
.case-card a,
.case-card a:hover,
.dry-cleaning-card a,
.dry-cleaning-card a:hover,
.rate-card a,
.rate-card a:hover {
    text-decoration: none !important;
}

/* Эффекты для навигации */
.nav-link,
.menu-item {
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover,
.menu-item:hover {
    color: #007bff;
}

.nav-link::after,
.menu-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: width 0.2s ease;
}

.nav-link:hover::after,
.menu-item:hover::after {
    width: 100%;
}

/* Эффекты для кнопок заказа */
.order-btn,
.calculate-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-btn::before,
.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.order-btn:hover::before,
.calculate-btn:hover::before {
    left: 100%;
}

/* Эффекты для модальных окон */
.modal,
.modal-overlay {
    transition: all 0.3s ease;
}

.modal.active,
.modal-overlay.active {
    animation: modalFadeIn 0.3s ease;
}

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

/* Эффекты для FAQ аккордеона */
.faq-question {
    transition: all 0.2s ease;
}

.faq-question:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateX(5px);
}

/* Эффекты для слайдера */
.swiper-slide {
    transition: all 0.3s ease;
}

.swiper-slide:hover {
    transform: scale(1.02);
}

/* Эффекты для кнопки "Наверх" */
.scroll-to-top {
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Эффекты для мини-навигации */
.nav-dot {
    transition: all 0.3s ease;
}

.nav-dot:hover {
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Эффекты для прогресс-бара */
.scroll-progress-fill {
    transition: width 0.1s ease;
}

/* Эффекты для форм */
.form-group {
    transition: all 0.2s ease;
}

.form-group:focus-within {
    transform: translateY(-2px);
}

/* Эффекты для логотипа */
.logo {
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
} 

/* =============================================== */
/*  About/О нас — шахматная раскладка              */
/* =============================================== */
.testimonial-section .about-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.testimonial-section .about-row {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    align-items: center;
    gap: 24px;
}
.testimonial-section .about-row-2 {
    grid-template-columns: 0.7fr 1.3fr;
}
.testimonial-section .about-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    position: relative;
}
.testimonial-section .about-photo {
    width: 320px;
    max-width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}
.testimonial-section .about-logo {
    width: 160px;
    max-width: 100%;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.15));
}
@media (max-width: 992px) {
    .testimonial-section .about-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .testimonial-section .about-photo,
    .testimonial-section .about-logo {
        margin: 0 auto;
    }
    .testimonial-section .about-media { display: none; }
    .testimonial-section .about-row-2 { display: none; }
}

/* Collapsible for about text */
.about-card .about-collapsible { max-height: 2000px; transition: max-height .25s ease; }
.about-card.collapsed .about-collapsible { max-height: 140px; overflow: hidden; }
.about-card.collapsed::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 56px;
    height: 48px;
    background: linear-gradient(180deg, rgba(248,249,250,0), #eef2f7);
    pointer-events: none;
}
.about-toggle {
    display: inline-block;
    margin-top: 12px;
    background: transparent;
    border: 1px solid #d0d7de;
    color: #495057;
    font-weight: 600;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all .2s ease;
}
.about-toggle:hover { border-color: #667eea; color: #667eea; }

/* На версии ПК текст в блоке "О нас" всегда развёрнут, без сворачивания */
@media (min-width: 992px) {
    .about-card.collapsed .about-collapsible {
        max-height: none !important;
        overflow: visible !important;
    }
    .about-card.collapsed::after {
        display: none !important;
    }
    .about-toggle {
        display: none !important;
    }
}

/* =============================================== */
/*  SEO-блок: Что входит в список наших услуг      */
/* =============================================== */
.services-seo {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    padding: 24px;
    margin: 12px auto 28px auto;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}
.services-seo h3 {
    margin: 0 0 12px 0;
    font-size: 1.35rem;
    line-height: 1.3;
    color: #2c3e50;
}
.services-seo p {
    margin: 0 0 12px 0;
    color: #5c6670;
}
.services-seo .services-seo-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 12px 0;
    columns: 2;
    column-gap: 28px;
}
.services-seo .services-seo-list li {
    position: relative;
    padding-left: 20px;
    margin: 6px 0;
    color: #414b56;
    break-inside: avoid;
}
.services-seo .services-seo-list li::before {
    content: '\2713'; /* checkmark */
    position: absolute;
    left: 0;
    top: 0;
    color: #22c55e;
    font-weight: 700;
}
@media (max-width: 768px) {
    .services-seo { padding: 18px; border-radius: 12px; }
    .services-seo h3 { font-size: 1.15rem; margin-bottom: 10px; }
    .services-seo .services-seo-list { columns: 1; }
}

/* =============================================== */
/*  SEO-блок: Как рассчитать стоимость              */
/* =============================================== */
.seo-calc .calc-card {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.seo-calc .calc-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 16px 0;
    columns: 2;
    column-gap: 28px;
}
.seo-calc .calc-list li {
    position: relative;
    padding-left: 20px;
    margin: 6px 0;
    color: #414b56;
    break-inside: avoid;
}
.seo-calc .calc-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: #667eea;
    font-weight: 700;
}
.seo-calc .calc-cta-wrap {
    text-align: center;
    margin-top: 12px;
}
@media (max-width: 768px) {
    .seo-calc .calc-card { padding: 18px; border-radius: 12px; }
    .seo-calc .calc-list { columns: 1; }
}

/* =============================================== */
/*  SEO-блок: Химчистка и Почасовая работа         */
/* =============================================== */
.seo-dry-clean .dry-card,
.seo-hourly .hourly-card {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.seo-dry-clean .calc-cta-wrap,
.seo-hourly .calc-cta-wrap {
    text-align: center;
    margin-top: 12px;
}

.seo-hourly .hourly-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 12px 0;
    columns: 2;
    column-gap: 28px;
}
.seo-hourly .hourly-list li {
    position: relative;
    padding-left: 20px;
    margin: 6px 0;
    color: #414b56;
    break-inside: avoid;
}
.seo-hourly .hourly-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 0;
    color: #22c55e;
    font-weight: 700;
}

@media (max-width: 768px) {
    .seo-dry-clean .dry-card, .seo-hourly .hourly-card { padding: 18px; border-radius: 12px; }
    .seo-hourly .hourly-list { columns: 1; }
}