
/* ====== Основний блок новин ====== */
.latest-news {
    margin-top: 0;
    text-align: center;
}

.intro-text {
    font-size: 1.1em;
    color: #555;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* ====== Обгортка карток ====== */
.news-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px 0;
    max-width: 1100px;
    margin: 0 auto;
}

/* ====== Картка новини ====== */
.news-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0px;
    padding: 10px;
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

/* ====== Зображення новини (завжди квадратне!) ====== */
.news-card .image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0px;
}

.news-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ====== Теги на зображенні ====== */
.news-card .tags {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
}

.news-card .tag {
    padding: 2px 8px;
    border-radius: 0px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
}

/* ====== Кольори тегів ====== */
.tag-sale {
    background-color: #e74c3c !important; /* червоний — акція */
}

.tag-cab {
    background-color: #f8d000  !important; /* червоний — акція */
}

.tag-news {
    background-color: #2980b9 !important; /* синій — новина */
}

.tag-other {
    background-color: #7f8c8d !important; /* сірий — інше */
}
/* ====== Заголовок новини ====== */
.news-card h3 {
    font-size: 16px;
    margin: 10px 0 5px;
    color: #222;
    line-height: 1.3;
    text-align: left;
}

/* ====== Дата новини ====== */
.news-card .news-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    text-align: left;
}

/* ====== Опис новини ====== */
.news-card p {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 8px;
    text-align: left;
    margin-top: 0px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 3 рядки */
    -webkit-box-orient: vertical;
    max-height: calc(1.4em * 3.5); /* 3.5 рядки */
}


/* ====== Кнопка "Читати далі" ====== */
.news-card a {
    display: inline-block;
    margin-top: auto;
    padding: 6px 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 0px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.news-card a:hover {
    background-color: #0056b3;
    text-decoration: none;
}
/* ====== Адаптивність ====== */
@media (max-width: 1024px) {
    .news-wrapper {
        gap: 16px;
    }

    .news-card {
        max-width: 280px;
    }

    .news-card h3 {
        font-size: 15px;
    }

.news-card p {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 8px;
    text-align: left;

    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 3 рядки */
    -webkit-box-orient: vertical;
    max-height: calc(1.4em * 3.5); /* 3.5 рядки */
}

}

@media (max-width: 768px) {
    .news-wrapper {
        flex-direction: row;
        gap: 10px;
    }

    .news-card {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .news-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .news-card {
        max-width: 95%;
    }

    .news-card .image-container {
        aspect-ratio: 1 / 1;
    }
}

.view-toggle button {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 6px 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 0px;
    transition: background-color 0.2s ease;
}

.view-toggle button.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.news-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.news-list.list-view {
    display: block;
}

.news-list.list-view .news-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.news-list.list-view .news-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.news-list.list-view .news-item h2 {
    margin-top: 0;
}

        .viewer-container {
            max-width: 900px;
            margin: 30px auto;
            background: #fff;
            padding: 25px;
            border-radius: 0px;
            border: 1px solid #e0e0e0;
            box-sizing: border-box;
        }
        .viewer-container img {
            max-width: 100%;
            height: auto;
            margin: 20px auto;
            display: block;
            border-radius: 0px;
        }
        .tags {
            text-align: center;
            margin-bottom: 20px;
        }
        .tag {
            display: inline-block;
            padding: 4px 10px;
            margin: 3px;
            border-radius: 0px;
            font-size: 12px;
            font-weight: bold;
            color: #fff;
            text-transform: uppercase;
        }
        .tag-sale { background-color: #e74c3c; } /* Акція */
        .tag-news { background-color: #2980b9; } /* Новина */
        .tag-other { background-color: #7f8c8d; } /* Інше */
        .back-link {
            display: inline-block;
            margin-top: 20px;
            text-decoration: none;
            color: #007bff;
            font-weight: 500;
        }
        .back-link:hover {
            text-decoration: underline;
        }
        .content {
            margin-top: 20px;
            line-height: 1.6;
            font-size: 15px;
            color: #333;
        }
        @media (max-width: 600px) {
            .viewer-container {
                padding: 15px;
            }
        }
		
		
		.news-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.news-filters label {
    font-size: 14px;
    color: #555;
    margin-right: 5px;
}

.news-filters select {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s ease;
}

.news-filters select:focus {
    border-color: #007bff;
    outline: none;
}

/* Трохи "згладжене" для меншого акценту */
.news-filters select option {
    font-size: 14px;
}

/* Додатково, якщо хочеш ще менш помітно: */
.news-filters select {
    box-shadow: none;
    border-radius: 0px;
    background-color: transparent;
    border: 1px solid #ddd;
}

.news-filters label {
    font-weight: normal;
    color: #666;
}


