/* Layout 05 - Latest News & Events Styles */

/* Content Intro */
.content-intro {
    margin-top: 30px;
    margin-bottom: 40px;
}

.content-intro p {
    font-size: 16px;
    color: #000000;
    font-family: 'Noto Sans Thai', sans-serif;
    font-weight: 500;
}

/* Featured News */
.featured-news {
    margin-bottom: 50px;
}

.featured-image {
    position: relative;
    overflow: hidden;
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.photo-clip{
    position: absolute;
    top: 6px;
    right: 15px;
    z-index:10; 
    width: 50px;
    height: 50px;
    background: #FFB119;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-clip:hover{
    transform: scale(1.05);
}

.featured-button{
    position: absolute;
    top: 7px;
    right: 7px;
}

.featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-image:hover .featured-img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    top: -7px;
    right: 0px;
    width: 120px;
    height: 120px;
}

.featured-button-icon{
    width: 30px;
    height: 30px;
}

.featured-play-icon {
    width: 120px;
    height: 120px;
}

.featured-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    border-bottom-left-radius: 24px;   /* ถ้ามีโค้ง */
    border-bottom-right-radius: 24px;
    font-family: 'Noto Sans Thai', sans-serif;
}

/* Category Title */
.category-title {
    margin: 40px 0 20px 0;
    text-align: center;
}

.category-title h3 {
    color: var(--primary-red);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    position: relative;
    display: inline-block;
}

.category-title h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #FFD700;
    border-radius: 2px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.news-item {
    position: relative;
    background: #FCF5F5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.news-item:hover .news-img {
    transform: scale(1.1);
}

.news-photo-clip{
    position: absolute;
    top: 6px;
    right: 15px;
    z-index:10; 
    width: 43px;
    height: 43px;
    background: #FFB119;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-photo-clip:hover{
    transform: scale(1.05);
}

.news-button{
    position: absolute;
    top: 6px;
    right: 6px;
}

.news-button-icon{
    width: 25px;
    height: 25px;
}

.news-overlay {
    position: absolute;
    top: -6px;
    right: -20px;
    width: 120px;
    height: 120px;
}

.news-play-icon {
    width: 100px;
    height: 100px;
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #A41F22;
    margin: 0 60px 0 0;
    line-height: 1.4;
    font-family: 'Noto Sans Thai', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.7rem;
    color: #112D55;
    font-weight: 600;
    font-family: 'Noto Sans Thai', sans-serif;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-img {
        height: 300px;
    }
    
    .featured-caption {
        padding: 30px 15px 15px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .featured-img {
        height: 250px;
    }
    
    .featured-overlay {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
    
    .featured-play-icon {
        width: 25px;
        height: 25px;
    }
    
    .news-overlay {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
    
    .news-play-icon {
        width: 18px;
        height: 18px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-content h3 {
        font-size: 0.9rem;
    }
    
    .news-date {
        font-size: 0.8rem;
    }
}

/* Animation for news items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-item {
    animation: fadeInUp 0.6s ease forwards;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }
.news-item:nth-child(6) { animation-delay: 0.6s; }

/* Loading state */
.news-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.news-grid.loading::after {
    content: 'กำลังโหลด...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 1.1rem;
}
