.news-section {
    position: relative;
    min-height: 100vh;
    padding: 80px 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: url("../images/bg-newsupdate.png") center/cover no-repeat;
}

.news-board {
    position: relative;
    z-index: 3;
    width: min(1080px, 76vw);
    margin-left: 10vw;
    filter: drop-shadow(0 24px 30px rgba(92, 61, 35, 0.22));
}
.news-board-bg {
    width: 100%;
}

.news-discord {
    position: absolute;
    z-index: 6;
    width: clamp(78px, 8vw, 118px);
    left: 8%;
    top: 4%;
}

.news-lunatic {
    position: absolute;
    z-index: 7;
    width: clamp(145px, 18vw, 255px);
    left: 11%;
    bottom: 13%;
    animation: floatNews 4s ease-in-out infinite;
}

.news-maid {
    position: absolute;
    z-index: 5;
    width: clamp(280px, 28vw, 500px);
    right: -2%;
    left: auto;
    bottom: -8%;
    pointer-events: none;
}

/* menu ยื่นออกมาเป็นที่คั่นหนังสือ */
.news-tabs {
    position: absolute;
    z-index: 9;
    left: -33%;
    top: 2%;

    display: flex;
    flex-direction: column;
    align-items: flex-end; /* สำคัญ */
    gap: 10px;
}

.news-tab {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.48;
    filter: grayscale(0.5) brightness(0.88);
    transform: translateX(0);
    transition: 0.25s ease;
}

.news-tab.active,
.news-tab:hover {
    opacity: 1;
    filter: none;
    transform: translateX(-6px);
}

.news-tab img {
    width: auto;
    height: 50px;
    display: block;
}

.news-inner {
    position: absolute;
    left: 10%;
    right: 18%;
    top: 23%;
    bottom: 16%;
    display: block;
}

.news-content-area {
    position: relative;
    height: 100%;
}

.news-list {
    display: none;
    height: 100%;
    overflow: visible;
    padding: 0;
}

.news-list.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
}

/* card ข่าวเอียงๆ แบบในตัวอย่าง */
.news-card {
    width: min(245px, 30%);
    min-height: 265px;
    padding: 12px 13px 16px;
    border-radius: 8px;
    background: #fff;
    border: 0;
    box-shadow: 0 10px 18px rgba(86, 65, 45, 0.18);
    transform: rotate(-3deg);
}

.news-card:nth-child(2) {
    transform: rotate(1.5deg) translateY(8px);
}

.news-card:nth-child(3) {
    transform: rotate(3.5deg) translateY(1px);
}

.news-card img {
    width: 100%;
    display: block;
    border-radius: 5px;
    margin-bottom: 8px;
}

.news-card span {
    display: inline-block;
    margin-bottom: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #5272de;
    font-size: 12px;
    font-weight: 800;
}

.news-card h3 {
    margin: 0 0 6px;
    color: #161616;
    font-size: 15px;
    line-height: 1.22;
}

.news-card p {
    margin: 0;
    color: #777;
    font-size: 13px;
    line-height: 1.25;
}

.news-see-more {
    position: absolute;
    left: 50%;
    bottom: 8%;
    z-index: 9;
    transform: translateX(-50%);
    min-width: 140px;
    height: 44px;
    border-radius: 10px;
    border: 3px solid #8c5d34;
    background: #fff8e7;
    color: #6f4728;
    font-weight: 900;
    font-size: 17px;
    cursor: pointer;
}

.commu-section {
    position: relative;
    min-height: 100vh;
    padding: 90px 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: url("../images/Comp-2.png") center/cover no-repeat;
}

.commu-video-box {
    width: min(1040px, 88vw);
    aspect-ratio: 16 / 9;
    border-radius: 34px;
    padding: 10px;
    background: linear-gradient(180deg, #d8c39c, #8f7554);
    box-shadow: 0 24px 40px rgba(69, 52, 37, 0.25);
}

.commu-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 26px;
    display: grid;
    place-items: center;
    align-content: center;
    background:
        linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
        url("../images/Comp-2.png") center/cover no-repeat;
    text-align: center;
}

.commu-placeholder h2 {
    margin: 0 0 8px;
    font-family: Georgia, serif;
    font-size: clamp(46px, 6vw, 86px);
    color: #9b8062;
}

.commu-placeholder p {
    margin: 0;
    font-weight: 900;
    color: #5f5260;
}

