@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Public+Sans:ital,wght@0,100..900;1,100..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&family=Syne:wght@400..800&display=swap');

* {
  font-family: "Geist Mono", monospace;
  font-optical-sizing: auto;
  font-style: normal;
}

:root {
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 60%, #db2777 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(37, 99, 235, .12) 0%, rgba(124, 58, 237, .12) 60%, rgba(219, 39, 119, .10) 100%);
  --font-size-base-en: 15px;
  --font-size-nav-en: .88rem;
  --font-size-mega-en: .84rem;
}

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base-en);
}

body {
  line-height: 1.6;
}

/* Compact English navigation */
#mainNav .navbar-brand {
  font-size: 1.35rem !important;
  letter-spacing: -.025em;
}

#mainNav .navbar-nav > .nav-item > .nav-link {
  font-size: var(--font-size-nav-en);
  line-height: 1.35;
  padding-right: .65rem;
  padding-left: .65rem;
}

#mainNav .dropdown-mega .dropdown-menu {
  font-size: var(--font-size-mega-en);
}

#mainNav .dropdown-mega .dropdown-menu h6 {
  font-size: .72rem;
  line-height: 1.35;
}

#mainNav .dropdown-mega .mega-link {
  line-height: 1.4;
}

/* Offset anchor scroll for sticky navbar */
section {
  scroll-margin-top: 90px;
}

.topbar .dropdown-menu {
  z-index: 2000;
}

/* ===== Mega Menu (Bootstrap 5 only) ===== */
.dropdown-mega .dropdown-menu {
  width: min(900px, 92vw);
  padding: 1rem;
  border: 0;
  border-radius: 1rem;
  /* rounded-4-ish */
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, .12);
}

/* Keep dropdown aligned under the nav item */
@media (min-width: 992px) {
  .dropdown-mega {
    /* position: static; */
    position: static;
  }

  /* allow full width positioning */
  .dropdown-mega .dropdown-menu {
    left: 65%;
    transform: translateX(-50%);
    margin-top: .75rem;
    /* margin-top: .75rem; */
  }

}

@media (max-width: 991.98px) {
  html {
    font-size: 14.5px;
  }

  #mainNav .navbar-brand {
    font-size: 1.2rem !important;
  }

  #mainNav .navbar-nav > .nav-item > .nav-link {
    font-size: .92rem;
    padding-top: .65rem;
    padding-bottom: .65rem;
  }
}

.mega-light-green{
  background: linear-gradient(135deg,#f0fdf4,#dcfce7);
  border: 1px solid #bbf7d0;
}

/* Badge */
.badge-floating{
  position: relative;
  top: -6px;
  right: -12px;
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 50px;
  background: linear-gradient(135deg,#2563eb,#7c3aed);
  color: white;
  font-weight: 600;
}

/* Nice hover for links inside mega */
.mega-link {
  border-radius: .75rem;
  padding: .6rem .75rem;
  transition: background .15s ease;
}

.mega-link:hover {
  background: rgba(0, 0, 0, .06);
}

/* Optional: open on hover (desktop only) */
@media (min-width: 992px) {
  .navbar .dropdown-mega:hover .dropdown-menu {
    display: block;
  }
}

/* Submenu */
.subnav {
  position: sticky;
  top: 72px;
  /* height of your main navbar */
  z-index: 1020;
}

.subnav .nav-link {
  font-weight: 500;
  color: #555;
  white-space: nowrap;
}

.subnav .nav-link:hover {
  color: #2563eb;
}

.subnav .nav-link.active {
  color: #2563eb;
  border-bottom: 2px solid #2563eb;
}

/* Smooth horizontal scroll on mobile */
.subnav .nav {
  overflow-x: auto;
}



/* ===== Hero Carousel ===== */
.hero-carousel .carousel-item {
  /* min-height: 100vh; */
  min-height: 80vh;
}

.hero-slide {
  /* min-height: 100vh; */
  min-height: 80vh;
  position: relative;
  overflow: hidden;
  background: var(--brand-gradient);
}

/* Ensure content above overlays */
.hero-slide .container {
  position: relative;
  z-index: 3;
}

/* Optional: keep your light blobs */
.hero-slide::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: 2;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .22), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .18), transparent 48%);
  transform: rotate(10deg);
  pointer-events: none;
}

/* Video background layer (optional per slide) */
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 177.78vh;
  min-height: 100vh;
  transform: translate(-50%, -50%);
  border: 0;
  /* pointer-events: none; */
}

/* Overlay above video (optional) */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--brand-gradient);
  /* opacity: .78; */
  opacity: .5;
}

/* Carousel controls look nicer on hero */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 8%;
}


/* Soft card hover */
.hover-lift {
  transition: transform .2s ease, box-shadow .2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, .12) !important;
}

/* Simple “app screenshot” placeholder */
.hero-mock {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
}

/* Dark mode helpers */
.theme-toggle {
  cursor: pointer;
}

.team-card {
  transition: transform .25s ease, box-shadow .25s ease;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, .12);
}

/* News */
#news img {
  height: 180px;
  object-fit: cover;
}

#events img {
  height: 180px;
  object-fit: cover;
}

.news-cover {
  height: 180px;
  object-fit: cover;
}


/* Feedback */
.feedback-swiper {
  padding: 8px 4px 44px; /* เว้นพื้นที่ให้ pagination */
}

.feedback-swiper .swiper-slide {
  height: auto;            /* ให้ card สูงตามเนื้อหา */
  display: flex;           /* ทำให้ card เต็มความสูงได้ */
}

.feedback-swiper .card {
  width: 100%;
}

.feedback-swiper .swiper-button-prev,
.feedback-swiper .swiper-button-next {
  width: 44px;
  height: 44px;
}

.feedback-swiper .swiper-button-prev::after,
.feedback-swiper .swiper-button-next::after {
  font-size: 18px;
}

/* Contact */
#contact .card { border: 1px solid rgba(0,0,0,.04); }
#contact .form-control, 
#contact .form-select { border-radius: 16px; }
#contact .btn.rounded-pill { padding-left: 1.1rem; padding-right: 1.1rem; }

footer i {
  font-size: 0.95rem;
  transition: 0.3s;
}

footer a:hover i {
  transform: translateX(4px);
}
