body {
  font-family: "Kanit", sans-serif;
  margin: 0;
  padding: 0;
  text-align: left;
  
}

/* แถบบนสุด */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f8f8;
  padding: 5px 20px;
  font-size: 14px;
  border-bottom: 1px solid #ddd;
}

.top-left,
.top-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-right input[type="text"] {
  padding: 5px;
  font-size: 14px;
}

/* Header */
header {
  background-color: #fff;
  padding: 20px;
}

/* โลโก้และชื่อวิทยาลัย */
.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  padding-left: 240px;
}

.logo {
  height: 80px;
}

/* เมนู */
nav ul.main-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  padding: 10px 0;
  margin: 0;
}

nav li {
  position: relative;
}

nav a {
  text-decoration: none;
  color: #000;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

nav a:hover {
  color: #1da1f2;
}

/* เมนูย่อย */
nav ul.submenu {
  display: none;
  position: absolute;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 10px 0;
  margin: 0;
  top: 100%;
  left: 0;
  min-width: 220px;
  z-index: 1000;
}

nav li.dropdown:hover .submenu {
  display: block;
}

nav ul.submenu li {
  padding: 5px 20px;
}

nav ul.submenu li a {
  color: #000;
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

nav ul.submenu li a:hover {
  background-color: #f0f0f0;
}

/* Marquee */
.marquee-container {
  overflow: hidden;
  background: #fff;
}

.marquee {
  display: inline-block;
  white-space: nowrap;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 600;
  animation: marquee 20s linear infinite;
  color: #333;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Section หลัก */
.info-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  padding: 20px;
  background-color: #f9f9f9;
  flex-wrap: wrap;
  margin-top: 0;
}

.info-left-carousel {
  position: relative;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-track img {
  width: 100%;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
  border-radius: 50%;
  transition: color 0.3s ease;
}

.carousel-btn:hover {
  color: #79292C;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.info-right {
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

.director-photo {
  width: 60%;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.info-right h3 {
  margin-bottom: 15px;
  font-size: 20px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-right p {
  font-size: 16px;
  color: #000;
  line-height: 1.5;
  text-align: left;
}

/* ข่าว */
.news-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.news-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 15px;
  transition: 0.3s ease;
  text-align: left;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Media Query สำหรับมือถือ */
@media screen and (max-width: 768px) {
  .top-bar,
  .top-left,
  .top-right,
  .header-content,
  nav ul.main-menu {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0;
    text-align: left;
  }

  .top-right input[type="text"] {
    width: 100%;
    max-width: 250px;
  }

  nav ul.main-menu {
    gap: 12px;
  }

  .info-section {
    flex-direction: column;
    margin-top: 20px;
  }

  .info-left-carousel {
    scale: 1;
    margin-left: 0;
    margin-top: 0;
  }

  .info-right {
    margin-left: 0;
    margin-top: 20px;
    width: 90%;
    text-align: left;
  }

  .marquee {
    font-size: 14px;
  }

  .news-container {
    grid-template-columns: 1fr;
  }
}
