:root {
    --primary-color: #0056b3;
    --secondary-color: #f8f9fa;
    --accent-color: #17a2b8;
    --text-dark: #343a40;
    --text-light: #ffffff;
    --bs-secondary-rgb: 108, 117, 125;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    padding-top: 76px;
}

.text-secondary {
    color: var(--text-light) !important;
    font-weight: bold !important; /* Робить текст жирним */
}

/* Навігація */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
    border-radius: 20px;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
    background: var(--primary-color);
}

/* Головна секція - мінімальна */
.hero-section {
    background: linear-gradient(135deg, rgba(146, 167, 244, 0.53) 0%, rgba(110, 130, 159, 0) 100%),
                url('img/Завод 2.jpg') center/cover no-repeat;
    padding: 80px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section h1,
.hero-section p {
    color: white;
    text-shadow: 0px 0px 6px rgba(53, 53, 53, 0.87);
}

/* Анімації для головної сторінки */
.animate-fade-in {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Заголовок сторінки */
.page-header {
    padding-top: 140px;
    margin-top: 0;
}

/* Анімації */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Фільтри категорій */
.category-filters .btn {
    border-radius: 25px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.category-filters .btn.active {

    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,86,179,0.3);
}

/* Картки продуктів */
.product-card {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card .card-text {
    flex-grow: 1;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
    height: 250px;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
    padding: 15px;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.5rem;
}

/* Іконки переваг */
.feature-icon,
.advantage-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.feature-icon:hover,
.advantage-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Статистика */
.stat-item {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Команда */
.team-member {
    transition: transform 0.3s ease;
    padding: 2rem 1rem;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    transition: transform 0.3s ease;
}

.team-member:hover img {
    transform: scale(1.1);
}

/* Сертифікати */
.certificate-item {
    transition: transform 0.3s ease;
}

.certificate-item:hover {
    transform: translateY(-5px);
}

.certificate-item img {
    transition: transform 0.3s ease;
}

.certificate-item:hover img {
    transform: scale(1.05);
}

/* Кнопки */
.btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #004494, #138496);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,86,179,0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,86,179,0.3);
    color: white;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

/* Секції */
section {
    position: relative;
    overflow: hidden;
}

/* Контактна форма */
.contact-form {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.contact-form .form-control {
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 8px;
}

.contact-form .form-control::placeholder {
    color: rgba(255,255,255,0.8);
}

.contact-form .form-control:focus {
    border-color: white;
    background: rgba(255,255,255,0.3);
    box-shadow: none;
    color: white;
}

/* Плавна прокрутка */
html {
    scroll-behavior: smooth;
}

/* Адаптивність */
@media (max-width: 1247px) {
    .hero-section {
        text-align: center;
        padding: 60px 0;
        min-height: 70vh;
    }

    .mobile-filter-toggler {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px 30px;
    cursor: pointer;
    display: flex;
    align-items: center; /* Вирівнює текст та іконку по центру вертикально */
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: background-color 0.2s ease;
    }

    .mobile-filter-toggler:hover,
    .mobile-filter-toggler:focus {
        background-color: #f8f9fa;
        outline: none;
    }

    /* Малюємо три горизонтальні смужки всередині кнопки */
    .filter-toggler-icon {
        display: block;
        width: 30px;
        height: 3px;
        background-color: #495057;
        position: relative;
        /* transition видаляємо, щоб при кліку іконка не смикалась окремо від тексту */
    }

    .filter-toggler-text {
        font-size: 15px;
        font-weight: 500;
        color: #495057;
        margin-right: 12px; /* Відступ справа, щоб відсунути три смужки */
        font-family: sans-serif; /* Або ваш основний шрифт сайту */
    }

    .filter-toggler-icon::before,
    .filter-toggler-icon::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background-color: #495057;
    }

    .filter-toggler-icon::before {
        top: -10px;
    }

    .filter-toggler-icon::after {
        bottom: -10px;
    }

    /* ВАШІ СТИЛІ ФІЛЬТРІВ (Трохи підкориговані для сумісності з collapse) */
    .btn-group.category-filters {
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
        max-width: 400px;
        margin: 10px auto 0 auto;  /* Додали відступ зверху від кнопки */
        gap: 8px;
    }

    .btn-group.category-filters .btn {
        flex: 1 1 auto;
        white-space: normal !important;
        width: 100% !important;
        border-radius: 20px !important;
        margin: 0 !important;
        padding: 10px 20px !important;
        font-size: 15px !important;
        text-align: center !important; /* Робимо по центру, як на вашому першому скриншоті */
    }

    .w-100-mobile {
    width: 100%;
    }

    .page-header {
        padding-top: 120px;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        margin: 0.25rem;
    }

    .hero-buttons .btn {
        display: block;
        margin: 0.5rem auto;
        width: 280px;
    }

    .feature-icon,
    .advantage-icon {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }

    .stat-number {
        font-size: 2.5rem !important;
    }

    /* --- ОНОВЛЕНА СТРУКТУРА ФІЛЬТРІВ ДЛЯ МОБІЛЬНИХ (ЯК НА СКРИНШОТІ) --- */
    .btn-group.category-filters {
        display: flex !important;
        flex-direction: column !important; /* Розгортає кнопки у вертикальний стовпчик */
        width: 100%;
        max-width: 400px; /* Обмежує максимальну ширину на планшетах, щоб кнопки не були надто розтягнутими */
        margin: 0 auto;  /* Центрує весь блок фільтрів на сторінці */
        gap: 8px;         /* Створює невеликий відступ між кнопками */
    }

    .btn-group.category-filters .btn {
        flex: 1 1 auto;
        white-space: normal !important; /* Дозволяє тексту переноситися, якщо назва категорії довга */
        width: 100% !important;
        border-radius: 20px !important; /* Заокруглення як на скриншоті меню */
        margin: 0 !important;           /* Скидаємо стандартні відступи Bootstrap */
        padding: 10px 20px !important;  /* Робимо кнопки приємними для натискання пальцем */
        font-size: 15px !important;
        text-align: left;               /* За бажанням: вирівнювання тексту по лівому краю, як у меню */
    }
}

@media (max-width: 1247px) {
    body {
        padding-top: 70px;
    }

    .btn-group.category-filters {
    max-width: 100%; /* На зовсім маленьких екранах адаптуємо під всю ширину */
    }

    .page-header {
        padding-top: 110px;
    }

    .container {
        padding: 0 15px;
    }

    .hero-buttons .btn {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .product-card .card-body {
        padding: 1rem;
    }

    .product-card .card-title {
        font-size: 1.1rem;
    }

    .product-card .card-img-top {
        height: 200px;
        padding: 10px;
    }

    .contact-form {
        padding: 1.5rem;
    }

    /* Оптимізація ширини блоку кнопок на маленьких екранах */
    .btn-group.category-filters {
        max-width: 100%; /* На телефонах кнопки займають майже всю ширину екрана */
    }
}

/* Спеціальні ефекти */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

/* Hover ефекти для посилань */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* Стилі для футера */
footer {
    margin-top: auto;
    background: #212529 !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Завантаження контенту з анімацією */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Покращення доступності */
.btn:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,86,179,0.2);
}

/* Прелоадер */
.loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-fixed {
    width: 300px;
    height: 400px;
    object-fit: cover; /* Захищає відео від спотворення та розтягування */
    display: block;    /* Прибирає зайві нижні відступи, характерні для інлайнових елементів */
}

.video-fixed-pellicle {
    width: 400px;
    height: 600px;
    object-fit: cover; /* Захищає відео від спотворення та розтягування */
    display: block;    /* Прибирає зайві нижні відступи, характерні для інлайнових елементів */
}

.foto-fixed-pipes {
  /* Керування розмірами: змінюй ці значення під свої потреби */
  width: 300px;         /* Ширина фото */
  height: 500px;

  /* Повне прибирання рамок, ліній та тіней */
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important; /* Гарантує прозорий фон */

  /* Правильне масштабування всередині блоку */
  object-fit: contain;
}


/* Кастомні скролбари */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #004494;
}
/* Кастомні стилі для таблиці товарів під стиль сайту */
.custom-product-table {
    font-size: 0.95rem;
    background-color: #ffffff;
}

/* Колір шапки таблиці через змінну головного кольору */
.custom-product-table thead.table-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color)) !important;
}

/* Текст коду товару (сірий нейтральний) */
.text-secondary-custom {
    color: #6c757d;
}

/* Оформлення уточнень під назвами плівок */
.italic-sub {
    font-style: italic;
    font-size: 0.85rem;
}

/* Лінія розмежування для останнього типу товарів (мішки) */
.border-top-2 {
    border-top: 2px solid #dee2e6;
}

/* Плавний ховер ефект для рядків таблиці */
.custom-product-table tbody tr {
    transition: background-color 0.2s ease;
}

/* Центрування та адаптивні відступи відео-контейнера поруч із таблицею */
.video-container-wrapper {
    padding: 10px;
    display: flex;
    justify-content: center;
}