/* 
  News/news.css
  Styles for News List and Article Pages
*/

/* News List Card Layout */
.news-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-img-container {
    position: relative;
    width: 100%;
    padding-top: 60%;
    /* Aspect Ratio 5:3 */
    overflow: hidden;
    background-color: #f0f0f0;
    /* Fallback color */
}

.news-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img-container img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.875rem;
    color: #6B7280;
    /* text-gray-500 */
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E2337;
    /* Theme dark color */
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc {
    font-size: 1rem;
    color: #4B5563;
    /* text-gray-600 */
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Limit to 3 lines */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    color: #6680B3;
    /* Theme accent color */
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.news-read-more svg {
    width: 16px;
    height: 16px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.news-card:hover .news-read-more {
    color: #354b77;
    /* Darker accent on hover */
}

.news-card:hover .news-read-more svg {
    transform: translateX(4px);
}

/* Article Detail Page Styles */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.article-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.article-date {
    display: inline-block;
    background-color: #EEF2F5;
    /* bg-primary */
    color: #6B7280;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1E2337;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.5rem;
    }
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
    /* text-gray-700 */
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1E2337;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid #6680B3;
    padding-left: 1.5rem;
    color: #4B5563;
    font-style: italic;
    margin: 2rem 0;
}

/* Link Styles within Article Content */
.article-content a {
    color: #6680B3;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.article-content a:hover {
    color: #354b77;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    color: #6680B3;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: transform 0.2s ease;
}

.back-btn:hover {
    transform: translateX(-4px);
}

/* Pagination (Simple for now) */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: white;
    color: #1E2337;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid #E5E7EB;
}

.page-btn.active {
    background-color: #6680B3;
    color: white;
    border-color: #6680B3;
}


/* Share Buttons */
.share-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
    text-align: center;
}

.share-title {
    font-size: 1.125rem;
    color: #4B5563;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    transition: transform 0.2s ease, opacity 0.2s;
}

.share-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.share-line {
    background-color: #06C755;
}

.share-fb {
    background-color: #1877F2;
}

.share-copy {
    background-color: #6B7280;
}

.share-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Ensure share buttons are white even inside article-content */
.article-content .share-btn {
    color: white !important;
    text-decoration: none;
}

/* Section Title */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1E2337;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #6680B3 0%, #354b77 100%);
    border-radius: 2px;
}

/* Video Grid Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Video Card */
.video-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #000;
    cursor: pointer;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-container .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-card:hover .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.video-play-btn {
    width: 64px;
    height: 64px;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-card:hover .video-play-btn {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.video-play-btn svg {
    width: 28px;
    height: 28px;
    color: #fff;
    margin-left: 4px;
}

/* Video Content */
.video-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-date {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
}

.video-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1E2337;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-desc {
    font-size: 0.875rem;
    color: #4B5563;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-modal video {
    width: 100%;
    height: auto;
    display: block;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-modal-close svg {
    width: 24px;
    height: 24px;
    color: #fff;
}