/*
 * style.css
 * Этот файл содержит CSS-стили для вашего сайта, включая исправления для SimpleLightbox.
 * Все изменения, связанные с лайтбоксом, помещены в отдельный блок в конце файла для удобства.
 */

/* -------------------- ГЛОБАЛЬНЫЕ СТИЛИ И СБРОСЫ (НАЧАЛО ФАЙЛА) -------------------- */

/*
 * Сброс стандартных отступов браузера для избежания
 * нежелательных отступов по периметру страницы.
 */
html, body {
    margin: 0;
    padding: 0;
}

/* Базовый сброс отступов и установка box-sizing для всех элементов */
html {
    box-sizing: border-box; /* Глобальное применение box-sizing */
}
*, *::before, *::after {
    box-sizing: inherit; /* Все элементы наследуют box-sizing */
}

/* Общие стили для тела документа */
body {
    font-family: 'Inter', sans-serif; /* Ваши шрифты */
    /* margin и padding уже установлены выше через !important */
    /* overflow-x: hidden; - УДАЛЕНО: теперь контролируется глобальным html, body */
    color: #333; /* Ваш основной цвет текста */
    line-height: 1.6;
    background-color: #f8f8f8; /* Ваш цвет фона страницы */
}

/* Ваш контейнер для основного содержимого */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px; /* Достаточный отступ по бокам для всех экранов */
}

h1, h2, h3 {
    color: #10281e;
    text-align: center;
    margin-bottom: 25px;
    font-family: 'Raleway', sans-serif; /* Ваши шрифты для заголовков */
}

h1 {
    font-size: 3.5em;
    font-weight: 200;
    line-height: 1.2;
}

h2 {
    font-size: 2.8em;
    font-weight: 200;
    margin-top: 60px;
    margin-bottom: 40px;
}

h3 {
    font-size: 1.8em;
    font-weight: 400;
    margin-bottom: 15px;
}

p {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.4em;
    color: #555;
}

a {
    color: #d4a75e;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #c0914e;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    gap: 10px;
    padding: 20px 40px;
    border-radius: 50px;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 600;
    margin: 10px; /* Общие margin для всех кнопок */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    white-space: nowrap; /* Предотвращает перенос текста на десктопе */
}

.btn-primary {
    background: linear-gradient(45deg, #1b4332, #173a2b);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #21523d, #21523d);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: linear-gradient(45deg, #1b4332, #173a2b);
    color: #fff;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #21523d, #21523d);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-submit {
    background: linear-gradient(45deg, #1a4230, #1a4230);
    color: #fff;
    border: none;
}

.btn-submit:hover {
    background: linear-gradient(45deg, #21523d, #21523d);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Sections Styling */
section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #ffc300, #f8be01);
    padding-top: 0; 
    padding-bottom: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 40px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
    text-align: center; /* Убедимся, что контент внутри контейнера центрирован */
}

.hero-section h1 {
    font-size: 3.8em;
    margin-bottom: 20px;
    color: black;
    margin-top: 0;
    text-align: center; /* Принудительно центрируем H1 */
    word-wrap: break-word; /* Для длинных слов */
    overflow-wrap: break-word; /* Для очень длинных слов без пробелов */
}

.hero-section p {
    font-size: 1.4em;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #1b4332;
    text-align: center; /* Центрируем параграф */
}

.hero-actions {
    margin-top: 40px;
    margin-bottom: 50px;
    display: flex;
    flex-wrap: wrap; /* Разрешить перенос кнопок */
    justify-content: center; /* Центрировать кнопки */
    align-items: center;
    width: 100%; /* Занимает всю ширину контейнера */
    padding: 0; /* Убираем padding, если он мешает центрированию, добавим на кнопки если нужно */
}

/* General Section Styling */
.why-outsource-section,
.services-section,
.portfolio-section,
.process-section,
.pricing-section,
.contact-section { 
    background-color: #f8f8f8;
    padding: 80px 0;
    border-bottom: 1px solid #eee;
}

section:last-of-type {
    border-bottom: none;
}

/* Features Grid */
.features-grid,
.services-grid,
.portfolio-grid,
.process-steps,
.pricing-grid { 
    display: grid;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    text-align: center;
}

.feature-item {
    background-color: #fff;;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.feature-item .icon {
    font-size: 3em;
    color: #fcc000;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.6em;
    margin-top: 15px;
    margin-bottom: 10px;
    font-family: 'Raleway', sans-serif;
    color: #1b4332;
}

.feature-item p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 0;
}

/* Services Grid */
.services-section {
    background-color: #f8f8f8;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    text-align: center;
}

.service-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3.5em;
    color: #fcc000;
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.7em;
    margin-bottom: 15px;
    font-family: 'Raleway', sans-serif;
}

.service-item p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 0;
}

