:root {
    --primary-color: #6FB6F5;
    --secondary-color: #333333;
    --text-color: #000000;
    --bg-color: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #25D366;
    --error-color: #dc3545;
    --warning-color: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
}

html,
body {
    height: 100%;
}

.main-content {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.intro-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeOut 1s ease-in-out 2s forwards;
}

.intro-content {
    text-align: center;
    animation: slideOpen 1.5s ease-in-out;
}

.intro-logo {
    width: 300px;
    height: auto;
    margin-bottom: 20px;
    animation: logoFade 1s ease-in-out;
}

.intro-text {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    animation: textSlide 1.5s ease-in-out;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes slideOpen {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes logoFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textSlide {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 20px;
}

.logo img {
    width: 40px;
    height: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.lang-btn.active,
.lang-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s;
}

/* Стили для активного состояния бургер-меню */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.hero {
    padding: 100px 0;
    text-align: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 40px;
}

.hero-animation-container {
    width: 100%;
    max-width: 600px;
    height: 300px;
    margin: 40px auto;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.car-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.car-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-info {
    padding: 20px;
}

.car-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.car-description {
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-description.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
}

.car-description-wrapper {
    margin-bottom: 10px;
}

.car-desc-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0;
    cursor: pointer;
}

.car-desc-toggle .toggle-icon {
    font-size: 14px;
    line-height: 1;
}

.car-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.car-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #1da851;
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    display: block;
}

.text-center {
    text-align: center;
}

.videos-section {
    background: #f9f9f9;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.video-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color);
}

.video-player {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.video-controls {
    position: absolute;
    bottom: 60px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.video-play-btn,
.video-sound-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.video-play-btn:hover,
.video-sound-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.video-title {
    padding: 15px;
    font-size: 18px;
}

.contact-section {
    background: #f9f9f9;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.contact-item p,
.contact-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 10px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 8px;
}

/* ФУТЕР - ЧЕРНЫЙ С ЧЕРНЫМ ТЕКСТОМ И КРАСНЫМ Erton.pro */
.footer {
    background: #000000 !important; /* Черный фон */
    color: #000000 !important; /* Черный текст для основного */
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 20px;
    color: #555555 !important; /* Черные заголовки */
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
    color: #555555 !important; /* Черный текст в списках */
}

.footer-col p {
    color: #555555 !important; /* Черный текст параграфов */
}

.footer-col a {
    color: #555555 !important; /* Черные ссылки */
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary-color) !important; /* При наведении синий */
}

.footer-bottom {
    border-top: 1px solid #333333; /* Темно-серая граница */
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #555555 !important; /* Черный текст */
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #555555 !important; /* Черные ссылки */
    white-space: normal;
}

@media (max-width: 768px) {
    .car-desc-toggle {
        display: inline-flex;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
}

.footer-credit {
    color: #555555 !important; /* Черный текст */
}

/* ОСОБЫЙ СТИЛЬ ДЛЯ ССЫЛКИ Erton.pro - КРАСНАЯ */
.footer-credit a {
    color: #ff0000 !important; /* КРАСНЫЙ Erton.pro */
    text-decoration: none;
    font-weight: bold;
}

.footer-credit a:hover {
    color: #cc0000 !important; /* Темно-красный при наведении */
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overscroll-behavior: contain;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90dvh;
    overflow-y: auto;
    position: relative;
    touch-action: pan-y;
}

@media (max-width: 768px) {
    body {
        overscroll-behavior-y: none;
    }

    .main-content {
        min-height: 100dvh;
    }

    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--secondary-color);
}

.modal h2 {
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.booking-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.booking-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.modal-success {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.page-header {
    padding: 60px 0;
    background: #f9f9f9;
    text-align: center;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 700;
}

.car-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.car-gallery {
    position: sticky;
    top: 100px;
}

.gallery-main {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary-color);
}

.car-detail-info h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.car-price-large {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.car-description-full {
    margin-bottom: 30px;
}

.car-description-full h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.content-text {
    max-width: 800px;
    margin: 0 auto;
}

.content-text h2 {
    font-size: 32px;
    margin: 40px 0 20px;
}

.content-text p {
    margin-bottom: 20px;
}

.content-text ul,
.content-text ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.content-text li {
    margin-bottom: 10px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 30px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.faq-question {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.faq-answer {
    color: var(--secondary-color);
}

.faq-contact {
    text-align: center;
    margin-top: 60px;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
}

.faq-contact h2 {
    margin-bottom: 20px;
}

.social-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    max-width: 400px;
}

.flash-message {
    padding: 15px 40px 15px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.flash-message.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

/* Стили для мобильного меню */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 40px 40px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .nav-menu.active {
        display: flex;
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .nav-link {
        display: block;
        padding: 10px 0;
        font-size: 18px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 20px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid,
    .car-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .car-gallery {
        position: static;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .nav-menu {
        max-width: 280px;
        padding: 80px 20px 20px;
    }
}