/* ========================================
   УНИФИЦИРОВАННЫЕ СТИЛИ САЙТА РИЭЛТОРА
   ========================================
   1. ПЕРЕМЕННЫЕ
   2. СБРОСЫ
   3. СИСТЕМНЫЕ ЗАГОЛОВКИ
   4. УТИЛИТНЫЕ КЛАССЫ
   5. УНИВЕРСАЛЬНАЯ СЕКЦИЯ
   6. ШАПКА
   7. КНОПКИ
   8. ЕДИНЫЕ СПИСКИ
   9. СЕКЦИЯ "О РИЭЛТОРЕ"
   10. КАРТОЧКИ УСЛУГ
   11. ПРЕИМУЩЕСТВА
   12. ВИДЕО-ПРЕВЬЮ
   13. СТАТЬИ (КАРТОЧКИ)
   14. СЕКЦИЯ КОНСУЛЬТАЦИИ
   15. ФОРМЫ
   16. УВЕДОМЛЕНИЯ
   17. АККОРДЕОН
   18. ФУТЕР
   19. МОДАЛЬНЫЕ ОКНА
   20. КНОПКА НАВЕРХ
   21. БАННЕР COOKIE
   22. СЛАЙДЕР
   23. СИСТЕМА СЕТОК
   24. СТРАНИЦЫ СТАТЕЙ
   25. ПАГИНАЦИЯ
   26. АДАПТИВНОСТЬ (ОБЩАЯ)
======================================== */

/* ----------------------------------------
   1. ПЕРЕМЕННЫЕ
---------------------------------------- */
:root {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-primary: #ffdd2d;
    --color-primary-hover: #f3d012;
    --color-secondary: #333333;
    --color-gray-50: #fafafa;
    --color-gray-100: #f8f9fa;
    --color-gray-200: #e9ecef;
    --color-gray-600: #6c757d;
    --color-gray-700: #495057;
    --color-gray-900: #212529;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.15);

    --border-radius: 24px;
    --border-radius-sm: 16px;
    --border-radius-full: 9999px;

    --gutter: clamp(1rem, 4vw, 3rem);
    --space-xxs: 0.25rem;
    --space-xs: 0.5rem;
    --space-s: 1rem;
    --space-m: 1.5rem;
    --space-l: 2rem;
    --space-xl: 3rem;
    --space-xxl: clamp(2.5rem, 6vw, 5rem);

    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
}

/* ----------------------------------------
   2. СБРОСЫ
---------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text);
    line-height: 1.5;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ----------------------------------------
   3. СИСТЕМНЫЕ ЗАГОЛОВКИ
---------------------------------------- */
.h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; }
.h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
.h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
.h4 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.h5 { font-size: 1.125rem; font-weight: 600; line-height: 1.5; }
.h6 { font-size: 1rem; font-weight: 600; line-height: 1.5; }

/* ----------------------------------------
   4. УТИЛИТНЫЕ КЛАССЫ
---------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-gray-600 { color: var(--color-gray-600); }
.text-white { color: #ffffff; }

.text-normal { font-weight: 400; }
.text-semibold { font-weight: 600; }
.text-bold { font-weight: 700; }

.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }

.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-s); }
.mb-3 { margin-bottom: var(--space-m); }
.mb-4 { margin-bottom: var(--space-l); }
.mb-5 { margin-bottom: var(--space-xl); }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-s); }
.mt-3 { margin-top: var(--space-m); }
.mt-4 { margin-top: var(--space-l); }
.mt-5 { margin-top: var(--space-xl); }

.bg-gray-100 { background: var(--color-gray-100); }
.bg-white { background: var(--color-bg); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.text-decoration-none { text-decoration: none; }

/* ----------------------------------------
   5. УНИВЕРСАЛЬНАЯ СЕКЦИЯ
---------------------------------------- */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
    padding-block: var(--space-xxl);
}

/* ----------------------------------------
   6. ШАПКА
---------------------------------------- */
.header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

.header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    gap: 1rem;
}

