/* ===== NEWS PAGE ===== */

/* --- Section Header --- */
.news-sec h3 {
    text-align: center;
    color: #212529;
    margin: 25px 0;
    font-weight: 600;
    font-size: 1.9rem;
   
}

/* --- Year Filter --- */
.news-years {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 0 0 30px 0;
    background: #e8f5ee;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border-radius: 40px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(34,153,97,0.12);
    flex-wrap: wrap;
}

.news-year-btn {
    padding: 9px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    background: transparent;
    color: #229961;
    border: none;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    user-select: none;
}

.news-year-btn:hover {
    background: rgba(34, 153, 97, 0.15);
}

.news-year-btn.active {
    background: #229961;
    color: white;
    box-shadow: 0 4px 12px rgba(34, 153, 97, 0.35);
}

/* --- Grid --- */
.news-grid-section {
    padding: 20px 0 60px;
}

.news-grid-section .container {
    max-width: 1200px;
}

/* --- News Card --- */
.news-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(27, 94, 32, 0.08);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 42px rgba(0,0,0,0.13);
}

/* --- Card Image --- */
.news-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

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

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

/* Image overlay */
.news-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(27, 94, 32, 0.60);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.news-card:hover .news-card-overlay {
    opacity: 1;
}

.view-icon {
    background: rgba(255,255,255,0.15);
    border: 2px solid white;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: transform 0.3s ease;
}

.news-card:hover .view-icon {
    transform: scale(1.1);
}

/* --- Card Body --- */
.news-card-body {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 3px solid #229961;
}

.news-card-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: #00B4B4;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== MODAL ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
    overflow-y: auto;
}

.modal-backdrop.hidden {
    display: none;
}

.news-modal {
    width: min(820px, 100%);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 40px 100px rgba(10, 15, 30, 0.45);
    overflow: hidden;
    position: relative;
    animation: modalIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(30px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #229961;
    color: white;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 10;
    box-shadow: 0 4px 14px rgba(34, 153, 97, 0.45);
    transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    background: #1a7a4e;
    transform: scale(1.1);
}

/* Image fill */
.modal-img-wrap {
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    background: #000;
}

.modal-image {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-content {
    padding: 24px 28px 30px;
    border-top: 3px solid #229961;
}

.modal-tag {
    display: inline-block;
    background: #e8f5ee;
    color: #229961;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.modal-meta {
    font-size: 0.82rem;
    color: #00B4B4;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.news-modal h3 {
    margin: 0;
    font-size: 1.35rem;
    color: #1a1a2e;
    line-height: 1.5;
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .news-card-img {
        height: 150px;
    }

    .news-sec h2 {
        font-size: 1.6rem;
    }

    .news-modal h3 {
        font-size: 1.1rem;
    }

    .modal-content {
        padding: 18px 20px 22px;
    }
}

@media (max-width: 480px) {
    .news-card-img {
        height: 130px;
    }

    .news-card-body {
        padding: 10px 12px 14px;
    }

    .news-card-title {
        font-size: 0.82rem;
    }
}
