:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --border-color: #000000;
    --shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
    --shadow-hover: 4px 4px 0px rgba(0, 0, 0, 0.25);
    --radius: 14px;
    --container-width: 75vw;
}

#page-content {
    opacity: 0;
    transition: opacity 0.5s ease;
}
#page-content.visible {
    opacity: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg-color); color: var(--text-color); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* Большие кнопки */
.btn-large {
    padding: 15px 40px;
    font-size: 16px;
}

/* Навигация */
.navbar {
    border-bottom: 1px solid var(--border-color);
    padding: 5px 0;
    background: #fff;
    position: sticky; top: 0; z-index: 100;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }

/* Левая часть нав */
.nav-left { display: flex; align-items: center; gap: 15px; justify-content: space-between; }
.nav-logo { height: 50px; width: auto; display: block; }
.nav-title { font-weight: 800; font-size: 24px; letter-spacing: -1px; }

/* Правая часть нав */
.nav-right { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 16px; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 0.6; }
.nav-links a.active { color: #000; font-weight: 700; border-bottom: 2px solid #000;}

/* Дропдаун */
.dropdown { position: relative; cursor: pointer; }
.drop-trigger { font-weight: 500; font-size: 16px; }

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 160px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
    pointer-events: none;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    color: black;
    text-decoration: none;
    transition: background 0.2s;
    border-radius: var(--radius);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: #f5f5f5;
}

/* Показываем при наведении */
.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

/* === Мобильное меню === */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #000;
    border-radius: 2px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Скрыто справа */
    width: 300px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #000;
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.mobile-menu-title {
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav a {
    font-size: 18px;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Показываем гамбургер на мобильных */
@media (max-width: 900px) {
    .desktop-only {
        display: none;
    }
    .mobile-toggle {
        display: flex;
    }
    .nav-right {
        display: none; /* Скрываем старую правую часть на мобильных */
    }
    .container {
        width: 100vw;
        padding: 5px;
    }
}

/* Кнопки */
.btn {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 16px; /* Универсальный размер */
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
}

.btn:hover {
    box-shadow: var(--shadow-hover);
    transform: translate(-2px, -2px);
}
/* Кнопки в навигации */
.btn-nav {
    padding: 10px 20px;
    font-size: 16px;
}

/* Кнопки в карточках */
.btn-card {
    width: 100%;
    margin-top: 15px;
    font-size: 16px;
}
/* Большие кнопки */
.btn-large {
    padding: 15px 40px;
    font-size: 16px;
}

/* Баннер 100vh */
.hero {
    height: 90vh;
    min-height: 600px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100vw;
}
.hero-text h1 { font-size: clamp(24px, 3.5vw, 52px); line-height: 1.1; margin-bottom: 20px; text-transform: uppercase; }
.subtitle { font-size: 20px; color: #333; max-width: 500px; }

/* Визуал баннера */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 550px;      /* максимальная ширина на больших экранах */
    margin: 0 auto;        /* центрирование внутри колонки */
    aspect-ratio: 1 / 1;   /* квадратная пропорция */
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-logo,
.slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1s ease;
}

.intro-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff; /* если лого имеет прозрачные области */
}

.intro-logo img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: invert(100%);
}

.slider-wrapper {
    opacity: 0;
    pointer-events: none;
}

.slider-wrapper.visible {
    opacity: 1;
    pointer-events: all;
}

.slider-frame {
    width: 100%;
    height: 100%;
    position: relative;
    border: 1px solid #000;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    background: #f5f5f5;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
    .hero-visual {
        max-width: 100%;
        margin: 20px auto;
    }
}

/* Анимация слайдов */
.slide-img.active { transform: translateX(0); opacity: 1; z-index: 2; }
.slide-img.next { transform: translateX(100%); opacity: 0; z-index: 1; } /* Справа ждет */
.slide-img.prev { transform: translateX(-100%); opacity: 0; z-index: 1; } /* Уехал влево */

/* Полоски */
.gallery-strips {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    display: flex;
    gap: 10px;
    height: 10px;
}
.strip {
    flex: 1;
    background: #ddd;
    border: 1px solid #000;
    border-radius: 5px;
    cursor: pointer;
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s;
}
.strip.active {
    flex: 4;
    background: #000;
}

