:root {
  /* Design tokens หลักสำหรับปรับธีมเว็บไซต์จากจุดเดียว */
  --color-navy: #061a3a;
  --color-navy-2: #0b2f63;
  --color-navy-3: #123f7c;
  --color-black: #020817;
  --color-white: #ffffff;
  --color-soft: #f3f7ff;
  --color-muted: #adc0dc;
  --color-gold: #d6a72f;
  --color-gold-2: #f7d86a;
  --color-gold-3: #fff1b8;
  --shadow: 0 20px 50px rgba(2, 8, 23, 0.24);
  --radius: 8px;
  --container: 1180px;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: "Prompt", system-ui, sans-serif;
  color: var(--color-white);
  background:
    radial-gradient(circle at top left, rgba(214, 167, 47, 0.12), transparent 34rem),
    linear-gradient(180deg, var(--color-navy), var(--color-black));
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.site-header {
  /* Sticky navbar พร้อมพื้นหลังโปร่งแสงเพื่ออ่านง่ายบนทุก section */
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  background: rgba(6, 26, 58, 0.9);
  border-bottom: 1px solid rgba(247, 216, 106, 0.2);
  backdrop-filter: blur(18px);
}

.navbar {
  min-height: var(--header-height);
  width: min(100% - 28px, 1240px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(247, 216, 106, 0.28));
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  color: var(--color-gold-2);
  font-size: 0.68rem;
  letter-spacing: 0;
}

.footer-brand .brand-logo {
  width: 72px;
  height: 72px;
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 101;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 18px;
  list-style: none;
  background: rgba(6, 26, 58, 0.98);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  border-bottom: 1px solid rgba(247, 216, 106, 0.18);
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  box-shadow: 0 18px 34px rgba(2, 8, 23, 0.28);
}

.nav-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu a {
  display: block;
  padding: 12px 10px;
  color: #eaf0fa;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--color-gold-2);
  background: rgba(214, 167, 47, 0.12);
}

.profile-menu-link {
  display: flex !important;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.profile-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: var(--color-navy);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-2));
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 0 0 1px rgba(247, 216, 106, 0.22), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.profile-avatar.has-image {
  background-position: center;
  background-size: cover;
  color: transparent;
}

.profile-menu-link [data-profile-name] {
  display: block;
  min-width: 0;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 1px solid rgba(247, 216, 106, 0.35);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  /* ใช้ภาพสนามฟุตบอลจริงเป็น visual anchor ของหน้าแรก */
  min-height: calc(100vh - var(--header-height));
  display: grid;
  align-items: end;
  gap: 32px;
  padding: 110px 20px 32px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(2, 8, 23, 0.94), rgba(6, 26, 58, 0.82), rgba(11, 47, 99, 0.48)),
    url("https://images.unsplash.com/photo-1551958219-acbc608c6377?auto=format&fit=crop&w=1800&q=82") center/cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(transparent, var(--color-navy));
  pointer-events: none;
}

.hero-content,
.hero-stats {
  position: relative;
  z-index: 1;
  width: min(100%, var(--container));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-gold-2);
  text-shadow: 0 0 22px rgba(214, 167, 47, 0.26);
  font-weight: 700;
  font-size: 0.78rem;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.35rem, 8vw, 5.6rem);
  line-height: 1.08;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 18px 0 28px;
  color: #e3ebf6;
  font-size: clamp(1.1rem, 3.2vw, 1.6rem);
}

.hero-actions,
.chip-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid rgba(247, 216, 106, 0.28);
  border-radius: var(--radius);
  color: var(--color-gold-3);
  background: linear-gradient(135deg, var(--color-navy-2), var(--color-navy-3));
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.btn-primary {
  color: var(--color-navy);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-2));
  border-color: transparent;
}

.btn-outline {
  color: var(--color-gold-3);
  background: rgba(6, 26, 58, 0.44);
  border-color: rgba(247, 216, 106, 0.48);
}

.btn-small {
  min-height: 42px;
  width: 100%;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(247, 216, 106, 0.22);
  border-radius: var(--radius);
  background: rgba(6, 26, 58, 0.58);
  backdrop-filter: blur(16px);
}

