/* ============================================
   Hanuman Tennis Association — main stylesheet
   Black & gold identity, mobile-first
   ============================================ */

:root {
  --gold: #f5c518;
  --gold-dark: #d4a90e;
  --black: #0c0c0e;
  --dark: #16161a;
  --dark-2: #1f1f24;
  --light: #fafaf7;
  --paper: #ffffff;
  --ink: #1c1c21;
  --muted: #6b6b74;
  --line: #e8e6df;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(12, 12, 14, 0.08);
  --font-thai: 'Noto Sans Thai', 'Outfit', sans-serif;
  --font-zh: 'Noto Sans SC', 'Noto Sans Thai', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-thai);
  color: var(--ink);
  background: var(--light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.lang-zh { font-family: var(--font-zh); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.text-gold { color: var(--gold); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: var(--gold);
  color: var(--black);
  box-shadow: 0 6px 24px rgba(245, 197, 24, 0.35);
}
.btn-gold:hover { background: #ffd83a; }
.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-dark {
  background: var(--black);
  color: var(--gold);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.9rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.navbar.scrolled {
  background: rgba(12, 12, 14, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  padding: 0.55rem 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.nav-logo { width: 44px; height: 44px; flex-shrink: 0; }
.nav-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-links {
  display: flex;
  gap: 1.6rem;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.2rem 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 0.9rem; }

.lang-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-btn.active { background: var(--gold); color: var(--black); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--black);
  color: #fff;
  overflow: hidden;
  padding: 7.5rem 0 4rem;
}
.hero-bg { position: absolute; inset: 0; }
.hero-glow {
  position: absolute;
  width: 720px; height: 720px;
  right: -180px; top: -180px;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.16) 0%, transparent 65%);
  border-radius: 50%;
}
.hero-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 3rem;
}
.hero-badge {
  display: inline-block;
  border: 1px solid rgba(245, 197, 24, 0.5);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}
.hero-sub {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 540px;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
  display: flex;
  gap: 2.8rem;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: 'Outfit', var(--font-thai);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.2;
}
.stat-label { font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); }

.hero-emblem { display: flex; justify-content: center; }
.hero-logo {
  width: min(340px, 80%);
  filter: drop-shadow(0 0 60px rgba(245, 197, 24, 0.25));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ===== Sections ===== */
.section { padding: 5.5rem 0; }

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.2rem;
}
.section-tag {
  display: inline-block;
  background: rgba(245, 197, 24, 0.16);
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.9rem;
}
.section-sub { color: var(--muted); font-size: 1.04rem; }

/* ===== About / Objectives ===== */
.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}
.obj-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.obj-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}
.obj-wide { grid-column: 1 / -1; }
.obj-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.obj-card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 0.5rem; }
.obj-card p { color: var(--muted); font-size: 0.96rem; }

.logo-story {
  margin-top: 3.2rem;
  display: flex;
  align-items: center;
  gap: 2.4rem;
  background: var(--black);
  color: #fff;
  border-radius: calc(var(--radius) + 6px);
  padding: 2.4rem 2.6rem;
}
.logo-story-img { width: 150px; flex-shrink: 0; }
.logo-story h3 { color: var(--gold); font-size: 1.3rem; margin-bottom: 0.6rem; }
.logo-story p { color: rgba(255, 255, 255, 0.78); font-size: 0.98rem; }

/* ===== Committee ===== */
.committee { background: #f3f1ea; }

.president-card {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  background: var(--black);
  color: #fff;
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem 2.4rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(245, 197, 24, 0.35);
}
.president-avatar {
  width: 86px; height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #b8860b);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-initial { font-size: 2rem; font-weight: 800; color: var(--black); }
.president-info h3 { font-size: 1.35rem; margin: 0.45rem 0 0.35rem; }
.president-info p { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }

.role-badge {
  display: inline-block;
  background: rgba(245, 197, 24, 0.16);
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.8rem;
  border-radius: 999px;
}
.role-president { background: var(--gold); color: var(--black); }

.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 1.1rem;
}
.member-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.member-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.member-card h4 { font-size: 1rem; font-weight: 700; margin-top: 0.6rem; line-height: 1.5; }

.directors-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2.4rem 0 1.1rem;
  text-align: center;
  color: var(--muted);
}
.directors-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}
.director-chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 600;
  transition: border-color 0.2s, transform 0.2s;
}
.director-chip:hover { border-color: var(--gold); transform: translateY(-2px); }

/* ===== Membership banner ===== */
.membership { padding: 0 0 5.5rem; }
.membership-banner {
  background: linear-gradient(120deg, var(--gold) 0%, #ffd83a 100%);
  color: var(--black);
  border-radius: calc(var(--radius) + 8px);
  padding: 2.8rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  box-shadow: 0 18px 50px rgba(245, 197, 24, 0.35);
}
.membership-banner h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 0.5rem; }
.membership-banner p { max-width: 640px; font-size: 1rem; opacity: 0.85; }

/* ===== Testimonials ===== */
.testimonials { background: var(--black); color: #fff; }
.testimonials .section-title { color: #fff; }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.testi-card {
  background: var(--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.testi-card:hover { transform: translateY(-6px); border-color: rgba(245, 197, 24, 0.5); }
.testi-stars { color: var(--gold); letter-spacing: 0.2em; margin-bottom: 1rem; }
.testi-card blockquote {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
  margin-bottom: 1.4rem;
}
.testi-name { display: block; font-weight: 700; color: var(--gold); }
.testi-role { display: block; font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  margin-bottom: 3rem;
}
.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.contact-icon { font-size: 2rem; margin-bottom: 0.7rem; }
.contact-card h3 { font-size: 1.08rem; margin-bottom: 0.35rem; }
.contact-card p, .contact-card a { color: var(--muted); font-size: 0.98rem; }
.contact-card a:hover { color: var(--gold-dark); }

.socials { text-align: center; }
.socials-label { font-weight: 600; color: var(--muted); margin-bottom: 1rem; }
.social-links { display: flex; justify-content: center; gap: 0.9rem; }
.social-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--black);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.social-btn:hover {
  transform: translateY(-4px) scale(1.06);
  background: var(--gold);
  color: var(--black);
}

/* ===== Footer ===== */
.footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 2.2rem;
}
.footer-inner { text-align: center; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}
.footer-brand > div { text-align: left; }
.footer-logo { width: 56px; }
.footer-name { color: #fff; font-weight: 700; }
.footer-name-en { font-size: 0.85rem; color: var(--gold); }
.footer-note { font-size: 0.9rem; margin-bottom: 0.5rem; }
.footer-copy { font-size: 0.82rem; color: rgba(255, 255, 255, 0.4); }

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-logo { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero-emblem { order: -1; }
  .hero-logo { width: min(220px, 55%); }
  .hero { padding-top: 6.5rem; }
  .logo-story { flex-direction: column; text-align: center; padding: 2.2rem 1.6rem; }
}

@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(300px, 80vw);
    background: rgba(12, 12, 14, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 6rem 2.2rem 2rem;
    gap: 1.6rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; }
  .nav-toggle { display: flex; z-index: 110; }
  .nav-title { display: none; }
  .president-card { flex-direction: column; text-align: center; }
  .membership-banner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .section { padding: 4rem 0; }
  .hero-stats { gap: 1.6rem; }
  .stat-num { font-size: 1.7rem; }
  .lang-btn { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
}
