:root {
  --primary-color: #0056b3;
  /* สีน้ำเงินโรงเรียน */
  --secondary-color: #ffc107;
  /* สีเหลืองตัด */
  --text-color: #333;
  --bg-light: #f8f9fa;
}

body {
  font-family: "Sarabun", sans-serif;
  color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6,
.nav-link,
.btn {
  font-family: "Kanit", sans-serif;
}

/* Top Bar */
.top-bar {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.9rem;
  padding: 8px 0;
}

.top-bar a {
  color: white;
  text-decoration: none;
  margin-left: 10px;
}

/* Navbar */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-link {
  color: #333;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--primary-color);
}

.dropdown-menu {
  border-top: 3px solid var(--primary-color);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("../img/44.jpg");
  /* background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1503676260728-1c00da094a0b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80'); */
  background-size: cover;
  background-position: center;
  height: 400px;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
}

.hero-btn {
  padding: 10px 30px;
  border-radius: 50px;
  font-size: 1.1rem;
  transition: all 0.3s;
}

/* Quick Links */
.quick-links {
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.quick-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s;
  cursor: pointer;
  border-bottom: 4px solid var(--primary-color);
  height: 100%;
}

.quick-card:hover {
  transform: translateY(-10px);
  background: var(--primary-color);
  color: white;
}

.quick-card i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

/* Notice Board */
.notice-board {
  background-color: #ffeeba;
  color: #856404;
  padding: 10px 0;
  font-family: "Kanit";
}

/* News Cards */
.news-card img {
  height: 200px;
  object-fit: cover;
}

.badge-academic {
  background-color: var(--primary-color);
}

.badge-activity {
  background-color: #28a745;
}

.badge-procure {
  background-color: #dc3545;
}

/* Director Message */
.director-section {
  background-color: var(--bg-light);
  padding: 60px 0;
}

.director-img {
  width: 40%;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.teacher-img {
  width: 40%;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
  background-color: #2c3e50;
  color: white;
  padding: 20px 0 20px;
}

footer a {
  color: #adb5bd;
  text-decoration: none;
}

footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #495057;
  margin-top: 30px;
  padding-top: 20px;
  font-size: 0.8rem;
}

/* Organizational Chart Styling */
.org-chart-container {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.chart-box {
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  margin: 5px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.box-director {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  border: 2px solid var(--secondary-color);
}

.box-deputy {
  background-color: #e9f5ff;
  color: var(--primary-color);
  font-weight: 600;
  border-bottom: 3px solid var(--primary-color);
}

.box-head {
  background-color: #f0f0f0;
  color: var(--text-color);
  font-size: 0.95rem;
  border-left: 5px solid #6c757d;
}

/* Connectors (Simplified for Bootstrap Layout) */
.chart-connector {
  height: 20px;
  border-left: 2px dashed #ccc;
  margin: 0 auto;
}

/* เพิ่มเส้นแนวนอนสำหรับเชื่อม 4 ฝ่าย */
.chart-connector-horizontal {
  /* ใช้สำหรับเส้นแนวนอนหลักที่เชื่อม 4 ฝ่าย */
  height: 2px;
  background-color: #ccc;
  /* เปลี่ยนจาก dashed เป็น solid เพื่อให้ดูเป็นเส้นหลัก */
  margin-top: 5px;
  /* จัดตำแหน่งให้ห่างจากเส้นตั้งที่ลงมาจากรอง ผอ. เล็กน้อย */
  position: relative;
  width: 80%;
  /* ความกว้างของเส้นแนวนอน */
}

/* เส้นตั้งสั้นๆ ที่ลงจากเส้นแนวนอนไปยังแต่ละฝ่าย */
.vertical-line {
  position: absolute;
  top: -10px;
  /* ขยับขึ้นไปเหนือกล่อง */
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background-color: #ccc;
  z-index: 10;
  /* ให้เส้นอยู่เหนือกล่อง */
}

.chart-row {
  /* ยกเลิกการตั้งค่า gap: 5px; ที่อาจทำให้แถวไม่จัดเรียงในบางจอ */
  /* display: flex;
                justify-content: center;
                gap: 5px; */
  padding-top: 5px;
}

/* Contact Details Card */
.contact-card {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  height: 100%;
  /* ให้ความสูงเท่ากัน */
}

.contact-card i {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-right: 15px;
}

/* Map Section */
.map-container {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Contact Form */
.contact-form {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.login-card {
  max-width: 400px;
  width: 90%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  align-items: center;
  justify-content: center;
}

.login-header {
  margin-top: 30px;
  background: #0056b3;
  /* box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); */
  border-radius: 15px;
  color: white;
  padding: 30px;
  align-items: center;
  justify-content: center;
}
/* Calendar Specific Styles */
.calendar-header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px;
  border-radius: 8px 8px 0 0;
}

.calendar-grid {
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 0 0 8px 8px;
}

.calendar-day {
  min-height: 100px;
  padding: 5px;
  border-right: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.9rem;
}

.calendar-day:last-child {
  border-right: none;
}

.day-label {
  font-weight: 600;
  color: #6c757d;
  font-family: "Kanit", sans-serif;
  font-size: 1rem;
  background-color: #f8f9fa;
  padding: 10px 0;
  border-right: 1px solid #dee2e6;
}

.day-number {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 5px;
  display: block;
}

.event-badge {
  font-size: 0.75rem;
  padding: 3px 6px;
  margin-top: 3px;
  cursor: pointer;
  display: block;
}

.event-holiday {
  background-color: #dc3545;
}

.event-exam {
  background-color: var(--secondary-color);
  color: #333 !important;
}

.event-school {
  background-color: #0d6efd;
}

.event-other {
  background-color: #6c757d;
}

.calendar-legend span {
  display: inline-block;
  margin-right: 15px;
  font-size: 0.9rem;
}

/* Menu Card Styling */
.menu-card {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: none;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.menu-card img {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.menu-card .card-body {
  padding: 15px;
}

.food-badge {
  font-size: 0.8rem;
  font-weight: 600;
}
.news-header-image {
  height: 450px;
  object-fit: cover;
  border-radius: 10px;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-news-card img {
  height: 120px;
  object-fit: cover;
}
