/* pages/news-details/view.css */

.breadcrumbs ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumbs ol li {
    color: #fff;
}

.breadcrumbs ol li + li::before {
    content: "/";
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumbs ol li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs ol li a:hover {
    color: #fff;
}

.breadcrumbs ol li.current {
    color: #fff;
    font-weight: 500;
}

/* News Details Section */
.courses-course-details {
    padding: 60px 0;
}

/* Main Image */
.news-main-image {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.news-main-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.news-main-image:hover img {
    transform: scale(1.02);
}

/* Title */
.courses-course-details h3 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

/* Meta Info */
.news-meta .badge {
    font-size: 14px;
    padding: 8px 15px;
    font-weight: 400;
}

.news-meta .badge i {
    margin-right: 5px;
}

/* News Description */
.news-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-top: 20px;
}

.news-description p {
    margin-bottom: 20px;
}

.news-description h4,
.news-description h5 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 15px;
}

.news-description ul,
.news-description ol {
    margin: 20px 0;
    padding-left: 30px;
}

.news-description li {
    margin-bottom: 10px;
}

.news-description img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 5px;
}

/* SDG Section */
.sdg-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.sdg-section h5 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.sdg-section h5 i {
    color: #667eea;
    margin-right: 8px;
}

.sdg-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.sdg-link {
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.sdg-link:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

.sdg-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 5px;
}

/* Documents Section */
.documents-section {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.documents-section h5 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.documents-section h5 i {
    color: #667eea;
    margin-right: 8px;
}

.document-list {
    margin-top: 15px;
}

.document-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.document-item:last-child {
    border-bottom: none;
}

.document-link {
    display: flex;
    align-items: center;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    padding: 10px 15px;
    border-radius: 5px;
}

.document-link:hover {
    background: #f8f9fa;
    color: #667eea;
}

.document-link i:first-child {
    font-size: 24px;
    margin-right: 12px;
    color: #dc3545;
}

.document-link span {
    flex: 1;
}

.document-link i:last-child {
    color: #667eea;
}

/* SDG Compact Section - แบบเล็ก */
.sdg-compact-section {
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
}

.sdg-compact-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sdg-compact-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.sdg-compact-link:hover {
    transform: translateY(-3px);
}

.sdg-compact-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Share Section */
.share-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.share-section h5 {
    font-size: 18px;
    color: #333;
    margin-bottom: 0;
}

.share-section h5 i {
    margin-right: 5px;
}

/* Animation */
.news-main-image,
.news-card {
    animation: fadeInUp 0.6s ease;
}
.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(137, 40, 127, 0.15);
}

/* News Image Link */
.news-image-link {
    text-decoration: none;
    display: block;
}

.news-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

/* News Card Content */
.news-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
    flex-grow: 1;
}

.news-card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a:hover {
    color: #89287f;
}

/* News Meta */
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.news-date-text {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-date-text i {
    color: #89287f;
}

/* SDG Badges */
.sdg-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.sdg-badge-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.sdg-badge-link:hover {
    transform: translateY(-3px);
}

.sdg-badge-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .courses-course-details h3 {
        font-size: 26px;
    }
    
    .news-description {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .courses-course-details {
        padding: 40px 0;
    }
    
    .courses-course-details h3 {
        font-size: 22px;
    }
    
    .news-meta .badge {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .news-description {
        font-size: 14px;
    }
    
    .documents-section {
        padding: 15px;
    }
    
    .document-link {
        padding: 8px 10px;
    }
    
    .document-link span {
        font-size: 14px;
    }
    
    .sdg-compact-icon {
        width: 38px;
        height: 38px;
    }
    
    .share-section h5 {
        display: block;
        margin-bottom: 10px;
    }
    
    /* Responsive news cards */
    .news-image-wrapper {
        height: 220px;
    }
    
    .news-card-content {
        padding: 20px;
    }
    
    .news-card-title {
        font-size: 1rem;
    }
    
    .sdg-badge-icon {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 575px) {
    .sdg-compact-icons {
        gap: 6px;
    }
    
    .sdg-compact-icon {
        width: 35px;
        height: 35px;
    }
    
    .news-image-wrapper {
        height: 200px;
    }
    
    .news-card-content {
        padding: 15px;
    }
    
    .sdg-badges {
        gap: 6px;
    }
    
    .sdg-badge-icon {
        width: 35px;
        height: 35px;
    }
}

/* Animation */
.news-main-image,
.card {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Print Styles */
@media print {
    .share-section,
    .breadcrumbs {
        display: none;
    }
    
    .news-main-image {
        box-shadow: none;
    }
    
    .news-description {
        font-size: 12pt;
    }
    
    .card {
        page-break-inside: avoid;
    }
}

/* Gallery Section */
.news-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.news-gallery-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
}

.news-gallery-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.news-gallery-item:hover img {
    transform: scale(1.05);
}