body {
    font-family: 'Prompt', sans-serif;
    background-color: #f0f2f5;
    margin: 0;

}

/* Container หลักสำหรับเลื่อน */
.news-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 5px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    /* ซ่อน Scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.news-scroll-container::-webkit-scrollbar {
    display: none;
}

/* ตัวกล่องข่าว */
.news-card {
    flex: 0 0 auto;
    /* ห้ามย่อห้ามขยาย */
    width: 450px;
    /* ความกว้างต่อกล่อง */
    background: #ffffff;
    border-radius: 1px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    scroll-snap-align: start;
    border: 1px solid #eee;
    backdrop-filter: blur(30px);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 132, 255, 0.2);
}

/* รูปภาพ */
.news-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

/* วันที่ */
.news-date {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(163, 0, 0, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* เนื้อหา */
.news-content {
    padding: 15px;
}

.news-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}



.presentation-container {
    width: 100%;
    overflow-x: auto;
    /* ให้เลื่อนแนวนอนได้ */
    overflow-y: hidden;
    /* ซ่อน scroll แนวตั้งของกล่องนี้ */
    white-space: nowrap;
    /* บังคับไม่ให้ตัดบรรทัด */
    -webkit-overflow-scrolling: touch;
    /* ให้ลื่นไหลบนมือถือ */
    padding: 20px 0;
    /* เว้นระยะบนล่างนิดหน่อย */

    /* สไตล์ Scrollbar (ถ้าต้องการแต่ง) */
    scrollbar-width: thin;
}

/* รางเลื่อน (Horizontal Scroller) */
.scroller {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    height: 600px;
    /* ความสูงของพื้นที่เลื่อน */
    align-items: center;
    scroll-snap-type: x mandatory;
    /* บังคับ Snap */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE */
    padding-bottom: 20px;
}

.scroller::-webkit-scrollbar {
    display: none;
}

/* Chrome/Safari */

/* การ์ดทั่วไป (Staff) */
.person-card {
    flex: 0 0 auto;
    width: 230px;
    margin: 0 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    /* ไม่ใส่ snap-align เพื่อให้ลื่นไหลและไปหยุดที่หัวหน้า */
}

/* การ์ดหัวหน้า (Boss) - จุดโฟกัส */
.person-card.boss {
    width: 260px;
    /* ใหญ่กว่า */
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid #a30202ff;
    z-index: 10;
    scroll-snap-align: center;

    /* จุดหยุด */
}

.profile-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid #7c0000ff;
}

.boss .profile-img {
    height: 260px;
}

/* พื้นที่ว่างซ้ายขวาเพื่อให้เลื่อนได้สุด */
.spacer {
    flex: 0 0 50vw;
}

/* ตกแต่ง Text */
.card-body {
    padding: 1.5rem;
    text-align: center;
}

.card-title {
    font-weight: 6;
    color: #000000ff;
}

.card-text {
    color: #666;
    font-size: 0.9rem;
}

.card-text-boss {
    color: #8a0000ff;
    font-size: 1.1rem;
}

.boss .card-title {
    color: #000000ff;
    font-size: 1.5rem;
}



/* สไตล์การ์ดอัลบั้ม */
.album-card {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    background: #ffffff8a;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    position: relative;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* รูปปกอัลบั้ม (ใช้รูปแรกของอัลบั้ม) */
.album-cover {
    height: 250px;
    width: 700px;
    object-fit: cover;
}

/* ป้ายบอกจำนวนรูป */
.photo-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* สไตล์รูปใน Pop-up (Modal) */
.modal-img-box {
    height: auto;
    overflow: hidden;
    border-radius: 9px;
    cursor: pointer;
}

.modal-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.modal-img-box:hover img {
    transform: scale(1.1);
}


/* ปุ่มเปิดแชท (Floating Button) */
.chat-btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1064ff7e, #0d6dfd81);
    /* สีธีมวิทยาลัย */
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(25, 58, 121, 0.3);
    cursor: pointer;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-btn-floating:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(25, 59, 121, 0.74);
}

/* กล่องแชทหลัก */
.chat-window {
    font-family: 'Prompt', sans-serif;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 360px;
    height: 500px;
    background: #ffffff6b;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.664);
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    /* Animation ตอนเปิด-ปิด */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* ส่วนหัว (Header) */
.chat-header {
    background: rgba(0, 110, 255, 0.37);
    /* สีน้ำเงินเข้ม เป็นทางการ */
    color: rgb(0, 0, 0);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
}
.elec-header{
    background: rgba(0, 110, 255, 0);
    /* สีน้ำเงินเข้ม เป็นทางการ */
    color: rgb(112, 0, 0);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;

}

/* พื้นที่ข้อความ (Body) */
.chat-body {
    flex: 1;
    padding: 20px;
    background-color: #ffffff62;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    backdrop-filter: blur(30px);
}

/* บอลลูนข้อความ */
.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.548);
}

/* ข้อความบอท */
.msg-bot {
    align-self: flex-start;
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
    border-bottom-left-radius: 2px;
    margin-left: 20px;
}

/* รูป Avatar บอท */
.bot-avatar {
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.24);
    border-radius: 50%;
    position: absolute;
    left: -38px;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(0, 0, 0);
    font-size: 15px;
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.37);
}

/* ข้อความผู้ใช้ */
.msg-user {
    align-self: flex-end;
    background: #0543b6ff;
    color: white;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 5px rgba(25, 58, 121, 0.1);
}

/* ส่วนพิมพ์ข้อความ (Footer) */
.chat-footer {
    padding: 15px;
    background: #008cff65;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(30px);
}

.chat-input {
    border: 1px solid #ced4da;
    border-radius: 25px;
    padding: 10px 20px;
    flex: 1;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: 'Prompt', sans-serif;
}

.chat-input:focus {
    border-color: #0059ffff;
}

.btn-send {
    background: #0848beff;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-send:hover {
    background: #0d6efd;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-self: flex-start;
    margin-left: 45px;
    background: #e9ecef;
    padding: 10px 15px;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    margin-bottom: 10px;
}

.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #6c757d;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
    margin: 0 2px;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}