/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* FULL HEIGHT FIX */
html, body {
  height: 100%;
  font-family: 'Sarabun', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
}

main {
  flex: 1;
}

/* TOPBAR */
.topbar {
  height: 6px;
  background: linear-gradient(to right, #ff4da6, #2ecc71);
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.nav-left {
  display: flex;
  align-items: center;
}

.logo {
  width: 45px;
  margin-right: 10px;
}

.system-text {
  line-height: 1.2;
}

.system-name {
  font-weight: 600;
  font-size: 18px;
}

.system-full {
  font-size: 12px;
  color: #666;
}

.nav-right a {
  margin-left: 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.nav-right a:hover {
  color: #ff4da6;
}

/* HERO */
.hero {
  position: relative;
  height: 30vh; /* 🔥 ลดขนาดไม่ให้ใหญ่เกิน */
  background: url('../images/school.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  width: 100%;
  height: 100%;

  /* 🔥 ไล่สีโรงเรียน */
  background: linear-gradient(
    rgba(255, 77, 166, 0.55),   /* ชมพู */
    rgba(46, 204, 113, 0.55)   /* เขียว */
  );
}

.hero-content {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 20px;

  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.hero-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.hero-title h1 {
  font-size: 36px;
}

.icon {
  font-size: 32px;
}

.system {
  margin-top: 10px;
  font-weight: 400;
}

.subtitle {
  margin-top: 10px;
  font-size: 16px;
}

/* BUTTON */
.btn-apply {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 30px;
  background: #ff4da6;
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  transition: 0.3s;
}

.btn-apply:hover {
  background: #e60073;
}

/* POSITION SECTION */
.positions {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

.positions h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #333;
}

/* GRID */
.position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: auto;
}

/* CARD */
.position-card {
  background: white;
  padding: 25px;
  border-radius: 15px;

  box-shadow: 0 5px 15px rgba(0,0,0,0.1);

  transition: 0.3s;
  cursor: pointer;
}

/* TEXT */
.position-card h3 {
  color: #2ecc71;
  font-size: 1.1rem;
}

/* 🔥 HOVER EFFECT */
.position-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);

  background: linear-gradient(
    135deg,
    #ff4da6,
    #2ecc71
  );
}

.position-card:hover h3 {
  color: white;
}

/* FOOTER */
footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 12px;
}

/* MODAL BACKGROUND */
.modal {
  display: none;
  position: fixed;
  z-index: 999;

  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  background: rgba(0,0,0,0.6);
}

/* MODAL BOX */
.modal-content {
  background: white;
  margin: 10% auto;
  padding: 30px;
  width: 90%;
  max-width: 500px;

  border-radius: 15px;
  text-align: center;

  animation: fadeIn 0.4s ease;
}

/* CLOSE BUTTON */
.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

/* TEXT */
.modal-content h2 {
  color: #ff4da6;
  margin-bottom: 15px;
}

.modal-content p {
  color: #333;
  margin-bottom: 20px;
}

/* ANIMATION */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}