@keyframes floatNews {
    50% {
        transform: translateY(-18px) rotate(3deg);
    }
}

@media (max-width: 768px) {
    .news-section {
        padding: 70px 0;
    }

    .news-board {
        width: 122vw;
    }

    .news-inner {
        left: 13%;
        right: 13%;
        top: 18%;
        bottom: 13%;
    }

    .news-tabs {
        gap: 8px;
        margin-bottom: 14px;
    }

    .news-tab img {
        height: 32px;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .news-maid {
        width: 190px;
        left: -48px;
    }

    .news-lunatic {
        right: -45px;
    }
}

/*
.news-inner {
    position: absolute;
    left: 7%;
    right: 8%;
    top: 20%;
    bottom: 12%;
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 24px;
}
*/

.news-tabs {
    position: absolute;
    z-index: 9;
    left: -32%;
    top: 2%;

    display: flex;
    flex-direction: column;
    align-items: flex-end; /* สำคัญ */
    gap: 10px;
}
.news-tab {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.45;
    filter: grayscale(0.45) brightness(0.9);
    transform: translateX(0);
    transition: 0.25s ease;
}

.news-tab.active,
.news-tab:hover {
    opacity: 1;
    filter: none;
    transform: translateX(8px);
}

.news-tab img {
    width: auto;
    height: 50px;
    display: block;
}

.news-content-area {
    min-width: 0;
    overflow: hidden;
}

.news-list {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    height: 100%;
    overflow: auto;
    padding-right: 8px;
}

.news-list.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding-top: 12px;
}

.commu-section {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 90px 0;
    overflow: hidden;
    background: url("../images/Comp-2.png") center/cover no-repeat;
}

.commu-frame {
    position: relative;
    width: min(1100px, 88vw);
    aspect-ratio: 16 / 7.5;
    overflow: hidden;

    border: 2px solid rgba(233, 214, 177, 0.8);

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.28),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.commu-media {
    position: absolute;
    inset: 0;
}

.commu-media img,
.commu-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transform: scale(1.04);
}

.commu-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.48) 24%,
        rgba(0, 0, 0, 0.1) 55%,
        rgba(0, 0, 0, 0.02) 100%
    );

    z-index: 2;
}

.commu-content {
    position: absolute;
    z-index: 4;

    left: 6%;
    top: 50%;

    transform: translateY(-50%);

    width: min(360px, 36%);
}

.commu-content h2 {
    margin: 0 0 14px;

    font-family: Georgia, serif;
    font-size: clamp(42px, 4vw, 72px);
    line-height: 0.9;
    color: #fff;

    text-shadow:
        0 4px 10px rgba(0, 0, 0, 0.38),
        0 0 22px rgba(255, 255, 255, 0.12);
}

.commu-content p {
    margin: 0 0 28px;

    color: rgba(255, 255, 255, 0.9);

    font-size: clamp(13px, 1vw, 16px);
    line-height: 1.5;
}

.commu-social {
    display: flex;
    align-items: center;
    gap: 14px;
}

.commu-social a {
    width: 62px;
    height: 62px;

    border-radius: 50%;

    display: grid;
    place-items: center;

    background: radial-gradient(circle at center, #fff 0%, #f7efdf 60%, #d9c09a 100%);

    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.25),
        inset 0 0 0 2px rgba(255, 255, 255, 0.7);

    transition: 0.25s ease;
}

.commu-social a:hover {
    transform: translateY(-6px) scale(1.06);
}

.commu-social img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

/* parallax feel */
.commu-frame:hover .commu-media img {
    transform: scale(1.08);
    transition: transform 1.8s ease;
}

@media (max-width: 768px) {
    .commu-frame {
        width: 94vw;
        aspect-ratio: 16 / 11;
    }

    .commu-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.38) 40%, rgba(0, 0, 0, 0.1) 100%);
    }

    .commu-content {
        width: 82%;
        left: 30%;
        top: 50%;

        transform: translate(-50%, -50%);
        text-align: center;
    }

    .commu-social {
        justify-content: center;
    }

    .commu-social a {
        width: 54px;
        height: 54px;
    }

    .commu-social img {
        width: 28px;
        height: 28px;
    }
}

/* NEWS interaction / slider override */
.news-inner {
    overflow: visible;
}

.news-list {
    display: none;
    overflow: visible !important;
    padding: 0 !important;
}

