@charset "utf-8";
.header {
	float: left;
	height: auto;
	width: 100%;
}
.box-header-top {
	background-color: #2e3192;
	float: left;
	height: auto;
	width: 100%;
	padding-top: 1%;
	padding-bottom: 1%;
}
.tel-top {
	font-family: "Noto Sans Thai";
	font-size: 1rem;
	color: #FFF;
	background-image: url(../images/icon-tel-top.png);
	background-repeat: no-repeat;
	background-position: left center;
	background-size: 18px;
	float: left;
	height: auto;
	width: 20%;
	margin-left: 3%;
	padding-top: 5px;
	padding-bottom: 5px;
	padding-left: 30px;
}
.tel-top a {
	color: #FFF;
	text-decoration: none;
}

.box-l {
	background-image: url(../images/icon-l-top.png);
	background-repeat: no-repeat;
	background-position: left center;
	background-size: 18px;
	float: right;
	position: relative; /* ขวาเว้นที่ให้ลูกศร ซ้ายเว้นให้ไอคอน */
	cursor: pointer;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
	min-width: 40px;
	margin-right: 3%;
	padding-top: 5px;
	padding-right: 30px;
	padding-bottom: 5px;
	padding-left: 30px;
}

/* ตัวหนังสือภาษาปัจจุบัน */
.current-lang {
	font-size: 1rem;
	font-weight: normal;
	display: block;
	font-family: "Noto Sans Thai";
}

/* สร้างลูกศรด้านขวา */
.box-l::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
    transition: 0.3s; /* ให้ลูกศรหมุนแบบนิ่มนวล */
}

/* ซ่อนรายการภาษาไว้ก่อน */
.dropdown-list {
    display: none; 
    position: absolute;
    top: 100%; /* ให้แสดงต่อลงมาจากกล่องหลัก */
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dropdown-list li a {
	display: block;
	padding: 8px 10px;
	text-decoration: none;
	color: #2E3192;
	font-size: 1rem;
	text-align: center;
	font-family: "Noto Sans Thai";
}

/* เอฟเฟกต์เมื่อ Hover */
.dropdown-list li a:hover {
    background-color: #f0f0f0;
    color: #007bff;
}

/* สั่งให้ Dropdown แสดงออกมาเมื่อเอาเมาส์ชี้ที่ .box-l */
.box-l:hover .dropdown-list {
    display: block;
}

/* หมุนลูกศรขึ้นเมื่อ Hover */
.box-l:hover::after {
    transform: translateY(-50%) rotate(180deg);
}
.box-header-middle {
    float: left;
    height: auto;
    width: 100%;
    padding-top: 5px;
    padding-bottom: 5px;

    /* วิธีเขียนที่ถูกต้อง: รูปภาพต้องขึ้นก่อน ตามด้วยคอมมา แล้วค่อยตามด้วย Gradient */
    background: url("../images/bg-top.png") no-repeat right center / 80%, 
                linear-gradient(to right, #ffffff, #ffffff, #ebebeb);
}

.logo {
	float: left;
	height: auto;
	width: 10%;
	margin-top: 1%;
	margin-bottom: 1%;
	margin-left: 3%;
}
.logo img {
	height: auto;
	width: 100%;
}

.menu {
	float: right;
	height: auto;
	width: 60%;
	margin-top: 2.3%;
	margin-right: 3%;
}
.menu-m {
	float: right;
	height: auto;
	width: 50%;
	margin-top: 2.3%;
	margin-right: 3%;
	display: none;
}
.banner {
	float: left;
	height: auto;
	width: 100%;
}
.banner-m {
	display: none;
}
.content-overlay {
	position: absolute;
	z-index: 9999;
	left: 50px;
	top: 150px;
}
/* 1. กำหนดการเคลื่อนที่จากซ้ายมาขวา */
@keyframes slideInLeftToRight {
  0% {
    opacity: 0;
    transform: translateX(-100px); /* เริ่มจากทางซ้าย 100px */
  }
  100% {
    opacity: 1;
    transform: translateX(0); /* กลับมาตำแหน่งปกติ */
  }
}

/* 2. ซ่อนองค์ประกอบไว้ก่อน (Pre-state) */
.splide__slide .text-a,
.splide__slide .text-b,
.splide__slide .btn-yellow {
  opacity: 0;
}

/* 3. สั่งทำงานเมื่อสไลด์นั้น Active (.is-active คือคลาสมาตรฐานของ Splide) */

/* ข้อความที่ 1: AAAAA */
.splide__slide.is-active .text-a {
	animation: slideInLeftToRight 0.7s ease-out forwards;
	animation-delay: 0.3s; /* มาก่อนเพื่อน */
	font-family: serithairegular;
	font-size: 3rem;
	color: #FFF;
	text-shadow: 4px 4px #558abb;
}

/* ข้อความที่ 2: BBBBB */
.splide__slide.is-active .text-b {
	animation: slideInLeftToRight 0.7s ease-out forwards;
	animation-delay: 0.8s; /* ตามมาอันดับสอง */
	font-family: serithairegular;
	font-size: 2rem;
	color: #FFF;
	text-shadow: 1px 1px #558abb;

}.header .banner #slide1 .splide__track .splide__list .splide__slide img {
	height: auto;
	width: 100%;
}
.text-b{
	margin-top: 8px;
}
.box-slogan {
	float: left;
	height: auto;
	width: 79%;
	background-color: #FFFFFF;
	border-radius: 25px;
	margin-top: -90px;
	z-index: 9999;
	position: relative;
	margin-left: 10%;
	border: 5px solid #ebebeb;
}
.box-slogan-list {
	float: left;
	height: auto;
	width: 23%;
	margin-right: 1%;
	margin-left: 1%;
	padding-top: 2%;
	padding-bottom: 2%;
}
.icon-slogan {
	text-align: center;
	float: left;
	height: auto;
	width: 100%;
	margin-top: 2%;
}
.icon-slogan img {
	height: auto;
	width: 15%;
}

/* 1. กำหนด Keyframes สำหรับอนิเมชั่นเขย่า (Shake) - ปรับระดับปานกลาง */
@keyframes shake-icon-medium {
  0% { transform: translate(2px, 2px) rotate(0deg); }
  10% { transform: translate(-2px, -3px) rotate(-1deg); }
  20% { transform: translate(-4px, 0px) rotate(1deg); }
  30% { transform: translate(4px, 3px) rotate(0deg); }
  40% { transform: translate(2px, -2px) rotate(1deg); }
  50% { transform: translate(-2px, 3px) rotate(-1deg); }
  60% { transform: translate(-4px, 2px) rotate(0deg); }
  70% { transform: translate(4px, 2px) rotate(-1deg); }
  80% { transform: translate(-2px, -2px) rotate(1deg); }
  90% { transform: translate(2px, 3px) rotate(0deg); }
  100% { transform: translate(2px, -3px) rotate(-1deg); }
}

/* 2. โค้ดเดิมของคุณ */
.icon-slogan-01 {
	text-align: center;
	float: left;
	height: auto;
	width: 100%;
	margin-top: 2%; 
	
}

.icon-slogan-01 img {
	height: auto;
	width: 3rem;
	animation: shake-icon-medium 2s infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.15); } /* เต้นครั้งที่ 1 */
  28% { transform: scale(1); }
  42% { transform: scale(1.15); } /* เต้นครั้งที่ 2 */
  70% { transform: scale(1); }
}

