/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  overflow-x: hidden;
}
body {
  font-family: "Sarabun", "Segoe UI", sans-serif;
  line-height: 1.8;
  background-color: #f8fafc;
  font-size: 16px;
  color: #374151;
}
:root {
  --primary-blue: #1e3a8a;
  --secondary-blue: #3b82f6;
  --primary-orange: #ea580c;
  --secondary-orange: #fb923c;
  --accent-gold: #f59e0b;
  --white: #ffffff;
  --light-gray: #f8fafc;
  --medium-gray: #e2e8f0;
  --dark-gray: #374151;
  --text-dark: #1f2937;
  --border-light: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
a {
  text-decoration: none;
  color: inherit;
}
.mobile-break { display: none; }

/* Header & Navbar */
.header {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--secondary-blue) 100%
  );
  color: white;
  box-shadow: var(--shadow-lg);
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 20px;
  flex-wrap: wrap;
}
.logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo img {
  height: 70px;
  width: auto;
}
.school-info h1 {
  font-size: 24px;
  margin-bottom: 5px;
  color: var(--accent-gold);
  font-weight: 600;
}
.school-info p {
  font-size: 16px;
  opacity: 0.95;
}
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.mobile-menu-toggle {
  display: none;
}
.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  margin: 0;
}
.nav-item a {
  display: block;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  padding: 18px 24px;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}
.nav-item a:hover,
.nav-item a:focus {
  color: var(--primary-orange);
  background-color: var(--light-gray);
  border-bottom-color: var(--primary-orange);
}
.nav-item a.active {
  color: var(--primary-orange);
  border-bottom-color: var(--primary-orange);
  font-weight: 600;
}

/* Page Header */
.page-header {
  background-color: var(--light-gray);
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.page-header h1 {
  font-size: 42px;
  color: var(--primary-blue);
  font-weight: 700;
}
.page-header p {
  font-size: 18px;
  color: var(--dark-gray);
  margin-top: 10px;
}

/* Section & Common Components */
.section {
  padding: 80px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 60px;
}
.section-title h2 {
  font-size: 36px;
  color: var(--primary-blue);
  margin-bottom: 16px;
  font-weight: 700;
}
.section-title p {
  color: var(--dark-gray);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}
.grid {
  display: grid;
  gap: 30px;
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Footer Refined */
.footer { background: #1e293b; color: #cbd5e1; padding: 70px 0 20px; font-size: 15px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; margin-bottom: 50px; }
.footer-brand .footer-logo { height: 60px; margin-bottom: 20px; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-brand h3 { color: var(--white); font-size: 20px; margin-bottom: 5px; font-weight: 600; }
.footer-brand .en-name { font-size: 14px; margin-bottom: 20px; opacity: 0.8; }
.contact-info p { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.contact-info .icon { display: inline-block; min-width: 20px; }
.contact-info a { color: var(--accent-gold); text-decoration: none; transition: color 0.3s; }
.contact-info a:hover { color: var(--primary-orange); }

.footer-links-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.footer-section h4 { color: var(--white); font-size: 18px; font-weight: 600; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.footer-section h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--primary-orange); border-radius: 2px; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 15px; }
.footer-section a { color: #94a3b8; text-decoration: none; transition: all 0.3s ease; display: inline-block; }
.footer-section a:hover { color: var(--accent-gold); transform: translateX(5px); }

.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.1); opacity: 0.8; font-size: 14px; }

@media (max-width: 768px) {
  .logo img { height: 50px; }
  .school-info h1 { font-size: 18px; line-height: 1.4; }
  .school-info p { font-size: 13px; }
  .mobile-break { display: block; }

  /* Mobile Dropdown Navigation Menu */
  .mobile-menu-toggle {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--white);
    color: var(--primary-blue);
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-bottom: 2px solid var(--border-light);
    text-align: center;
    cursor: pointer;
  }
  
  .nav-container { 
    flex-direction: column; 
    padding: 0; 
  }
  
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--light-gray);
    padding: 0;
  }
  
  .nav-menu.show {
    display: flex;
  }
  
  .nav-item { 
    width: 100%; 
    border-bottom: 1px solid var(--border-light); 
  }
  
  .nav-item a { 
    padding: 15px 20px; 
    font-size: 16px; 
    border-bottom: none !important;
  }
  
  .nav-item a:hover,
  .nav-item a.active {
    background-color: var(--primary-orange);
    color: var(--white);
  }

  .page-header h1 {
    font-size: 32px;
  }
  .footer { padding: 50px 0 20px; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-brand h3 { font-size: 18px; }
  .footer-links-group { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-section h4 { font-size: 16px; margin-bottom: 15px; }
  .footer-section li { margin-bottom: 12px; font-size: 14px; }
}
