:root {
    --primary-purple: #60256c;
    --secondary-gold: #e2b60d;
    --text-dark: #0f172a;
    --text-grey: #666;
    --bg-light: #f9f9f9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Kanit", sans-serif;
    background-color: #fff;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0px !important;
    padding-right: 0px !important;
    width: 100%;
}



.news-header {
    display: block;
    margin-bottom: 40px;
}

.news-title-box h1 {
    color: var(--primary-purple);
    font-size: 32px;
    line-height: 1.4;
    margin-bottom: 20px;
    font-weight: bold;
}

.text-primary,
body .text-primary,
.article-body .text-primary {
    color: var(--primary-purple) !important;
    text-decoration: underline !important;
}

.meta-info {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.share-icons {
    margin-left: auto;
    display: flex;

    font-size: large;

}

.share-icons i {
    padding: 10px;
}

.share-icons i:hover {
    background-color: var(--text-grey);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    padding: 10px;
}

.hero-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 65%;
    height: auto;
    /* height: 500px;
            object-fit: cover; */
    /* background-size: cover;
            background-position: center; */
    border-radius: 8px;
}

.news-gallery,
.related-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.news-gallery::-webkit-scrollbar,
.related-grid::-webkit-scrollbar {
    display: none;
}

.news-gallery {
    gap: 15px;
    margin-bottom: 40px;
}

.gallery-img {
    min-width: calc(25% - 11.25px);
    /* แสดง 4 รูปต่อหน้าจอ Desktop */
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.4s ease;
}

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

.related-grid {
    gap: 20px;
    margin-bottom: 20px;
}

.related-card {
    min-width: calc(33.333% - 13.33px);
    /* แสดง 3 การ์ดต่อหน้าจอ Desktop */
    overflow: hidden;
}

.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.47);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-prev,
.lightbox-next {
    border: none;
    outline: none;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    color: white;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.3s, color 0.3s;
    user-select: none;
    text-decoration: none;
}

.lightbox-prev {
    color: white;
    left: 20px;
}

.lightbox-next {
    color: white;
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #dbdbdb;
}

.lightbox-close:hover {
    color: #dbdbdb;
}

.article-body {
    color: var(--text-dark);
    font-size: 16px;
    margin-bottom: 50px;
    text-align: justify;
    font-weight: normal;
}

.article-body p {
    margin-bottom: 20px;
}

.section-header {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
}

.download-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
}

.pdf-icon {
    width: 48px;
    height: 40px;
    background-color: #d83d2d;
    /* background-image: url('img/pdf.png');
            background-size: cover;
            background-position: center; */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
}

.word-icon {
    width: 48px;
    height: 40px;
    background-image: url('../images/word.png');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
}

.excel-icon {
    width: 48px;
    height: 40px;
    background-image: url('../images/excel.png');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
}

.download-btn {
    color: var(--text-grey);
    font-size: 20px;
    cursor: pointer;
}

.related-section {
    margin-bottom: 60px;
    margin-top: 50px;
}

.news-gallery,
.related-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.news-gallery::-webkit-scrollbar,
.related-grid::-webkit-scrollbar {
    display: none;
}

.news-gallery {
    gap: 15px;
    padding: 10px 0;
}

.gallery-img {
    flex: 0 0 calc(25% - 11.25px);
    max-width: calc(25% - 11.25px);
    height: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.4s ease;
}

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

.related-grid {
    gap: 20px;
}

.related-card {
    flex: 0 0 calc(33.333% - 13.33px);
    max-width: calc(33.333% - 13.33px);
    overflow: hidden;
}

.related-img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #fff;
    background-size: contain;
    transition: transform 0.4s ease;
}

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

.related-content {
    padding: 15px;
}

.related-title {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-title:hover {
    color: var(--primary-purple);
}

.related-desc {
    font-size: 14px;
    font-weight: normal;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-date {
    font-weight: bold;
    font-size: 12px;
    color: #131313;
    padding-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}




.breadcrumb {
    flex-wrap: nowrap !important;
    overflow: hidden;
    align-items: center;
    font-weight: normal;
}

.breadcrumb-item {
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-item.active.text-truncate {
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    display: inline-block;
}

.breadcrumb a {
    color: var(--text-dark);
    text-decoration: none;
}

.breadcrumb-item.active a {
    color: var(--text-grey);
    text-decoration: none;
}

.related-card a {
    color: var(--primary-purple);
    text-decoration: none;
}

.download-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.file-size {
    font-size: 12px;
    color: #767676;
}

.slider-wrapper {
    position: relative;
    width: 100%;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #333;
    font-size: 36px;
    padding: 5px;
    transition: color 0.3s ease;
}

.slider-arrow:hover {
    background-color: transparent;
    color: var(--primary-purple);
}

.slider-arrow.left {
    left: -50px;
}

.slider-arrow.right {
    right: -50px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 50px;
    width: 100%;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d1d5db;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.slider-dots .dot:hover {
    background-color: #9ca3af;
}

.slider-dots .dot.active {
    background-color: var(--primary-purple);
    transform: scale(1.2);
    width: 24px;
    border-radius: 10px;
}

.no-data-msg {
    text-align: center;
    color: var(--text-grey);
    font-size: 18px;
    padding: 60px 20px;
    width: 100%;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ccc;
    margin-bottom: 30px;
}

@media (max-width: 1300px) {
    .slider-wrapper {
        padding: 0 40px;
    }

    .slider-arrow {
        font-size: 32px;
    }

    .slider-arrow.left {
        left: 0px;
    }

    .slider-arrow.right {
        right: 0px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px !important;
    }

    .news-gallery,
    .related-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .related-card {
        min-width: 85%;
        scroll-snap-align: center;
    }

    .gallery-img {
        min-width: calc(50% - 7.5px);
        scroll-snap-align: start;
    }

    .news-gallery::-webkit-scrollbar,
    .related-grid::-webkit-scrollbar {
        display: none;
    }

    .slider-wrapper {
        padding: 0 35px;
    }

    .slider-arrow {
        font-size: 24px;
    }

    .slider-arrow.left {
        left: 0px;
    }

    .slider-arrow.right {
        right: 0px;
    }

    .lightbox-content {
        max-width: 95%;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-image {
        width: 100%;
        height: auto;
    }

}
