html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

.news-section {
    background-image: url('../../assets/images/bg-news.webp'); 
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 100px 0;
    overflow: hidden; 
    z-index: 99;
    position: relative;
}

.news-slider-wrapper {
    width: 100%;
    padding-left: calc((100% - 1200px) / 2 + 20px);
    margin-top: 40px;
}

@media (max-width: 1200px) {
    .news-slider-wrapper {
        padding-left: 20px;
    }
}

#news-slick .slick-list {
    overflow: visible; 
}

.news-card {
    padding-right: 45px;
    outline: none;
}

#news-slick .slick-slide:nth-child(even) .news-card {
    margin-top: 120px;
}

.news-card .img-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  transition: transform 0.5s ease; 
}


.img-wrapper:hover img {
  transform: scale(1.05); 
}

.news-card img {
    width: 100%;
    object-fit: cover;
}


.news-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}


.btn-view-all {
    display: inline-block;
    padding: 8px 30px;
    border: 1px solid #333;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-view-all:hover {
    background-color: #333;
    color: #fff;
}


.center-action {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #999;
}

.drag-text { font-size: 20px; }

.drag-line {
    width: 50px;
    height: 2px;
    background-color: #ccc;
    position: relative;
    display: block;
}

.drag-line.left::before {
    content: '';
    position: absolute;
    left: 0;
    top: -3px;
    width: 9px;
    height: 9px;
    border-top: 2px solid #ccc;
    border-left: 2px solid #ccc;
    transform: rotate(-45deg);
}

.drag-line.right::after {
    content: ''; position: absolute; right: 0; top: -3px;
    width: 9px; height: 9px;
    border-top: 2px solid #ccc; border-right: 2px solid #ccc;
    transform: rotate(45deg);
}

.custom-slider-arrows {
    display: flex;
    gap: 10px;
}

.custom-prev, 
.custom-next {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid #333;
    background-color: #fff;
    color: #3333336b;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}


.custom-prev:not(.slick-disabled):hover,
.custom-next:not(.slick-disabled):hover {
    background-color: #E22723;
    color: #fff;
    border: 1px solid #E22723;
}


.custom-prev.slick-disabled,
.custom-next.slick-disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: default;
    opacity: 0.6;
}


.news-detail-wrapper {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 155px 0 100px 0;
    position: relative;
    overflow: hidden;
    background: 
    url('../../assets/images/news/bg-news-left.svg') left center no-repeat,
    url('../../assets/images/news/bg-news-right.svg') right center no-repeat;
    background-attachment: fixed;
}

.close-btn {
    position: absolute;
    top: 115px;
    right: 92px;
    color: #006CAF;
    transition: transform 0.3s;
    z-index: 10;
}
.close-btn:hover {
    transform: scale(1.1);
}

.news-title {
    color: #006CAF;
    font-size: 40px;
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 40px;
    text-align: left;
}

.main-image {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
}

.main-image img {
    max-width: 75%;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.news-content p, .news-content span, .news-content div{
    font-family:Geist,sans-serif!important;
    line-height: 1.7;
}
.news-content p {
    color: #565656;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
    font-family:Geist,sans-serif!important;
}

.full-dotted-line {
    width: 100%;
    height: 1px;
    border-top: 2px dashed #cccccc;
    margin: 60px 0;
}

.gallery-title {
    text-align: center;
    color: #111111;
    font-size: 40px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
}

.gallery-grid a {
    display: block;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3; 
    object-fit: cover; 
    display: block;
    transition: transform 0.4s ease;
}

.gallery-grid a:hover img {
    transform: scale(1.05);
}

.news-wrapper {
    max-width: 1920px;
    margin: 0 auto;
    padding: 80px 20px 0 20px; /* เผื่อระยะซ้ายขวา 20px */
    box-sizing: border-box;
}

/* =========================================
   2. กล่องเนื้อหา (ระยะ Content 1200px + 2 คอลัมน์)
   ========================================= */
.news-wrapper .news-list {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 40px; 
    padding-bottom: 120px; 
}

/* =========================================
   3. สไตล์การ์ดข่าว (News Card)
   ========================================= */
.news-wrapper .news-card {
    display: block;
    text-decoration: none;
    color: #111111;
    padding-right: 0;
}

/* 🎯 พระเอกของเรา: ดันคอลัมน์ที่ 2 (เลขคู่) ลงมา 120px โดยไม่ทำให้ระยะห่างบรรทัดพัง */
.news-wrapper .news-list .news-card:nth-child(even) {
    transform: translateY(120px);
}

.news-wrapper .img-wrapper {
    width: 100%;
    border-radius: 12px; /* มุมโค้งตามภาพ */
    overflow: hidden;
}

.news-wrapper .img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease; /* เอฟเฟกต์ซูมสมูทๆ */
}