.hero-stats div {
  padding: 18px 12px;
  text-align: center;
}

.hero-stats strong {
  display: block;
  color: var(--color-gold-2);
  font-size: 1.25rem;
}

.hero-stats span {
  color: #d8e2ef;
  font-size: 0.82rem;
}

.section {
  padding: 76px 0;
}

.section:nth-of-type(even) {
  background:
    linear-gradient(180deg, rgba(243, 247, 255, 0.98), rgba(232, 239, 252, 0.98));
  color: #132036;
}

.section:nth-of-type(odd):not(.hero) {
  background:
    linear-gradient(180deg, var(--color-navy), #071f45);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.2;
}

.section-heading p:last-child {
  color: currentColor;
  opacity: 0.78;
}

.promotions {
  position: relative;
  overflow: hidden;
  color: var(--color-white);
  background:
    linear-gradient(110deg, rgba(2, 8, 23, 0.94), rgba(6, 26, 58, 0.84), rgba(2, 8, 23, 0.72)),
    url("../img/gallery/football-field-5v5.png") center/cover fixed;
}

.promotions::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(247, 216, 106, 0.22), transparent 26rem),
    linear-gradient(180deg, rgba(6, 26, 58, 0.12), rgba(2, 8, 23, 0.7));
  pointer-events: none;
}

.promotions .container {
  position: relative;
  z-index: 1;
}

.promotions .section-heading {
  max-width: 860px;
}

.promotions .section-heading p:last-child {
  color: #eaf0fa;
  opacity: 0.9;
}

.about-grid,
.service-grid,
.listing-grid,
.trainer-grid,
.blog-grid,
.pricing-grid,
.gallery-grid,
.contact-grid,
.footer-grid {
  display: grid;
  gap: 18px;
}

.info-card,
.service-card,
.field-card,
.trainer-card,
.blog-card,
.price-card,
.contact-panel,
.contact-form {
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 63, 124, 0.42), rgba(6, 26, 58, 0.72));
  border: 1px solid rgba(247, 216, 106, 0.16);
  box-shadow: var(--shadow);
}

.section:nth-of-type(even) .info-card,
.section:nth-of-type(even) .field-card,
.section:nth-of-type(even) .blog-card {
  background: var(--color-white);
  border-color: rgba(214, 167, 47, 0.24);
  box-shadow: 0 18px 40px rgba(6, 26, 58, 0.14);
}

.info-card,
.service-card {
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.info-card:hover,
.service-card:hover,
.price-card:hover {
  transform: translateY(-6px);
  border-color: rgba(247, 216, 106, 0.72);
  box-shadow: 0 24px 58px rgba(2, 8, 23, 0.32), 0 0 0 1px rgba(247, 216, 106, 0.14);
}

.card-icon,
.service-card span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--color-navy);
  background: var(--color-gold);
  border-radius: 50%;
  font-size: 1.35rem;
}

.service-card p,
.field-card p,
.trainer-card p,
.blog-card p,
.price-card p {
  color: inherit;
  opacity: 0.74;
}

.filter-bar {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(214, 167, 47, 0.25);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(16, 42, 85, 0.12);
}

.filter-bar input,
.filter-bar select,
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(16, 42, 85, 0.18);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: #132036;
  background: #fff;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(214, 167, 47, 0.16);
}

.field-card,
.trainer-card,
.blog-card {
  overflow: hidden;
}

.field-card img,
.trainer-card img,
.blog-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.field-card div,
.trainer-card div,
.blog-card div {
  padding: 18px;
}

.field-card h3,
.trainer-card h3,
.blog-card h3,
.price-card h3 {
  margin: 0 0 8px;
}

