/* /css/news.css */

/* Секция статей на главной */
.articles-section {
    padding: 5rem 0;
    background: var(--bg-white);
}

.articles-slider-container {
    margin-top: 3rem;
    position: relative;
    padding: 0 40px;
}

.articles-slider {
    overflow: hidden;
    padding: 10px 5px; /* Добавлен отступ для видимости теней */
}

/* Навигация слайдера */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary);
    background: rgba(255,255,255,0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.2rem !important;
    color: var(--primary);
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--secondary);
    color: var(--primary);
}

.swiper-pagination-bullet {
    background: var(--primary);
}

.swiper-pagination-bullet-active {
    background: var(--secondary);
}

/* Страница со списком статей */
.articles-list-page {
    padding: 3rem 0 5rem;
}

/* Сетка статей */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Карточка статьи (используется и в слайдере, и в сетке) */
.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    border: 1px solid #eef2f6;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -8px rgba(64,191,188,0.1);
    border-color: var(--primary);
}

.article-card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
}

.article-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--secondary);
}

.article-date {
    position: relative;
    padding-left: 20px;
}

.article-date::before {
    content: '📅';
    position: absolute;
    left: 0;
    top: 0;
}

.article-card-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--dark);
}

.article-card-content p {
    color: #4a5a6a;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    align-self: flex-start;
}

.read-more:hover {
    text-decoration: underline;
}

.read-more::after {
    content: '→';
    transition: transform 0.2s;
}

.read-more:hover::after {
    transform: translateX(3px);
}

.articles-all-link {
    text-align: center;
    margin-top: 3rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Кнопка "Ещё новости" на странице списка */
.load-more-container {
    text-align: center;
    margin: 40px 0 20px;
}

.btn--primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn--primary:hover {
    background: #2ea09e;
}

.btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-block;
    margin-left: 15px;
    color: var(--primary);
}

/* Индикаторы загрузки и сообщения */
.loading-indicator, 
.no-articles, 
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    font-size: 1.2rem;
    color: #666;
}

.error-message {
    color: #d32f2f;
}

.no-more-news {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--secondary);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .articles-slider-container {
        padding: 0 20px;
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-card-image {
        height: 180px;
    }
    
    .article-card-content h3 {
        font-size: 1.2rem;
    }
}
/* Дополнительные стили для Swiper */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    height: auto;
    display: flex;
}

.article-card {
    width: 100%;
    height: 100%;
}
.swiper-button-next, .swiper-button-prev {width:calc(var(--swiper-navigation-size)/ 44 * 44)}