/* =====================
   Fonts
===================== */
@font-face{
  font-display:swap;
  font-family:'Kanit';
  font-style:normal;
  font-weight:300;
  src:url('../fonts/kanit-v17-latin-300.woff2') format('woff2');
}
@font-face{
  font-display:swap;
  font-family:'Kanit';
  font-style:normal;
  font-weight:400;
  src:url('../fonts/kanit-v17-latin-regular.woff2') format('woff2');
}
@font-face{
  font-display:swap;
  font-family:'Kanit';
  font-style:normal;
  font-weight:500;
  src:url('../fonts/kanit-v17-latin-500.woff2') format('woff2');
}
@font-face{
  font-display:swap;
  font-family:'Kanit';
  font-style:normal;
  font-weight:600;
  src:url('../fonts/kanit-v17-latin-600.woff2') format('woff2');
}

/* =====================
   Variables
===================== */
:root{
  --mint:#86efac;
  --sky:#38bdf8;
  --dark-blue:#0c4a6e;
  --light-bg:#f0f9ff;
  --white:#fff;
  --gray:#f3f4f6;
  --text:#333;
  --font:'Kanit',sans-serif;
  --shadow:0 6px 20px rgba(0,0,0,.08);
  --swiper-theme-color:var(--sky);
}

/* =====================
   Reset / Base
===================== */
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:var(--font);
  color:var(--text);
  line-height:1.7;
  background:#fff;
  padding-bottom:0px;
}
a{text-decoration:none;color:var(--sky)}
img{display:block;max-width:100%}

/* =====================
   Layout
===================== */
.container{
  max-width:1100px;
  margin:auto;
  padding:0 20px;
}
.section{
  padding:60px 0;
}
.section-title{
  text-align:center;
  font-size:2.4rem;
  color:var(--dark-blue);
  margin-bottom:42px;
  position:relative;
}
.section-title::after{
  content:'';
  position:absolute;
  left:50%;
  bottom:-10px;
  transform:translateX(-50%);
  width:80px;
  height:4px;
  background:linear-gradient(90deg,var(--sky),var(--mint));
  border-radius:2px;
}

/* =====================
   Header / Nav
===================== */
.top-bar {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
}
.top-bar .container {
    display: flex;
    justify-content: flex-end;
}
.top-bar a {
    color: var(--white);
    margin-left: 20px;
    transition: color 0.3s ease;
}
.top-bar a:hover {
    color: var(--mint);
}
.top-bar i {
    margin-right: 8px;
    color: var(--mint);
}

header{
  background:#fff;
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:var(--shadow);
}
header .container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 20px;
}
.logo img{height:80px}

.main-nav ul{list-style:none;display:flex}
.main-nav li{margin-left:30px}
.main-nav a{color:var(--text);font-weight:500}

.hamburger{
  display:none;
  font-size:1.6rem;
  background:none;
  border:0;
}

/* =====================
   Mobile Menu
===================== */
.mobile-menu{
  position:fixed;
  top:143px;
  right:0;
  width:100%;
  max-width:300px;
  height:calc(100vh - 143px);
  background:#fff;
  transform:translateX(100%);
  transition:.3s;
  z-index:999;
}
.mobile-menu.active{transform:translateX(0)}
.mobile-menu a{
  display:block;
  padding:20px;
  border-bottom:1px solid var(--gray);
  color:var(--dark-blue);
}

/* =====================
   Buttons
===================== */
.btn{
  background:linear-gradient(90deg,var(--sky),var(--mint));
  color:#fff;
  padding:12px 26px;
  border-radius:999px;
  border:0;
  cursor:pointer;
}

/* =====================
   Footer / FAB
===================== */

.floating-buttons{
  position: fixed;
  right: 18px;
  bottom: 90px;              /* ⭐ ไม่ชนปุ่มขึ้นบน */
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 999;
}

/* ปุ่มแต่ละอัน */
.fab-item{
  width: 54px;
  height: 54px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-size: 1.35rem;

  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Hover */
.fab-item:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,.25);
}

/* =========================
   Brand Colors
========================= */
.fab-phone{ background:#38bdf8; }     /* โทร */
.fab-line{ background:#22c55e; }      /* LINE */
.fab-messenger{ background:#2563eb; } /* Messenger */
.fab-top{ background:#0c4a6e; }       /* ขึ้นบน */

/* =========================
   Mobile Adjust
========================= */
@media (max-width:768px){
  .floating-buttons{
    right: 14px;
    bottom: 80px;
    gap: 12px;
  }

  .fab-item{
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}

/* =====================
   Responsive
===================== */
@media(max-width:768px){
  .main-nav{display:none}
  .hamburger{display:block}
}
/* =========================
   Floating FAB – Scroll Logic
========================= */

/* ปุ่มขึ้นบน ซ่อนไว้ก่อน */
.fab-top,
#scroll-to-top {
  display: none;
}

/* เมื่อเลื่อนแล้ว → โชว์ปุ่มขึ้นบน */
.floating-buttons.show-top .fab-top{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#visitor-counter{
  display:flex;
  justify-content:center;
  gap:14px;
  margin-top:12px;
  font-size:14px;
  color:#fff;
}
#visitor-counter b{
  display:block;
  font-size:16px;
  font-weight:700;
}
/* ===== Visitor Counter ===== */
.visitor-stats{
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;

  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);

  padding: 10px 22px;
  border-radius: 999px;
  width: fit-content;
}

.visitor-stats .stat{
  text-align: center;
  line-height: 1.2;
}

.visitor-stats .label{
  font-size: 0.75rem;
  color: #e0f2fe;   /* ฟ้าอ่อน */
}

.visitor-stats .number{
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;  /* ขาวชัด */
}

.visitor-stats .divider{
  color: rgba(255,255,255,0.4);
  font-weight: 300;
}
/* =====================
   Visitor Counter Bar
===================== */

.site-footer{
  background:#ffffff;
  text-align:center;
}

/* แถบดำล่างสุด */
.visitor-bar{
  width:100%;
  background:#0f172a; /* ดำอมฟ้า */
  padding:12px 0;
}

/* กล่องตัวนับ */
.visitor-stats{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:18px;
  font-family:'Kanit', sans-serif;
}

/* แต่ละค่า */
.visitor-stats .stat{
  text-align:center;
  line-height:1.2;
}

/* label */
.visitor-stats .label{
  font-size:0.75rem;
  color:#94a3b8;
}

/* ตัวเลข */
.visitor-stats .number{
  font-size:1.2rem;
  font-weight:600;
  color:#e5e7eb;
}

/* วันนี้เน้นสี */
.visitor-stats .number.today{
  color:#86efac;
}

/* เส้นคั่น */
.visitor-stats .divider{
  color:#334155;
  font-weight:300;
}

/* มือถือ */
@media (max-width:480px){
  .visitor-stats{
    gap:12px;
  }
  .visitor-stats .number{
    font-size:1rem;
  }
}
/* REMOVE EXTRA SPACE UNDER FOOTER */
html, body {
  height: auto !important;
}

body::after {
  content: none !important;
  display: none !important;
}

footer {
  margin-bottom: 0 !important;
}

footer + * {
  display: none !important;
}
@media (max-width: 480px) {
  .section-title {
    font-size: 1.45rem;
  }
}
/* ===== Vertical Video Grid ===== */
.video-vertical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  justify-items: center;
}

.video-vertical {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
}

/* cover */
.video-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
}

.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* play icon */
.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-icon i {
  font-size: 48px;
  color: #fff;
  background: rgba(0,0,0,.55);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* video */
.video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
