/* ========================================
   ฟอนต์และ Global Styles
   ======================================== */
body {
  font-family: 'Mitr', sans-serif;
  color: #3C3C3C;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.7;
}


/* ✅ Navbar */
.nav-color {
  background: linear-gradient(to right, #4169e1, #9400d3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
}

.navbar-brand {
  color: #fff !important;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo {
  width: 32px;
  height: auto;
}

.navbar-logo:hover {
  transform: scale(1.3);
  transition: scale 0.3s ease, transform 0.3s ease;
  filter: drop-shadow(0 8px 20px rgba(255, 255, 255, 0.5));
}

.navbar-nav .nav-link {
  color: #fff !important;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
}

/* ✅ เส้นโผล่จากตรงกลาง + เรืองแสง */
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 64%;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(.2, .9, .2, 1), opacity 0.18s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after,
.navbar-nav .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}
/* ========================================
   ✅ Hero Section - พื้นหลังเบลอและ Layout สวยงาม
   ======================================== */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

/* พื้นหลังภาพ - เพิ่มการเบลอ */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: blur(8px) brightness(0.7);
  transform: scale(1.1);
}

/* Overlay เพิ่มเติมเพื่อความชัดเจนของข้อความ */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(65, 105, 225, 0.4), rgba(148, 0, 211, 0.4));
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
  padding: 80px 20px 60px;
  max-width: 1000px;
}

.hero-section h1 {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease-out;
  line-height: 1.2;
  letter-spacing: -0.5px;
  text-align: center;
}

.hero-section h2 {
  font-size: clamp(20px, 3.5vw, 38px);
  font-weight: 600;
  color: #f5f5f5;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
  line-height: 1.3;
  text-align: center;
}

.hero-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-buttons .btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 50px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-width: auto;
}

.hero-buttons .btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.hero-buttons .btn:hover::before {
  width: 300px;
  height: 300px;
}

.hero-buttons .btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: #fff;
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.05);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   ✅ Features Section - History
   ======================================== */
.features-section {
  padding: 100px 20px;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.history-1936 {
  position: relative;
  background: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  height: 100%;
}

.history-1936:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.12);
}

.history-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 16px;
}

.history-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #4169e1, #9400d3);
  border-radius: 2px;
}

.history-text {
  font-size: clamp(15px, 2.5vw, 17px);
  color: #4a5568;
  line-height: 1.9;
  text-align: justify;
}

.history-video {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.history-video iframe {
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  width: 100%;
  height: 350px;
  border: none;
  transition: transform 0.3s ease;
}

.history-video iframe:hover {
  transform: scale(1.03);
}

/* ========================================
   ✅ ML, NLP, LLM Sections - ปรับให้สวยงามขึ้น
   ======================================== */
.ml-section {
  padding: 100px 20px;
  background: linear-gradient(180deg, #FFFFFF, #B2EBF2);
}

.nlp-section {
  padding: 100px 20px;
  background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
}

.llm-section {
  padding: 100px 20px;
  background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
}

/* Info Boxes - ทำให้ทันสมัยขึ้น */
.info-box,
.info-box-2,
.info-box-3 {
  position: relative;
  background: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  overflow: visible;
}

.info-box::before,
.info-box-2::before,
.info-box-3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #4169e1, #9400d3);
  border-radius: 24px 24px 0 0;
}

.info-box:hover,
.info-box-2:hover,
.info-box-3:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

.info-box h3,
.info-box-2 h3,
.info-box-3 h3 {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 20px;
  margin-top: 0;
}

.info-box p,
.info-box-2 p,
.info-box-3 p {
  font-size: clamp(15px, 2.5vw, 17px);
  color: #4a5568;
  line-height: 1.9;
  text-align: justify;
}

/* Labels - ทำให้โดดเด่นขึ้นและ responsive */
.label {
  position: absolute;
  top: -10px;
  right: 28px;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 600;
  color: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 2;
  white-space: nowrap;
}

.label.basic {
  background: linear-gradient(135deg, #2d3748, #1a202c);
}

.label.intermediate {
  background: linear-gradient(135deg, #718096, #4a5568);
  color: #ffffff;
}

.label.advanced {
  background: linear-gradient(135deg, #fc8181, #e53e3e);
}

/* Video Boxes */
.ml-video-box,
.nlp-video-box,
.llm-video-box {
  width: 100%;
}

.ml-video-box iframe,
.nlp-video-box iframe,
.llm-video-box iframe {
  width: 100%;
  height: 350px;
  border-radius: 20px;
  border: none;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease;
}

.ml-video-box iframe:hover,
.nlp-video-box iframe:hover,
.llm-video-box iframe:hover {
  transform: scale(1.03);
}

/* ========================================
   ✅ Benefits Section
   ======================================== */
.benefits-section {
  padding: 100px 20px;
  background: linear-gradient(180deg, #E8F5E9 0%, #ffffff 100%);
}

.benefits-title {
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  color: #2d3748;
  text-align: center;
  margin-bottom: 60px;
}

.ai-benefits-box {
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
  border: none;
  border-radius: 28px;
  padding: 60px 40px;
  box-shadow: 0 20px 60px rgba(65, 105, 225, 0.15);
  max-width: 1100px;
  margin: 0 auto;
  transition: all 0.4s ease;
}

.ai-benefits-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(65, 105, 225, 0.2);
}

.ai-benefits-box h3 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 40px;
  text-align: center;
}

.benefits-list {
  padding-left: 95px;
  list-style: none;
  font-size: 17px;
  line-height: 1.8;
}

.benefits-list-main {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
  font-size: 19px;
  position: relative;
  padding-left: 40px;
}

.benefits-list-main::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4169e1;
  font-weight: 700;
  font-size: 24px;
}

.benefits-list-second {
  color: #718096;
  margin-top: 6px;
  margin-bottom: 28px;
  font-size: 16px;
  padding-left: 40px;
}

/* ========================================
   ✅ Content Section - Microsoft Copilot
   ======================================== */
.content-section {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 20px;
  background: linear-gradient(180deg, #ffffff, #c3cfe2);
  text-align: center;
}

.content-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.section-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  color: #2d3748;
  text-align: center;
  margin-bottom: 16px;
}

.section-sub-title {
  font-size: clamp(16px, 3vw, 20px);
  color: #718096;
  text-align: center;
  margin-bottom: 40px;
}

.copilot-section-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 28px;
  padding: 50px 40px;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
  width: 100%;
  max-width: 650px;
  text-align: center;
  transition: all 0.4s ease;
  margin: 0 auto;
}

.copilot-section-box:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 30px 80px rgba(102, 126, 234, 0.4);
}

