/* ============================================ */
/* ★ CSS Variables                              */
/* ============================================ */
:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #0ea5e9;
  --success: #16a34a;
  --success-light: #22c55e;
  --pink: #ec4899;
  --pink-light: #f472b6;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --white: #ffffff;
 --bg-gradient: linear-gradient(135deg, #d1fae5 0%, #e0f2fe 100%);
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --grad-blue: linear-gradient(135deg, #0284c7, #0ea5e9);
  --grad-green: linear-gradient(135deg, #16a34a, #22c55e);
  --grad-pink: linear-gradient(135deg, #ec4899, #f472b6);
  --grad-purple: linear-gradient(135deg, #8b5cf6, #a78bfa);
  --grad-hero: linear-gradient(135deg, #0284c7 0%, #ec4899 100%);
  --body-padding: 0 15px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 0 60px rgba(0, 0, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.08);
  --font: 'Prompt', sans-serif;
}

/* ============================================ */
/* ★ Reset                                      */
/* ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.2;
  padding: var(--body-padding);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============================================ */
/* ★ Container - ลอย                            */
/* ============================================ */
.container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  overflow: hidden;
}

/* ============================================ */
/* ★ Header                                     */
/* ============================================ */
.header {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1350px;
  margin: 0 auto;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px;
}

.nav ul { list-style: none; display: flex; gap: 4px; align-items: center; }

.nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  color: white;
}

.nav a:hover, .nav a.active { background: rgba(255, 255, 255, 0.2); }

/* ---- Dropdown ---- */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 220px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 100;
  display: flex;
  flex-direction: column;      /* ★ เรียงลงมา */
  gap: 2px;
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  display: block;              /* ★ แต่ละ li อยู่บรรทัดเดียว */
  width: 100%;
}

.dropdown-menu a {
  display: block;              /* ★ block → ไม่ inline */
  width: 100%;
  text-align: left;
  color: var(--text) !important;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 400;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: #f0f9ff;
  color: var(--primary) !important;
}

/* ============================================ */
/* ★ Hero Slider                                */
/* ============================================ */
.hero-slider {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.slide.active { opacity: 1; }

.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
}

.slide-overlay {
  position: relative;
  text-align: center;
  color: white;
  padding: 20px;
}

.slide-overlay h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.slide-overlay p {
  font-size: 1.1rem;
  opacity: 0.95;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.slider-prev { left: 20px; }
.slider-next { right: 20px; }

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active { background: white; transform: scale(1.3); }

/* ============================================ */
/* ★ Section                                    */
/* ============================================ */
.section { padding: 40px 20px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.see-all {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.see-all:hover { color: var(--primary-dark); transform: translateX(5px); }

/* ============================================ */
/* ★ ประกาศ/ข่าว                               */
/* ============================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  transition: all 0.3s;
  cursor: pointer;
  display: block;
}

.news-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.news-date {
  display: inline-block;
  background: var(--grad-blue);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.news-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.news-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================ */
/* ★ Cards - กิจกรรม 6 ใบ (2×3)                */
/* ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  padding: 30px 25px;
  border-radius: var(--radius-sm);
  color: white;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); }

.card-gradient-blue { background: var(--grad-blue); }
.card-gradient-green { background: var(--grad-green); }
.card-gradient-pink { background: var(--grad-pink); }
.card-gradient-purple { background: var(--grad-purple); }

.card-icon { font-size: 2.5rem; margin-bottom: 12px; }
.card-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.card-desc { font-size: 0.85rem; opacity: 0.95; }

/* ============================================ */
/* ★ Person Cards - บุคลากร 5 คน แถวเดียว       */
/* ============================================ */
.person-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.person-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 15px;
  text-align: center;
  transition: all 0.3s;
}

.person-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.person-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--grad-blue);
  color: white;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.person-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.person-role { font-size: 0.78rem; color: var(--text-muted); }

/* ============================================ */
/* ★ Footer                                     */
/* ============================================ */
.footer {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #cbd5e1;
  padding: 40px 20px 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer h4 { color: white; font-size: 1rem; font-weight: 600; margin-bottom: 15px; }
.footer p { font-size: 0.85rem; line-height: 1.8; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: #cbd5e1; font-size: 0.85rem; transition: color 0.2s; }
.footer a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ============================================ */
/* ★ Page Header (สำหรับหน้าอื่น ๆ)             */
/* ============================================ */
.page-header {
  background: var(--grad-hero);
  color: white;
  padding: 60px 20px 50px;
  text-align: center;
}

.page-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.page-header p { font-size: 1rem; opacity: 0.95; }

/* ============================================ */
/* ★ Statistics                                 */
/* ============================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-sm); }
.stat-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.stat-label { font-size: 0.9rem; color: var(--text-muted); }

/* ============================================ */
/* ★ Table                                      */
/* ============================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }

table { width: 100%; border-collapse: collapse; background: white; min-width: 500px; }

th {
  background: var(--grad-blue);
  color: white;
  padding: 15px;
  font-weight: 600;
  text-align: left;
  font-size: 0.9rem;
}

td { padding: 12px 15px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
tr:hover td { background: #f0f9ff; }
tr:last-child td { border-bottom: none; font-weight: 600; background: #f8fafc; }

/* ============================================ */
/* ★ Contact Form                               */
/* ============================================ */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 6px; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--grad-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3); }

/* ============================================ */
/* ★ Info Box                                   */
/* ============================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.info-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 25px;
  transition: all 0.3s;
}

.info-card:hover { border-color: var(--primary); }
.info-card-icon { font-size: 2rem; margin-bottom: 10px; }
.info-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--primary); }
.info-card p { font-size: 0.88rem; color: var(--text-muted); }

/* ============================================ */
/* ★ Responsive                                 */
/* ============================================ */
@media (max-width: 768px) {
  body { padding: 0 10px; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .menu-toggle { display: flex; }
  .nav { display: none; width: 100%; order: 3; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; padding: 10px 0; }
  .nav a { padding: 12px 15px; }
  .dropdown-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.1);
  margin-left: 15px;
  display: none;
  flex-direction: column;
  min-width: auto;
  width: auto;
}


.dropdown-menu a {
  color: white !important;
  padding: 10px 15px;
}
  
  .hero-slider { height: 350px; }
  .slide-overlay h2 { font-size: 1.6rem; }
  .slide-overlay p { font-size: 0.9rem; }
  .slider-btn { width: 40px; height: 40px; font-size: 1.4rem; }
  .section { padding: 30px 15px; }
  .section-header h2 { font-size: 1.2rem; }
  .news-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .person-grid { grid-template-columns: repeat(3, 1fr); }
  .person-avatar { width: 55px; height: 55px; font-size: 1.6rem; }
  .person-card h4 { font-size: 0.8rem; }
  .person-role { font-size: 0.7rem; }
  .footer { padding: 30px 15px 15px; }
  .stat-number { font-size: 1.8rem; }
  .page-header { padding: 40px 15px 30px; }
  .page-header h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .logo-text { font-size: 0.9rem; }
  .hero-slider { height: 280px; }
  .slide-overlay h2 { font-size: 1.3rem; }
  .card-grid { grid-template-columns: 1fr; }
  .person-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================ 
*/
/* ★ Personnel Grid — 4 คอลัมน์                */
/* ============================================ */
.person-grid-4col {
  grid-template-columns: repeat(4, 1fr);
}

.person-grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

/* Person Sub-Info */
.person-subject {
  font-size: 0.75rem;
  color: var(--primary);
  margin-top: 4px;
}

.person-phone {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Person Avatar with Image */
.person-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Committee Card */
.committee-card {
  position: relative;
  border-color: #fbbf24;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 30%);
}

.committee-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2);
}

.committee-avatar {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
}

.star-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* ★ ซ่อน Scrollbar */
html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* ★ Responsive */
@media (max-width: 992px) {
  .person-grid-4col {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .person-grid-4col,
  .person-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .person-grid-4col,
  .person-grid-3col {
    grid-template-columns: 1fr;
  }
}