:root {
    --brand-primary: #1677C9;
    --brand-primary-dark: #125f9f;
    --brand-secondary: #32B8B8;
    --brand-tertiary: #A3A8E0;
}

.news-hero {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.news-hero .hero-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
}

.news-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.news-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.news-main-section {
    padding: 60px 0;
    background-color: #f8f9fa;
    position: relative;
    z-index: 1;
}

.news-main-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, rgba(0, 51, 153, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 51, 153, 0.03) 1px, transparent 1px),
        repeating-linear-gradient(45deg, transparent, transparent 150px, rgba(0, 51, 153, 0.02) 150px, rgba(0, 51, 153, 0.02) 151px),
        repeating-linear-gradient(-45deg, transparent, transparent 150px, rgba(0, 51, 153, 0.02) 150px, rgba(0, 51, 153, 0.02) 151px);
    background-size: 80px 80px, 80px 80px, 100% 100%, 100% 100%;
    z-index: -1;
    pointer-events: none;
}

.featured-news-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    min-height: 360px;
}

.featured-img {
    flex: 1.2;
    overflow: hidden;
}

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

.featured-news-card:hover .featured-img img {
    transform: scale(1.04);
}

.featured-content {
    flex: 1;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
    font-size: 1rem;
    color: #666;
}

.tag {
    padding: 6px 34px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1.15rem;
}

.featured-content .news-meta .date {
    font-size: 1.3rem;
    font-weight: 600;
}

.blue-tag {
    background-color: rgba(163, 168, 224, 0.24);
    color: var(--brand-primary);
}

.featured-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: #222;
    line-height: 1.3;
}

.featured-content p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 1rem;
}

.featured-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.author {
    color: #999;
    font-size: 0.9rem;
}

.read-more-btn {
    padding: 10px 24px;
    background-color: var(--brand-primary);
    color: #fff;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.read-more-btn:hover {
    background-color: var(--brand-primary);
    animation: btnPulse 1.2s ease-in-out infinite;
}

.news-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.filter-btn {
    padding: 8px 20px;
    border: none;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.filter-btn:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(19, 44, 76, 0.12);
}

.filter-btn.active {
    background-color: #333;
    color: #fff;
}

.news-grid-carousel {
    width: 100%;
}

.news-grid-panel {
    width: 100%;
    overflow: hidden;
}

.news-grid-track {
    display: flex;
    width: 100%;
    transition: transform 0.35s ease;
}

.news-grid-slide {
    min-width: 100%;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.news-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.news-item-enter {
    opacity: 0;
    transform: translateY(18px);
    animation: newsItemIn 0.52s ease forwards;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.news-item-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.news-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.news-item:hover .news-item-img img {
    transform: scale(1.05);
}

.news-date-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: linear-gradient(155deg, rgba(22, 119, 201, 0.95), rgba(163, 168, 224, 0.9));
    color: #fff;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 20px rgba(7, 40, 79, 0.25);
    padding: 7px 10px;
    line-height: 1.18;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-align: center;
    min-width: 64px;
    backdrop-filter: blur(2px);
}

.news-overlay-tag {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    color: #1d2e45;
    border: 1px solid rgba(22, 119, 201, 0.22);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-overlay-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-secondary);
    box-shadow: 0 0 0 3px rgba(50, 184, 184, 0.18);
}

.news-item-content {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-item-content h3 {
    margin: 0 0 10px;
    color: #222;
    font-size: 1.02rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-content p {
    margin: 0 0 14px;
    color: #666;
    font-size: 0.92rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-link {
    margin-top: auto;
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.item-link:hover {
    color: var(--brand-primary-dark);
}

.news-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    gap: 20px;
}

.news-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-control-btn:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    transform: scale(1.08);
}

.news-pagination-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.25s;
}

.page-dot.active {
    width: 22px;
    border-radius: 999px;
    background: var(--brand-secondary);
}

@keyframes newsItemIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ripple-overlay {
    position: fixed;
    border-radius: 50%;
    background-color: #f8f9fa;
    transform: scale(0);
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ripple-overlay.expand {
    transform: scale(1);
}

@media (max-width: 1200px) {
    .news-grid {
        gap: 16px;
    }
}

@media (max-width: 992px) {
    .featured-news-card {
        flex-direction: column;
    }

    .featured-img {
        height: 280px;
    }

    .featured-content {
        padding: 30px;
    }

    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }
}

@media (max-width: 576px) {
    .news-hero h1 {
        font-size: 2.2rem;
    }

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

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