/* Основные стили для сайта МОХ */

:root {
    --primary-color: #84b967;
    --primary-dark: #6a9c55;
    --secondary-color: #f7faf5;
    --accent-color: #ff4a4a;
    --text-color: #000000;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --black: #000000;
}

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 140px; /* Увеличил из-за большего логотипа */
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0;
    min-height: 140px; /* Для большого логотипа */
    overflow: visible; /* Чтобы логотип не обрезался */
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-wrap: wrap;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Логотип - ЦЕНТР (десктоп) */
.navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    top: 10px;
}

.navbar-brand img {
    height: 140px !important;
    width: auto !important;
    max-width: 200px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

/* Кнопка бургер-меню */
.navbar-toggler {
    border: none;
    padding: 8px 10px;
    font-size: 1.25rem;
    order: 3;
    z-index: 11;
    margin-left: auto;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

/* Контейнер меню (Bootstrap collapse) */
.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    order: 4;
    margin-top: 60px; /* Отступ для логотипа */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 15px;
    z-index: 1000;
}

/* Обертка для группировки меню */
.navbar-nav-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Общие стили навигации */
.navbar-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    width: 100%;
    margin: 5px 0;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    font-size: 16px;
    padding: 12px 15px !important;
    display: block;
    width: 100%;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(132, 185, 103, 0.1);
}

/* Активная ссылка (мобильная версия) */
.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    background-color: rgba(132, 185, 103, 0.1);
    border-left: 3px solid var(--primary-color);
}