.icon-slogan-02 {
    text-align: center;
    float: left;
    height: auto;
    width: 100%;
    margin-top: 2%;
    /* ลบ animation ออกจากตัวแม่ */
}

.icon-slogan-02 img {
    height: auto;
    width: 3rem;
    display: inline-block; /* มั่นใจว่ารองรับ transform */
    
    /* 2. ย้ายมาใส่ที่ตัว img โดยตรง */
   animation: swing-icon 2s ease-in-out infinite;
}

/* 1. กำหนด Keyframes สำหรับการแกว่ง */
@keyframes swing-icon {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }   /* แกว่งไปขวา 5 องศา */
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-5deg); }  /* แกว่งไปซ้าย 5 องศา */
  100% { transform: rotate(0deg); }
}

.icon-slogan-03 {
	text-align: center;
	float: left;
	height: auto;
	width: 100%;
	margin-top: 2%;
}

.icon-slogan-03 img {
	height: auto;
	width: 3rem;
	display: inline-block;

	/* --- จุดสำคัญคือบรรทัดนี้ --- */
	transform-origin: top center; /* ยึดจุดหมุนไว้ที่ "กึ่งกลางด้านบน" */
	
	/* เรียกใช้แอนิเมชั่น */
	 animation: heartbeat 1.5s ease-in-out infinite;
	
}


.icon-slogan-04 {
	text-align: center;
	float: left;
	height: auto;
	width: 100%;
	margin-top: 2%;
}


.icon-slogan-04 img {
    height: auto;
    width: 3rem;
    display: inline-block;

    /* --- เรียกใช้แอนิเมชั่นใหม่ --- */
    /* 2s คือระยะเวลาหมุนไป-กลับ (ปรับให้ช้าลงเพื่อความสมูท) */
    /* ease-in-out ทำให้จังหวะการเหวี่ยงดูเป็นธรรมชาติ */
    animation: rotate-back-and-forth 2s ease-in-out infinite;
    
    /* ช่วยให้การหมุนคมชัด ไม่เบลอ */
    backface-visibility: hidden;
}

@keyframes rotate-back-and-forth {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg); /* หมุนไปครึ่งรอบ */
    }
    100% {
        transform: rotate(0deg);   /* หมุนกลับมาที่เดิม */
    }
}
.text-slogan {
	font-family: serithairegular;
	font-size: 1rem;
	color: #333;
	text-align: center;
	float: left;
	height: auto;
	width: 100%;
	margin-bottom: 3%;
	display: block;
	margin-top: 8%;
}