@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter-VariableFont.woff2') format('woff2');
    /* диапазон весов */
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

body {
    font-family: 'Inter'
}

:root {
    /* Основные цвета Bootstrap */
    --bs-primary: #000000;
    --bs-primary-rgb: 198, 40, 40;
    --bs-secondary: #6C757D;
    --bs-secondary-rgb: 108, 117, 125;

    /* Фоны */
    --bs-body-bg: #FFFFFF;
    --bs-light: #F8F9FA;
    --bs-dark: #212529;

    /* Типографика */
    --bs-body-color: #212529;
    --bs-link-color: var(--bs-primary);
    --bs-link-hover-color: #B71C1C;

    /* Плавная прокрутка */
    scroll-behavior: smooth;
}

/* высота навбара */
.custom-navbar {
    min-height: 80px;
}

.custom-navbar .navbar-brand {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* отсупы между элементами
меню navbar */
.custom-navbar .nav-item {
    margin-left: 2rem;
    margin-right: 2rem;
}

/* данное правило действует только в веб-версии */
@media (min-width: 992px) {

    /* Чёрный жирный текст для всех ссылок */
    .custom-navbar .nav-link {
        /* прозрачная нижняя граница */
        border-bottom: 2px solid transparent;
        transition: border-color 0.2s ease;
    }

    /* нижняя граница становится черной при наведении на пункт меню */
    .custom-navbar .nav-link:hover {
        border-bottom-color: #000;
    }
}

/* Чёрный жирный текст для всех ссылок */
.custom-navbar .nav-link {
    color: #000 !important;
    font-weight: 700;
}

/* Активный пункт меню navbar*/
.custom-navbar .nav-link.active {
    border-bottom-color: #C62828;
}

/* Hero-карусель */
.hero-carousel {
    /* На мобильных высота определяется контентом, без лишнего пространства */
    height: auto;
    max-height: 60vh;
    /* Не даем карусели быть слишком высокой */
    /* ограничиваем максимальную высоту при очень широких экранах */
    overflow: hidden;
    /* обнуление отсутпа после блока */
    margin-bottom: 0;
}

.hero-slide-img {
    object-fit: cover;
    /* картинка заполняет контейнер, обрезая лишнее */
    height: 100%;
}

.hero-carousel .carousel-inner {
    height: 100%;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .hero-carousel {
        min-height: 70vh;
        /* На десктопах возвращаем фиксированную высоту */
        height: 70vh;
    }
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1) !important;
}

.wave-divider {
    position: relative;
    height: 70px;
    overflow: hidden;
}

.wave-divider::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39 56.44c58-10.79 114.16-30.13 172-41.86 82.39-16.72 168.19-17.73 250.45-.39C823.78 31 906.67 72 985.66 92.83c70.05 18.48 146.53 26.09 214.34 3V0H0v27.35a600.21 600.21 0 00321.39 29.09z' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat;
    background-size: cover;
}

a {
    color: var(--bs-primary);
}

a:hover {
    color: #0c0c0c;
}

.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
}

body {
    line-height: 1.7;
}

.img-wrapper {
    aspect-ratio: 4 / 3;
    /* отношение ширины к высоте; можно 1/1, 16/9 и т.д. */
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* картинка заполнит контейнер, обрезая лишнее */
    transition: transform 0.3s;
    /* для лёгкого эффекта при наведении (опционально) */
}

.product-card {
    border: 1px solid rgba(0, 0, 0, .125);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.product-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
}

.btn-primary {
    --bs-btn-bg: #C62828;
    --bs-btn-border-color: #C62828;
    --bs-btn-hover-bg: #B71C1C;
    --bs-btn-hover-border-color: #B71C1C;
    --bs-btn-active-bg: #B71C1C;
    --bs-btn-active-border-color: #B71C1C;
    --bs-btn-disabled-bg: #C62828;
    --bs-btn-disabled-border-color: #C62828;
}

.btn-outline-primary {
    --bs-btn-color: #C62828;
    --bs-btn-border-color: #C62828;
    --bs-btn-hover-bg: #C62828;
    --bs-btn-hover-border-color: #C62828;
    --bs-btn-active-bg: #B71C1C;
    --bs-btn-active-border-color: #B71C1C;
}

/* Карточки новостей */
.news-card {
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 0.375rem;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.news-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
}

.news-card-img-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-detail-image img {
    max-height: 400px;
    object-fit: cover;
}

.news-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.page-item.active .page-link {
    background-color: #C62828;
    border-color: #C62828;
    color: #fff;
}

/* Мобильный дропдаун категорий – по ширине экрана */
@media (max-width: 767.98px) {
    .dropdown-menu {
        max-height: 60vh;
        overflow-y: auto;
    }
}