body {
	margin: 0;
	padding: 0;
	
	font-family: Arial, Tahoma;
	line-height: 1.6em;
	color: #333;
	font-size: 14px;
}
a {
	color: #4b5056;
	text-decoration: none;
	cursor: pointer;
}
a:hover, a:focus {
	color: #e96b56;
	text-decoration: underline;
}
img { max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
	font-family: sans-serif, Tahoma;
	color: #353535;
	font-weight: 400;
	line-height: 1.1em;
	margin-top: 0;
}
h1 { font-size: 38px; margin-bottom: 22px; }
h3 { font-size: 30px; margin-bottom: 22px; }
h4 { font-size: 26px; margin-bottom: 22px; }

h3 a { color: #e96b56; text-decoration: none; }
h3 a:hover { color: #353535; text-decoration: none; }
h4 { letter-spacing: -1.5px; }
h3 span, h4 span { color: #e96b56; }

.banner1 {
	width: 100%;
	height: 225px;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: auto 100%;
}



/* =========== Main ============== */

/* บนมือถือ: เรียงต่อกันเป็นแถวแนวตั้ง 100% อัตโนมัติ */
.grid {
	display: grid;
	gap: 60px;
	
	padding: 50px 20px;
	max-width: 1170px;
	margin: 0 auto;
}

/* บนหน้าจอคอมพิวเตอร์ (ขนาด 768px ขึ้นไป): แบ่งเป็น 30% และ 70% */
@media (min-width: 768px) {
	.grid30 { grid-template-columns: 3fr 7fr; }
	.grid50 { grid-template-columns: 5fr 5fr; }
	.grid70 { grid-template-columns: 7fr 3fr; }
	.grid > :nth-child(1) { min-height: 400px; }
	.grid30 > :nth-child(2) { min-width: 400px; }
	.line-right { box-shadow: 30px 0 0 0 white, 31px 0 0 0 #ccc; }
}


/* =========== Header ============== */

/* 1. จัดกลุ่ม Reset ค่าเริ่มต้นและตั้งค่าพื้นฐาน */
.nav, .dropdown-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* 2. โครงสร้างหลักของ Header (ดันซ้าย-ขวา คุมความกว้าง) */
header {
	box-shadow: 0 2px 4px -2px #ddd;
}
.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 27px 0;
	width: 90%;
	max-width: 1170px;
	margin: 0 auto;
}
.logo img { max-height: 42px; }

/* 3. ลิงก์เมนูหลัก (จัดระเบียบรูปแบบตัวอักษร) */
.nav { display: flex; gap: 10px; }
.nav a {
	text-decoration: none;
	font: 400 18px sans-serif; /* รวบคำสั่ง font-weight, font-size */
	color: #444;
	padding: 6px 12px;
	border-radius: 3px;
	display: inline-flex;		/* เปลี่ยนเป็น inline-flex เพื่อให้คุณสมบัติ gap และ align-items ทำงานร่วมกับไอคอนได้ */
	align-items: center;
	gap: 6px;
}

/* 4. สถานะ Hover และ Active ของเมนูหลัก */
.nav a:hover { color: #ddd; background: #343434;	 text-decoration: none; }
.nav .active > a, .nav .active a:hover { color: #fff; background: #e96b56; }

/* 5. ระบบเมนูย่อย Dropdown แสดงผลเมื่อเมาส์ชี้ */
.dropdown { position: relative; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; }

.dropdown-menu {
	position: absolute;
	margin-top: 10px;
	background: #343434;
	border: 2px solid #302f2f;
	border-top: 0;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	min-width: 170px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
	right: 0;
	left: auto;
}

/* ลิงก์ภายในเมนูย่อย */
.dropdown-menu a {
	display: block;
	color: #ddd;
	padding: 10px 15px;
	line-height: 20px;
	white-space: nowrap;
	border-radius: 0;
}
.dropdown-menu a:hover {
	color: #fff; background: #e96b56;
}



/* =========== Footer ============== */

footer {
	background: #222;
	color: #bbb;
}
.footer {
	padding: 25px 10% 40px;
	display: grid;
	gap: 30px;
	line-height: 28px;
}
.footer div > p {
	color: #eee;
	font-size: 22px;
}
footer a { color: #eee; text-decoration: none; }
footer a:hover { color: #e96b56; text-decoration: none; }

/* บนจอคอมพิวเตอร์ (ขนาด 768px ขึ้นไป): แบ่งเป็น 3 คอลัมน์เท่าๆ กันอัตโนมัติ */
@media (min-width: 768px) {
	.footer {
		grid-template-columns: repeat(3, 1fr);
		max-width: 1170px;
		margin: 0 auto;
	}
}

.sub-footer {
	background: #111;
}
.sub-footer div {
	margin: 0 auto;
	padding: 25px 10%;
	max-width: 1170px;
	font-size: 0.9em;
}


/* =========== Form Contact ============== */

.form_main {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
	width: 100%;
	margin: 20px auto;
}
.form_main input, .form_main textarea { 
	font-size: 1em;
	box-sizing: border-box;
	padding: 10px;
}
#subject, #detail, #bt_submit { grid-column: span 2; }
#bt_submit {
	justify-self: center;
	width: auto;
	font-size: 1.2em;
}
@media (max-width: 768px) {
	.form_main { grid-template-columns: 1fr; }
	#subject, #detail, #bt_submit { grid-column: span 1; }
}

#warning {
	color: red; text-align: center;
}
.info { padding: 0; list-style: none; }
.info li { margin: 0 0 15px 0; }
.info li b { display: block; }



/* ========== Buttons ========== */
.more {
	display: inline-block;
	background-color: #727272;
	color: #fff;
	line-height: 30px;
	text-align: center;
	text-decoration: none;
	padding: 0 30px;
}
.more:hover {
	background-color: #e96b56;
	color: #fff;
	text-decoration: none;
}
.button1 {
	margin: 5px 3px;
	min-width: 100px;
	display: inline-block;
	padding: 13px 20px;
	background-color: #e96b56;
	border: 0;
	text-decoration: none;
	color: #fff;
	text-align: center;
	border-radius: 6px;
	font-size: 16pt;
	cursor: pointer;
}
.button1:hover {
	color: #fff;
	background-color: #666;
	text-decoration: none;
}


#scrollTopBtn {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 99;
	width: 45px;
	height: 45px;
	background-color: #e96b56;
	color: white;
	border: none;
	border-radius: 50%;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);

	/* ตั้งค่าแอนิเมชันให้ค่อยๆ จางเปิด-ปิด */
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

/* เอฟเฟกต์เมื่อปุ่มแสดงผล และเมื่อนำเมาส์ไปชี้ */
#scrollTopBtn.show { opacity: 1; visibility: visible; }
#scrollTopBtn:hover { background-color: #343434; transform: translateY(-3px); }

/* ========== end Buttons ========== */


/* 1. สไตล์พื้นฐานสำหรับครอบไอคอน (ใช้ร่วมกับ Bootstrap FontAwesome) */

a .ico { display: inline-flex; }
a .ico:hover { transform: translate(1px, 1px); }
.ico {
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	font-size: 14px; /* ขนาดไอคอนเริ่มต้นของ FA 3.2.1 */
	line-height: 1;
	text-decoration: none;
	transition: all 0.2s ease-in-out;
}
.icon-rounded { border-radius: 6px; }
.icon-circled { border-radius: 50%; }
.icon-bgprimary { color: #fff; background-color: #36739D; }
.icon-bgwarning { color: #fff; background-color: #DABB3A; }
