/* static/css/style.css */

html {
  scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

/* Общие классы */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 2.5rem;
    color: #444;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: #6c5ce7;
    color: white;
    border: 2px solid #6c5ce7;
}

.btn-primary:hover {
    background-color: #5d4fd3;
    border-color: #5d4fd3;
}

.btn-secondary {
    background-color: #6c5ce7;
    color: white;
    border: 2px solid #6c5ce7;
}

.btn-secondary:hover {
    background-color: #5d4fd3;
    border-color: #5d4fd3;
}

.btn-outline {
    background-color: transparent;
    color: #6c5ce7;
    border: 2px solid #6c5ce7;
}

.btn-outline:hover {
    background-color: #6c5ce7;
    color: white;
}

/* Шапка */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header__logo img {
    width: 50px;
    height: 50px;
}

.header__logo-text h1 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.header__nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.header__nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header__nav a:hover,
.header__nav a.active {
    background-color: #f0f0f0;
    color: #6c5ce7;
}

/* Блок с цифрами */
.numbers {
    background: url('../img/hero-background.jpg') no-repeat center center;
    background-size: cover;
    padding: 60px 0;
    position: relative;
}

.numbers::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.numbers .container {
    position: relative;
    z-index: 2;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 5px;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex: 1 1 250px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #6c5ce7;
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* Главный баннер */
.hero {
    background: url('../img/hero-background.jpg') no-repeat center center;
    background-size: cover;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero__content {
    z-index: 2;
    padding: 0 20px;
    text-align: center;
}

.hero__content h1 {
    font-size: 3.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hero__content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* О компании */
.about__content {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.about__content img {
    width: 33%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.about__text p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
}

/* Приём деталей */
.services-intro {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: transform 0.3s ease;
    min-height: 220px;
}

.service-card i {
    font-size: 2.5rem;
    color: #6c5ce7;
}

.service-card h3 {
    margin: 0;
    color: #333;
    text-align: center;
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.service-card--centered {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Заявка */
.cta-section {
    text-align: center;
    margin-top: 60px;
}

.cta-section h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.application {
    background: url('../img/hero-background.jpg') no-repeat center center;
    background-size: cover;
    padding: 50px 0;
    position: relative;
}

.application::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.application .cta-section {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.application .cta-section h3 {
    color: white;
}

.application .btn-secondary {
    background-color: #6c5ce7;
    color: white;
    border: 2px solid #6c5ce7;
}

.application .btn-secondary:hover {
    background-color: #5d4fd3;
    border-color: #5d4fd3;
}

/* Какие детали принимаем */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.part-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.part-item:hover {
    transform: scale(1.05);
}

.part-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.part-item span {
    font-size: 1rem;
    text-align: center;
    color: #333;
}

/* Контакты */
.contacts {
    background: url('../img/i.jpg') no-repeat center center;
    background-size: cover;
    padding: 60px 0;
    position: relative;
}

.contacts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.contacts .container {
    position: relative;
    z-index: 2;
}

.contacts h2 {
    color: white;
}

.contact-intro {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    color: white;
    font-size: 1rem;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.contact-item {
    flex: 1 1 250px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-item strong {
    display: block;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.contact-item span {
    display: block;
    color: #666;
    font-size: 1rem;
}

/* Карточки связи — иконка слева, только заголовок */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 80px;
    text-align: left;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.contact-card__icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.4rem;
}

.contact-card__text h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.contact-card:nth-child(1) .contact-card__icon {
    background-color: #0088cc; /* WhatsApp */
}

.contact-card:nth-child(2) .contact-card__icon {
    background-color: #007bff; /* Телефон */
}

.contact-card:nth-child(3) .contact-card__icon {
    background-color: #0088cc; /* MAX (Telegram-like) */
}

/* Кнопка MAX в правом нижнем углу */
.max-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid #25D366; /* Зелёная рамка */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1001;
    text-decoration: none;
}

.max-button img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
}

.max-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Футер */
.footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    border-top: 1px solid #444;
}

.footer p {
    margin: 0;
}

@media (max-width: 768px) {

    /* Общие отступы */
    .section {
        padding: 40px 0;
    }

    .section h2 {
        font-size: 1.8rem;
    }

    .footer {
        font-size: 0.85rem;
        padding: 15px 0;
    }

    .nav-item--services {
        display: none;

    }
    .header__nav .nav-btn {
        background-color: #f0f0f0; /* Серый фон */
        color: #555; /* Тёмный текст */
        padding: 8px 15px; /* Отступы внутри */
        border-radius: 8px; /* Закруглённые углы */
        font-size: 0.9rem;
        font-weight: 500;
        text-decoration: none;
        display: inline-block;
        transition: background-color 0.2s;
        margin: 0 5px; /* Отступ между кнопками */
    }

    /* Убираем hover-эффект или делаем его минимальным */
    .header__nav .nav-btn:hover {
        background-color: #e0e0e0; /* Легкий оттенок при наведении */
    }

    /* Убираем стандартный hover/active из предыдущих стилей */
    .header__nav a:hover,
    .header__nav a.active {
        background-color: transparent;
        color: #555;
    }

    /* Шапка — увеличиваем отступы сверху и снизу */
    .header__container {
        flex-direction: column;
        gap: 10px;
        padding: 25px 0; /* ← Увеличил отступы сверху и снизу */
    }

    /* Логотип — больше отступов вокруг */
    .header__logo {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 10px; /* ← Добавил отступ снизу */
    }

    .header__logo img {
        width: 50px;
        height: 50px;
    }

    .header__logo h1 {
        font-size: 1.5rem;
        color: #333;
        margin: 0;
        font-weight: 600;
    }

    /* Навигация — аккуратные кнопки как на скриншоте */
    .header__nav ul {
        display: flex;
        list-style: none;
        gap: 15px; /* ← Уменьшил отступы между кнопками */
        justify-content: center;
        margin: 0;
        padding: 0;
        flex-wrap: wrap;
    }

    .header__nav a {
        text-decoration: none;
        color: #555;
        font-weight: 500;
        padding: 6px 10px; /* ← Уменьшил внутренние отступы */
        border-radius: 4px;
        transition: background-color 0.3s;
        font-size: 0.9rem; /* ← Уменьшил шрифт */
        line-height: 1.4;
        text-align: center;
    }

    .header__nav a:hover,
    .header__nav a.active {
        background-color: #f0f0f0;
        color: #6c5ce7;
    }

    /* Главный баннер */
    .hero {
        height: 60vh;
    }

    .hero__content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .hero__content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    /* О компании */
    .about__content {
        flex-direction: column;
        text-align: center;
    }

    .about__content img {
        width: 80%;
        margin: 0 auto 20px;
    }

    .about__text p {
        padding: 0 10px;
    }

    /* Статистика */
    .stat-item {
        flex: 1 1 100%;
        padding: 15px;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Приём деталей */
    .service-card {
        min-height: auto;
        padding: 20px 15px;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.95rem;
    }

    /* CTA (призыв к действию) */
    .cta-section h3 {
        font-size: 1.4rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    /* Какие детали принимаем */
    .parts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .part-item {
        padding: 15px;
    }

    .part-item img {
        width: 60px;
        height: 60px;
    }

    .part-item span {
        font-size: 0.9rem;
    }

    /* Контакты */
    .contact-info {
        flex-direction: column;
        gap: 15px;
    }

    .contact-item {
        flex: 1 1 100%;
    }

    .contact-intro {
        font-size: 0.95rem;
    }

    /* Кнопки связи */
    .contact-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-card {
        padding: 15px;
        min-height: auto;
    }

    .contact-card__icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    .contact-card__text h3 {
        font-size: 1.1rem;
    }

        /* Уменьшаем отступ сверху у CTA-блока ТОЛЬКО на мобильных */
    .application {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .cta-section {
        margin-top: 0; /* убираем верхний отступ */
        padding-top: 0;
    }

    .cta-section h3 {
        font-size: 1.5rem;
        margin-bottom: 10px; /* уменьшаем отступ под заголовком */
    }

    .cta-section .btn {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
}