.chip {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(247, 216, 106, 0.24);
  border-radius: 999px;
  color: var(--color-white);
  background: rgba(18, 63, 124, 0.44);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.chip.active,
.chip:hover {
  color: var(--color-navy);
  background: var(--color-gold);
}

.rating {
  color: var(--color-gold-2);
  font-weight: 700;
}

.blog-card time {
  color: var(--color-gold);
  font-weight: 700;
  font-size: 0.85rem;
}

.blog-card .btn {
  margin-top: 12px;
}

.price-card {
  position: relative;
  padding: 24px;
  background: linear-gradient(180deg, rgba(18, 63, 124, 0.76), rgba(6, 26, 58, 0.96));
  border-color: rgba(247, 216, 106, 0.28);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.price-card.featured {
  background: linear-gradient(160deg, rgba(214, 167, 47, 0.34), rgba(11, 47, 99, 0.96));
  border-color: rgba(244, 211, 107, 0.58);
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  color: var(--color-navy);
  background: var(--color-gold-2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.price {
  margin: 12px 0 18px;
  color: var(--color-gold-2);
  font-size: 2.2rem;
  font-weight: 800;
}

.price span {
  font-size: 0.95rem;
  color: #eaf0fa;
}

.price-card .price-detail {
  display: none;
}

.modal-detail-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: #eaf0fa;
  font-size: 0.98rem;
}

.modal-detail-list li {
  position: relative;
  padding-left: 24px;
}

.modal-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold-2);
  box-shadow: 0 0 12px rgba(247, 216, 106, 0.45);
}

.price-card .btn {
  margin-top: auto;
}

.price-modal,
.renewal-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: none;
  place-items: center;
  padding: 22px;
  overflow-y: auto;
  background: rgba(2, 8, 23, 0.78);
  backdrop-filter: blur(10px);
}

.renewal-modal {
  z-index: 195;
}

.price-modal.is-open,
.renewal-modal.is-open {
  display: grid;
}

.price-modal-card,
.renewal-modal-card {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  padding: 28px;
  color: var(--color-white);
  background: linear-gradient(160deg, rgba(18, 63, 124, 0.96), rgba(6, 26, 58, 0.98));
  border: 1px solid rgba(247, 216, 106, 0.32);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.price-modal-card h3,
.renewal-modal-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2rem);
}

.modal-price {
  margin: 10px 0 0;
  color: var(--color-gold-2);
  font-size: 1.8rem;
  font-weight: 800;
}

.price-select-btn {
  width: 100%;
  margin-top: 20px;
}

.payment-panel {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(247, 216, 106, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.payment-panel[hidden] {
  display: none;
}

.payment-title,
.payment-amount {
  display: block;
}

.payment-amount {
  color: var(--color-gold-2);
  font-size: 1.3rem;
  font-weight: 800;
}

.payment-panel img {
  width: min(100%, 260px);
  margin: 6px auto;
  border-radius: var(--radius);
  background: #fff;
}

.payment-panel p:last-child {
  margin: 0;
  color: #dbe7f7;
  font-size: 0.92rem;
}

.payment-confirm-btn {
  width: 100%;
}

.payment-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--color-gold-2);
  font-size: 0.92rem;
  font-weight: 700;
}

.renew-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.renew-payment-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(247, 216, 106, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.renew-payment-panel[hidden] {
  display: none;
}

.renew-payment-title,
.renew-payment-amount {
  display: block;
}

.renew-payment-amount {
  color: var(--color-gold-2);
  font-size: 1.35rem;
  font-weight: 800;
}

.renew-payment-qr {
  width: min(100%, 280px);
  margin: 6px auto;
  border-radius: var(--radius);
  background: #fff;
}

.renew-package-grid {
  display: grid;
  gap: 14px;
}

.renew-package-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(247, 216, 106, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.renew-package-card.current {
  border-color: rgba(247, 216, 106, 0.48);
  background: rgba(247, 216, 106, 0.08);
}

.renew-package-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.renew-package-card .price {
  margin: 0;
  color: var(--color-gold-2);
  font-size: 1.4rem;
  font-weight: 800;
}

.renew-package-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #dbe7f7;
}

.price-modal-close,
.renewal-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 216, 106, 0.28);
  border-radius: 50%;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.renewal-message {
  margin: 0;
  color: #dbe7f7;
}

.renewal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.news-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: none;
  place-items: center;
  padding: 22px;
  overflow-y: auto;
  background: rgba(2, 8, 23, 0.78);
  backdrop-filter: blur(10px);
}

