/* Переменные */
:root {
    --color-primary: #000000; /* Черный */
    --color-secondary: #222222; /* Темно-серый */
    --color-accent: #f9ac00; /* Яркий Оранжевый */
    --color-light: #ffffff; /* Белый */
    --font-primary: 'Montserrat', sans-serif;
}

/* Общие стили и Сброс */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: #fff;
    color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden; /* Предотвращаем горизонтальный скроллинг */
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-accent);
}

.accent-text {
    color: var(--color-accent);
    font-weight: 700;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-primary);
    text-align:center;
}

.btn-primary:hover {
    background-color: #ffc030; /* Более светлый оранжевый */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    padding: 10px 23px;
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* Секции */
.section {
    padding: 80px 0;
    text-align: center;
}

.section-dark {
    background-color: var(--color-secondary);
}

.section-title {
    font-size: 3em;
    margin-bottom: 15px;
    font-weight: 900;
}

.section-subtitle {
    font-size: 1.2em;
    margin-bottom: 50px;
    color: #aaa;
}

/* 1. Хедер/Навигация */
.header {
    position: fixed;
    background-color:#fff;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5em;
    font-weight: 900;
    color:#000;
}

.nav-link {
    margin-left: 30px;
    font-weight: 700;
}

.nav-link--button {
    background-color: var(--color-accent);
    color: var(--color-primary) !important;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link--button:hover {
    background-color: #ffc030;
    color: var(--color-primary) !important;
}

/* 2. Главный экран (Hero) */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('crane-placeholder-bg.jpg'); /* ЗАМЕНИТЕ НА РЕАЛЬНОЕ ФОТО/ВИДЕО */
    background-size: cover;
    background-position: center;
    filter: brightness(0.4); /* Затемнение для читаемости текста */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 5;
    max-width: 1000px;
}

.hero h1 {
    font-size: 3.6em;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #ccc;
}


/* 3. О кране (Характеристики) */
.crane-features {
    display: flex;
    /* Разрешаем перенос на новую строку */
    flex-wrap: wrap; 
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.feature-card {
    /* Рассчитываем размер так, чтобы влезло 3 карточки в ряд */
    /* 100% / 3 = 33.333%. Вычитаем отступы (gap 30px) */
    flex-basis: calc(33.333% - 20px); 
    background-color: var(--color-secondary);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid var(--color-accent);
}

.feature-card .icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--color-accent);
    margin-bottom: 10px;
}

.about-details {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    padding: 40px 0;
}

.about-image-placeholder {
    flex-basis: 50%;
    height: 600px;
    /* Убираем серый фон заглушки */
    background-color: transparent; 
    display: block; 
    font-size: 1.2em;
    color: #999;
    border-radius: 8px;
    overflow: hidden; 
}

.crane-img {
    width: 100%; /* Растягиваем изображение на всю ширину контейнера */
    height: 100%; /* Растягиваем на всю высоту контейнера */
    object-fit: cover; /* Обрезает изображение, чтобы оно покрывало всю область без искажений */
    border-radius: 8px; 
}

.about-text {
    flex-basis: 50%;
}