/* Portfolio Grid */
.portfolio-section {
    background-color: #f0f0f0;
    padding: 80px 0;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* КЛАСС-ОБЕРТКА ДЛЯ СООТНОШЕНИЯ СТОРОН */
.portfolio-item .image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Это 9 / 16 = 0.5625. Создает контейнер 16:9 */
    overflow: hidden;
    /* *** ИЗМЕНЕНИЕ ЗДЕСЬ *** */
    background-color: #ffffff; /* Или 'white'. Теперь фон будет белым! */
}

.portfolio-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Изображение будет полностью видно, возможно с пустыми полосами */
    display: block;
}

.portfolio-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(28, 67, 49, 1);
    color: #fff;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.portfolio-item:hover .portfolio-caption {
    transform: translateY(0);
}

/* Process Steps */
.process-section {
    background-color: #f8f8f8ff;
}
.process-steps {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; 
    text-align: center;
}

.step-item {
    background-color: #f8f8f8;
    padding: 40px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    align-items: center; 
}

.step-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.step-icon {
    font-size: 3.5em;
    color: #fcc000;
    margin-bottom: 20px;
}

.step-item h3 {
    font-size: 1.6em;
    margin-bottom: 15px;
    font-family: 'Raleway', sans-serif;
    flex-shrink: 0; 
}

.step-item p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 0;
    flex-grow: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
}

/* Pricing Grid */
.pricing-section {
    background-color: #f0f0f0;
}
.pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: stretch;
}