.news-modal.is-open {
  display: grid;
}

.news-modal-card {
  position: relative;
  width: min(100%, 640px);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  padding: 28px;
  color: var(--color-white);
  background: linear-gradient(160deg, rgba(18, 63, 124, 0.96), rgba(6, 26, 58, 0.98));
  border: 1px solid rgba(247, 216, 106, 0.32);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.news-modal-card time {
  display: block;
  margin-bottom: 8px;
  color: var(--color-gold-2);
  font-weight: 700;
}

.news-modal-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 5vw, 2rem);
  line-height: 1.3;
}

.news-modal-detail {
  margin-bottom: 0;
  color: #eaf0fa;
  white-space: pre-line;
}

.news-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.news-share-btn {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  color: var(--color-white);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-share-btn span {
  line-height: 1;
}

.news-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.32);
}

.news-share-btn.facebook {
  background: linear-gradient(135deg, #1877f2, var(--color-navy-2));
  border: 1px solid rgba(247, 216, 106, 0.24);
  font-size: 1.6rem;
  font-family: Arial, sans-serif;
}

.news-share-btn.line {
  background: linear-gradient(135deg, #06c755, #00a844);
  font-size: 0.78rem;
}

.news-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 216, 106, 0.28);
  border-radius: 50%;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.trainer-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: none;
  place-items: center;
  padding: 22px;
  overflow-y: auto;
  background: rgba(2, 8, 23, 0.78);
  backdrop-filter: blur(10px);
}

.trainer-modal.is-open {
  display: grid;
}

.trainer-modal-card {
  position: relative;
  width: min(100%, 760px);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  color: var(--color-white);
  background: linear-gradient(160deg, rgba(18, 63, 124, 0.96), rgba(6, 26, 58, 0.98));
  border: 1px solid rgba(247, 216, 106, 0.32);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.trainer-modal-card img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.trainer-modal-card > div {
  padding: 24px;
}

.trainer-modal-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
}

.trainer-modal-meta {
  margin: 0 0 16px;
  color: var(--color-gold-2);
  font-weight: 700;
}

.trainer-modal-detail {
  margin: 0;
  color: #eaf0fa;
  white-space: pre-line;
}

.trainer-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 216, 106, 0.28);
  border-radius: 50%;
  color: var(--color-white);
  background: rgba(6, 26, 58, 0.78);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-grid {
  grid-template-columns: repeat(2, 1fr);
}

.gallery-item {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  cursor: zoom-in;
  background: var(--color-navy);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item-wide {
  grid-column: 1 / -1;
}

.gallery-item-wide img {
  aspect-ratio: 16 / 7;
}

.gallery-item span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: var(--color-white);
  background: rgba(6, 26, 58, 0.78);
  border: 1px solid rgba(247, 216, 106, 0.28);
  border-radius: var(--radius);
  font-weight: 700;
}

.contact-panel,
.contact-form {
  padding: 20px;
}

.contact-list {
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(247, 216, 106, 0.16);
}

.contact-panel iframe {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: var(--radius);
  filter: saturate(0.85) contrast(1.05);
}

.contact-form {
  display: grid;
  gap: 14px;
  background: #ffffff;
  color: #132036;
  border-color: rgba(214, 167, 47, 0.28);
}

.contact-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: #1b7f4d;
  font-weight: 700;
}

.footer {
  padding: 48px 0 20px;
  background: #03142e;
  border-top: 1px solid rgba(247, 216, 106, 0.18);
}

.footer-grid {
  gap: 28px;
}

.footer a:not(.brand) {
  display: block;
  width: max-content;
  margin: 8px 0;
  color: #dce5f2;
}

.footer a:hover {
  color: var(--color-gold-2);
}

.visitor-counter {
  width: min(100% - 32px, var(--container));
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  color: #eaf0fa;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(247, 216, 106, 0.18);
  border-radius: var(--radius);
}

.visitor-counter strong {
  color: var(--color-gold-2);
  font-size: 1.35rem;
}