.header__logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    grid-column: 1 / 2;
}

.header__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.header__company-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: center;
    grid-column: 2 / 3;
    justify-self: start;
}

.header__company-name {
    font-weight: 600;
    color: var(--color-gray-600);
    font-size: 0.9rem;
}

.header__company-phone {
    font-size: 0.85rem;
    color: var(--color-gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.header__company-phone:hover {
    color: var(--color-primary);
}

.header__nav {
    grid-column: 3 / 4;
    justify-self: stretch;
}

.header__menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.header__menu a {
    text-decoration: none;
    color: var(--color-gray-600);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    white-space: nowrap;
}

.header__menu a:hover {
    color: var(--color-secondary);
}

/*.header__menu a.active {*/
/*    color: var(--color-primary);*/
/*    !*text-decoration: underline;*!*/
/*    !*text-underline-offset: 4px;*!*/
/*    font-weight: 600;*/
/*}*/

/* Активная ссылка в любом меню */
.header__menu a.active,
.header__mobile-menu a.active {
    /*color: var(--color-primary);*/
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 2px;
    font-weight: 600;
    color: inherit;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    grid-column: 4 / 5;
    justify-self: end;
}

.header__icon {
    color: var(--color-gray-600);
    font-size: 1.25rem;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-100);
    border-radius: 50%;
    text-decoration: none;
}

.header__icon:hover {
    color: var(--color-primary);
    background: var(--color-gray-200);
    transform: translateY(-2px);
}

.header__burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    justify-content: center;
    grid-column: 5 / 6;
    justify-self: end;
}

.header__burger span {
    width: 24px;
    height: 2px;
    background: var(--color-secondary);
    transition: 0.2s;
    display: block;
}

.header__mobile-nav {
    display: none;
    background: var(--color-bg);
    border-top: 1px solid var(--color-gray-200);
    padding: var(--space-m) var(--gutter);
}

.header__mobile-nav.active {
    display: block;
}

.header__mobile-menu {
    list-style: none;
    text-align: center;
}

.header__mobile-menu li {
    margin-bottom: var(--space-s);
}

.header__mobile-menu a {
    text-decoration: none;
    color: var(--color-gray-600);
    font-size: 1rem;
    font-weight: 500;
    display: block;
    padding: var(--space-xs) 0;
}

.header__mobile-menu a:hover {
    color: var(--color-primary);
}

/* ----------------------------------------
   7. КНОПКИ
---------------------------------------- */
.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: var(--font-size-base);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.btn--primary:hover {
    background: var(--color-primary-hover);
}

.btn--large {
    padding: 1rem 2.5rem;
    font-size: var(--font-size-lg);
}

.btn--full {
    width: 100%;
}

/* ----------------------------------------
   8. ЕДИНЫЕ СПИСКИ
---------------------------------------- */
.list {
    list-style: none;
}

.list li {
    margin-bottom: var(--space-xs);
    padding-left: var(--space-s);
    position: relative;
}

