/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Kanit', sans-serif;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: #0078D7;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar .logo {
  display: flex;
  align-items: center;
}
.navbar .logo img {
  height: 50px;
  margin-right: 10px;
}
.navbar .logo h1 {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}
.nav-links li {
  position: relative;
}
.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}
.nav-links a:hover {
  color: #ffdd57;
}

/* Dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  background: white;
  color: black;
  top: 100%;
  left: 0;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}
.dropdown-menu li a {
  display: block;
  padding: 10px;
  color: #333;
}
.dropdown-menu li a:hover {
  background: #f0f0f0;
}
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 3px;
}

/* Responsive Navbar */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 65px;
    right: 0;
    background: #0078D7;
    flex-direction: column;
    width: 220px;
    padding: 15px;
    border-radius: 8px 0 0 8px;
  }
  .nav-links.show {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    background: #0060b5;
  }
  .dropdown.open .dropdown-menu {
    display: block;
  }
  .dropdown-menu li a {
    color: white;
  }
  .dropdown-menu li a:hover {
    background: rgba(255,255,255,0.1);
  }
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(136, 200, 252, 0.4), rgba(205, 120, 231, 0.4)),
              url('assets/img/hero-bg.jpg') center/cover no-repeat;
  color: rgb(136, 2, 91);
  text-align: center;
  padding: 120px 20px;
}
.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: #ffdd57;
  color: #8f36f5;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}
.btn-primary:hover {
  background: #ffc107;
}

/* ข่าวสาร */
.news {
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
}
.news h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8rem;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}
.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}
.post-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.post-card .content {
  padding: 15px;
}
.post-card p {
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.post-card a {
  color: #0078D7;
  text-decoration: none;
  font-weight: bold;
}
.post-card a:hover {
  text-decoration: underline;
}
.badge-new {
  display: inline-block;
  background: #ff4d4d;
  color: white;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 8px;
}

/* Footer */
footer {
  background: #222;
  color: #aaa;
  text-align: center;
  padding: 20px;
  margin-top: 50px;
}
footer p {
  margin: 0;
  font-size: 0.9rem;
}
