:root {
    --max-width: 1100px;
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Светлая палитра */
    --bg: #f8fafc;           /* Светло-серый фон страницы */
    --card-bg: #ffffff;      /* Чисто белый для карточек */
    --border: #e2e8f0;       /* Тонкие границы */
    --text-main: #1e293b;    /* Глубокий темно-синий для текста */
    --text-muted: #64748b;   /* Серый для второстепенного текста */
    --accent: #2563eb;       /* Насыщенный синий (доверие) */
    --accent-light: #dbeafe; /* Светло-голубой для фонов */
    --shadow: rgba(0, 0, 0, 0.05);
}

/* Базовые стили */
* { box-sizing: border-box; }

html { 
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Отступ для фиксированного хедера */
    
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
}

/* Навигация */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-switch a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.85rem;
}

.lang-switch a:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.lang-switch select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
}

.lang-switch select:focus {
    outline: 2px solid var(--accent);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.08);
}

.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

nav ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: 8px;
}

nav a:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* Герой-секция (светлая с картинкой) */
#Home {
    position: relative;
    min-height: 600px;
    display: flex;
    max-width: var(--max-width);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end; 
    text-align: right;
    padding: 2rem 10% 4rem 10%;
    margin-bottom: 2rem;
    color: white;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    border: none;
    padding-top: 5vh;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

#Home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    z-index: 2;
}

#Home h1,
#Home p,
#Home .btn {
    position: relative;
    z-index: 3;
}

#Home h1 {
    font-size: 3.5rem;
    margin: 0;
    line-height: 1.1;
    font-weight: 800;
}

#Home p {
    font-size: 1.2rem;
    max-width: 500px;
    margin: 1.5rem 0;
    opacity: 0.9;
}

/* Секции */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 4rem 0;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Кнопка */
.btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.3);
    background: #1d4ed8;
}

/* Сетка услуг */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Галерея услуг */
.truck-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
    object-fit: cover;
    aspect-ratio: 4/3;
}

    .gallery-image,
    .scania-right,
    .scania-left {
        width: 100%;
        height: auto;
        border-radius: var(--radius);
        box-shadow: 0 4px 15px var(--shadow);
        transition: var(--transition);
        object-fit: cover;
        aspect-ratio: 4/3;
    }

    .gallery-image:hover,
    .scania-right:hover,
    .scania-left:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
    }

.gallery-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

/* Pair two images of the same truck so they appear as one unit */
.gallery-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    align-items: stretch;
}

.gallery-pair .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

    .gallery-pair .gallery-image,
    .gallery-pair .scania-right,
    .gallery-pair .scania-left {
        width: 100%;
        height: 100%;
        object-fit: cover;
        aspect-ratio: 4/3;
    }

/* Make the left Scania image cover its container so it fills the div */
.gallery-pair .scania-left {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
    display: block;
    align-self: stretch;
    padding: 0;
    background: transparent;
    border-radius: var(--radius);
    overflow: hidden;
}

/* Адаптивный дизайн для мобильных устройств */
@media (max-width: 768px) {
    nav {
        padding: 1rem 15px;
    }
    
    nav ul {
        gap: 0.8rem;
    }
    
    nav a {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    #Home {
        min-height: 400px;
        padding: 1.5rem 5% 2rem 5%;
        align-items: center;
        text-align: center;
    }
    
    #Home h1 {
        font-size: 2rem;
    }
    
    #Home p {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    h2::after {
        width: 40px;
    }
    
    .gallery-pair {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem 10px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        order: 3;
    }
    
    nav li {
        width: 100%;
    }
    
    nav a {
        display: block;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .lang-switch {
        order: 2;
        width: 100%;
    }
    
    .lang-switch select {
        width: 100%;
        font-size: 0.85rem;
    }
    
    #Home {
        min-height: 300px;
        padding: 1rem 10px 1.5rem 10px;
    }
    
    #Home h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    #Home p {
        font-size: 0.9rem;
        margin: 0.8rem 0;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    section {
        padding: 1.5rem 0;
    }
    
    h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    h2::after {
        width: 30px;
        height: 3px;
        bottom: -8px;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    main {
        padding: 0 10px;
    }
    
    .truck-gallery {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .gallery-image {
        border-radius: 8px;
    }
    
    footer {
        padding: 1.5rem 10px;
        margin-top: 2rem;
    }
    
    footer .footer-text {
        font-size: 0.85rem;
    }
    
    .contact-list {
        font-size: 0.9rem;
    }
    
    .contact-item {
        padding: 0.5rem 0;
    }
}

/* Ensure MAN image uses same sizing/ratio as other gallery images */
.man-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius);
}

/* Footer styles */
footer {
    text-align: center;
    padding: 2rem 20px;
    margin-top: 3rem;
    color: var(--text-muted);
}

footer .footer-text {
    margin: 0;
    font-size: 0.95rem;
}

footer .socials {
    margin-top: 0.5rem;
}

footer .socials a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.cookies-notice {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
}

.company-requisites {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.5;
}

.company-requisites span {
    display: inline;
}

@media (max-width: 480px) {
    .company-requisites {
        font-size: 0.75rem;
    }
    
    .cookies-notice {
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) {
    footer {
        padding: 2.5rem 0;
    }
}

.contact-item, .footer-work-hours {
    margin-top: 10px;
    font-size: 0.95rem;
}

.footer-work-hours {
    color: #555;
    font-size: 0.85rem;
}

section[id] {
    scroll-margin-top: 100px;
}