.list li::before {
    content: "\2022";
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.list--lg li {
    margin-bottom: var(--space-s);
    font-size: var(--font-size-lg);
}

/* ----------------------------------------
   9. СЕКЦИЯ "О РИЭЛТОРЕ"
---------------------------------------- */
.about__card {
    background: var(--color-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    overflow: hidden;
}

.about__image {
    float: left;
    width: 33.333%;
    max-width: 300px;
    margin-right: var(--space-xl);
    margin-bottom: var(--space-m);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    aspect-ratio: 1 / 1.2;
}

.about__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.about__photo:hover {
    transform: scale(1.05);
}

.about__contact {
    font-size: var(--font-size-lg);
    background: var(--color-gray-100);
    padding: var(--space-m);
    border-radius: var(--border-radius-sm);
    clear: both;
}

.about__contact a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.about__contact a:hover {
    text-decoration: underline;
}

.about__list {
    list-style: none;
    margin-bottom: var(--space-l);
    padding: 0;
}

.about__list li {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-s);
}

.about__list li::before {
    content: "•";
    font-size: 1.5rem;
    color: var(--color-primary);
    padding-right: 10px;
}

/* ----------------------------------------
   10. КАРТОЧКИ УСЛУГ
---------------------------------------- */
.service-card {
    background: var(--color-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: var(--space-l);
    transition: all 0.2s;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.service-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    margin-bottom: var(--space-m);
}

.service-card__icon {
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--color-secondary);
    flex-shrink: 0;
}

.service-card__icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.service-card__title {
    margin-bottom: 0;
}

.service-card__content p {
    margin-bottom: var(--space-s);
}

.service-card__content p:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------
   11. ПРЕИМУЩЕСТВА
---------------------------------------- */
.benefit-item {
    background: var(--color-bg);
    padding: var(--space-l);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
    text-align: center;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.benefit-item__icon {
    width: 70px;
    height: 70px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--space-m);
    color: var(--color-secondary);
}

.benefit-item__title {
    margin-bottom: var(--space-xs);
}

.benefit-item__description {
    font-size: var(--font-size-base);
}

/* ----------------------------------------
   12. ВИДЕО-ПРЕВЬЮ
---------------------------------------- */
.video-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.video-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary);
    font-size: 1.25rem;
    opacity: 0.9;
    transition: all 0.2s;
}

.video-thumbnail:hover .video-thumbnail__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* ----------------------------------------
   13. СТАТЬИ (КАРТОЧКИ)
---------------------------------------- */
.article-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.article-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-card__image img {
    transform: scale(1.05);
}

.article-card__title {
    margin: var(--space-m) var(--space-m) var(--space-xs);
    transition: color 0.2s;
}

.article-card:hover .article-card__title {
    color: var(--color-primary);
}

.article-card__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 var(--space-m) var(--space-m);
    color: var(--color-primary);
    font-weight: 500;
    transition: gap 0.2s;
}

.article-card__link span {
    color: var(--color-gray-600);
    transition: color 0.2s;
    font-size: var(--font-size-sm);
}

.article-card:hover .article-card__link {
    gap: 0.75rem;
}

.article-card:hover .article-card__link span {
    color: var(--color-primary);
}

.article-card__link i {
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.article-card:hover .article-card__link i {
    transform: translateX(3px);
}

/* ----------------------------------------
   14. СЕКЦИЯ КОНСУЛЬТАЦИИ
---------------------------------------- */
.consultation__grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    background: var(--color-bg);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.consultation__contacts {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
}

.contact-item {
    display: flex;
    gap: var(--space-m);
    align-items: flex-start;
    padding: var(--space-s);
    background: var(--color-gray-100);
    border-radius: var(--border-radius-sm);
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.contact-item:hover {
    transform: translateX(5px);
    background: var(--color-gray-200);
}

.contact-item__icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-secondary);
    flex-shrink: 0;
}

.contact-item__text {
    display: flex;
    flex-direction: column;
}

.contact-item__label {
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
    margin-bottom: 4px;
}

.contact-item__value {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-secondary);
}

.contact-item:hover .contact-item__value {
    color: var(--color-primary);
}

.consultation__form {
    background: var(--color-gray-100);
    padding: var(--space-l);
    border-radius: var(--border-radius-sm);
}

/* ----------------------------------------
   15. ФОРМЫ
---------------------------------------- */
.form-group {
    margin-bottom: var(--space-m);
}

.form-group input[type="text"],
.form-group input[type="tel"] {
    width: 100%;
    padding: var(--space-m);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-base);
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group input.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.form-group--checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.form-group--checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-group--checkbox label {
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
    cursor: pointer;
}

.form-group--checkbox a {
    color: var(--color-primary);
    text-decoration: none;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

/* ----------------------------------------
   16. УВЕДОМЛЕНИЯ
---------------------------------------- */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius-full);
    text-align: center;
    font-weight: 500;
    margin-bottom: var(--space-m);
}

