/* news-detail.css — SEAS news detail page (news-detail.php).
   Themed with the SEAS red/navy palette (#C8102E + #1e2a6f).
   Recent-news cards live under `.recent-news-grid` and don't
   collide with the homepage `.news-section` rules in home.css. */

.page-spacer { height: 2rem; }

/* News detail body */
.news-detail-section {
    padding: 3rem 0 2rem;
    background-color: #ffffff;
}
.news-detail-main {
    max-width: 900px;
    margin: 0 auto;
}
.news-detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e2a6f;
    margin: 0 0 1.5rem;
    line-height: 1.3;
    text-align: center;
}
.news-detail-text {
    font-size: 1.02rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    text-align: justify;
}
.news-detail-text p { margin-bottom: 1.1rem; }

/* Embedded video (YouTube) */
.news-video-container { margin: 2rem 0; }
.responsive-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
}
.responsive-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Image gallery */
.news-gallery { margin: 2rem 0 3rem; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.gallery-item {
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background: #f3f4f6;
}
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}
.gallery-image-container { height: 100%; width: 100%; }
.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}
.gallery-item:hover .gallery-image { transform: scale(1.05); }

/* Lightbox */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.lightbox-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80%;
    max-width: 1200px;
    margin: 0 auto;
}
.lightbox-content img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    z-index: 10000;
    cursor: pointer;
    transition: color 0.2s ease;
}
.lightbox-close:hover { color: #C8102E; }
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 16px;
    transition: all 0.2s ease;
    background-color: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    user-select: none;
}
.lightbox-prev { left: 5%; }
.lightbox-next { right: 5%; }
.lightbox-prev:hover,
.lightbox-next:hover { background-color: rgba(196, 31, 50, 0.7); }
.lightbox-counter {
    color: white;
    font-size: 16px;
    padding: 15px 0;
    font-weight: 500;
}

/* Back-to-news nav */
.news-detail-nav {
    margin-top: 2rem;
    text-align: center;
}

/* Recent News Section */
.recent-news-section {
    padding: 4rem 0;
    background-color: #f9fafb;
}
.recent-news-section .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e2a6f;
    margin-bottom: 2rem;
    text-align: center;
}
.recent-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.recent-news-item {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.recent-news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.recent-news-image {
    height: 170px;
    overflow: hidden;
}
.recent-news-image img,
.recent-news-image iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    border: 0;
}
.recent-news-item:hover .recent-news-image img { transform: scale(1.05); }
.recent-news-content {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.recent-news-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.6rem;
    line-height: 1.4;
    flex-grow: 1;
}
.recent-news-title a {
    color: #1e2a6f;
    text-decoration: none;
    transition: color 0.2s ease;
}
.recent-news-title a:hover { color: #C8102E; }

.recent-news-section .read-more-link {
    display: inline-block;
    color: #C8102E;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: auto;
    padding-top: 0.4rem;
}
.recent-news-section .read-more-link:hover {
    color: #a61729;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1200px) {
    .recent-news-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .news-detail-title { font-size: 1.7rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .recent-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .news-detail-title { font-size: 1.5rem; }
    .news-detail-text  { font-size: 0.95rem; text-align: left; }
    .recent-news-grid  { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 480px) {
    .news-detail-title { font-size: 1.3rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item { height: 180px; }
}