/* ลูกเล่น Hover ซูมภาพตอนเอาเมาส์ชี้ */
.news-wrapper .news-card:hover .img-wrapper img {
    transform: scale(1.05);
}

.news-wrapper .text-wrapper {
    padding: 10px 0 0 0;
}

.news-wrapper .text-wrapper p {
    margin: 0;
    font-size: 18px;
    line-height: 1.5;
    color: #111;
    
    /* (ทางเลือก) ถ้าต้องการตัดข้อความที่ยาวเกิน 3 บรรทัดให้เป็น ... */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   4. ปุ่มเปลี่ยนหน้า (Pagination)
   ========================================= */
.pagination-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding-top: 40px; /* ระยะห่างจากกล่องข่าวมาหาปุ่ม */
}

.page-num, .page-btn, .page-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    text-decoration: none;
    color: #565656;
    font-size: 18px;
    transition: all 0.3s ease;
}

.page-btn {
    background-color: #f5f5f5;
}

.page-num:hover, .page-btn:hover, .page-num.active {
    background-color: #006CAF; /* สีฟ้า TISCO */
    color: #ffffff;
}

/* =========================================
   5. สำหรับหน้าจอแท็บเล็ตและมือถือ (Responsive)
   ========================================= */
@media (max-width: 992px) {
    .news-list {
        gap: 40px 20px;
        padding-bottom: 80px; 
    }
    .news-wrapper .news-list .news-card:nth-child(even) {
    transform: translateY(0);
}


}

@media (max-width: 768px) {
    .news-list {
        grid-template-columns: 1fr; /* บนมือถือบีบเหลือคอลัมน์เดียว */
        gap: 40px;
        padding-bottom: 0; 
    }
    
    /* ล้างค่าดึงลงทั้งหมดบนมือถือ ให้เรียงตรงๆ ปกติ */
    .news-list .news-card:nth-child(even) {
        transform: translateY(0);
    }
    .news-wrapper .news-list .news-card:nth-child(even) {transform: unset;}
    .news-wrapper .news-list {gap: 50px 0;    padding-bottom: 0;}
    .pagination-wrapper {padding-top: 0;}
}

/* คลุมพื้นที่ Pagination ทั้งหมด และดันระยะห่างจากรูปข่าว */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* ระยะห่างระหว่างปุ่ม */
    margin-top: 0; /* ระยะห่างจากกล่องข่าวสารด้านบน */
    width: 100%;
}

/* สไตล์พื้นฐานของปุ่มตัวเลข */
.page-num {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50px; /* ทำปุ่มให้โค้งมนนิดๆ */
    background-color: transparent;
    color: #565656;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* เอฟเฟกต์ตอนเอาเมาส์ชี้ และ ตอนที่กำลังอยู่หน้านั้น (Active) */
.page-num:hover, 
.page-num.active {
    background-color: #006CAF; /* สีน้ำเงินของเว็บ */
    color: #ffffff;
    border: 1px solid #006CAF;
}

/* สไตล์ของปุ่มลูกศร (Prev / Next) */
.page-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50px;
    background-color: #f5f5f5; /* สีพื้นหลังเทาอ่อน */
    color: #565656;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background-color: #E22723; /* สีแดงของเว็บเมื่อชี้ลูกศร */
    color: #ffffff;
}

/* จุดไข่ปลา (...) */
.page-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    color: #565656;
    font-size: 18px;
    letter-spacing: 2px;
}

/* =========================================
   📱 สำหรับหน้าจอมือถือ (Responsive)
   ========================================= */
