/* style.css */
:root {
    --toyota-red: #EB0A1E;
    --dark: #1a1a1a;
    --gray: #f5f5f5;
    --white: #ffffff;
    --text: #333333;
    --border: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== ХЕДЕР ===== */
.header {
    background: var(--dark);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo span.domain {
    color: var(--toyota-red);
    margin-left: -8px;
    padding-left: 0;
}

.logo i {
    font-size: 1.3em;
    color: var(--toyota-red);
}

/* Навигация (десктоп) */
.nav-wrapper {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s;
    white-space: nowrap;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--toyota-red);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-phone {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    white-space: nowrap;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.header-phone:hover {
    color: var(--toyota-red);
}

.header-phone i {
    color: var(--toyota-red);
}

.mobile-nav-phone {
    display: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
}

/* ===== ГЕРОЙ-СЕКЦИЯ ===== */
.hero {
    background: linear-gradient(135deg, #111 0%, #1a1a2e 50%, #111 100%);
    color: var(--white);
    padding: 60px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path d="M100 20 L120 80 L180 80 L130 110 L150 170 L100 140 L50 170 L70 110 L20 80 L80 80 Z" fill="none" stroke="rgba(235,10,30,0.08)" stroke-width="1"/></svg>') repeat;
    background-size: 100px 100px;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 2.8em);
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero h1 .red {
    color: var(--toyota-red);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2em);
    color: #bbb;
    max-width: 700px;
    margin: 0 auto 35px;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    padding: 10px 18px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.95em;
}

.hero-feature i {
    color: var(--toyota-red);
    font-size: 1.2em;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
    min-height: 50px;
}

.btn-red {
    background: var(--toyota-red);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(235,10,30,0.4);
}

.btn-red:hover {
    background: #c7081a;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(235,10,30,0.6);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
}

/* ===== ОБЩИЕ СЕКЦИИ ===== */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.2em);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
    padding: 0 10px;
}

.section-subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 40px;
    font-size: clamp(0.95rem, 1.5vw, 1.1em);
    padding: 0 10px;
}

/* ===== МОДЕЛИ ===== */
/* Стили для карточек моделей с фоновым изображением */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.model-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    min-height: 320px; /* Сделали карточку чуть выше для удобного размещения */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Растягивает контент вверх и вниз */
    padding: 25px;
}

/* Если нужно настроить конкретную карточку прямо в HTML, 
   можно переопределить свойства прямо в атрибуте style, например:
   style="background-image: url(...); background-size: 110%; background-position: center 30%;" */

/* Темная полупрозрачная подложка поверх фото для идеальной читаемости текста */
/* Темная подложка */
.model-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}

/* Верхний блок: Название строго по центру */
.model-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.model-header-content .model-icon {
    font-size: 28px;
    color: #e60012;
    margin-bottom: 8px;
}

.model-header-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff !important; /* Принудительный белый цвет */
    margin: 0;
}

/* Нижний блок: Годы и цена в левом нижнем углу */
.model-footer-content {
    position: relative;
    z-index: 2;
    text-align: left; /* Выравнивание по левому краю */
}

.model-card .model-years {
    display: inline-block;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    backdrop-filter: blur(5px);
    color: #ffffff;
}

