* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #ff652f;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden; /* Добавлено для предотвращения горизонтального скролла */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.logo a {
    display: block;
    max-width: 150px;
}

.logo img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.btn-nav:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero {
    min-height: 75vh;
    background: linear-gradient(135deg, #1f2937 0%, #1f2937 100%); 
    padding-top: 80px;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: left;
    padding: 2rem 20px;
    position: relative;
    z-index: 1;
    min-height: calc(75vh - 80px);
}

.hero-text h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
}

.hero-text {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s, background 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-card h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.cta-button {
    display: inline-block;
    background: var(--secondary);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    margin: 0.5rem;
    flex: 1;
    text-align: center;
    min-width: 200px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(245, 158, 11, 0.6);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.truck-illustration {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lomovoz {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Rental Section */
.rental {
    min-height: 100vh;
    background: var(--bg-light);
    padding: 6rem 0;
}

.rental h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 4rem;
}

.rental-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.truck-types h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.truck-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.truck-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.truck-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

.truck-card.active {
    border: 2px solid var(--primary);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.truck-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.truck-card h4 {
    font-size: 1.3rem;
    color: var(--text-dark);
}

.price {
    background: var(--primary);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.truck-specs {
    list-style: none;
}

.truck-specs li {
    color: var(--text-light);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.truck-specs li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Form */
.rental-form-container {
    position: relative;
}

.rental-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.submit-button {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.submit-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.submit-button:active {
    transform: translateY(0);
}

.form-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.success-message {
    display: none;
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.success-message.show {
    display: block;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
}

.success-message h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.success-message p {
    color: var(--text-light);
}

/* Gallery Section - ИСПРАВЛЕНА */
.gallery {
    min-height: 75vh;
    background: var(--white);
    padding: 4rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%; /* Добавлено для гарантии */
    overflow: hidden; /* Добавлено для предотвращения выхода за границы */
}

.gallery h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    width: 100%; /* Гарантирует центрирование */
}

.gallery .section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    width: 100%; /* Гарантирует центрирование */
}

.gallery-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; /* Гарантирует правильную ширину */
}

.carousel {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.carousel::before,
.carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 1;
    pointer-events: none;
}

.carousel::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.carousel::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.carousel-track {
    display: flex;
    animation: scroll 30s linear infinite;
    width: max-content; /* Важно для правильной работы анимации */
}

.carousel-track img {
    height: 300px;
    width: auto;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 8px;
    flex-shrink: 0;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.privacy-policy h1 {
    margin-top: 4rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 968px) {
    .gallery {
        min-height: auto;
        padding: 2rem 0;
    }

    .gallery h2 {
        font-size: 2rem;
        text-align: center;
    }

    .gallery .section-subtitle {
        text-align: center;
    }

    .carousel-track img {
        height: 200px;
        margin-right: 0.5rem;
    }

    .rental-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .gallery h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    .gallery .section-subtitle {
        text-align: center;
    }

    .carousel-track img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gallery {
        padding: 1rem 0;
    }

    .gallery h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .gallery .section-subtitle {
        text-align: center;
    }

    .carousel-track img {
        height: 120px;
        margin-right: 0.25rem;
    }
    
    /* Убираем градиентные затемнения на очень маленьких экранах */
    .carousel::before,
    .carousel::after {
        display: none;
    }
}

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .rental-content {
        grid-template-columns: 1fr;
    }

    .logo a {
        max-width: 130px;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        min-width: 250px;
        flex: none;
    }
}

@media (max-width: 640px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .nav-links li:not(:last-child) {
        display: none;
    }

    .nav-links {
        gap: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo a {
        max-width: 110px;
    }

    .cta-button {
        font-size: 1rem;
        padding: 0.8rem 2rem;
        min-width: 200px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .truck-illustration {
        max-width: 300px;
    }

    .lomovoz {
        max-height: 250px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .logo a {
        max-width: 90px;
    }
    
    .nav-links {
        gap: 0.8rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
    
    .btn-nav {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .container {
        max-width: 480px;
    }
}