/* =========================================================
   1. 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');
}

/* =========================================================
   2. Variables & Base Reset
   ========================================================= */
: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, 0.08);
  --swiper-theme-color: var(--sky);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: auto !important;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  background: #fff;
  padding-bottom: 0px;
  height: auto !important;
}

body::after {
  content: none !important;
  display: none !important;
}

a {
  text-decoration: none;
  color: var(--sky);
}

img {
  display: block;
  max-width: 100%;
}

/* =========================================================
   3. Common Layout Components
   ========================================================= */
.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;
}

.btn {
  background: linear-gradient(90deg, var(--sky), var(--mint));
  color: #fff;
  padding: 12px 26px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}

/* =========================================================
   4. Header & Navigation
   ========================================================= */
.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 {
  position: fixed;
  top: 143px;
  right: 0;
  width: 100%;
  max-width: 300px;
  height: calc(100vh - 143px);
  background: #fff;
  transform: translateX(100%);
  transition: 0.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);
}

/* =========================================================
   5. Floating Action Buttons (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, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fab-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.fab-phone { background: #38bdf8; }
.fab-line { background: #22c55e; }
.fab-messenger { background: #2563eb; }
.fab-top { background: #0c4a6e; }

.fab-top,
#scroll-to-top {
  display: none;
}

.floating-buttons.show-top .fab-top {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================================================
   6. Branch Promo Box & Content Grid (รูปภาพ + Map + โปสเตอร์)
   ========================================================= */
.branch-promo-box {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 2px dashed #22c55e;
  border-radius: 20px;
  padding: 28px 24px;
  margin: 32px auto;
  text-align: center;
  box-shadow: 0 12px 30px -5px rgba(34, 197, 94, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.branch-promo-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -5px rgba(34, 197, 94, 0.18);
}

.branch-badge {
  display: inline-block;
  background-color: #22c55e;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.branch-badge i {
  margin-right: 6px;
}

.branch-title {
  color: #166534;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.branch-desc {
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 20px;
}

/* Grid จัดระเบียบ รูปภาพ + Map + โปสเตอร์ */
.branch-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  align-items: stretch;
}

.branch-left-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.branch-media-card,
.branch-map-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  background-color: #f8fafc;
  flex: 1;
  min-height: 240px;
}

.branch-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.branch-map-card iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.branch-right-col {
  display: flex;
}

.branch-poster-card {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.branch-poster-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ปุ่มไฮไลท์คลิกไป Line */
.branch-highlight {
  background-color: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 12px 20px;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.branch-highlight:hover {
  background-color: #22c55e;
  border-color: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.branch-highlight:hover .highlight-text {
  color: #ffffff;
}

.highlight-text {
  color: #15803d;
  font-size: 1.05rem;
  font-weight: 700;
  transition: color 0.25s ease;
}

/* =========================================================
   7. Vertical Video Grid
   ========================================================= */
.video-vertical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  justify-items: center;
  align-items: start;
}

.video-vertical {
  position: relative;
  width: 100%;
  max-width: 1024px;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
}

.video-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
}

.video-cover img, 
.video-cover canvas {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
}

.play-icon i {
  font-size: 48px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-player {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.video-player::-webkit-media-controls-fullscreen-button {
  display: none !important;
}
.video-player::-moz-full-screen-button {
  display: none !important;
}

/* =========================================================
   8. Footer & Visitor Counter Bar
   ========================================================= */
.site-footer {
  background: #ffffff;
  text-align: center;
  margin-bottom: 0 !important;
}

footer + * {
  display: none !important;
}

.visitor-bar {
  width: 100%;
  background: #0f172a;
  padding: 12px 0;
}

.visitor-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.visitor-stats .stat {
  text-align: center;
  line-height: 1.2;
}

.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;
}

/* =========================================================
   9. Consolidated Responsive (Media Queries)
   ========================================================= */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  
  .hamburger {
    display: block;
  }

  .floating-buttons {
    right: 14px;
    bottom: 80px;
    gap: 12px;
  }

  .fab-item {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .branch-content-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .branch-media-card,
  .branch-map-card {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .branch-promo-box {
    padding: 20px 14px;
    margin: 24px auto;
  }

  .branch-title {
    font-size: 1.25rem;
  }

  .highlight-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.45rem;
  }

  .visitor-stats {
    gap: 12px;
  }

  .visitor-stats .number {
    font-size: 1rem;
  }
}