/* =========================================
   News Page Specific Styles
   ========================================= */

.news-header {
    background: linear-gradient(135deg, rgba(204, 0, 0, 0.8) 0%, rgba(102, 0, 0, 0.9) 100%), url('../images/cabinet.jpg') center/cover no-repeat !important;
    padding: 100px 20px 80px;
    position: relative;
}
.news-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 0;
}
.news-header .container {
    position: relative;
    z-index: 1;
}

#news-featured-container, #news-grid-container {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Featured News Card */
.news-featured {
    display: flex;
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    border: none;
}

.news-featured:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    transform: translateY(-8px);
}

.news-featured-img {
    flex: 1;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.news-featured-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.1), transparent);
}

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

.news-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(204, 0, 0, 0.1);
    color: var(--red);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    align-self: flex-start;
}

.news-date {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-featured-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

body.dark-mode .news-featured-title {
    color: var(--white);
}

.news-desc {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.news-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--blue);
    font-size: 1rem;
    transition: gap 0.2s;
    align-self: flex-start;
}

.news-featured:hover .news-btn {
    gap: 12px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Standard News Card */
.news-card {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    border: none;
    display: flex;
    flex-direction: column;
    opacity: 0;
}

.news-card.visible, .news-featured.visible {
    opacity: 1;
}

.news-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-6px);
}

.news-card-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

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

.news-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--card);
    position: relative;
    z-index: 1;
}

.news-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin: 15px 0;
    line-height: 1.3;
}

body.dark-mode .news-card-title {
    color: var(--white);
}

.news-card-desc {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 25px;
    flex: 1;
}

.news-card:hover .news-btn {
    gap: 10px;
}

@media (max-width: 992px) {
    .news-featured {
        flex-direction: column;
    }
    .news-featured-img {
        min-height: 250px;
    }
    .news-featured-content {
        padding: 25px;
    }
    .news-featured-title {
        font-size: 1.8rem;
    }
}

/* =========================================
   News Detail Modal (.mo)
   ========================================= */
.mo {
    position: fixed; inset: 0; background: rgba(15,25,35,.55); z-index: 2000;
    display: none; align-items: flex-start; justify-content: center;
    padding: 28px 16px; overflow-y: auto; backdrop-filter: blur(2px);
}
.mo.show { display: flex; }
.mo .md {
    background: var(--card); border-radius: 18px; width: 100%; max-width: 850px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18); animation: moShow .25s ease; margin: auto;
}
@keyframes moShow {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
.mo .mh {
    padding: 20px 26px; border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex; align-items: center; justify-content: space-between;
}
.mo .mb { padding: 22px 26px; }
.mo-close {
    width: 30px; height: 30px; border-radius: 8px; border: none;
    background: transparent; color: var(--muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    transition: all 0.15s;
}
.mo-close:hover { background: rgba(0,0,0,0.05); color: var(--dark); }

/* =========================================
   Lightbox Modal for News Gallery
   ========================================= */
.lightbox-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox-modal.show { opacity: 1; pointer-events: auto; }
.lightbox-close {
    position: absolute; top: 20px; right: 30px; color: #fff; font-size: 3rem;
    cursor: pointer; z-index: 10000; transition: color 0.2s;
}
.lightbox-close:hover { color: var(--re); }
.lightbox-content { max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-content img { max-width: 100%; max-height: 80vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox-caption { margin-top: 15px; text-align: center; color: #fff; }
.lightbox-caption h3 { font-size: 1.5rem; margin-bottom: 5px; }
.lightbox-caption p { font-size: 1rem; color: rgba(255,255,255,0.7); }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 2rem;
    width: 60px; height: 60px; border-radius: 50%; display: none; align-items: center;
    justify-content: center; cursor: pointer; transition: all 0.3s; z-index: 10001;
}
.lightbox-nav:hover { background: var(--blue); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