.model-card .model-price {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.model-card .model-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Эффект при наведении */
.model-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.model-card:hover .model-bg-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}
/* ===== КАК МЫ РАБОТАЕМ ===== */
.how-section {
    background: var(--gray);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.step-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.step-number {
    width: 45px;
    height: 45px;
    background: var(--toyota-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 auto 15px;
}

.step-card h3 {
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 1.15em;
}

.step-card p {
    color: #666;
    font-size: 0.9em;
}

/* Дистанционная установка */
.remote-install-card {
    background: var(--white);
    border-radius: 16px;
    padding: 35px 30px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.remote-install-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.remote-install-icon {
    width: 55px;
    height: 55px;
    background: rgba(235, 10, 30, 0.1);
    color: var(--toyota-red);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    flex-shrink: 0;
}

.remote-install-card h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.5em);
    color: var(--dark);
    margin-bottom: 5px;
}

.remote-install-card > p {
    color: #666;
    font-size: 1em;
    margin-bottom: 25px;
    line-height: 1.6;
}

.requirements-box {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.requirements-title {
    font-size: 0.85em;
    font-weight: 700;
    color: var(--toyota-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.requirements-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.requirements-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9em;
    color: var(--text);
}

.requirements-list i {
    color: var(--toyota-red);
    font-size: 1.1em;
    width: 18px;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.remote-install-card .btn-red {
    display: flex;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

/* ===== ПОРТФОЛИО И ГАЛЕРЕЯ (НАШИ РАБОТЫ) ===== */
.portfolio-section {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 60px 0;
}

/* Обертка ленты на всю ширину экрана с адаптивными отступами по краям */
.portfolio-slider-wrapper {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Скрыть скроллбар для Firefox */
    -ms-overflow-style: none; /* Скрыть скроллбар для IE/Edge */
    padding: 20px max(20px, calc((100vw - 1200px) / 2));
    scroll-behavior: smooth;
    cursor: default; /* Обычный курсор без свайпов мышкой на ПК */
}

.portfolio-slider-wrapper::-webkit-scrollbar {
    display: none; /* Скрыть скроллбар для Chrome/Safari */
}

/* Трек карточек */
.portfolio-track {
    display: flex;
    gap: 25px; /* Расстояние между карточками */
    width: max-content;
}

/* Карточка портфолио (фиксированная ширина, без размытия и прозрачности) */
.portfolio-card {
    width: 360px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
    filter: none;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Контейнер управления со стрелками — строго по центру страницы */
.portfolio-controls-container {
    display: flex;
    justify-content: center; /* Центрирование по горизонтали */
    width: 100%;
    margin-top: 30px;
}

.portfolio-arrows {
    display: flex;
    gap: 15px;
}

.portfolio-arrow-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.portfolio-arrow-btn:hover {
    background: #e60012; /* Фирменный акцентный цвет */
    color: #ffffff;
    border-color: #e60012;
    transform: scale(1.05);
}

/* Внутренний слайдер фото в карточке */
.portfolio-gallery {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #f0f0f0, #e2e2e2);
    overflow: hidden;
    user-select: none;
}

.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide.active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Заглушка, если картинка не загрузилась или отсутствует */
.slide-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #999;
    font-size: 0.85em;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #eaeaea;
    z-index: 1;
}

.slide-placeholder i {
    font-size: 2em;
    color: #b5b5b5;
}

/* Стрелки внутри карточки */
.card-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
}

.portfolio-gallery:hover .card-arrow {
    opacity: 1;
}

.card-prev { left: 8px; }
.card-next { right: 8px; }

.card-arrow:hover {
    background: var(--toyota-red);
}

/* Точки (пагинация) в карточке */
.gallery-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
}

.gallery-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.3s, transform 0.3s;
}

.gallery-dots .dot.active {
    background: var(--white);
    transform: scale(1.2);
}

/* Счетчики фото (например, 1 / 3) */
.gallery-counter {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 5;
}

.portfolio-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-location {
    color: var(--toyota-red);
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.portfolio-info h3 {
    margin-bottom: 6px;
    color: var(--dark);
    font-size: 1.15em;
}

.portfolio-desc {
    color: #666;
    font-size: 0.88em;
    margin-bottom: 12px;
    flex-grow: 1;
    line-height: 1.5;
}

.portfolio-info .date {
    font-size: 0.8em;
    color: #aaa;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

/* Контейнер управления со стрелками — строго по центру ВСЕГО экрана */
.portfolio-controls-container {
    display: flex;
    justify-content: center; /* Центрируем стрелки горизонтально по центру экрана */
    width: 100%;
    margin-top: 30px;
}

.portfolio-arrows {
    display: flex;
    gap: 15px; /* Расстояние между кнопками */
}

.portfolio-arrow-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.portfolio-arrow-btn:hover {
    background: #e60012; /* Фирменный красный цвет */
    color: #ffffff;
    border-color: #e60012;
    transform: scale(1.05);
}

/* ===== МОДАЛЬНОЕ ОКНО ПРОСМОТРА ФОТО ===== */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content-wrapper {
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.modal-content-wrapper img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.modal-caption {
    color: #ddd;
    margin-top: 12px;
    font-size: 0.95em;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 2.2em;
    cursor: pointer;
    z-index: 2010;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--toyota-red);
}

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    z-index: 2010;
    transition: background 0.3s, transform 0.2s;
}

.modal-arrow:hover {
    background: var(--toyota-red);
    transform: translateY(-50%) scale(1.05);
}

.modal-prev { left: 25px; }
.modal-next { right: 25px; }


/* ===== КОНТАКТЫ И МЕССЕНДЖЕРЫ ===== */
.contact-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
    color: var(--white);
}

.contact-section .section-title {
    color: var(--white);
}

.contact-section .section-subtitle {
    color: #aaa;
}

.contact-center-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.messengers-block-centered {
    background: #2a2a2a;
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #383838;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.messengers-block-centered h3 {
    margin-bottom: 20px;
    font-size: 1.35em;
    color: var(--white);
}

.messenger-buttons-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-telegram,
.btn-whatsapp,
.btn-max {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
    flex: 1;
    min-width: 140px;
}

.btn-telegram {
    background: #0088cc;
    color: white;
}

.btn-telegram:hover {
    background: #006ea0;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1ea851;
}

.btn-max {
    background: #4a5568;
    color: white;
}

.btn-max:hover {
    background: #374151;
}

.messengers-block-centered p {
    margin-top: 12px;
    color: #aaa;
    font-size: 0.9em;
}

.messengers-block-centered .phone-large {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--white);
    display: inline-block;
    margin-top: 6px;
    text-decoration: none;
    transition: color 0.3s;
}

.messengers-block-centered .phone-large:hover {
    color: var(--toyota-red);
}

/* ===== ПЛАВАЮЩИЕ КНОПКИ МЕССЕНДЖЕРОВ ===== */
.floating-messengers {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    text-decoration: none;
}

.floating-btn.telegram { background: #0088cc; }
.floating-btn.whatsapp { background: #25D366; }
.floating-btn.max { background: #4a5568; }

.floating-btn:hover {
    transform: scale(1.1);
}

/* ===== ФУТЕР ===== */
.footer {
    background: #111;
    color: #888;
    text-align: center;
    padding: 25px 0;
    font-size: 0.85em;
}

.footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer .footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer .footer-links a:hover {
    color: var(--toyota-red);
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И ТЕЛЕФОНОВ ===== */
@media (max-width: 950px) {
    .header .container {
        position: relative;
        padding-left: 20px;
        padding-right: 20px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        background: transparent;
        border: none;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }

    .header-phone {
        display: none;
    }

    .mobile-nav-phone {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: var(--white);
        background: rgba(235, 10, 30, 0.15);
        border: 1px solid var(--toyota-red);
        padding: 12px 15px;
        border-radius: 10px;
        font-weight: 600;
        margin-top: 10px;
        width: 100%;
        text-align: center;
        text-decoration: none;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 18px);
        right: 20px;
        width: 260px;
        max-width: calc(100vw - 40px);
        background: var(--dark);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: -5px 10px 20px rgba(0,0,0,0.4);
        border: 1px solid #333;
        border-radius: 12px;
        gap: 15px;
        z-index: 1000;
        box-sizing: border-box;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a.nav-item {
        font-size: 1.1em;
        width: 100%;
    }
    
    .nav-links li {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 10px 0;
    }
    
    .logo {
        font-size: 1.15em;
        max-width: calc(100% - 50px);
    }

    .logo span.domain {
        margin-left: -8px;
    }

    .menu-toggle {
        right: 15px;
    }

    .nav-links {
        right: 15px;
        max-width: calc(100vw - 30px);
    }
    
    .hero {
        padding: 40px 0 50px;
    }

    .hero-features {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        max-width: 280px;
        margin: 0 auto 30px;
    }

    .hero-feature {
        justify-content: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
    }
    
    .btn {
        width: 100%;
    }
    
    .section {
        padding: 45px 0;
    }

    .remote-install-card {
        padding: 20px 15px;
        margin-top: 25px;
        border-radius: 12px;
    }

    .remote-install-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .requirements-list {
        grid-template-columns: 1fr;
    }

    .messengers-block-centered {
        padding: 25px 15px;
    }

    .messenger-buttons-row {
        flex-direction: column;
    }

    .btn-telegram,
    .btn-whatsapp,
    .btn-max {
        width: 100%;
        min-width: unset;
    }

    .floating-messengers {
        bottom: 15px;
        right: 15px;
    }

    .floating-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2em;
    }

    /* На мобилках всегда показываем стрелки внутри карточек для удобства тача */
    .card-arrow {
        opacity: 0.8;
        width: 28px;
        height: 28px;
        font-size: 0.75em;
    }

    .portfolio-controls-container {
        display: none;
    }

    .modal-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.1em;
    }
    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
}