.news-list.active {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding-top: 12px !important;
}

.news-card {
    flex: 0 0 245px;
    width: 245px;
    max-width: 245px;
    transform-origin: center center;
    will-change: transform, opacity;
}

.news-card.is-visible {
    display: block;
}

.news-card.pop-in:nth-child(1),
.news-card.pop-in:nth-child(4) {
    animation: newsPopLeft 0.56s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}

.news-card.pop-in:nth-child(2),
.news-card.pop-in:nth-child(5) {
    animation: newsPopMid 0.56s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}

.news-card.pop-in:nth-child(3),
.news-card.pop-in:nth-child(6) {
    animation: newsPopRight 0.56s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}

@keyframes newsPopLeft {
    0% {
        opacity: 0;
        transform: rotate(-5deg) translateY(22px) scale(0.72);
    }
    72% {
        opacity: 1;
        transform: rotate(-5deg) translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(-5deg) translateY(0) scale(1);
    }
}

@keyframes newsPopMid {
    0% {
        opacity: 0;
        transform: rotate(1.5deg) translateY(22px) scale(0.72);
    }
    72% {
        opacity: 1;
        transform: rotate(1.5deg) translateY(3px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(1.5deg) translateY(8px) scale(1);
    }
}

@keyframes newsPopRight {
    0% {
        opacity: 0;
        transform: rotate(3.5deg) translateY(22px) scale(0.72);
    }
    72% {
        opacity: 1;
        transform: rotate(3.5deg) translateY(-4px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(3.5deg) translateY(1px) scale(1);
    }
}

.news-arrow {
    position: absolute;
    z-index: 10;
    top: 43%;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(162, 142, 109, 0.82);
    color: #fff;
    font-size: 40px;
    line-height: 34px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(80, 58, 35, 0.22);
    transition: 0.22s ease;
}

.news-arrow.prev {
    /*left: -2%;*/
}

.news-arrow.next {
    /*right: -2%;*/
}

.news-arrow:hover:not(:disabled) {
    transform: scale(1.08);
    background: rgba(136, 111, 73, 0.95);
}

.news-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.news-see-more {
    bottom: 7%;
    left: 50%;
    z-index: 12;
}

.news-tab.active {
    pointer-events: none;
}

@media (max-width: 768px) {
    .news-list.active {
        gap: 16px;
        justify-content: flex-start;
        overflow: hidden !important;
    }

    .news-card {
        flex-basis: 180px;
        width: 180px;
        max-width: 180px;
    }

    .news-arrow {
        width: 34px;
        height: 34px;
        font-size: 32px;
        line-height: 27px;
    }

    .news-arrow.prev {
        left: 5%;
    }

    .news-arrow.next {
        right: 5%;
    }
}

/* COMMU — background video only, no frame/box */
.commu-frame,
.commu-media,
.commu-video-box,
.commu-placeholder {
    display: none !important;
}

.commu-section {
    position: relative !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    /*background: #000 !important;*/
}

.commu-bg-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
}

.commu-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0) 0%,
        rgba(0, 0, 0, 0.75) 30%,
        rgba(0, 0, 0, 0.25) 60%,
        rgba(0, 0, 0, 0.02) 100%
    ) !important;
}

.commu-content {
    position: relative !important;
    z-index: 5 !important;
    margin-left: 7vw !important;
    width: min(360px, 82vw) !important;
    color: #fff !important;
}

.commu-socials {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

/* แก้ไข: HTML ใช้ .commu-social บน <a> โดยตรง (ไม่ใช่ .commu-social > a) */
a.commu-social {
    /*
    width: 62px;
    height: 62px;
    */
    border-radius: 50%;
    display: grid;
    place-items: center;
    /*
    background: radial-gradient(circle at center, #fff 0%, #f7efdf 60%, #d9c09a 100%);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.25),
        inset 0 0 0 2px rgba(255, 255, 255, 0.7);
        */
    transition: 0.25s ease;
    text-decoration: none;
    color: #fff;
    font-weight: 900;
    font-size: 13px;
}

a.commu-social:hover {
    transform: translateY(-6px) scale(1.06);
}

a.commu-social img {
    width:100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .commu-section {
        justify-content: center !important;
    }

    .commu-overlay {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.42) 42%,
            rgba(0, 0, 0, 0.08) 100%
        ) !important;
    }

    .commu-content {
        margin: auto !important;
        text-align: center !important;
    }

    .commu-socials {
        justify-content: center !important;
    }

    a.commu-social {
        /*
        width: 54px;
        height: 54px;
        */
    }

    a.commu-social img {
        width: 100%;
        height: auto;
    }
}

