* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
}

/* СТИЛИ ШАПКИ */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(18, 18, 18, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #222;
}

.logo {
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 1px;
}

.logo span {
    color: #ff4a1c;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: 0.3s ease;
}

.nav-menu a:hover {
    color: #ff4a1c;
}

.btn-header {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s ease;
}

.btn-header:hover {
    background-color: #ffffff;
    color: #121212;
}

/* СТИЛИ ГЛАВНОГО ЭКРАНА */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), 
                url('https://images.unsplash.com/photo-1617469167446-8043d4466b0e?q=80&w=1920') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    max-width: 800px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-main {
    display: inline-block;
    background-color: #ff4a1c;
    color: #ffffff;
    text-decoration: none;
    padding: 15px 35px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 74, 28, 0.4);
}

.btn-main:hover {
    background-color: #e03d13;
    transform: translateY(-2px);
}
/* СТИЛИ БЛОКА ПРЕИМУЩЕСТВ */
.features-section {
    padding: 100px 50px;
    background-color: #1a1a1a; /* Чуть светлее основного фона для контраста */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки одинаковой ширины */
    gap: 30px; /* Отступы между карточками */
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: #121212;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #252525;
    transition: 0.3s ease; /* Плавность для ховера */
}

.feature-card:hover {
    transform: translateY(-10px); /* Карточка плавно приподнимается */
    border-color: #ff4a1c; /* Граница подсвечивается оранжевым */
    box-shadow: 0 10px 20px rgba(255, 74, 28, 0.1);
}

.feature-card .icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.feature-card p {
    font-size: 15px;
    color: #aaaaaa;
    line-height: 1.6;
}
/* СТИЛИ БЛОКА ГАЛЕРЕИ */
.portfolio-section {
    padding: 100px 50px;
    background-color: #121212;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 крутых тачки в один ряд */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    height: 300px;
    border-radius: 6px;
    overflow: hidden; /* Прячем всё, что вылазит за границы при увеличении */
    border: 1px solid #222;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Чтобы фото не сжималось, а красиво заполняло блок */
    transition: transform 0.5s ease; /* Плавный зум */
}

/* Эффект затемнения и появления текста при наведении */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0; /* Изначально текст скрыт */
    transition: opacity 0.3s ease;
}

.portfolio-overlay h4 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

/* ХОВЕР ЭФФЕКТЫ */
.portfolio-item:hover img {
    transform: scale(1.1); /* Картинка увеличивается на 10% */
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1; /* Проявляем текст и затемнение */
}
/* СТИЛИ ПОДВАЛА */
.main-footer {
    background-color: #0a0a0a; /* Еще более темный фон для финала */
    padding: 40px 20px;
    border-top: 1px solid #222;
    text-align: center;
}

.footer-content p {
    color: #666666;
    font-size: 14px;
    margin: 5px 0;
}
/* ==========================================================================
   ИДЕАЛЬНЫЙ АДАПТИВ ПОД ТВОИ КЛАССЫ
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Глобальный сброс, чтобы сайт не косило */
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* 1. ШАПКА САЙТА */
    .main-header {
        display: flex !important;
        flex-direction: column !important; /* Меню и кнопка встают в столбик */
        align-items: center !important;
        gap: 15px !important;
        padding: 15px 10px !important;
        text-align: center;
    }

    /* На случай, если внутри шапки есть nav, пустим ссылки в столбик */
    .main-header nav, .main-header .nav {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* 2. ГЛАВНЫЙ ЭКРАН */
    .hero-section {
        padding: 40px 15px !important;
        text-align: center !important;
    }

    /* Уменьшаем шрифты, чтобы они НЕ резались на экранах 280px-390px */
    .hero-section h1, .hero-section .main-title {
        font-size: 24px !important; 
        line-height: 1.2 !important;
        word-wrap: break-word; /* Чтобы длинные слова переносились */
    }

    .hero-section p {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }

    .hero-section button, .hero-section .btn {
        width: 100% !important;
        max-width: 280px;
        font-size: 14px !important;
    }

    /* 3. БЛОК 2: ПРЕИМУЩЕСТВА */
    /* Перестраиваем сетку карточек в один столбик */
    .features-section {
        padding: 40px 15px !important;
    }

    /* Если у тебя внутри секции стоит display: grid или flex */
    .features-section, 
    .features-section > div { 
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        grid-template-columns: 1fr !important; /* Убиваем колонки грида */
        gap: 20px !important;
    }

    /* Сами белые карточки преимуществ */
    .features-section [class*="card"], 
    .features-section [class*="item"] {
        width: 100% !important;
        max-width: 320px;
    }

    /* 4. БЛОК 3: ГАЛЕРЕЯ РАБОТ */
    /* Твои машины теперь будут идти одна под другой, крупно и красиво */
    .portfolio-section {
        padding: 40px 15px !important;
    }

    .portfolio-section, 
    .portfolio-section > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Фотки машин делаем адаптивными */
    .portfolio-section img {
        width: 100% !important;
        max-width: 340px;
        height: 200px !important; /* Нормальная высота для мобилки */
        object-fit: cover !important; /* Чтобы фотки не сжимались, а обрезались */
        border-radius: 8px;
    }
}