/* ===========================
   NEWS PAGE - Final Version
   Комбінація логіки V1 + стилістики V3
   =========================== */

/* ===========================
   NEWS INTRO
   =========================== */

.news-intro {
    padding: 60px 0 40px;
    background: var(--white);
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
}

.intro-title {
    text-align: center;
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 800;
}

.intro-text {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===========================
   FILTERS
   =========================== */

.news-filters {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filters-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ===========================
   FEATURED NEWS
   =========================== */

.featured-news-section {
    padding: 60px 0;
    background: var(--light-gray);
}

.featured-news {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.featured-news:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.featured-image-wrapper {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.featured-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.featured-news:hover .featured-image-wrapper img {
    transform: scale(1.08);
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        transparent 40%,
        transparent 100%);
    padding: 30px;
}

.featured-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--secondary-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-category svg {
    stroke: var(--primary-color);
}

.featured-content {
    padding: 40px;
}

.featured-date {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.938rem;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.featured-content h2 {
    font-size: 2.25rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 800;
}

.featured-content p {
    font-size: 1.063rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 30px;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.063rem;
    transition: gap 0.3s ease;
}

.featured-news:hover .featured-link {
    gap: 16px;
}

.featured-link svg {
    stroke: var(--primary-color);
}

/* ===========================
   NEWS GRID
   =========================== */

.news-grid-section {
    padding: 60px 0 80px;
    background: var(--light-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.news-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(44, 62, 80, 0.9);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-events {
    background: rgba(41, 128, 185, 0.9);
}

.badge-education {
    background: rgba(142, 68, 173, 0.9);
}

.badge-achievements {
    background: rgba(39, 174, 96, 0.9);
}

.badge-patients {
    background: rgba(230, 126, 34, 0.9);
}

.news-card-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-date {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.813rem;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.news-card-content h3 {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.news-card-content p {
    color: var(--text-light);
    font-size: 0.938rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
    transition: gap 0.3s ease;
}

.news-card:hover .read-more {
    gap: 12px;
}

.read-more svg {
    stroke: var(--primary-color);
}

/* ===========================
   PAGINATION
   =========================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.pagination-btn {
    width: 45px;
    height: 45px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
}

.pagination-btn:hover:not(:disabled):not(.disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination-btn:disabled,
.pagination-btn.disabled,
.pagination-btn[aria-disabled="true"] {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===========================
   QUESTION CTA
   =========================== */

.question-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.cta-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: var(--white);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.cta-icon {
    width: 80px;
    height: 80px;
    background: rgba(145, 208, 114, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.cta-icon svg {
    stroke: var(--primary-color);
}

.cta-box h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.cta-box p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.cta-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-actions .btn {
    min-width: 240px;
}

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

@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .intro-title {
        font-size: 2.5rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .featured-news {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .featured-image-wrapper {
        height: 350px;
    }

    .featured-content {
        padding: 40px 30px;
    }

    .featured-content h2 {
        font-size: 1.875rem;
    }

    .featured-content p {
        font-size: 1rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .news-intro {
        padding: 40px 0 30px;
    }

    .intro-title {
        font-size: 2rem;
    }

    .news-filters {
        position: relative;
        top: 0;
    }

    .filters-wrapper {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .featured-news-section {
        padding: 40px 0;
    }

    .featured-image-wrapper {
        height: 280px;
    }

    .featured-content {
        padding: 30px 25px;
    }

    .featured-content h2 {
        font-size: 1.5rem;
    }

    .news-grid-section {
        padding: 40px 0 60px;
    }

    .news-card-image {
        height: 220px;
    }

    .news-card-content {
        padding: 25px 20px;
    }

    .cta-box {
        padding: 40px 30px;
    }

    .cta-box h2 {
        font-size: 2rem;
    }

    .cta-box p {
        font-size: 1rem;
    }

    .cta-actions {
        flex-direction: column;
    }

    .cta-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .intro-title {
        font-size: 1.75rem;
    }

    .featured-image-wrapper {
        height: 220px;
    }

    .featured-content h2 {
        font-size: 1.25rem;
    }

    .news-card-content h3 {
        font-size: 1.125rem;
    }

    .cta-icon {
        width: 60px;
        height: 60px;
    }

    .cta-icon svg {
        width: 36px;
        height: 36px;
    }

    .cta-box h2 {
        font-size: 1.75rem;
    }
}
