/* ==========================================================================
 * 1. СБРОС СТИЛЕЙ И БАЗОВЫЕ НАСТРОЙКИ СТРАНИЦЫ
 * ========================================================================== */
* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f4f5f7 0%, #e2e8f0 100%);
    background-attachment: fixed;
    color: #1a202c;
    overflow-x: hidden;
}

/* ==========================================================================
 * 2. ФИКСИРОВАННЫЕ ЭЛЕМЕНТЫ УПРАВЛЕНИЯ И НАВИГАЦИИ (ШАПКА)
 * ========================================================================== */
.site-logo {
    position: fixed;
    top: 25px;
    left: 25px;
    z-index: 1000;
    text-decoration: none;
    display: flex;
    align-items: center;
    user-select: none;
    transition: transform 0.2s ease-in-out;
}
.site-logo:hover {
    transform: scale(1.03);
}
.site-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* Базовый класс для обеих кнопок (возвращаем фиксированные координаты) */
.wiki-button {
    position: fixed;
    top: 25px;
    height: 40px;
    padding: 0 15px;
    background-color: #fff;
    border: 2px solid #111;
    border-radius: 8px;
    color: #111;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    width: auto; /* Запрещаем кнопкам растягиваться на весь экран */
}

/* Правая кнопка: Википедия Harrier */
.wiki-button:not(.lc-button) {
    right: 90px;
}

/* Левая кнопка: Википедия Land Cruiser (сместили ещё левее для идеального зазора) */
.wiki-button.lc-button {
    right: 275px; 
}

.wiki-button:hover {
    background-color: #d71921;
    border-color: #d71921;
    color: #fff;
}

.menu-button {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: none;
    border: none;
}
.menu-button span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: #111;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
    .site-logo { top: 20px; left: 20px; }
    .site-logo img { height: 32px; }
    .wiki-button { display: none !important; } /* Чистим шапку на смартфонах */
    .menu-button { top: 20px; right: 20px; width: 32px; height: 32px; gap: 4px; }
    .menu-button span { height: 3px; }
}
/* ==========================================================================
 * 3. ГЛАВНЫЙ ЭКРАН (HERO SECTION)
 * ========================================================================== */
.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 80px 20px 40px;
}
.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    letter-spacing: -1px;
    font-weight: 800;
}
.hero-content h1.brand-title {
    color: #d71921; /* Фирменный красный Toyota */
}
.hero-content h2 {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 400;
    margin-bottom: 20px;
}

/* ==========================================================================
 * 4. СТИЛИ ВЫПАДАЮЩИХ СПИСКОВ И КНОПКИ GO
 * ========================================================================== */
.select-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 700px;
    margin: 20px auto 0;
    flex-wrap: wrap;
}
.dropdown {
    position: relative;
    flex: 1;
    min-width: 250px;
    background: #fff;
    border: 2px solid #111;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.dropdown-trigger {
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.dropdown-trigger::after {
    content: '▼';
    font-size: 0.65rem;
    color: #777;
    transition: transform 0.2s;
}
.dropdown-menu {
    position: absolute;
    top: 105%;
    left: -2px;
    width: calc(100% + 4px);
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    border: 2px solid #111;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    z-index: 10;
    display: none;
}
.dropdown.active .dropdown-menu { display: block !important; }
.dropdown.active .dropdown-trigger::after { transform: rotate(180deg); }
.dropdown.disabled { opacity: 0.4; pointer-events: none; }
.dropdown-item {
    display: block;
    padding: 11px 20px;
    color: #111;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
    transition: background 0.15s;
}
.dropdown-item:hover { background-color: #d71921; color: #fff; }
.placeholder-text { display: block; padding: 20px; color: #888; font-size: 0.9rem; text-align: center; }

.btn-go {
    padding: 14px 35px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background-color: #111;
    border: 2px solid #111;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    min-width: 120px;
}
.btn-go:hover { background-color: #d71921; border-color: #d71921; }
@media (max-width: 680px) { .btn-go { width: 100%; flex: 1 1 100%; } }

/* ==========================================================================
 * 5. МОДАЛЬНЫЕ ОКНА И МЕНЮ НАВИГАЦИИ
 * ========================================================================== */
.modal-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 15, 15, 0.98);
    z-index: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.nav-links { list-style: none; text-align: center; }
.nav-links li { margin: 25px 0; }
.nav-links a { color: #fff; font-size: 2.3rem; text-decoration: none; font-weight: 600; cursor: pointer; transition: color 0.2s; }
.nav-links a:hover { color: #d71921; }

body.menu-open { overflow: hidden; }
body.menu-open .modal-menu { opacity: 1 !important; visibility: visible !important; transform: scale(1) !important; }
body.menu-open .menu-button span:nth-child(1) { transform: translateY(10px) rotate(45deg); background-color: #fff; }
body.menu-open .menu-button span:nth-child(2) { opacity: 0; }
body.menu-open .menu-button span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); background-color: #fff; }
    
.about-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.about-modal.active { opacity: 1; visibility: visible; }
.about-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 550px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    text-align: left;
    border: 2px solid #111;
}
.about-content h2 { margin-bottom: 20px; font-size: 1.8rem; color: #111; }
.about-content p { font-size: 1rem; line-height: 1.6; color: #4a4a4a; margin-bottom: 20px; }
.about-links { display: flex; gap: 15px; margin-top: 25px; }
.about-links a {
    color: #fff; background-color: #111; text-decoration: none;
    padding: 10px 20px; border-radius: 6px; font-size: 0.9rem;
    font-weight: 600; transition: background 0.2s;
}
.about-links a:hover { background-color: #d71921; }
.about-close { position: absolute; top: 15px; right: 20px; font-size: 1.6rem; background: none; border: none; cursor: pointer; color: #777; }
.about-close:hover { color: #111; }