.alert--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert--info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* ----------------------------------------
   17. АККОРДЕОН
---------------------------------------- */
.seo-accordion {
    margin: var(--space-xl) 0;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--color-gray-200);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: var(--space-m) var(--space-l);
    background: var(--color-white);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--color-secondary);
    transition: background 0.2s;
    font-size: 1.25rem;
    text-align: left;
    gap: 10px;
}

.accordion-header:hover {
    background: var(--color-gray-100);
}

.accordion-header i {
    transition: transform 0.3s;
    color: var(--color-gray-600);
}

.accordion-header.active i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--color-gray-50);
}

.accordion-content.active {
    max-height: 2000px;
}

.accordion-content p {
    padding: 0 var(--space-l);
    margin: var(--space-s) 0 0 0;
    color: var(--color-text);
}

.accordion-content p:first-of-type {
    margin-top: var(--space-s);
}

.accordion-content p:last-of-type {
    margin-bottom: var(--space-s);
}

.accordion-content .list {
    padding: 0 var(--space-l);
    margin: var(--space-s) 0;
}

.accordion-content .list li {
    color: var(--color-text);
}

/* ----------------------------------------
   18. ФУТЕР
---------------------------------------- */
.footer {
    background: var(--color-secondary);
    color: white;
    padding: var(--space-xxl) 0 var(--space-xl);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.footer__col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer__spacer {
    height: 0.5rem;
}

.footer__social {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer__social-link {
    color: white;
    font-size: 2.25rem;
    transition: all 0.2s;
    line-height: 1;
}

.footer__social-link:hover {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.footer__phone {
    text-decoration: none;
    color: white;
    display: inline-block;
}

.footer__phone:hover {
    color: var(--color-primary);
}

.footer .h3 {
    margin-bottom: 0;
}

/* ----------------------------------------
   19. МОДАЛЬНЫЕ ОКНА
---------------------------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: block;
    opacity: 1;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    backdrop-filter: blur(4px);
    font-weight: bold;
}

.modal__close:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
    transform: rotate(90deg);
}

.modal--video .modal__content {
    max-width: 500px;
    width: 90%;
    background: transparent;
    box-shadow: none;
}

.modal__video {
    width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: var(--border-radius);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.modal--callback .modal__content {
    max-width: 500px;
    width: 90%;
    background: var(--color-white);
}

.modal--callback .modal__form-container {
    padding: var(--space-xl);
}

/* ----------------------------------------
   20. КНОПКА НАВЕРХ
---------------------------------------- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 101;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--color-primary-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ----------------------------------------
   21. БАННЕР COOKIE
---------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    z-index: 9999;
    text-align: center;
    display: none;
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-banner p {
    margin: 0;
    font-size: var(--font-size-sm);
}

.cookie-banner__buttons {
    display: flex;
    gap: 10px;
}

.cookie-banner__button {
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: var(--font-size-sm);
}

.cookie-banner__button--accept {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.cookie-banner__button--accept:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
}

.cookie-banner__button--decline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-banner__button--decline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-banner a {
    color: var(--color-primary);
    text-decoration: none;
}

/* ----------------------------------------
   22. СЛАЙДЕР
---------------------------------------- */
.slider-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 50px;
    overflow: hidden;
    --visible: 4;
    --gap: 20px;
}

.slider__track {
    overflow: hidden;
    width: 100%;
}

.slider__row {
    display: flex;
    flex-direction: row;
    gap: var(--gap);
    transition: transform 0.3s ease;
    width: 100%;
    flex-wrap: nowrap;
}

.slider__item {
    flex: 0 0 calc((100% - (var(--gap) * (var(--visible) - 1))) / var(--visible));
    padding: 5px;
    box-sizing: border-box;
}

.slider__item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.slider__item:hover img {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: var(--color-bg);
    box-shadow: var(--shadow-md);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-secondary);
    transition: all 0.2s;
    z-index: 10;
}

.slider__arrow:hover:not(:disabled) {
    background: var(--color-primary);
    color: var(--color-secondary);
    transform: translateY(-50%) scale(1.1);
}

.slider__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider__arrow--prev {
    left: 0;
}

.slider__arrow--next {
    right: 0;
}

.slider__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: var(--space-l);
}