/* NEWS — 5 slots, 5th is read more */
.news-arrow,
.news-see-more {
    display: none !important;
}

.news-list {
    display: none;
    overflow: visible !important;
    padding: 0 !important;
}

.news-list.active {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    justify-content: center;
    gap: 16px;
    padding-top: 8px !important;
}

.news-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    min-height: 245px;
    transform-origin: center center;
    will-change: transform, opacity;
}

.news-card:nth-child(1) {
    transform: rotate(-4deg) translateY(8px);
}

.news-card:nth-child(2) {
    transform: rotate(1.5deg) translateY(0);
}

.news-card:nth-child(3) {
    transform: rotate(4deg) translateY(8px);
}

.news-card:nth-child(4) {
    transform: rotate(-2deg) translateY(2px);
}

.news-card-more {
    padding: 0 !important;
    background: rgba(255, 248, 231, 0.92) !important;
    border: 2px dashed rgba(143, 105, 63, 0.42) !important;
    transform: rotate(3deg) translateY(4px);
}

.news-more-card-btn {
    width: 100%;
    height: 100%;
    min-height: 245px;
    border: 0;
    background: transparent;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #6f4728;
    font-family: inherit;
    cursor: pointer;
}

.news-more-plus {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff8e7;
    border: 3px solid #8c5d34;
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
    box-shadow: 0 7px 14px rgba(80, 58, 35, 0.18);
}

.news-more-card-btn strong {
    font-size: 18px;
    font-weight: 900;
}

.news-more-card-btn small {
    font-size: 12px;
    font-weight: 800;
    opacity: 0.72;
}

.news-card.pop-in:nth-child(1) {
    animation: newsPop1 0.56s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}
.news-card.pop-in:nth-child(2) {
    animation: newsPop2 0.56s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}
.news-card.pop-in:nth-child(3) {
    animation: newsPop3 0.56s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}
.news-card.pop-in:nth-child(4) {
    animation: newsPop4 0.56s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}
.news-card.pop-in:nth-child(5) {
    animation: newsPop5 0.56s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}

@keyframes newsPop1 {
    0% {
        opacity: 0;
        transform: rotate(-4deg) translateY(26px) scale(0.72);
    }
    72% {
        opacity: 1;
        transform: rotate(-4deg) translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(-4deg) translateY(8px) scale(1);
    }
}

