/* News Section Styles */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.news-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.news-card {
    cursor: pointer;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.news-image-wrapper {
    position: relative;
    padding-top: 60%;
    /* Aspect ratio 16:9 approx */
    overflow: hidden;
    background-color: #f5f5f5;
    /* Lighter placeholder background */
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image-wrapper img {
    transform: scale(1.05);
}

.news-image-wrapper img[src*="placeholder"] {
    opacity: 0;
}

.news-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
    font-weight: 500;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
    flex-grow: 0;
}

.news-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.btn-primary {
    display: inline-block;
    background-color: #FFD700;
    color: #333;
    padding: 12px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2);
}

.btn-primary:hover {
    background-color: #FFC107;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: all 0.3s ease;
}

.pagination-btn.active,
.pagination-btn:hover {
    background-color: #FFD700;
    border-color: #FFD700;
    color: #333;
}




/* ========================================
   CSS СТИЛІ ДЛЯ ДЕТАЛЬНОЇ СТОРІНКИ НОВИНИ
   Додати до news.css
   ======================================== */

/* Контейнер для детальної новини */
.news-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Кнопка "Назад" */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.back-button:hover {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
    transform: translateX(-5px);
}

/* Стаття з деталями новини */
.news-detail {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Зображення новини */
.news-detail-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* Заголовок деталей */
.news-detail-header {
    padding-top: 30px;
    padding-left: 30px;
    padding-right: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.news-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 16px 0 0 0;
    line-height: 1.3;
}

/* Дата новини (переви́користання із news.css) */
.news-detail .news-date {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

/* Контент новини */
.news-detail-content {
    padding: 30px;
    font-size: 18px;
    line-height: 1.8;
    color: #555;
}

.news-detail-content p {
    margin-bottom: 20px;
}

.news-detail-content p:last-child {
    margin-bottom: 0;
}

/* Адаптив для планшетів */
@media screen and (max-width: 768px) {
    .news-detail-container {
        padding: 15px;
    }

    .news-detail-title {
        font-size: 26px;
    }

    .news-detail-header {
        padding: 20px;
    }

    .news-detail-content {
        padding: 20px;
        font-size: 16px;
    }

    .back-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Адаптив для мобільних */
@media screen and (max-width: 480px) {
    .news-detail-title {
        font-size: 22px;
    }

    .news-detail-header {
        padding: 15px;
    }

    .news-detail-content {
        padding: 15px;
        font-size: 15px;
    }

    .news-detail-image {
        max-height: 300px;
    }
}

/* На планшетах */
@media screen and (max-width: 1060px) {
    .news-grid-page {
        grid-template-columns: 1fr;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        margin: 20px 0;
    }
}

/* На телефонах */
@media screen and (max-width: 820px) {
    .news-grid-page {
        /* одна колонка */
        grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
        gap: 10px;
        margin: 10px 20px;
    }
}

/* На  мел телефонах */
@media screen and (max-width: 480px) {
    .news-grid-page {
        /* одна колонка */
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
        margin: 10px 20px;
    }
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ========================================
   ПІДСУМОК
   ======================================== */

/*
ЩО ДОДАЄ ЦЕЙ CSS:

1. .news-detail-container - обгортка для всієї детальної сторінки
2. .back-button - кнопка "Назад до новин"
3. .news-detail - контейнер статті з тінню та заокругленнями
4. .news-detail-image - зображення на всю ширину
5. .news-detail-header - заголовок + дата
6. .news-detail-content - текстовий контент новини
7. Hover ефекти для карток у списку
8. Responsive для планшетів та мобільних

ВИКОРИСТАННЯ:
- Додати ці стилі до src/frontend/css/news.css
- Або створити окремий файл news-detail.css та підключити його
*/