.slider__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-gray-200);
    cursor: pointer;
    transition: all 0.2s;
}

.slider__dot:hover {
    background: var(--color-gray-600);
}

.slider__dot.active {
    background: var(--color-primary);
    transform: scale(1.2);
}

/* Слайдер для статей */
.article-gallery .slider-container {
    --visible: 1 !important;
    margin: 0 auto;
    padding: 0 50px;
}

.article-gallery .slider__item {
    flex: 0 0 100%;
    padding: 0;
}

.article-gallery .slider__row {
    gap: 0;
    justify-content: flex-start;
}

.article-gallery[data-single="true"] .slider-container {
    padding-left: 0;
    padding-right: 0;
}

.article-gallery .slider__item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ----------------------------------------
   23. СИСТЕМА СЕТОК
---------------------------------------- */
.grid {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: 1fr;
}

.flex {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-l);
}

.flex > * {
    width: 100%;
}

@media (max-width: 575px) {
    .grid-xs-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .flex-xs-2 > * {
        width: calc((100% - var(--space-l)) / 2);
    }
}

@media (min-width: 576px) {
    .grid-sm-1 { grid-template-columns: repeat(1, 1fr); }
    .grid-sm-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-sm-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-sm-4 { grid-template-columns: repeat(4, 1fr); }

    .flex-sm-1 > * { width: 100%; }
    .flex-sm-2 > * { width: calc((100% - var(--space-l)) / 2); }
    .flex-sm-3 > * { width: calc((100% - (2 * var(--space-l))) / 3); }
    .flex-sm-4 > * { width: calc((100% - (3 * var(--space-l))) / 4); }
}

@media (min-width: 768px) {
    .grid-md-1 { grid-template-columns: repeat(1, 1fr); }
    .grid-md-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-md-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-md-4 { grid-template-columns: repeat(4, 1fr); }

    .flex-md-1 > * { width: 100%; }
    .flex-md-2 > * { width: calc((100% - var(--space-l)) / 2); }
    .flex-md-3 > * { width: calc((100% - (2 * var(--space-l))) / 3); }
    .flex-md-4 > * { width: calc((100% - (3 * var(--space-l))) / 4); }
}

@media (min-width: 992px) {
    .grid-lg-1 { grid-template-columns: repeat(1, 1fr); }
    .grid-lg-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-lg-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-lg-4 { grid-template-columns: repeat(4, 1fr); }

    .flex-lg-1 > * { width: 100%; }
    .flex-lg-2 > * { width: calc((100% - var(--space-l)) / 2); }
    .flex-lg-3 > * { width: calc((100% - (2 * var(--space-l))) / 3); }
    .flex-lg-4 > * { width: calc((100% - (3 * var(--space-l))) / 4); }
}

@media (min-width: 1200px) {
    .grid-xl-1 { grid-template-columns: repeat(1, 1fr); }
    .grid-xl-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-xl-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-xl-4 { grid-template-columns: repeat(4, 1fr); }

    .flex-xl-1 > * { width: 100%; }
    .flex-xl-2 > * { width: calc((100% - var(--space-l)) / 2); }
    .flex-xl-3 > * { width: calc((100% - (2 * var(--space-l))) / 3); }
    .flex-xl-4 > * { width: calc((100% - (3 * var(--space-l))) / 4); }
}

.flex-stretch-last > *:last-child {
    width: 100% !important;
    margin-top: var(--space-l);
}

.flex-center {
    justify-content: center;
}

.flex-start {
    justify-content: flex-start;
}

.flex-end {
    justify-content: flex-end;
}

.flex-align-center {
    align-items: center;
}

