/* ===== VARIABLES ===== */
:root {
  --sk-primary:      #0d5ff6;
  --sk-primary-dark: #0a4dd4;
  --sk-primary-900:  #0a2d78;
  --sk-primary-soft: #e8f1ff;
  --sk-red:          #c41230;
  --sk-red-dark:     #9b0f27;
  --sk-red-soft:     #ffe4e9;
}

/* ===== BASE ===== */
body {
  font-family: 'Sarabun', 'Inter', sans-serif;
  background: #f8fafc;
  color: #1e293b;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--sk-primary); border-radius: 3px; }

/* ===== ICON SIZES ===== */
.icon-xs { width: 12px; height: 12px; display: inline-block; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.icon-md { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.icon-lg { width: 28px; height: 28px; display: inline-block; vertical-align: middle; }

/* ===== TOP BAR ===== */
.top-bar {
  background: linear-gradient(90deg, #1e3a8a 60%, #7f1d1d 100%);
  color: #93c5fd;
  font-size: 0.75rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--sk-red);
}
.top-bar-link {
  color: #93c5fd;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.top-bar-link:hover { color: #fff; }
.top-bar-sep { color: #1d4ed8; }

/* ===== NAVBAR ===== */
#mainNav {
  transition: box-shadow 0.3s ease;
  border-bottom: 3px solid var(--sk-red);
}
#mainNav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important; }

.sk-logo-icon {
  width: 44px; height: 44px;
  background: var(--sk-primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.navbar-brand:hover .sk-logo-icon { transform: scale(1.05); }
.sk-brand-name { font-size: 0.9rem; font-weight: 700; color: #1e3a8a; line-height: 1.2; }
.sk-brand-sub { font-size: 0.7rem; color: #94a3b8; font-weight: 500; }

.sk-nav-link {
  font-size: 0.875rem !important;
  font-weight: 500;
  color: #475569 !important;
  border-radius: 8px;
  padding: 6px 14px !important;
  transition: background 0.2s, color 0.2s;
}
.sk-nav-link:hover, .sk-nav-link.active {
  color: var(--sk-primary) !important;
  background: #eff6ff;
}
.dropdown-menu { border-radius: 12px !important; min-width: 200px; }
.dropdown-item { font-size: 0.875rem; color: #475569; padding: 8px 16px; }
.dropdown-item:hover { color: var(--sk-primary); background: #eff6ff; }

.btn-sk-primary {
  background: var(--sk-primary);
  color: #fff !important;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-sk-primary:hover { background: #1e40af; box-shadow: 0 4px 12px rgba(29,78,216,0.35); }

.btn-sk-red {
  background: var(--sk-red);
  color: #fff !important;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-sk-red:hover { background: var(--sk-red-dark); box-shadow: 0 4px 12px rgba(196,18,48,0.4); }

/* ===== HERO ===== */
.hero-gradient {
  background: linear-gradient(140deg, #1e3a8a 0%, #1d4ed8 55%, #9b0f27 100%);
}
.cta-gradient {
  background: linear-gradient(135deg, #7f1d1d 0%, #c41230 50%, #1d4ed8 100%);
}
.hero-blob-1 {
  top: 0; right: 0;
  width: 350px; height: 350px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  transform: translate(30%, -50%);
}
.hero-blob-2 {
  bottom: 0; left: 0;
  width: 250px; height: 250px;
  background: rgba(14,165,233,0.1);
  border-radius: 50%;
  transform: translate(-30%, 50%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.75rem; font-weight: 600;
  padding: 6px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
}
.text-sky-300 { color: #7dd3fc !important; }
.text-primary-light { color: #bfdbfe; }

.btn-white-hero {
  background: #fff; color: #1d4ed8; border: none;
  font-size: 0.875rem;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-white-hero:hover { background: #eff6ff; color: #1d4ed8; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.btn-glass-hero {
  background: rgba(255,255,255,0.1);
  color: #fff; border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.875rem;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.btn-glass-hero:hover { background: rgba(255,255,255,0.2); color: #fff; }

.swiper-hero { height: 360px; }
@media (max-width: 768px) { .swiper-hero { height: 240px; } }
.swiper-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

/* ===== STATS ===== */
.stat-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}
.stat-label { color: #bfdbfe; font-size: 0.8rem; }

/* ===== COLOR HELPERS ===== */
.text-sk-primary { color: var(--sk-primary) !important; }
.bg-sk-primary { background: var(--sk-primary) !important; }
.text-sk-red { color: var(--sk-red) !important; }
.bg-sk-red { background: var(--sk-red) !important; }
.section-tag-red {
  background: var(--sk-red-soft);
  color: var(--sk-red);
}

.bg-primary-soft  { background: #eff6ff; }
.bg-sky-soft      { background: #e0f2fe; }
.bg-success-soft  { background: #dcfce7; }
.bg-green-soft    { background: #dcfce7; }
.bg-danger-soft   { background: #fee2e2; }
.bg-warning-soft  { background: #fef9c3; }
.bg-amber-soft    { background: #fef9c3; }
.bg-violet-soft   { background: #ede9fe; }
.bg-pink-soft     { background: #fce7f3; }
.bg-facebook      { background: #1877f2; }
.bg-instagram     { background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); }

.text-sky    { color: #0284c7; }
.text-green  { color: #16a34a; }
.text-amber  { color: #d97706; }
.text-violet { color: #7c3aed; }
.text-pink   { color: #db2777; }
.text-warning-dark { color: #92400e; }

/* ===== BADGE OVERRIDES ===== */
.badge.bg-sky-soft    { background: #e0f2fe !important; color: #0284c7 !important; font-weight: 600; }
.badge.bg-green-soft  { background: #dcfce7 !important; color: #16a34a !important; font-weight: 600; }
.badge.bg-amber-soft  { background: #fef9c3 !important; color: #d97706 !important; font-weight: 600; }
.badge.bg-violet-soft { background: #ede9fe !important; color: #7c3aed !important; font-weight: 600; }
.badge.bg-danger-soft { background: #fee2e2 !important; color: #dc2626 !important; font-weight: 600; }
.badge.bg-warning-soft{ background: #fef9c3 !important; color: #d97706 !important; font-weight: 600; }
.badge.bg-sk-primary  { background: var(--sk-primary) !important; }

/* ===== SOFT BUTTONS ===== */
.btn-sky-soft   { background: #e0f2fe !important; color: #0369a1 !important; border: none; font-size: 0.75rem; font-weight: 600; }
.btn-sky-soft:hover { background: #bae6fd !important; }
.btn-green-soft { background: #dcfce7 !important; color: #15803d !important; border: none; font-size: 0.75rem; font-weight: 600; }
.btn-green-soft:hover { background: #bbf7d0 !important; }

/* ===== SIDEBAR CARDS ===== */
.sidebar-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}
.sidebar-icon-wrap {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ===== SECTION TAG ===== */
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eff6ff; color: var(--sk-primary);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 999px;
  margin-bottom: 8px;
}

/* ===== CARD HOVER ===== */
.card-hover { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(37,99,235,0.12) !important; }

.img-zoom { transition: transform 0.5s ease; }
.card-hover:hover .img-zoom { transform: scale(1.05); }

/* ===== LINE CLAMP ===== */
.lc-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.lc-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== ANNOUNCEMENTS ===== */
.announcement-item { border-bottom: 1px solid #f8fafc; }
.announcement-item:last-child { border-bottom: none; }
.ann-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== GALLERY ===== */
.gallery-item { aspect-ratio: 1; position: relative; cursor: pointer; }
.gallery-item img { transition: transform 0.5s ease; width: 100%; height: 100%; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(30,58,138,0);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}
.gallery-item:hover .gallery-overlay { background: rgba(30,58,138,0.5); }
.gallery-overlay .icon-lg { opacity: 0; transition: opacity 0.3s; }
.gallery-item:hover .gallery-overlay .icon-lg { opacity: 1; }
.gallery-more { aspect-ratio: 1; background: var(--sk-primary); cursor: pointer; }

/* ===== PROGRAM ICONS ===== */
.prog-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== VIDEO ===== */
.video-thumb { aspect-ratio: 16/9; cursor: pointer; }
.video-overlay { position: absolute; inset: 0; }
.video-play-btn {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.video-thumb:hover .video-play-btn { transform: scale(1.1); }
.video-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* ===== FAQ ACCORDION ===== */
.accordion-button { background: #fff !important; color: #1e293b; box-shadow: none !important; }
.accordion-button:not(.collapsed) { color: var(--sk-primary); background: #eff6ff !important; }

/* ===== CALENDAR ===== */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  min-width: 32px; min-height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.cal-day:not(.fw-semibold):hover { background: #eff6ff; color: var(--sk-primary); }
.cal-day.today { background: var(--sk-primary) !important; color: #fff !important; border-radius: 8px; }
.cal-day.event { position: relative; }
.cal-day.event::after {
  content: ''; position: absolute;
  bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: #f59e0b; border-radius: 50%;
}
.cal-dot { width: 8px; height: 8px; border-radius: 50%; }
.bg-sk-primary { background: var(--sk-primary) !important; }

/* ===== DOWNLOAD ITEMS ===== */
.download-item { text-decoration: none; background: #f8fafc; color: inherit; transition: background 0.2s; }
.download-item:hover { background: #eff6ff; }
.download-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.min-w-0 { min-width: 0; }

/* ===== QUICK LINKS ===== */
.quick-link-item {
  text-decoration: none; color: #475569;
  padding: 8px 12px; border-radius: 10px;
  font-size: 0.875rem;
  transition: background 0.2s, color 0.2s;
}
.quick-link-item:hover { background: #eff6ff; color: var(--sk-primary); }

/* ===== CONTACT ITEMS ===== */
.contact-item { text-decoration: none; color: inherit; background: #f8fafc; transition: background 0.2s; }
.contact-item:hover { background: #eff6ff; }
.contact-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ===== EXT LINKS ===== */
.ext-link { text-decoration: none; transition: color 0.2s; }
.ext-link:hover { color: var(--sk-primary) !important; }

/* ===== DIRECTOR BADGE ===== */
.director-badge {
  position: absolute; bottom: -4px; right: -4px;
  width: 24px; height: 24px;
  background: #34d399; border-radius: 50%;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
}

/* ===== NOTICE BOX ===== */
.notice-box { background: #fffbeb; border: 1px solid #fde68a; }

/* ===== FEATURES ===== */
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== FOOTER ===== */
.footer-dark { background: #1e3a8a; color: #93c5fd; }
.newsletter-bar { background: var(--sk-red-dark); border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}
.footer-input::placeholder { color: rgba(255,255,255,0.4); }
.footer-input:focus { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.5); color: #fff; box-shadow: none; }
.footer-muted { color: #93c5fd; }
.footer-link { color: #93c5fd; text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: #fff; }
.footer-nav-link { text-decoration: none; color: #93c5fd; transition: color 0.2s; }
.footer-nav-link:hover { color: #fff; }
.footer-icon { color: #60a5fa; }
.footer-logo-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.footer-social-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #93c5fd; transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.footer-social-btn:hover { background: var(--sk-primary); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); }
.footer-map-placeholder {
  height: 140px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
}
.footer-hours-box { background: rgba(255,255,255,0.08); }

/* ===== SCROLL TO TOP ===== */
.scroll-top-btn {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--sk-red);
  color: #fff; border: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  cursor: pointer; z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.2s;
}
.scroll-top-btn:hover { background: var(--sk-red-dark); transform: translateY(-2px); }
.scroll-top-btn.visible { opacity: 1; pointer-events: all; }

/* ===== PROGRESS BAR ===== */
@keyframes progress { from { width: 0; } }
.progress-bar-anim { animation: progress 1.5s ease forwards; }