@media (max-width: 568px) {
    .pagination-wrapper {
        gap: 5px;
        margin-top: 40px;
        margin-bottom: 0;
    }
    
    .page-num, .page-btn, .page-dots {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}



@media (max-width: 1536px) {
.news-wrapper .text-wrapper {padding: 0 10px 0;}   
.news-wrapper {padding: 40px 0 0 0;}    
.news-wrapper .news-list{max-width: 1100px;}    
.news-section {padding: 80px 0;}
.news-slider-wrapper {padding-left: calc((100% - 1100px) / 2 + 15px);}   
.drag-text, .news-wrapper .text-wrapper p {font-size: 17px;} 
.custom-prev, .custom-next {width: 37px;height: 37px;}
.news-title, .gallery-title {font-size: 30px;}
.news-content p {line-height: 1.4;}
.news-detail-wrapper {padding: 60px 0 100px 0;}
.close-btn {top: 25px;}
}

@media (max-width: 1280px) {
.news-section {padding: 110px 0;}    
.news-wrapper .news-list{max-width: 900px;}        
p, .news-wrapper .text-wrapper p {font-size: 14px;}
.news-slider-wrapper {padding-left: calc((100% - 900px) / 2 + 12px);}
.drag-text {font-size: 15px;}
.drag-line {width: 45px;height: 1.5px;}
.drag-line.left::before{border-top: 1.5px solid #ccc;border-left: 1.5px solid #ccc;}
.drag-line.right::after {top: -4px;border-top: 1.5px solid #ccc;border-right: 1.5px solid #ccc;}
.custom-prev, .custom-next {width: 35px;height: 35px;}
.site-footer .container {max-width: 900px;}
.news-title, .gallery-title {font-size: 25px;}
.news-content p {font-size: 14px;}
.news-detail-wrapper {padding: 110px 0 75px 0;}
.full-dotted-line {margin: 40px 0;}
.close-btn {top: 80px;}.top-section {margin-top: 0px!important;}

}

@media (max-width: 1080px) {
 
}

@media (max-width: 992px) {
.top-section {margin-top: 55px !important;}
 .news-section {padding: 70px 20px 50px 20px}
.news-content p, p, .drag-text, .news-wrapper .text-wrapper p{font-size: 16px;}
.news-detail-wrapper {padding: 85px 0 60px 0;background: url('../../assets/images/news/bg-news-left.svg') top center no-repeat;background-size: 100vh;background-attachment: fixed;}
.news-title { font-size: 24px; }
.gallery-grid { grid-template-columns: repeat(3, 1fr); }
.about-title-wrap .sub-heading {font-size: 20px;}
.news-wrapper {padding: 30px 20px 0 20px;}
.news-section-in {padding: 70px 0 50px 0!important;}
.close-btn {
        top: 60px;
        right: 50px;
    }

}

@media (max-width: 768px) {
    .main-image img {max-width: 100%;}
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 15px;}
    .close-btn { top: 85px; right: 15px; }
    .news-slider-wrapper {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* 2. ล้างช่องว่าง 45px ฝั่งขวาของการ์ดทิ้ง (ตัวการที่ทำให้รูปถัดไปโผล่มา) */
    .news-slider-wrapper a.news-card {
        padding: 0 !important; 
        margin: 0 !important;
    }

    /* 3. ล้าง Margin ของตัว Slick Track เพื่อให้มันเต็มจอ 100% พอดี */
    #news-slick .slick-slide {
        margin: 0 !important;
        padding: 0 5px; /* ถ้าอยากให้มีช่องไฟซ้ายขวานิดนึงให้ใส่บรรทัดนี้ แต่ถ้าอยากให้ชิดขอบไปเลยให้เปลี่ยนเป็น 0 */
    }
    
}


@media (max-width: 850px) {
    .news-wrapper .news-list {grid-template-columns: repeat(1, 1fr);}
    .news-wrapper .news-list .news-card:nth-child(even) {margin-top: 0;}
    .news-wrapper .text-wrapper {padding: 0 10px 0;}
}

@media (max-width: 568px) {

    .close-btn svg{
    width: 22px;
}
    .close-btn { top: 50px;right: 15px;}
    .custom-slider-arrows {display: none;}
    .news-bottom-bar .left-action {
        order: 3; 
    }
    .news-bottom-bar .center-action {
        order: 2; 
    }
    
    .news-bottom-bar .right-action {
        order: 1; 
    }
    .news-bottom-bar {
    display: flex;
    flex-direction: column; 
    align-items: center;    
    justify-content: center;
    width: 100%;            
    margin-top: 20px;
    gap: 0;              
}
}

@media (max-width: 480px) {

}