.copilot-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.copilot-logo {
  display: block;
  margin: 0 auto;
  max-width: 220px;
  height: auto;
  transition: transform 0.5s ease;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.25));
}

.copilot-logo:hover {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}

/* ========================================
   ✅ Reason Section
   ======================================== */
.reason-section {
  background: linear-gradient(180deg, #ffd89f, #ffffff);
  padding: 100px 20px;
}

.reason-box {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 28px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  text-align: center;
}

.reason-box:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

.reason-icon {
  font-size: 64px;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.reason-box h4 {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 16px;
}

.reason-box p {
  font-size: clamp(15px, 2.5vw, 17px);
  color: #4a5568;
  line-height: 1.8;
}

/* ========================================
   ✅ More Info Section
   ======================================== */
.more-info-section {
  padding: 100px 20px;
  background: linear-gradient(180deg, #ffffff, #E8EAF6);
}

.more-info-title {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  color: #2d3748;
  text-align: center;
  margin-bottom: 60px;
}

.more-info-video-box {
  margin-bottom: 20px;
}

.more-info-video-box iframe {
  width: 100%;
  height: 350px;
  border-radius: 20px;
  border: none;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease;
}

.more-info-video-box iframe:hover {
  transform: scale(1.03);
}

/* ========================================
   ✅ Map PSC Box
   ======================================== */
.map-psc-box {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.map-psc-box iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 20px;
}

/* ========================================
   ✅ Scroll Animation
   ======================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   ✅ Responsive Design - Mobile First
   ======================================== */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Desktop (1200px+) */
/* Medium screens (992px) */
@media (max-width: 992px) {
  .hero-section {
    min-height: 80vh;
  }

  .hero-section h1 {
    font-size: clamp(24px, 5vw, 44px);
  }

  .hero-section h2 {
    font-size: clamp(18px, 4vw, 32px);
  }

  .hero-buttons .btn {
    padding: 12px 26px;
    font-size: 15px;
  }

  /* Label ยังอยู่ขวาบนในขนาดนี้ */
  .label {
    right: 24px;
    top: -10px;
  }

  /* Sections */
  .features-section,
  .ml-section,
  .nlp-section,
  .llm-section,
  .benefits-section,
  .reason-section,
  .more-info-section,
  .content-section {
    padding: 80px 20px;
  }

  /* Videos */
  .history-video iframe,
  .ml-video-box iframe,
  .nlp-video-box iframe,
  .llm-video-box iframe,
  .more-info-video-box iframe {
    height: 300px;
  }
}

/* Tablets and below (768px) */
@media (max-width: 991.98px) {
  /* Navbar - Bootstrap breakpoint */
  .navbar.nav-color {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .navbar-collapse {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
  }

  .navbar-nav {
    align-items: stretch;
  }

  .navbar-nav .nav-link {
    margin: 4px 0;
    padding: 12px 16px !important;
    text-align: left;
  }

  .navbar-nav .nav-link::after {
    left: 20px;
    transform: translateX(0) scaleX(0);
    transform-origin: left;
    width: calc(100% - 40px);
    bottom: 6px;
  }

  .navbar-nav .nav-link:hover::after,
  .navbar-nav .nav-link.active::after {
    transform: translateX(0) scaleX(1);
  }

  .navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.5);
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 75vh;
    margin-top: 0;
  }

  .hero-off {
    filter: blur(6px) brightness(0.65);
  }

  .hero-section .container {
    padding: 60px 20px 40px;
  }

  .hero-section h1 {
    font-size: clamp(22px, 6vw, 36px);
    margin-bottom: 14px;
  }

  .hero-section h2 {
    font-size: clamp(18px, 5vw, 28px);
    margin-bottom: 32px;
  }

  /* ปุ่มยังคงเรียงแนวนอนแม้ในมือถือ */
  .hero-buttons {
    gap: 12px;
    width: 100%;
    justify-content: center;
  }

  .hero-buttons .btn {
    padding: 11px 22px;
    font-size: 14px;
    flex: 1;
    max-width: 160px;
  }

  /* Sections */
  .features-section,
  .ml-section,
  .nlp-section,
  .llm-section,
  .benefits-section,
  .reason-section,
  .more-info-section,
  .content-section {
    padding: 70px 16px;
  }

  /* Info Boxes */
  .info-box,
  .info-box-2,
  .info-box-3,
  .history-1936 {
    padding: 36px 24px;
    margin-bottom: 28px;
  }

  .history-1936 {
    padding: 32px 24px;
  }

  /* Labels บนมือถือ - ย้ายไปซ้ายบน */
  .label {
    top: -8px;
    right: auto;
    left: 20px;
    padding: 6px 14px;
    font-size: 12px;
  }

  /* Benefits */
  .benefits-list {
    padding-left: 0;
  }

  .ai-benefits-box {
    padding: 40px 28px;
  }

  /* Videos */
  .history-video iframe,
  .ml-video-box iframe,
  .nlp-video-box iframe,
  .llm-video-box iframe,
  .more-info-video-box iframe {
    height: 260px;
  }

  /* Reason Section */
  .reason-box {
    margin-bottom: 24px;
  }
}

/* Small Mobile (576px) */
@media (max-width: 576px) {
  /* Hero Section - ปรับขนาดให้เหมาะสมกับจอเล็ก */
  .hero-section {
    min-height: 70vh;
    margin-top: 0;
  }

  .hero-off {
    filter: blur(5px) brightness(0.6);
  }

  .hero-section .container {
    padding: 50px 16px 30px;
  }

  .hero-section h1 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .hero-section h2 {
    font-size: 18px;
    margin-bottom: 28px;
  }

  /* ปุ่มยังคงเรียงแนวนอนแม้จอเล็กมาก */
  .hero-buttons {
    gap: 10px;
    padding: 0 10px;
  }

  .hero-buttons .btn {
    padding: 10px 18px;
    font-size: 13px;
    flex: 1;
    max-width: 145px;
    min-width: 110px;
  }

  /* Sections */
  .features-section,
  .ml-section,
  .nlp-section,
  .llm-section,
  .benefits-section,
  .reason-section,
  .more-info-section,
  .content-section {
    padding: 60px 16px;
  }

  /* Info Boxes */
  .info-box,
  .info-box-2,
  .info-box-3,
  .history-1936 {
    padding: 32px 20px;
  }

  .history-1936 {
    padding: 28px 20px;
  }

  /* Labels - อยู่ซ้ายบนบนมือถือ */
  .label {
    top: -7px;
    right: auto;
    left: 16px;
    padding: 5px 12px;
    font-size: 11px;
  }

  /* Typography */
  .history-title,
  .more-info-title {
    text-align: center;
    font-size: 24px;
  }

  .history-text {
    text-align: left;
    font-size: 15px;
  }

  .section-title {
    font-size: 26px;
  }

  .benefits-title {
    font-size: 28px;
  }

  /* Copilot Section */
  .copilot-section-box {
    padding: 36px 24px;
  }

  .copilot-logo {
    max-width: 170px;
  }

  /* Videos */
  .history-video iframe,
  .ml-video-box iframe,
  .nlp-video-box iframe,
  .llm-video-box iframe,
  .more-info-video-box iframe {
    height: 220px;
  }

  /* Benefits */
  .ai-benefits-box {
    padding: 32px 20px;
  }

  /* Map Box */
  .map-psc-box {
    padding: 20px;
    border-radius: 20px;
  }

  /* Reason Icon */
  .reason-icon {
    font-size: 56px;
  }
}

/* Extra Small Mobile (400px) */
@media (max-width: 400px) {
  .hero-buttons .btn {
    padding: 9px 14px;
    font-size: 12px;
    min-width: 100px;
    max-width: 130px;
  }

  .hero-section h1 {
    font-size: 20px;
  }

  .hero-section h2 {
    font-size: 16px;
  }
}

/* ========================================
   ✅ Utility Classes
   ======================================== */
.text-gradient {
  background: linear-gradient(135deg, #4169e1, #9400d3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-soft {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.shadow-strong {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ========================================
   ✅ Footer - ไม่ให้ทับกับ content
   ======================================== */
footer {
  position: relative;
  z-index: 10;
  margin-top: 0;
  background: #2d3748;
  color: #fff;
  padding: 40px 0 20px;
}

/* เว้นระยะ main content จาก footer */
main {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Section สุดท้ายเว้นระยางจาก footer */
.more-info-section {
  padding-bottom: 80px !important;
  margin-bottom: 0;
}