/* ===== ДЕСКТОПНАЯ ВЕРСИЯ (992px и больше) ===== */
@media (min-width: 992px) {
    body {
        padding-top: 160px; /* Еще больше из-за большого логотипа */
    }
    
    .navbar {
        min-height: 160px;
    }
    
    .navbar-brand {
        height: 140px;
        top: 20px;
    }
    
    .navbar-brand img {
        height: 140px !important;
        max-width: 220px;
    }
    
    /* Скрываем бургер на десктопе */
    .navbar-toggler {
        display: none;
    }
    
    /* Показываем меню всегда на десктопе */
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 80px; /* Больше отступ для большого логотипа */
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        order: 2;
        width: 100%;
    }
    
    /* Горизонтальное меню на десктопе */
    .navbar-nav-wrapper {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        align-items: center;
    }
    
    .navbar-nav {
        flex-direction: row;
        align-items: center;
        width: auto;
    }
    
    /* Левая группа (3 пункта) */
    .navbar-nav:first-child {
        margin-right: auto;
        justify-content: flex-end;
        padding-right: 100px; /* Отступ от логотипа */
    }
    
    /* Правая группа (3 пункта) */
    .navbar-nav:last-child {
        margin-left: auto;
        justify-content: flex-start;
        padding-left: 100px; /* Отступ от логотипа */
    }
    
    .nav-item {
        width: auto;
        margin: 0 10px;
    }
    
    .nav-link {
        padding: 8px 15px !important;
        width: auto;
        text-align: center;
        background-color: transparent;
        border-radius: 0;
    }
    
    .nav-link:hover {
        background-color: transparent;
    }
    
    /* Подчеркивание при наведении (только для десктопа) */
    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        background: var(--primary-color);
        left: 50%;
        bottom: -5px;
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }
    
    .nav-link:hover::after {
        width: calc(100% - 30px);
    }
    
    /* Активная ссылка (десктоп) */
    .nav-link.active {
        background-color: transparent;
        border-left: none;
    }
    
    .nav-link.active::after {
        width: calc(100% - 30px);
        background: var(--primary-color);
    }
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ (меньше 992px) ===== */
@media (max-width: 991px) {
    body {
        padding-top: 100px; /* Меньше на мобильных */
    }
    
    .navbar {
        min-height: 100px;
        padding: 0;
    }
    
    .navbar .container {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    /* Логотип на мобильных - по центру сверху */
    .navbar-brand {
        position: static;
        transform: none;
        order: 1;
        height: 80px;
        margin: 0 auto;
        width: 100%;
        text-align: center;
    }
    
    .navbar-brand img {
        height: 80px !important;
        max-height: 80px;
        max-width: 150px;
    }
    
    /* Бургер-меню справа */
    .navbar-toggler {
        order: 2;
        position: absolute;
        right: 15px;
        top: 25px;
    }
    
    /* Мобильное меню (скрыто по умолчанию) */
    .navbar-collapse {
        order: 3;
        margin-top: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    /* Когда меню открыто */
    .navbar-collapse.show {
        max-height: 500px;
        padding: 15px;
    }
    
    /* Bootstrap collapse классы */
    .navbar-collapse.collapsing {
        height: auto;
        transition: height 0.35s ease;
    }
    
    .nav-link.active {
        border-left: 3px solid var(--primary-color);
    }
}

/* ===== ОСТАЛЬНЫЕ СТИЛИ (без изменений) ===== */

/* Герой-секция */
.hero-section {
    padding: 100px 0;
    background-color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero-text {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(132, 185, 103, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Секции */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* Карточки шагов */
.steps-section {
    padding: 100px 0;
}

.step-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-10px);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h4 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.step-card p {
    color: var(--text-light);
}

/* Карточки товаров */
.products-section {
    padding: 100px 0;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h5 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-info p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Миссия */
.mission-section {
    padding: 100px 0;
}

.mission-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Отзывы */
.reviews-section {
    padding: 100px 0;
    background-color: var(--secondary-color);
}

.review-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.reviewer-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--primary-color);
}

.review-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    font-style: italic;
    line-height: 1.8;
}

.reviewer-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.review-product {
    color: var(--text-light);
    font-size: 0.9rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

/* Квиз */
.quiz-section {
    padding: 100px 0;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h5 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
}

/* Блог */
.blog-section {
    padding: 100px 0;
}

.blog-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-content h5 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.blog-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.blog-link:hover {
    text-decoration: underline;
}

/* Форма входа */
.account-section {
    padding: 100px 0;
}

.login-form {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(132, 185, 103, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

/* Футер */
.footer {
    background-color: #0d0d0d;
    color: var(--white);
    padding: 60px 0 30px;
}

.footer h5 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer p, .footer li {
    color: rgba(255, 255, 255, 0.7);
}

.footer ul {
    padding-left: 0;
}

.footer li {
    list-style: none;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: 30px;
}

hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

/* Для средних экранов */
@media (max-width: 1200px) and (min-width: 992px) {
    .nav-item {
        margin: 0 8px;
    }
    
    .nav-link {
        font-size: 15px;
        padding: 8px 12px !important;
    }
    
    .navbar-nav:first-child {
        padding-right: 80px;
    }
    
    .navbar-nav:last-child {
        padding-left: 80px;
    }
}

/* ===== СТИЛИ ДЛЯ КОРЗИНЫ В МЕНЮ ===== */

/* Контейнер для пункта корзины в меню */
.cart-menu-item {
    margin-left: 10px;
}

/* Ссылка корзины в меню */
.cart-menu-link {
    position: relative;
    padding: 8px 12px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-menu-link i {
    font-size: 1.2rem;
}

/* Текст "Корзина" (скрыт на мобильных, виден на десктопе) */
.cart-text {
    font-weight: 500;
    margin-left: 4px;
}

/* Счетчик товаров */
.cart-count {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    padding: 0 6px;
}

/* Десктопная версия */
@media (min-width: 992px) {
    .cart-menu-item {
        margin-left: 20px;
    }
    
    .cart-menu-link {
        padding: 8px 16px !important;
        gap: 10px;
    }
    
    .cart-menu-link:hover {
        background-color: rgba(132, 185, 103, 0.1);
        border-radius: 8px;
    }
    
    .cart-count {
        position: absolute;
        top: 2px;
        right: 2px;
    }
    
    /* Скрываем бургер-меню на десктопе */
    .navbar-toggler.d-lg-none {
        display: none;
    }
}

/* Мобильная версия */
@media (max-width: 991px) {
    .cart-menu-item {
        margin-left: 0;
        margin-top: 10px;
        border-top: 1px solid var(--border-color);
        padding-top: 15px;
    }
    
    .cart-menu-link {
        padding: 12px 15px !important;
        justify-content: center;
        background-color: rgba(132, 185, 103, 0.05);
        border-radius: 8px;
    }
    
    .cart-text {
        display: inline !important; /* Показываем текст на мобильных */
        font-size: 1rem;
    }
    
    .cart-count {
        position: static;
        margin-left: 8px;
    }
}

/* Ховер-эффект для десктопа */
@media (min-width: 992px) {
    .cart-menu-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        background: var(--primary-color);
        left: 50%;
        bottom: -5px;
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }
    
    .cart-menu-link:hover::after {
        width: calc(100% - 32px);
    }
}

/* Показываем счетчик всегда, если есть товары */
.cart-count:not(:empty) {
    display: inline-flex;
}