@keyframes newsPop2 {
    0% {
        opacity: 0;
        transform: rotate(1.5deg) translateY(26px) scale(0.72);
    }
    72% {
        opacity: 1;
        transform: rotate(1.5deg) translateY(-7px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(1.5deg) translateY(0) scale(1);
    }
}

@keyframes newsPop3 {
    0% {
        opacity: 0;
        transform: rotate(4deg) translateY(26px) scale(0.72);
    }
    72% {
        opacity: 1;
        transform: rotate(4deg) translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(4deg) translateY(8px) scale(1);
    }
}

@keyframes newsPop4 {
    0% {
        opacity: 0;
        transform: rotate(-2deg) translateY(26px) scale(0.72);
    }
    72% {
        opacity: 1;
        transform: rotate(-2deg) translateY(-6px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(-2deg) translateY(2px) scale(1);
    }
}

@keyframes newsPop5 {
    0% {
        opacity: 0;
        transform: rotate(3deg) translateY(26px) scale(0.72);
    }
    72% {
        opacity: 1;
        transform: rotate(3deg) translateY(-4px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(3deg) translateY(4px) scale(1);
    }
}

@media (max-width: 900px) {
    .news-list.active {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 14px;
        max-height: 66vh;
        overflow-y: auto !important;
    }

    .news-card,
    .news-more-card-btn {
        min-height: 210px;
    }
}

/* 3 news slider */
.news-arrow {
    position: absolute;
    z-index: 20;
    top: 44%;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(162, 142, 109, 0.9);
    color: #fff;
    font-size: 38px;
    line-height: 38px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(80, 58, 35, 0.22);
    transition: 0.22s ease;
}

.news-arrow.prev {
    left: -3%;
}

.news-arrow.next {
    right: -3%;
}

.news-arrow:hover {
    transform: scale(1.08);
}

.news-list.active {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 900px) {
    .news-list.active {
        grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
    }

    .news-arrow.prev {
        left: 4%;
    }

    .news-arrow.next {
        right: 4%;
    }
}

/* FINAL NEWS SLIDER: 6 slots / 3 per page */
.news-see-more {
    display: none !important;
}

.news-arrow {
    display: block !important;
    position: absolute;
    z-index: 30;
    top: 44%;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(162, 142, 109, 0.9);
    color: #fff;
    font-size: 38px;
    line-height: 38px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(80, 58, 35, 0.22);
    transition: 0.22s ease;
}

.news-arrow.prev {
    left: -3%;
}

.news-arrow.next {
    right: -3%;
}

.news-arrow:hover:not(:disabled) {
    transform: scale(1.08);
}

.news-arrow:disabled {
    opacity: 0.36;
    cursor: default;
    pointer-events: none;
}

.news-list.active {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start;
    justify-content: center;
    gap: 26px;
    padding-top: 12px !important;
    overflow: visible !important;
}

.news-card {
    width: 100% !important;
    max-width: none !important;
    min-height: 265px;
}

.news-card-more {
    padding: 0 !important;
    background: rgba(255, 248, 231, 0.94) !important;
    border: 2px dashed rgba(143, 105, 63, 0.42) !important;
}

.news-more-card-btn {
    width: 100%;
    height: 100%;
    min-height: 265px;
    border: 0;
    background: transparent;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #6f4728;
    font-family: inherit;
    cursor: pointer;
}

.news-more-plus {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff8e7;
    border: 3px solid #8c5d34;
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
    box-shadow: 0 7px 14px rgba(80, 58, 35, 0.18);
}

.news-more-card-btn strong {
    font-size: 18px;
    font-weight: 900;
}

.news-more-card-btn small {
    font-size: 12px;
    font-weight: 800;
    opacity: 0.72;
}

@media (max-width: 900px) {
    .news-list.active {
        grid-template-columns: repeat(3, minmax(150px, 1fr)) !important;
        gap: 14px;
    }

    .news-arrow.prev {
        left: 2%;
    }

    .news-arrow.next {
        right: 2%;
    }
}

@media (max-width: 680px) {
    .news-list.active {
        grid-template-columns: repeat(1, minmax(180px, 1fr)) !important;
    }
}

.flip-horizontal {
    transform: scaleX(-1);
}

/* =========================
   NEWS MOBILE REDESIGN
========================= */
@media (max-width: 768px) {
    .news-section {
        min-height: 100svh;
        padding: 40px 0 80px;
        background: url("../images/bg-news-mb.png") center top/cover no-repeat !important;
        overflow: hidden;
    }

    .news-board {
        width: min(92vw, 430px);
        margin: 0 auto;
        position: relative;
        z-index: 4;
    }

    .news-board-bg {
        width: 100%;
        display: block;
    }

    .news-inner {
        position: absolute !important;
        left: 10% !important;
        right: 10% !important;
        top: 25% !important;
        bottom: 17% !important;
        overflow: visible !important;
    }

    .news-tabs {
        position: absolute !important;
        top: -72px !important;
        left: 50% !important;
        transform: translateX(-50%);
        width: 100%;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        align-items: flex-end;
        gap: 4px;
        z-index: 20;
    }

    .news-tab {
        transform: none !important;
        opacity: 0.55;
    }

    .news-tab.active {
        opacity: 1;
        transform: translateY(-4px) !important;
    }

    .news-tab img {
        height: 28px !important;
        width: auto;
    }

    .news-list.active {
        display: flex !important;
        justify-content: center;
        align-items: flex-start;
        gap: 0 !important;
    }

    .news-card {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        min-height: auto !important;
    }

    .news-card:nth-child(1),
    .news-card:nth-child(2),
    .news-card:nth-child(3),
    .news-card:nth-child(4),
    .news-card:nth-child(5) {
        transform: rotate(-3deg) !important;
    }

    .news-card h3 {
        font-size: 13px;
        line-height: 1.2;
    }

    .news-card p {
        font-size: 11px;
        line-height: 1.25;
    }

    .news-arrow {
        width: 34px !important;
        height: 34px !important;
        top: 46% !important;
        padding: 0;
        display: grid !important;
        place-items: center;
    }

    .news-arrow.prev {
        left: -14px !important;
    }

    .news-arrow.next {
        right: -14px !important;
    }

    .news-arrow img {
        width: 18px;
        height: auto;
    }

    .news-maid {
        width: 180px !important;
        right: 50% !important;
        transform: translateX(72%);
        bottom: 10% !important;
        z-index: 2 !important;
    }

    .news-lunatic {
        width: 95px !important;
        left: 4% !important;
        bottom: 7% !important;
        z-index: 8 !important;
    }

    .news-discord {
        display: none !important;
    }
}

/* =========================
   FINAL MOBILE NEWS CORRECTION
   - green section bg stays
   - board image becomes bg-news-mb
   - maid behind board
   - tabs in one row
   - slider moves 1 news/card per click
========================= */
@media (max-width: 768px) {
    .news-section {
        min-height: 100svh !important;
        padding: 44px 0 64px !important;
        display: grid !important;
        place-items: start center !important;

        /* keep the green room background */
        background: url("../images/bg-newsupdate.png") center/cover no-repeat !important;
        overflow: hidden !important;
    }

    .news-board {
        width: min(90vw, 650px) !important;
        margin: 250px auto 0 10% !important;
        position: relative !important;
        z-index: 5 !important;
        filter: drop-shadow(0 14px 18px rgba(72, 45, 27, 0.28)) !important;
    }

    /* swap only the board image */
    .news-board-bg {
        content: url("../images/bg-news-mb.png");
        width: 100% !important;
        display: block !important;
    }

    /* maid stands behind the mobile board */
    .news-maid {
        display: block !important;
        width: min(72vw, 320px) !important;
        position: absolute !important;
        right: 50% !important;
        top: 40px !important;
        bottom: auto !important;
        left: auto !important;
        transform: translateX(72%) !important;
        z-index: 3 !important;
        opacity: 1 !important;
        pointer-events: none !important;
    }

    .news-lunatic {
        display: block !important;
        width: min(24vw, 100px) !important;
        left: 3vw !important;
        bottom: 7% !important;
        right: auto !important;
        z-index: 8 !important;
    }

    .news-discord {
        display: none !important;
    }

    .news-inner {
        position: absolute !important;
        left: 12% !important;
        right: 20% !important;
        top: 30% !important;
        bottom: 16% !important;
        overflow: visible !important;
    }

    /* tab menu row above the board */
    .news-tabs {
        position: absolute !important;
        top: -58px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: max-content !important;
        max-width: 94vw !important;

        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;

        z-index: 30 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .news-tab {
        opacity: 0.58 !important;
        filter: grayscale(0.35) brightness(0.92) !important;
        transform: none !important;
    }

    .news-tab.active,
    .news-tab:hover {
        opacity: 1 !important;
        filter: none !important;
        transform: translateY(-3px) !important;
    }

    .news-tab img {
        height: 25px !important;
        width: auto !important;
        display: block !important;
    }

    /* show only one news at a time on mobile */
    .news-list.active {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0 !important;
        justify-items: center !important;
        align-items: start !important;
        padding-top: 0 !important;
        overflow: visible !important;
        max-height: none !important;
    }

    .news-card {
        width: min(100%, 230px) !important;
        max-width: 230px !important;
        min-height: auto !important;
        padding: 8px 8px 10px !important;
        transform: rotate(-3deg) !important;
        flex: none !important;
    }

    .news-card:nth-child(1),
    .news-card:nth-child(2),
    .news-card:nth-child(3),
    .news-card:nth-child(4),
    .news-card:nth-child(5),
    .news-card:nth-child(6) {
        transform: rotate(-3deg) !important;
    }

    .news-card img {
        margin-bottom: 6px !important;
    }

    .news-card span {
        font-size: 9px !important;
        padding: 2px 6px !important;
        margin-bottom: 4px !important;
    }

    .news-card h3 {
        font-size: 11px !important;
        line-height: 1.18 !important;
        margin-bottom: 4px !important;
    }

    .news-card p {
        font-size: 9px !important;
        line-height: 1.22 !important;
    }

    .news-card-more,
    .news-more-card-btn {
        min-height: 190px !important;
    }

    .news-more-plus {
        width: 44px !important;
        height: 44px !important;
        font-size: 30px !important;
    }

    .news-more-card-btn strong {
        font-size: 14px !important;
    }

    .news-more-card-btn small {
        font-size: 10px !important;
    }

    .news-arrow {
        display: grid !important;
        place-items: center !important;
        width: 30px !important;
        height: 30px !important;
        top: 44% !important;
        z-index: 35 !important;
        padding: 0 !important;
    }

    .news-arrow.prev {
        left: -12px !important;
    }

    .news-arrow.next {
        right: -12px !important;
    }

    .news-arrow img {
        width: 16px !important;
        height: auto !important;
        display: block !important;
    }
}

@media (max-width: 430px) {
    .news-board {
       width: min(95vw, 400px) !important;
        margin: 250px auto 0 6% !important;
    }

    .news-tabs {
        top: -54px !important;
        gap: 3px !important;
    }

    .news-tab img {
        height: 22px !important;
    }

    .news-maid {
        width: min(56vw, 250px) !important;
        top: 50px !important;
        transform: translateX(70%) !important;
    }

    .news-card {
        max-width: 205px !important;
    }
}

/* ======================================================
   NEWS SECTION — TABLET / SMALL DESKTOP FIX
   769px → 1400px
   ปัญหาเดิม:
   - tabs ใช้ left:-32% ยื่นออกนอก section (overflow:hidden ตัดทิ้ง)
   - ไม่มี breakpoint ช่วงนี้เลย
   แก้ไข:
   - tabs เปลี่ยนเป็นแนวนอนเหนือ board (safe ทุกขนาด)
   - board ขนาดปรับตาม viewport
   - card rotation ลดลงเล็กน้อย ป้องกันล้นขอบ
====================================================== */

@media (min-width: 769px) and (max-width: 1400px) {

    /* ---- Board: center + padding-top สำหรับ tabs แถวบน ---- */
    .news-board {
        width: min(960px, 80vw) !important;
        margin: 70px auto 0 !important;
    }

    /* ---- Tabs: วางเป็นแถวแนวนอนเหนือ board ---- */
    .news-tabs {
        position: absolute !important;
        left: 50% !important;
        top: -62px !important;
        transform: translateX(-50%) !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        justify-content: center !important;
        gap: 6px !important;
        width: max-content !important;
        max-width: 94vw !important;
        padding: 0 !important;
    }

    .news-tab {
        transform: none !important;
        opacity: 0.55 !important;
        filter: grayscale(0.35) brightness(0.92) !important;
    }

    .news-tab.active,
    .news-tab:hover {
        opacity: 1 !important;
        filter: none !important;
        transform: translateY(-5px) !important;
    }

    .news-tab img {
        height: 44px !important;
        width: auto !important;
    }

    /* ---- Inner area ---- */
    .news-inner {
        left: 9% !important;
        right: 7% !important;
        top: 22% !important;
        bottom: 13% !important;
        overflow: visible !important;
    }

    /* ---- Cards: ลด rotation ป้องกันล้นขอบ ---- */
    .news-card:nth-child(1) { transform: rotate(-3deg) translateY(6px) !important; }
    .news-card:nth-child(2) { transform: rotate(1deg) translateY(0) !important; }
    .news-card:nth-child(3) { transform: rotate(3deg) translateY(6px) !important; }
    .news-card:nth-child(4) { transform: rotate(-2deg) translateY(2px) !important; }
    .news-card:nth-child(5) { transform: rotate(2.5deg) translateY(4px) !important; }

    /* ---- Arrows: ภายใน board ---- */
    .news-arrow.prev {
        left: -2% !important;
    }

    .news-arrow.next {
        right: -2% !important;
    }
}

/* ---- Tablet portrait: 769-1100px ---- */
@media (min-width: 769px) and (max-width: 1100px) {
    .news-board {
        width: min(800px, 84vw) !important;
        margin-top: 65px !important;
    }

    .news-tabs {
        top: -56px !important;
        gap: 4px !important;
    }

    .news-tab img {
        height: 36px !important;
    }
}

/* ---- 769-900px (ช่วงแคบที่สุดก่อน mobile) ---- */
@media (min-width: 769px) and (max-width: 900px) {
    .news-board {
        width: min(660px, 86vw) !important;
        margin-top: 60px !important;
    }

    .news-tabs {
        top: -50px !important;
        gap: 3px !important;
    }

    .news-tab img {
        height: 30px !important;
    }

    .news-inner {
        left: 11% !important;
        right: 9% !important;
        top: 24% !important;
        bottom: 15% !important;
    }

    .news-list.active {
        gap: 12px !important;
    }
}