.about-text h3 {
    font-size: 2em;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.about-text p {
    margin-bottom: 25px;
}

/* Детальные характеристики крана */
.specs-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.specs-list li {
    background-color: #1a1a1a;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-left: 3px solid var(--color-accent);
    transition: background-color 0.3s;
}

.specs-list li:hover {
    background-color: #2a2a2a;
}

.attention-note {
    background-color: #382400; /* Темный фон, близкий к оранжевому */
    border: 1px solid var(--color-accent);
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 5px;
    color: var(--color-light);
}


/* 4. Портфолио */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.gallery-item {
    height: 250px;
    background-color: #555;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    text-align: center;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .caption {
    opacity: 1;
}

/* 5. Услуги и Цены */
.price-plans {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.plan-card {
    background-color: var(--color-secondary);
    padding: 40px 30px;
    border-radius: 8px;
    width: 30%; /* Карточки занимают треть контейнера */
    text-align: left;
    border: 1px solid transparent;
    transition: border-color 0.3s;
    
    /* ДОБАВЛЕНО: Flexbox для выравнивания кнопки по низу */
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

.plan-card:hover {
    border-color: var(--color-accent);
}

/* Стиль для выделенных карточек (Базовый, Персонал, Транспорт) */
.plan-card--featured {
    background-color: #333;
    border: 3px solid var(--color-accent);
    transform: scale(1.0); 
}

.plan-card h3 {
    font-size: 1.8em;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.plan-card .price-tag {
    font-size: 2.5em;
    font-weight: 900;
    margin-bottom: 30px;
    color: var(--color-light);
    text-align: center;
}

.plan-card ul {
    list-style: none;
    margin-bottom: 30px;
    padding-left: 0;
    /* Убеждаемся, что список занимает необходимое место, чтобы кнопка опустилась вниз */
    flex-grow: 1; 
}

.plan-card li {
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.plan-card .icon {
    font-size: 3em;
    color: var(--color-accent);
    margin-bottom: 15px;
    text-align: center;
    width: 100%; /* Центрируем иконку */
}


/* 5.5. СЕКЦИЯ FAQ (АККОРДЕОН) */
.faq-list {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    background-color: var(--color-secondary);
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 15px;
    padding: 0;
    overflow: hidden; 
}

.faq-question {
    display: block;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1em;
    position: relative;
    user-select: none;
    transition: background-color 0.3s;
}

.faq-item:hover .faq-question {
    background-color: #333;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 25px;
    font-size: 1.5em;
    line-height: 1;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

.faq-item[open] > .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 25px;
    color: #ccc;
    line-height: 1.8;
    border-top: 1px solid var(--color-accent);
}


/* 6. Контакты и Форма заявки (С ФОНОМ) */
.contact-section-bg {
    position: relative;
    padding: 80px 0;
    background-color: transparent; 
    color: var(--color-light); 
    overflow: hidden;
}

.contact-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ЗАМЕНИТЕ ЭТО ИЗОБРАЖЕНИЕ НА СВОЕ! */
    background-image: url('contact_bg_crane.jpg'); 
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.8); /* Затемнение: 80% черного */
    background-blend-mode: darken;
    z-index: 1;
}

.contact-grid {
    display: flex;
    gap: 50px;
    text-align: left;
    margin-top: 40px;
    position: relative;
    z-index: 2; /* Над оверлеем */
}

.contact-info {
    flex-basis: 40%;
}

.contact-info h3 {
    font-size: 2em;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-form {
    flex-basis: 60%;
    display: grid;
    gap: 15px;
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 15px;
    /* Очень темный фон для контраста с фоном секции */
    background-color: #111111; 
    border: 1px solid #444; 
    color: var(--color-light);
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* 7. Футер */
.footer {
    background-color: #fff;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #333;
    font-size: 0.9em;
    color:#000;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------------------------------------------------------------------- */
/* АНИМАЦИЯ ПРИ СКРОЛЛИНГЕ (Reveal on Scroll) */
/* ---------------------------------------------------------------------- */
.reveal-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-item.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-200 { transition-delay: 0.2s; }
.delay-400 { transition-delay: 0.4s; }
.delay-600 { transition-delay: 0.6s; }


/* ---------------------------------------------------------------------- */
/* МОДАЛЬНОЕ ОКНО (POP-UP) */
/* ---------------------------------------------------------------------- */

.modal {
    display: none; 
    position: fixed;
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95); 
    padding-top: 50px;
}

.modal.active {
    display: block; 
}

.modal-content {
    background-color: var(--color-secondary);
    margin: 5% auto; 
    padding: 30px;
    border: 3px solid var(--color-accent);
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    text-align: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-btn {
    color: var(--color-light);
    float: right;
    font-size: 35px;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--color-accent);
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    font-size: 2em;
    margin-bottom: 10px;
}

.modal-form {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.modal-form input,
.modal-form textarea {
    width: 100%;
    padding: 15px;
    background-color: #333;
    border: 1px solid #555;
    color: var(--color-light);
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1em;
}

.modal-form textarea {
    resize: vertical;
}

.modal-form button {
    margin-top: 10px;
    padding: 15px;
}

/* СТИЛИ ДЛЯ ЧЕКБОКСОВ В МОДАЛЬНОМ ОКНЕ */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    margin-top: 5px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 0.95em;
    cursor: pointer;
    color: #ccc;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid var(--color-accent);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    background-color: #111;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--color-accent);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: var(--color-primary);
    font-weight: 900;
    font-size: 1em;
}


/* ---------------------------------------------------------------------- */
/* АДАПТИВНОСТЬ (Media Queries) */
/* ---------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .crane-features, .price-plans, .contact-grid {
        flex-direction: column;
    }
    .feature-card, .plan-card {
        width: 100%;
        margin-bottom: 20px;
        /* Возвращаем кнопку в нормальное положение для мобильных, но сохраняем flex для структуры */
        flex-shrink: 0; 
    }
    .plan-card ul {
        flex-grow: 0;
    }
    .plan-card--featured {
        transform: scale(1.0); 
    }
    .about-details {
        flex-direction: column;
        text-align: center;
    }
    .about-image-placeholder {
        width: 100%;
        height: 250px;
    }
    .about-text {
        text-align: center;
    }
    .specs-list li {
        text-align: left; 
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    .nav {
        margin-top: 15px;
    }
    .nav-link {
        margin: 0 10px;
    }
    .hero h1 {
        font-size: 2.5em;
    }
    .section {
        padding: 50px 0;
    }
    .section-title {
        font-size: 2em;
    }
    .gallery {
        grid-template-columns: 1fr;
    }
    .footer .container {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .modal-content {
        margin: 5% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2em;
    }
    .hero p {
        font-size: 1em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}