/* ==================== GLOBAL ==================== */
body {
  font-family: "Times New Roman", Georgia, Serif;
  margin: 0;
  padding: 0;
  background: #f3f3f3;
}
h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display";
  letter-spacing: 5px;
}
html {
  scroll-behavior: smooth;
}
[id] {
  scroll-margin-top: 90px; /* กันไม่ให้เนื้อหาชน navbar */
}

/* ==================== HERO SECTION ==================== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}
.hero-text h1 { font-size: 60px; font-weight: bold; }
.hero-text h2 { font-size: 30px; margin-bottom: 20px; }

/* ==================== CONTACT ==================== */
.contact-card {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1000px;
  padding: 40px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease-in-out;
}
.contact-left, .contact-right { flex: 1; }
.contact-left { text-align: center; }

.profile-img {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s;
}
.profile-img:hover { transform: scale(1.05) rotate(-3deg); }

.social-links { margin-top: 15px; }
.social-links a {
  font-size: 28px; margin: 0 10px;
  color: #333; transition: 0.3s;
}
.social-links a:hover {
  transform: translateY(-5px);
  color: #007bff;
}
button { transition: background 0.3s, transform 0.2s; }
button:hover {
  background: #007bff !important;
  transform: scale(1.02);
}

/* ==================== ABOUT & SCHOOL CARD ==================== */
.about-card, .school-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.8s ease-in-out;
}
.about-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}
.school-card:hover {
  transform: scale(1.05);
  box-shadow: 0 14px 32px rgba(0,0,0,0.25);
}
.about-card img {
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ==================== INTERESTING ==================== */
.interesting-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  width: 100%;
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}
.interesting-card {
  width: 300px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}
.interesting-card:nth-child(1) { animation-delay: 0.2s; }
.interesting-card:nth-child(2) { animation-delay: 0.4s; }
.interesting-card:nth-child(3) { animation-delay: 0.6s; }
.interesting-card:nth-child(4) { animation-delay: 0.8s; }
.interesting-card:nth-child(5) { animation-delay: 1s; }
.interesting-card:nth-child(6) { animation-delay: 1.2s; }

.interesting-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.card-img {
  width: 100%; height: 180px;
  object-fit: contain;
  background: #f9f9f9;
  padding: 20px;
}
.card-body { padding: 15px; text-align: center; }
.card-body h3 { font-size: 18px; margin-bottom: 10px; }
.card-body p { font-size: 14px; color: #555; margin-bottom: 15px; }

/* ==================== NAVBAR ==================== */
.w3-bar .w3-button.active-link {
  background-color: #111 !important;
  color: #fff !important;
  border-radius: 6px;
}
/* ปิด effect ตอนกดปุ่ม Navbar */
.w3-bar .w3-button:focus,
.w3-bar .w3-button:active {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important; /* กันกล่องดำ */
  color: inherit !important;          /* คงสีเดิม */
  transform: none !important;         /* กันเด้ง */
}
.w3-bar .w3-button {
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animated-name {
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
/* ✅ Fix Navbar ให้เท่ากันทุกหน้า */
.w3-bar .w3-button {
  font-family: "Prompt", sans-serif; /* ใช้ฟอนต์เดียวกัน */
  font-size: 16px;                   /* กำหนดขนาดเท่ากัน */
  padding: 10px 16px !important;     /* ปรับ padding ให้เท่ากัน */
  letter-spacing: 2px;               /* ช่องไฟสม่ำเสมอ */
  line-height: 1.5;                  /* ให้ตัวหนังสืออยู่กึ่งกลาง */
}

/* ✅ ตัว active ไม่ให้เด้งขึ้นลง */
.w3-bar .w3-button.active-link {
  background-color: #111 !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 10px 16px !important; /* ให้เท่ากับปุ่มปกติ */
}


