body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('../images/Foni1.jpg'); /* Путь к вашему изображению */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

header {
    background: #375A4C;
    color: rgb(0, 252, 59);
    padding: 15px;
    text-align: center;
}
nav ul {
    list-style: none;
    padding: 0;
}
nav ul li {
    display: inline;
    margin: 0 10px;
}
nav ul li a {
    text-decoration: none;
    color: #B0E57C; /* Белый цвет текста */
    font-weight: bold;
    padding: 10px 15px;
    transition: color 0.3s ease, background 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.3); /* Полупрозрачный белый фон при наведении */
    color: #FFD700; /* Золотистый текст при наведении */
}

.container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.card {
    background: white;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    margin: 10px;
    padding: 20px;
    width: 300px;
    text-align: center;
}
.card img {
    max-width: 100%;
    border-radius: 10px;
}
html, body {
    height: 100%; /* Устанавливает высоту на 100% для родительских элементов */
    margin: 0; /* Убирает отступы */
    display: flex;
    flex-direction: column; /* Размещает элементы в колонку */
}

main {
    flex: 1; /* Заставляет основной контент занимать всё доступное пространство */
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: 0; /* Убирает отступ сверху */
}

.card {
    position: relative; /* Для позиционирования псевдоэлемента */
    background: url('../images/background.jpg') no-repeat center center;
    background-size: cover; /* Растягивает изображение */
    border: 1px solid #ddd;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    margin: 10px;
    padding: 20px;
    width: 300px;
    height: 400px; /* Высота карточки */
    color: white; /* Белый цвет текста */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7); /* Тень текста */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Обрезает псевдоэлемент */
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Полупрозрачный черный фон */
    z-index: 1; /* Позволяет тексту быть выше */
}

.card h2,
.card p {
    position: relative; /* Поднимает текст над оверлеем */
    z-index: 2;
}
.card img {
    max-width: 100%;
    max-height: 200px;
    object-fit: cover;
    margin-bottom: 10px;
    filter: brightness(1.5); /* Увеличивает яркость изображения */
}
.hidden-cards {
    display: none; /* Изначально скрыто */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    justify-content: center; /* Центрирует карточки горизонтально */
    align-items: center; /* Центрирует карточки вертикально */
    flex-wrap: wrap; /* Если не помещается, перенос на новую строку */
    gap: 1rem; /* Расстояние между карточками */
}

.hidden-cards.show {
    display: flex; /* Показываем карточки */
    opacity: 1;
    transform: translateY(0);
}






/* Общие стили для карточек */
.hidden-cards .card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0); /* Тень текста для читаемости */
    height: 200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    border-radius: 10px;
    flex: 0 1 calc(25% - 1rem); /* Карточки занимают 25% ширины контейнера */
    max-width: 300px; /* Ограничиваем максимальную ширину карточек */
    margin: 10px; /* Отступы между карточками */
}
/* Уникальные фоны для карточек */
#new-products-extra .card:nth-child(1) {
    background-image: url('../images/product1.jpg');
}

#new-products-extra .card:nth-child(2) {
    background-image: url('../images/product2.jpg');
}

#new-products-extra .card:nth-child(3) {
    background-image: url('../images/product3.jpg');
}

#new-products-extra .card:nth-child(4) {
    background-image: url('../images/product4.jpg');
}
#season-tips-extra .card:nth-child(1) {
    background-image: url('../images/White.jpg');
}

#season-tips-extra .card:nth-child(2) {
    background-image: url('../images/White.jpg');
}

#season-tips-extra .card:nth-child(3) {
    background-image: url('../images/White.jpg');
}

#season-tips-extra .card:nth-child(4) {
    background-image: url('../images/White.jpg');
}

.card-button {
    all: unset; /* Сбрасывает стандартное поведение кнопки */
    cursor: pointer; /* Указывает, что элемент кликабельный */
    display: block;
    width: 100%;
    height: 100%;
}


.blog-posts {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.post {
    width: 300px;
    height: 400px; /* Высота карточки */
    background-image: url('../images/post1.jpg'); /* Путь к изображению */
    background-size: cover; /* Покрывает весь блок */
    background-position: center; /* Центрирует изображение */
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    color: white; /* Белый текст для контраста */
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7); /* Тень текста для читаемости */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Текст располагается у нижнего края */
    padding: 20px;
    position: relative; /* Для дополнительных эффектов */
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

}


.post h2,
.post p,
.post .read-more {
    position: relative; /* Поднимает текст над затемнением */
    z-index: 2;
    margin: 0;
}

.post h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.post p {
    font-size: 1em;
    margin-bottom: 15px;
}