.copyright {
  width: min(100% - 32px, var(--container));
  margin: 30px auto 0;
  padding-top: 18px;
  color: var(--color-muted);
  border-top: 1px solid rgba(247, 216, 106, 0.16);
  font-size: 0.9rem;
}

.quick-contact {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 150;
  display: grid;
  gap: 10px;
}

.quick-contact-btn {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  color: var(--color-white);
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(2, 8, 23, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 0;
  cursor: pointer;
}

.quick-contact-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.quick-contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(2, 8, 23, 0.42);
}

.quick-contact-btn.line {
  background: linear-gradient(135deg, #06c755, #00a844);
}

.quick-contact-btn.facebook {
  background: linear-gradient(135deg, #1877f2, #0d5fd7);
  border: 1px solid rgba(247, 216, 106, 0.28);
}

.quick-contact-btn.share {
  color: var(--color-navy);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-2));
}

.share-status {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 220px;
  margin: 0;
  padding: 8px 12px;
  color: var(--color-white);
  background: rgba(6, 26, 58, 0.96);
  border: 1px solid rgba(247, 216, 106, 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 0.85rem;
  font-weight: 700;
}

.share-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.install-app-fab {
  position: fixed;
  right: 16px;
  bottom: 174px;
  z-index: 151;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(247, 216, 106, 0.42);
  border-radius: 999px;
  color: #102039;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-2));
  box-shadow: var(--shadow);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.install-app-fab[hidden] {
  display: none;
}

.install-app-fab span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--color-white);
  background: rgba(6, 26, 58, 0.86);
  line-height: 1;
}

.install-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  place-items: center;
  padding: 22px;
  overflow-y: auto;
  background: rgba(2, 8, 23, 0.78);
  backdrop-filter: blur(10px);
}

.install-modal.is-open {
  display: grid;
}

.install-modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(100%, 480px);
  padding: 28px;
  color: var(--color-white);
  background: linear-gradient(160deg, rgba(18, 63, 124, 0.96), rgba(6, 26, 58, 0.98));
  border: 1px solid rgba(247, 216, 106, 0.32);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.install-modal-card h3,
.install-modal-card p {
  margin: 0;
}

.install-ios-steps {
  padding: 14px;
  border: 1px solid rgba(247, 216, 106, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.install-ios-steps ol {
  margin: 8px 0 0;
  padding-left: 22px;
  color: #dbe7f7;
}

.install-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.install-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 216, 106, 0.28);
  border-radius: 50%;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-height: 78vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lightbox p {
  margin: 12px 0 0;
  font-weight: 700;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
  font-size: 2rem;
  cursor: pointer;
}

.reveal {
  /* Animation กลางที่ JS จะเปิดใช้งานเมื่อ element เข้าหน้าจอ */
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.member-page {
  min-height: 100vh;
  color: var(--color-white);
}

.member-hero {
  min-height: calc(100vh - var(--header-height));
  padding: 54px 0 76px;
  background:
    linear-gradient(110deg, rgba(2, 8, 23, 0.96), rgba(6, 26, 58, 0.9), rgba(11, 47, 99, 0.72)),
    url("../img/gallery/fitness-room-wide.png") center/cover;
}

.admin-hero {
  background:
    linear-gradient(110deg, rgba(2, 8, 23, 0.96), rgba(6, 26, 58, 0.92), rgba(2, 8, 23, 0.86)),
    url("../img/gallery/football-field-5v5.png") center/cover;
}

.member-shell {
  display: grid;
  gap: 22px;
}

.member-shell.narrow {
  width: min(100% - 32px, 720px);
}

.member-shell.wide {
  width: min(100% - 32px, 1320px);
}

.member-panel {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(247, 216, 106, 0.22);
  border-radius: var(--radius);
  background: rgba(6, 26, 58, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.member-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.15;
}

.member-panel > p:not(.eyebrow),
.member-helper,
.member-summary span {
  color: #dbe7f7;
}

.member-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.member-form label {
  display: grid;
  gap: 8px;
  color: #eef4ff;
  font-weight: 700;
}

.member-form .form-full {
  grid-column: 1 / -1;
}

.field-help {
  color: #b9c8de;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
}

.member-form .member-check {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  font-weight: 600;
  line-height: 1.45;
}

.member-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.member-form input,
.member-form select,
.member-form textarea,
.admin-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(247, 216, 106, 0.25);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #132036;
  background: #fff;
  outline: none;
}

.member-form input:focus,
.member-form select:focus,
.member-form textarea:focus,
.admin-search input:focus {
  border-color: var(--color-gold-2);
  box-shadow: 0 0 0 4px rgba(247, 216, 106, 0.18);
}

.member-form textarea {
  min-height: 120px;
  resize: vertical;
}

.member-form .member-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  flex: 0 0 24px;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(247, 216, 106, 0.8);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.member-form .member-check input[type="checkbox"]::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--color-gold-2);
  transform: scale(0);
  transition: transform 0.12s ease;
}