/* ----------------------------------------
   24. СТРАНИЦЫ СТАТЕЙ
---------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: 2.1fr 0.9fr;
    gap: var(--space-xl);
    align-items: flex-start;
}

.blog-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-block {
    margin-bottom: var(--space-xl);
}

.sidebar-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-m);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--color-primary);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: var(--space-xs);
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-gray-200);
    transition: color 0.2s;
}

.category-list a:hover {
    color: var(--color-primary);
}

.category-list .active {
    color: var(--color-primary);
    font-weight: 600;
}

.category-count {
    color: var(--color-gray-600);
    font-size: var(--font-size-sm);
}

.recent-posts {
    list-style: none;
}

.recent-posts li {
    margin-bottom: var(--space-s);
}

.recent-post-link {
    display: block;
    text-decoration: none;
    color: var(--color-text);
}

.recent-post-title {
    font-weight: 600;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.recent-post-link:hover .recent-post-title {
    color: var(--color-primary);
}

.recent-post-date {
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
}

.article-content h2 {
    margin-bottom: var(--space-s);
}

.article-content h3 {
    margin-bottom: var(--space-s);
}

.article-content p {
    margin-bottom: var(--space-s);
}

.article-content p:last-child {
    margin-bottom: 0;
}

.article-content .list {
    margin: 0 0 var(--space-s) 0;
}

.article-content .list:last-child {
    margin-bottom: 0;
}

.blog-grid.section {
    padding-top: var(--space-l);
}

/* ----------------------------------------
   25. ПАГИНАЦИЯ
---------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-s);
    flex-wrap: wrap;
}

.pagination__page,
.pagination__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-xs);
    border-radius: var(--border-radius-full);
    text-decoration: none;
    font-weight: 500;
}

.pagination__page {
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    transition: all 0.2s;
}

.pagination__page:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.pagination__current {
    background: var(--color-primary);
    color: var(--color-secondary);
    cursor: default;
}

.pagination__prev,
.pagination__next {
    text-decoration: none;
    padding: var(--space-xs) var(--space-m);
    border-radius: var(--border-radius-full);
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    transition: all 0.2s;
}

.pagination__prev:hover,
.pagination__next:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
}

/* ----------------------------------------
   26. АДАПТИВНОСТЬ (ОБЩАЯ)
---------------------------------------- */
@media (max-width: 1199px) {
    .slider-container {
        --visible: 3;
    }
}

@media (max-width: 992px) {
    .header__container {
        grid-template-columns: auto 1fr auto auto;
    }
    .header__company-info {
        grid-column: 2 / 3;
        justify-self: stretch;
        text-align: center;
    }
    .header__nav {
        display: none;
    }
    .header__actions {
        grid-column: 3 / 4;
    }
    .header__burger {
        display: flex;
        grid-column: 4 / 5;
    }
    .consultation__grid {
        grid-template-columns: 1fr;
    }
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .slider-container {
        --visible: 2;
    }
}

@media (max-width: 768px) {
    .about__card {
        display: flex;
        flex-direction: column;
        padding: var(--space-m);
    }
    .about__image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-right: 0;
    }
    .about__title {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .benefit-item {
        display: flex;
        flex-wrap: wrap;
        text-align: left;
        padding: var(--space-m);
    }
    .benefit-item__icon {
        width: 50px;
        height: 50px;
        margin: 0 var(--space-m) 0 0;
        flex-shrink: 0;
        font-size: 1.5rem;
    }
    .benefit-item__icon img,
    .benefit-item__icon svg {
        width: 36px;
        height: 36px;
    }
    .benefit-item__title {
        flex: 1;
        margin: 0;
        align-self: center;
    }
    .benefit-item__description {
        width: 100%;
        margin-top: var(--space-xs);
        padding-left: calc(50px + var(--space-m));
    }
    .slider-container {
        --visible: 1;
        padding: 0 40px;
    }
    .consultation__grid {
        padding-inline: 16px;
    }
    .consultation__form {
        padding-inline: 8px;
    }
    .footer__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .slider-container {
        --visible: 1;
        padding: 0 40px;
    }
}