.read-more {
    align-self: flex-start;
    padding: 10px 20px;
    background-color: #6c9b5e;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: #568947;
}
.post.post1 { background-image: url('../images/zeml.jpg'); }
.post.post2 { background-image: url('../images/top.jpg'); }
.post.post3 { background-image: url('../images/belok.jpg'); }

body.blog-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Черный с прозрачностью */
    z-index: -1; /* Оставляет слой позади содержимого */
}

/* Секция лайфхаков */
.tips-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.tip {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 300px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tip:hover {
    transform: scale(1.05);
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.3);
}

.tip h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #375A4C;
}

.tip p {
    font-size: 1em;
    color: #666;
    margin-bottom: 20px;
}

.tip .read-more {
    display: inline-block;
    padding: 10px 20px;
    background: #6c9b5e;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.tip .read-more:hover {
    background: #568947;
}


/* Модальное окно */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Затемнение фона */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.modal-content img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
}

.modal-content h2 {
    margin-top: 0;
    color: #375A4C;
}

.modal-content p {
    color: #666;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #FF0000;
}

/* Стили для главного меню */
header {
    background: #375A4C;
    color: rgb(0, 252, 59);
    padding: 15px;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    text-align: center; /* Центрирование ссылок */
}

nav ul li {
    display: inline;
    margin: 0 10px;
}

nav ul li a {
    text-decoration: none;
    color: #B0E57C;
    font-weight: bold;
    padding: 10px 15px;
    transition: color 0.3s ease, background 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #FFD700;
}

nav ul li a.active {
    background: rgba(0, 252, 59, 0.8); /* Для активного меню */
    color: white;
    border-radius: 5px;
}




/* Стили для страницы Магазин */

/* Основные настройки страницы Магазин */
.shop-page {
    background-color: #ffffff; /* Белый фон */
    background-image: none; /* Убирает изображение, если оно есть */
    color: #333; /* Цвет текста для контраста */
}



/* Секция вступительной информации */
.intro {
    background-color: #e0e0e0; /* Светло-серый фон */
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 900px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.intro h2 {
    color: #333;
    margin-bottom: 10px;
}
.intro p {
    color: #666;
    line-height: 1.6;
}

/* Секция категорий товаров */
.categories {
    background-color: #f1f8f5; /* Светло-зеленый фон */
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 1200px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.categories ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    gap: 15px;
}

.categories ul li {
    margin: 0;
}

.categories ul li a {
    background-color: #6c9b5e;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.categories ul li a:hover {
    background-color: #4e753e;
}

/* Секция карточек товаров */
.product-category {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.product-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 280px;
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.product-card h4 {
    font-size: 1.2rem;
    color: #333;
    margin: 10px 0;
}

.product-card p {
    font-size: 1rem;
    color: #666;
    margin: 0 10px 10px;
}

.product-card .price {
    font-size: 1.1rem;
    color: #6c9b5e;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Секция акций */
.promotions {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 900px;
}

.promotions h2 {
    color: #375A4C;
    text-align: center;
    margin-bottom: 20px;
}

.promo-block {
    background: #f1f8f5;
    border-left: 5px solid #6c9b5e;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.promo-block h3 {
    color: #375A4C;
    margin-bottom: 10px;
}

.promo-block p {
    color: #666;
    margin: 0;
}

/* Кнопка возврата к категориям */
button.return-to-categories {
    background-color: #6c9b5e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 20px auto;
    display: block;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button.return-to-categories:hover {
    background-color: #4e753e;
}

/* Адаптация для экранов менее 768px */
@media (max-width: 768px) {
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    nav ul li {
        display: block;
        margin: 5px 0;
    }

    .container {
        flex-direction: column;
        padding: 10px;
    }

    .card {
        width: 100%;
        max-width: 90%; /* Ограничиваем ширину карточки */
        margin: 10px auto;
    }

    .hidden-cards .card {
        flex: 0 1 calc(100% - 1rem); /* Карточка занимает всю ширину */
    }

    .blog-posts {
        flex-direction: column; /* Размещаем посты в колонку */
    }

    .post {
        width: 100%;
        height: auto; /* Автоматическая высота */
    }

    .categories ul {
        flex-wrap: wrap; /* Перенос категорий на новую строку */
    }

    .categories ul li a {
        padding: 10px;
        font-size: 14px; /* Уменьшаем размер шрифта */
    }

    .product-category {
        flex-direction: column; /* Располагаем карточки в колонку */
    }

    .product-card {
        width: 90%; /* Ширина карточки на мобильном экране */
        margin: 10px auto;
    }

    .modal-content {
        width: 90%; /* Уменьшаем модальное окно */
    }
}
