* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Sarabun', sans-serif;
  color: #222;
}

/* Body พื้นหลังสีขาวนวล */
body {
  background: #f0f4f8;
  line-height: 1.6;
}

/* โลโก้ */
.logo {
  background-color: #003366;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.logo img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border-radius: 10px;
}

/* Running marquee (แถบวิ่ง) */
.font-run {
  background-color: #ffc107;
  height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-left: 10px;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.1);
}

.marquee p {
  white-space: nowrap;
  display: inline-block;
  animation: marquee 20s linear infinite;
  font-size: 18px;
  font-weight: 600;
  color: #003366;
  padding-left: 100%;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* เมนูนำทาง */
.nav {
  background-color: #004080;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.nav > ul > li {
  position: relative;
  margin: 0 20px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  padding: 15px 18px;
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  transition: background-color 0.3s, color 0.3s;
}

.nav a:hover {
  background-color: #ff9800;
  color: #222;
  border-radius: 5px;
}

/* เมนู dropdown */
.nav li ul {
  display: none;
  position: absolute;
  background-color: #004080;
  top: 50px;
  left: 0;
  min-width: 200px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  z-index: 100;
}

.nav li:hover ul {
  display: block;
}

.nav li ul li {
  margin: 0;
}

.nav li ul li a {
  padding: 12px 20px;
  font-weight: 400;
  font-size: 1rem;
}

.nav li ul li a:hover {
  background-color: #ffb74d;
  color: #222;
  border-radius: 0;
}

/* Container หลัก */
.container {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* กล่องแสดงหัวข้อและรูป */
.box-item {
  background-color: #fff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s ease;
}

.box-item:hover {
  transform: translateY(-5px);
}

.box-item h1 {
  font-size: 26px;
  color: #510def;
  margin-bottom: 25px;
  font-weight: 700;
}


/* รูปภาพในกล่อง */
.box-item img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(196, 83, 83, 0.1);
  transition: box-shadow 0.3s ease;
}

.box-item img:hover {
  box-shadow: 0 10px 25px rgba(255, 152, 0, 0.5);
}

/* Footer */
footer {
  background-color: #00264d;
  color: #fff;
  padding: 40px 15px;
  font-size: 14px;
  text-align: center;
}

.footer-top-con {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  max-width: 1100px;
  margin: 0 auto;
  gap: 30px;
}

.footer-top-item {
  flex: 1 1 300px;
  min-width: 280px;
}

.footer-top-item h1 {
  color: #ffb300;
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 20px;
}

.footer-top-item p {
  line-height: 1.5;
  margin-bottom: 10px;
  color: #fff;
}

/* iframe แผนที่ขนาดเต็ม */
.footer-top-item iframe {
  width: 100%;
  height: 320px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .nav ul {
    flex-direction: column;
    align-items: center;
  }

  .nav > ul > li {
    margin: 10px 0;
  }

  .nav li ul {
    position: static;
    box-shadow: none;
    border-radius: 0;
  }

  .container {
    padding: 0 10px;
  }
}