.price-plan {
    background-color: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-plan:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.price-plan.featured {
    background: linear-gradient(135deg, #ffc300, #f8be01);
    color: #fff;
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.price-plan.featured h3,
.price-plan.featured .price,
.price-plan.featured .price span,
.price-plan.featured ul li {
    color: #fff;
}
.price-plan.featured .icon-check,
.price-plan.featured .icon-times {
    color: #fff;
}
.price-plan.featured .btn-primary {
    background-color: #fff;
    color: #d4a75e;
}
.price-plan.featured .btn-primary:hover {
    background-color: #f0f0f0;
}


.price-plan h3 {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #fcc000;
    font-family: 'Raleway', sans-serif;
    word-wrap: break-word; /* Для длинных слов */
    overflow-wrap: break-word; /* Для очень длинных слов без пробелов */
}

.price-plan .price {
    font-size: 3.2em;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 25px;
}

.price-plan .price span {
    font-size: 0.5em;
    font-weight: 400;
    color: #777;
}

.price-plan ul {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
    flex-grow: 1;
}

.price-plan ul li {
    margin-bottom: 12px;
    font-size: 1.2em;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-plan ul li i {
    margin-right: 12px;
    font-size: 1.3em;
}

/* Icons for list items */
.icon-check {
    color: #7cb342;
}
.icon-times {
    color: #e57373;
}

.pricing-section .note {
    font-size: 1em;
    color: #777;
    margin-top: 40px;
    line-height: 1.8;
}
.pricing-section .note .highlight {
    font-size: 1.2em;
    font-weight: 700;
    color: #b84242;
}

/* FAQ Section */
.faq-section {
    background-color: #f0f0f0;
}
.faq-item {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.faq-item h3 {
    text-align: left;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a1a1a; 
    display: flex;
    align-items: center;
    gap: 15px;
}

.faq-item h3 .fas {
    color: #fcc000;
}

.faq-item p {
    text-align: left;
    font-size: 1.2em;
    color: #666;
    margin-bottom: 0;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(45deg, #2c3e50, #1a1a1a);
    color: #fff;
    padding: 80px 0;
}

.contact-section h2,
.contact-section p {
    color: #fff;
}

.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 650px;
    margin: 0 auto 40px auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.2em;
    font-family: 'Inter', sans-serif;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #d4a75e;
    box-shadow: 0 0 0 3px rgba(212, 167, 94, 0.2);
    outline: none;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    background: linear-gradient(45deg, #1a4230, #1a4230);
    color: #fff;
    font-size: 1em;
    border: none;
    width: auto;
    align-self: center;
}

.btn-submit:hover {
    background: linear-gradient(45deg, #21523d, #21523d);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.contact-info {
    text-align: center;
    margin-top: 30px;
    font-size: 1.1em;
}

.contact-info p {
    margin-bottom: 15px;
    color: #fff;
}

.contact-info a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.contact-info a .fab {
    margin-right: 8px;
    font-size: 1.2em;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #ecf0f1;
    padding: 35px 0;
    text-align: center;
    font-size: 0.95em;
}

footer p {
    margin-bottom: 15px;
    color: #ecf0f1;
}

footer nav a {
    color: #ecf0f1;
    margin: 0 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer nav a:hover {
    color: #d4a75e;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    /* Hero section */
    .hero-section h1 {
        font-size: 3em; /* Уменьшаем шрифт H1 на планшетах */
    }
    .hero-section p {
        font-size: 1.2em; /* Уменьшаем шрифт параграфа */
    }

    h1 {
        font-size: 3em;
        font-weight: 500;
    }
    h2 {
        font-size: 2.2em;
        font-weight: 700;
    }
    h3 {
        font-size: 1.5em;
    }
    .hero-section {
        padding-bottom: 80px;
    }
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .faq-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Hero section - конкретные правки для мобильных */
    .hero-section h1 {
        font-size: 3em; /* Дополнительно уменьшаем шрифт H1 */
        margin-bottom: 15px;
    }
    .hero-section p {
        font-size: 1.2em; /* Уменьшаем шрифт параграфа еще больше */
        margin-bottom: 30px;
    }
    .hero-actions {
        flex-direction: column; /* Кнопки в столбец */
        align-items: center; /* Центрируем кнопки по горизонтали */
        width: 100%; /* Занимает всю ширину контейнера */
        padding: 0 15px; /* Немного padding для hero-actions */
        box-sizing: border-box;
    }
    .hero-actions .btn {
        width: 100%; /* Кнопка занимает всю доступную ширину */
        max-width: 300px; /* Ограничиваем максимальную ширину */
        margin: 0 auto 15px auto; /* Центрируем и добавляем отступ снизу */
        white-space: normal; /* Разрешаем перенос текста */
    }
    .hero-actions .btn:last-child {
        margin-bottom: 0; /* Убираем нижний отступ у последней кнопки */
    }


    h1 {
        font-size: 2.5em;
        text-align: center;
        font-weight: 700;
    }
    h2 {
        font-size: 2em;
        font-weight: 700;
    }
    section {
        padding: 50px 0;
    }
    .btn {
        width: 100%; /* Кнопка занимает всю доступную ширину */
        max-width: 300px; /* Ограничиваем максимальную ширину кнопки на мобильных */
        margin: 0 auto 15px auto; /* Центрируем кнопку по горизонтали и добавляем отступ снизу */
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 12px 20px; /* Возможно, увеличить padding для удобства нажатия */
        box-sizing: border-box; /* Убедитесь, что это свойство применяется */
        white-space: normal; /* Разрешаем перенос текста на кнопке, если он длинный */
    }
    
    .features-grid,
    .services-grid,
    .process-steps {
        grid-template-columns: 1fr; 
    }
    .portfolio-item img {
        height: 220px;
    }
    /* Main hero image adjustment for smaller screens */
    .hero-main-image {
        height: auto;
        max-height: 40vh;
        object-fit: contain;
    }
    
    /* Отступы для основных контейнеров секций, чтобы контент не прилипал к краям */
    .why-outsource-section .container,
    .services-section .container,
    .portfolio-section .container,
    .process-section .container,
    .pricing-section .container,
    .contact-section .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Дополнительные стили для price-plan на 768px */
    .price-plan {
        padding: 25px 20px; /* Уменьшаем внутренние отступы для мобильных */
    }
    .price-plan h3 {
        font-size: 1.6em; /* Уменьшаем размер заголовка пакета */
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    /* Hero section - дальнейшие корректировки для очень маленьких экранов */
    .hero-section h1 {
        font-size: 1.8em; /* Еще сильнее уменьшаем шрифт H1 */
    }
    .hero-section p {
        font-size: 0.95em; /* Еще сильнее уменьшаем шрифт параграфа */
    }

    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.6em;
    }
    p {
        font-size: 0.95em;
    }
    .hero-section p {
        font-size: 1em;
    }
    .price-plan h3 {
        font-size: 1.8em;
    }
    .price-plan .price {
        font-size: 2.5em;
    }
    .contact-form {
        padding: 25px;
    }
    footer nav a {
        margin: 0 10px;
    }

    /* Убедимся, что pricing-grid точно в одну колонку на самых маленьких экранах */
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .price-plan {
        width: 95%; /* Пакет занимает почти всю ширину */
        max-width: 350px; /* Ограничиваем максимальную ширину */
        margin: 0 auto 20px auto; /* Центрируем и добавляем отступ снизу */
    }
}

/* Cookie Consent Styles */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #152e23;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.5s ease-out;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    width: 90%;
    flex-wrap: wrap;
}

.cookie-consent-content p {
    margin: 0;
    flex-grow: 1;
    padding-right: 20px;
    font-size: 1em;
    color: #fff;
}

.cookie-consent-content p a {
    color: #feb914;
    text-decoration: underline;
}

.cookie-consent-content p a:hover {
    color: #e6c200;
}

.btn-accept-cookies {
    background-color: #feb914;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.btn-accept-cookies:hover {
    background-color: #e6c200;
    color: #000;
}

/* Media Queries for Cookie Consent */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .cookie-consent-content p {
        padding-right: 0;
        margin-bottom: 15px;
    }
    /* Уточнение для кнопки куки на мобильных */
    .btn-accept-cookies {
        width: auto; /* Позволить кнопке быть по размеру контента */
        margin: 0 auto; /* Центрировать, если не full width */
        max-width: 200px; /* Ограничить ширину, если слишком большая */
    }
}

