/* ========================================
   NEWS PAGE - Новостная страница
   По макету Figma
   ======================================== */

:root {
    /* Colors */
    --color-white: #FFFFFF;
    --color-primary: #1E293B;
    --color-secondary: #475569;
    --color-tertiary: #94A3B8;
    --color-brand: #3B33F8;
    --color-brand-secondary: #382DDD;
    --color-bg-light: #F1F5F9;
    --color-border: #E2E8F0;
    
    /* Fonts */
    --font-family: 'TT Firs Neue Variable', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   PAGE CONTAINER
   ======================================== */
.news-page {
    padding: 40px 0 40px 32px;
}

.news-page .container {
    max-width: 1440px;
    margin: 0 auto;
    padding-right: 32px;
}

/* ========================================
   PAGE HEADER
   ======================================== */
.news-page__header {
    margin-bottom: 32px;
}

.news-page__title {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 48px;
    line-height: 1.25;
    color: var(--color-primary);
    margin: 0 0 8px 0;
}

.news-page__subtitle {
    font-family: var(--font-family);
    font-weight: 450;
    font-size: 18px;
    line-height: 1.556;
    color: var(--color-secondary);
    margin: 0;
}

/* ========================================
   FEATURED NEWS (большой блок сверху)
   ======================================== */
.news-featured {
    background: var(--color-bg-light);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    gap: 83px;
    margin-bottom: 32px;
    align-items: center;
}

.news-featured__image {
    width: 189px;
    height: 267px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-featured__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-featured__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
}

.news-featured__text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-featured__title {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 24px;
    line-height: 1.333;
    color: var(--color-primary);
    margin: 0;
}

.news-featured__description {
    font-family: var(--font-family);
    font-weight: 450;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-primary);
    margin: 0;
}

.news-featured__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 24px;
    height: 40px;
    background: var(--color-brand);
    color: var(--color-white);
    border-radius: 8px;
    border: none;
    font-family: var(--font-family);
    font-weight: 450;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
    width: fit-content;
}

.news-featured__button:hover {
    background: var(--color-brand-secondary);
}

/* ========================================
   NEWS GRID
   ======================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}

/* ========================================
   NEWS CARD
   ======================================== */
.news-card {
    background: var(--color-white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.12);
}

.news-card__image-wrapper {
    position: relative;
    width: 100%;
    height: 197px;
    overflow: hidden;
}

.news-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--color-white);
    border-radius: 4px;
    font-family: var(--font-family);
    font-weight: 450;
    font-size: 12px;
    line-height: 1.333;
    color: var(--color-secondary);
}

.news-card__content {
    padding: 24px 0 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.news-card__header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.news-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.news-card__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-family);
    font-weight: 450;
    font-size: 12px;
    line-height: 1.333;
    color: var(--color-secondary);
    white-space: nowrap;
}

.news-card__icon-button {
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
    border: none;
    border-radius: 800px;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.3s;
}

.news-card__icon-button:hover {
    background: var(--color-border);
}

.news-card__icon-button svg {
    width: 16px;
    height: 16px;
}

.news-card__title {
    font-family: var(--font-family);
    font-weight: 450;
    font-size: 18px;
    line-height: 1.556;
    color: var(--color-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__date {
    font-family: var(--font-family);
    font-weight: 450;
    font-size: 12px;
    line-height: 1.333;
    color: var(--color-tertiary);
    margin-top: auto;
}

/* ========================================
   PAGINATION
   ======================================== */
.news-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.news-pagination__info {
    font-family: var(--font-family);
    font-weight: 450;
    font-size: 14px;
    line-height: 1.429;
    color: var(--color-secondary);
}

.news-pagination__controls {
    display: flex;
    gap: 16px;
}

.news-pagination__button,
.news-pagination__page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: transparent;
}

.news-pagination__button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.news-pagination__button svg {
    width: 24px;
    height: 24px;
}

.news-pagination__page {
    color: var(--color-secondary);
}

.news-pagination__page.active {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 800px;
    color: var(--color-primary);
}

.news-pagination__page:hover:not(.active) {
    background: var(--color-bg-light);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .news-featured {
        gap: 32px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .news-page {
        padding: 24px 16px;
    }
    
    .news-page .container {
        padding-right: 0;
    }
    
    .news-page__title {
        font-size: 32px;
        line-height: 1.25;
    }
    
    .news-page__subtitle {
        font-size: 16px;
    }
    
    .news-featured {
        flex-direction: column;
        gap: 24px;
        padding: 16px;
    }
    
    .news-featured__image {
        width: 100%;
        height: 200px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .news-pagination {
        flex-direction: column;
        gap: 16px;
    }
    
    .news-pagination__controls {
        width: 100%;
        justify-content: center;
    }
}


