﻿/* ===== Base Styles ===== */
/* Hero Section */
.container-fluid.page-header {
    background-size: cover;
    background-position: center;
    position: relative;
}

    .container-fluid.page-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
    }

.container.text-center.py-5 {
    position: relative;
    z-index: 1;
}

/* News Filter */
.news-filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 0;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.filter-btn {
    background: none;
    border: 2px solid #424F9B;
    color: #424F9B;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .filter-btn.active,
    .filter-btn:hover {
        background: #424F9B;
        color: white;
    }

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.news-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .news-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

.news-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

    .news-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
        object-position: top;
    }

.news-card:hover .news-image-container img {
    transform: scale(1.05);
}

.news-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #424F9B;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

    .news-date-badge .day {
        font-size: 18px;
        line-height: 1;
    }

    .news-date-badge .month {
        font-size: 12px;
        line-height: 1;
        text-transform: uppercase;
    }

.news-video-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

    .news-video-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .play-btn i {
        color: #424F9B;
        font-size: 20px;
        margin-left: 5px;
    }

.news-card:hover .play-btn {
    background: #424F9B;
}

    .news-card:hover .play-btn i {
        color: white;
    }

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-source {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.source-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 10px;
}

.source-name {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-excerpt {
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* ===== Previous Read Full Article Style ===== */
.read-more {
    color: #424F9B;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

    .read-more i {
        margin-left: 5px;
        transition: transform 0.3s ease;
    }

    .read-more:hover {
        color: #2a356b;
        text-decoration: underline;
    }

        .read-more:hover i {
            transform: translateX(3px);
        }

/* ===== News Modal Styles ===== */
#newsModal .modal-content {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

#newsModal .modal-header {
    background-color: #424F9B;
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

#newsModal .modal-title {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0;
    color: white;
}

#newsModal .btn-close {
    filter: invert(1) brightness(100);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    margin: 0;
}

    #newsModal .btn-close:hover {
        opacity: 1;
    }

#newsModal .modal-body {
    padding: 2rem;
    line-height: 1.8;
    color: #555;
    max-height: 60vh;
    overflow-y: auto;
}

    #newsModal .modal-body p {
        margin-bottom: 1.5rem;
    }

    #newsModal .modal-body img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 1rem 0;
    }

#newsModal .modal-footer {
    border-top: 1px solid #eee;
    padding: 1rem 2rem;
    display: flex;
    justify-content: flex-end;
}

#newsModal .btn-secondary {
    background-color: #424F9B;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: all 0.2s ease;
    color: white;
}

    #newsModal .btn-secondary:hover {
        background-color: #323d7a;
    }

/* ===== Video Modal Styles ===== */
#videoModal .modal-content {
    border-radius: 10px;
    overflow: hidden;
    border: none;
}

#videoModal .modal-header {
    border-bottom: none;
    padding: 0.5rem 1rem;
}

#videoModal .btn-close {
    margin: 0;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 991.98px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    #newsModal .modal-dialog {
        margin: 1rem auto;
    }
}

@media (max-width: 767.98px) {
    .news-filter-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
    }

    .filter-btn {
        white-space: nowrap;
    }

    #newsModal .modal-header {
        padding: 1rem;
    }

    #newsModal .modal-title {
        font-size: 1.2rem;
    }

    #newsModal .modal-body {
        padding: 1.5rem;
        font-size: 0.95rem;
    }

    #newsModal .modal-footer {
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    #newsModal .modal-body {
        max-height: 50vh;
    }
}