/* Секции */
.section { padding: 70px 0; border-bottom: 1px solid #eee; }
.section h2 { font-size: 40px; margin-bottom: 50px; text-transform: uppercase; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Обёртка-ссылка: сбрасываем всё, чтобы не ломала грид */
.card-link {
    display: contents; /* 🔥 Ключевое: элемент «исчезает» для грида, но ссылка работает */
    text-decoration: none;
    color: inherit;
}

/* Стили самой карточки */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    max-width: 90vw;
    background: #fff;
    cursor: pointer;
    transition: 0.3s;
    aspect-ratio: 3/4;
}

.card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hover);
}

.card-img {
    aspect-ratio: 9/7;
    background-color: #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
    border: 1px solid #000;
    flex-shrink: 0;
}

.card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.3em * 2);
}

.card p {
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.3em * 2);
}

.btn-card {
    width: 100%;
    margin-top: auto;
}

/* Адаптив */
@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        justify-items: center; /* Центрируем карточки по горизонтали */
        padding: 0 10px; /* Небольшой отступ по краям */
    }
    
    .card {
        width: calc(100% - 20px);
        margin: 0 auto; /* Центрируем саму карточку */
    }
}

/* Оффер */
/* Сетка для "Мы предлагаем" и "FAQ" */
.offer-grid,
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.offer-image img,
.faq-image img {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    object-fit: cover;
    aspect-ratio: 4/3;
}

#applyweoffer {
    margin-top: 20px;
}

/* FAQ: текст прижат вправо */
.faq-text {
    text-align: right;
}

.faq-item {
    margin-bottom: 25px;
}
.faq-item h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .offer-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }
    .offer-image,
    .faq-image {
        order: -1; /* Фото сверху на мобильных */
    }
    .offer-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* === Секция новостей === */
.news-section {
    padding: 80px 0;
    border-bottom: 1px solid #eee;
}

.news-slider-container {
    position: relative;
    padding: 20px 60px 40px; /* Отступы для стрелок */
    overflow: hidden;
}

.news-slider-container .swiper-slide {
    height: auto;
}

/* Карточка новости */
.news-card {
    height: 100%;
    display: block;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: visible;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.news-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-hover);
}

.news-card-img {
    border-radius: var(--radius);
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #000;
}

.news-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.3em * 2);
}

.news-card-content p {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-height: calc(1.5em * 5);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-top: auto;
}

.news-date {
    color: #777;
}

.news-meta .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Карточка "Смотреть все" */
.see-all-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border: 2px dashed var(--border-color);
    text-align: center;
    cursor: pointer;
}

.see-all-content {
    padding: 20px;
    width: 100%;
}

.see-all-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.see-all-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Стрелки слайдера */
.news-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.news-arrow:hover {
    background: #f5f5f5;
}

.news-arrow.left { left: 10px; }
.news-arrow.right { right: 10px; }

.news-arrow svg {
    width: 20px;
    height: 20px;
    fill: #000;
}

/* Адаптив */
@media (max-width: 768px) {
    .news-slider-container {
        padding: 20px 50px 40px;
    }
    .news-arrow {
        width: 35px;
        height: 35px;
    }
    .news-arrow svg {
        width: 18px;
        height: 18px;
    }
}

/* Footer */
.footer { padding: 60px 0; background: #fafafa; }
.map-placeholder { width: 100%; height: 300px; background: #eee; border: 1px solid #000; margin-top: 20px; border-radius: var(--radius); }

.footer {
    padding: 60px 0 30px;
    background: #fafafa;
    border-top: 1px solid var(--border-color);
}

.footer-brand {
    text-align: center;
    margin-bottom: 20px;
}

.footer-brand strong {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.footer-brand p {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 13px;
}

@media (max-width: 900px) {
    .hero-container { 
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 30px;
    }
    .hero-text h1 { font-size: 36px; }
    .subtitle { margin: 0 auto; }
    .nav-right { display: none; }
    .hero-visual {
        max-width: 80vw;
        margin: 20px auto;
    }
    :root {
        --container-width: 100vw;
    }
    h2, h3, p, li {
        text-align: center;
    }
    .section {
        padding: 30px 0 30px;
    }
    .section h2 {
        margin-bottom: 30px;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}