.member-form .member-check input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.member-form .member-check input[type="checkbox"]:focus {
  border-color: var(--color-gold-2);
  box-shadow: 0 0 0 4px rgba(247, 216, 106, 0.18);
}

.member-helper {
  margin: 18px 0 0;
}

.member-helper a {
  color: var(--color-gold-2);
  font-weight: 700;
}

.form-alert {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 600;
}

.form-alert.error {
  color: #ffe7e7;
  background: rgba(185, 28, 28, 0.28);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.form-alert.success {
  color: #e8fff3;
  background: rgba(22, 101, 52, 0.34);
  border: 1px solid rgba(74, 222, 128, 0.38);
}

.member-status-card {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.dashboard-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(247, 216, 106, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-profile-image {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(247, 216, 106, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-profile-card span,
.dashboard-profile-card small {
  display: block;
  color: #b9c8de;
}

.dashboard-profile-card strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.35;
}

.usage-check-panel {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.usage-check-panel > div {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(247, 216, 106, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.usage-check-panel span,
.usage-check-panel small {
  color: #b9c8de;
}

.usage-history-wrap {
  margin-top: 24px;
}

.usage-table {
  min-width: 780px;
}

.qr-scan-panel {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(247, 216, 106, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.qr-scan-panel video {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(2, 8, 23, 0.72);
}

.qr-reader {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(2, 8, 23, 0.72);
}

.qr-reader video {
  border-radius: var(--radius);
}

.qr-scan-status {
  color: #dbe7f7;
  font-weight: 600;
}

.checkin-popup {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 23, 0.58);
}

.checkin-popup[hidden] {
  display: none;
}

.checkin-popup-card {
  width: min(100%, 360px);
  padding: 24px;
  border: 1px solid rgba(247, 216, 106, 0.32);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(6, 26, 58, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.checkin-popup-card strong {
  display: block;
  color: var(--color-gold-2);
  font-size: 1.6rem;
}

.checkin-popup-card span {
  display: block;
  margin-top: 8px;
  color: #dbe7f7;
}

.member-status-card div,
.member-summary {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid rgba(247, 216, 106, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.usage-member-summary {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.member-status-card span,
.member-table small {
  color: #b9c8de;
  font-size: 0.84rem;
}

.member-status-card strong,
.member-summary strong {
  font-size: 1.05rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #102039;
  background: #e2e8f0;
  font-weight: 800;
  font-size: 0.86rem;
}

.status-pill.active {
  color: #052e16;
  background: #86efac;
}

.status-pill.expired {
  color: #450a0a;
  background: #fca5a5;
}

.status-pill.pending {
  color: #422006;
  background: #fde68a;
}

.status-pill.pinned {
  color: #102039;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-2));
}

.member-actions,
.admin-search,
.admin-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.member-actions {
  margin-top: 24px;
}

.member-actions.compact {
  margin-top: 0;
}

.inline-form {
  margin: 14px 0 0;
}

.inline-form .btn {
  width: auto;
}

.admin-heading {
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-heading h1 {
  margin-top: 0;
}

.admin-search {
  margin: 18px 0 22px;
}

.admin-search input {
  flex: 1 1 280px;
}

.admin-search select {
  min-height: 48px;
  border: 1px solid rgba(247, 216, 106, 0.25);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #132036;
  background: #fff;
}

.admin-search .btn,
.admin-heading .btn,
.member-actions .btn {
  width: auto;
}

.member-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(247, 216, 106, 0.18);
  border-radius: var(--radius);
}

.member-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  background: rgba(2, 8, 23, 0.36);
}

.news-table {
  min-width: 900px;
}

.table-thumb {
  width: 78px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(247, 216, 106, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.profile-thumb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.profile-image-editor {
  display: grid;
  gap: 10px;
  color: #eef4ff;
  font-weight: 700;
}

.profile-preview {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(247, 216, 106, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.compact-preview {
  width: 72px;
  height: 72px;
}

.member-table th,
.member-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(247, 216, 106, 0.12);
  text-align: left;
  vertical-align: top;
}

.member-table th {
  color: var(--color-gold-2);
  background: rgba(2, 8, 23, 0.42);
  font-size: 0.9rem;
}

.member-table td strong,
.member-table td span,
.member-table td small {
  display: block;
}

.table-actions {
  display: grid;
  gap: 8px;
  min-width: 120px;
}

.table-actions form {
  margin: 0;
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #991b1b, #dc2626);
  border-color: rgba(248, 113, 113, 0.35);
}

a.btn-danger:hover,
button.btn-danger:hover {
  color: #fff;
  border-color: rgba(248, 113, 113, 0.55);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.25);
}

.empty-cell {
  text-align: center;
  color: #dbe7f7;
}

.member-footer {
  margin-top: 0;
}

.login-choice-grid {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.login-choice-card {
  display: grid;
  gap: 8px;
  min-height: 168px;
  padding: 22px;
  border: 1px solid rgba(247, 216, 106, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 63, 124, 0.72), rgba(6, 26, 58, 0.9));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-choice-card:hover {
  transform: translateY(-4px);
  border-color: rgba(247, 216, 106, 0.72);
  box-shadow: 0 18px 38px rgba(2, 8, 23, 0.28);
}

.login-choice-card span {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--color-navy);
  background: var(--color-gold-2);
  font-size: 0.82rem;
  font-weight: 800;
}

.login-choice-card strong {
  font-size: 1.3rem;
}

.login-choice-card small {
  color: #dbe7f7;
  font-size: 0.95rem;
}

.login-choice-card.admin {
  background: linear-gradient(180deg, rgba(2, 8, 23, 0.78), rgba(18, 63, 124, 0.86));
}

@media (min-width: 640px) {
  .about-grid,
  .listing-grid,
  .trainer-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-bar {
    grid-template-columns: 1.2fr 1fr;
  }

  .member-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .member-form .btn,
  .member-helper,
  .form-alert {
    grid-column: 1 / -1;
  }

  .member-status-card {
    grid-template-columns: repeat(2, 1fr);
  }

  .login-choice-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .usage-check-panel {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0;
    background: transparent;
    border: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .nav-menu a {
    padding: 10px 9px;
    border-radius: var(--radius);
    font-size: 0.86rem;
  }

  .profile-menu-link [data-profile-name] {
    max-width: 6.5rem;
  }

  .hero {
    padding-inline: 28px;
  }

  .hero-stats {
    max-width: 720px;
    margin-left: calc((100% - min(100% - 56px, var(--container))) / 2);
  }

  .about-grid,
  .listing-grid,
  .trainer-grid,
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .filter-bar {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .pricing-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .member-status-card {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 420px) {
  .profile-menu-link {
    width: 100%;
  }

  .profile-menu-link [data-profile-name] {
    max-width: calc(100vw - 120px);
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .renewal-actions {
    grid-template-columns: 1fr;
  }

  .install-app-fab {
    right: 12px;
    bottom: 72px;
    min-height: 42px;
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .install-actions {
    grid-template-columns: 1fr;
  }

  .quick-contact {
    left: 12px;
    right: 12px;
    bottom: 12px;
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-contact-btn {
    width: auto;
    height: 46px;
    min-width: 0;
    font-size: 0.82rem;
  }

  .share-status {
    right: 0;
    left: 0;
    width: auto;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
