/* ==========================================================================
   Max Energy 聚能量 — site.css
   Custom styles complementing Tailwind CSS CDN
   Colors: #1d547d (hero blue), #ff8c42 (orange CTA), #0a284b (dark navy)
   ========================================================================== */

/* ---------- Base & Reset ---------- */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(255, 140, 66, 0.3);
  color: #fff;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a284b;
}

::-webkit-scrollbar-thumb {
  background: #1d547d;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff8c42;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #1d547d #0a284b;
}

/* ---------- Hero Overlay ---------- */
.hero-overlay {
  position: relative;
  overflow: hidden;
}

.hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 40, 75, 0.88) 0%,
    rgba(29, 84, 125, 0.75) 50%,
    rgba(10, 40, 75, 0.85) 100%
  );
  z-index: 1;
}

.hero-overlay > * {
  position: relative;
  z-index: 2;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: #ff8c42;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 2px solid #ff8c42;
  border-radius: 0.375rem;
  transition: background-color 0.3s, border-color 0.3s, transform 0.2s;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  background-color: #ff507e;
  border-color: #ff507e;
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: transparent;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.375rem;
  transition: background-color 0.3s, border-color 0.3s, transform 0.2s;
  cursor: pointer;
  text-align: center;
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-ghost:active {
  transform: translateY(0);
}

/* ---------- Navigation — Frosted Glass ---------- */
.nav-glass {
  background: rgba(10, 40, 75, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.nav-glass.scrolled {
  background: rgba(10, 40, 75, 0.92);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- Cards — Coach / Teacher Profile ---------- */
.coach-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.coach-card:hover {
  transform: translateY(-6px);
  border-color: #ff8c42;
  box-shadow: 0 12px 32px rgba(255, 140, 66, 0.15);
}

.coach-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  border: 3px solid rgba(255, 140, 66, 0.4);
  margin: 0 auto 1rem;
}

.coach-card h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.coach-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Cards — Testimonial ---------- */
.testimonial-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  position: relative;
  transition: transform 0.3s, border-color 0.3s;
}

.testimonial-card::before {
  content: "\201C";
  position: absolute;
  top: 0.75rem;
  left: 1.25rem;
  font-size: 3rem;
  color: rgba(255, 140, 66, 0.3);
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 140, 66, 0.4);
}

.testimonial-card blockquote {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}

.testimonial-card cite {
  color: #ff8c42;
  font-style: normal;
  font-weight: 600;
  font-size: 0.875rem;
}

/* ---------- Cards — Service Feature ---------- */
.service-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: #ff8c42;
  box-shadow: 0 12px 32px rgba(255, 140, 66, 0.12);
}

.service-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8c42, #ff507e);
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  color: #fff;
}

.service-card h3 {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Cards — Step (numbered process) ---------- */
.step-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: #ff8c42;
}

.step-card .step-number {
  position: absolute;
  top: -1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8c42, #ff507e);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}

.step-card h3 {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}

.step-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Mobile Menu Animation ---------- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-in-out, opacity 0.3s ease;
  opacity: 0;
}

.mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* Hamburger icon lines */
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Utility: Section Divider ---------- */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #ff8c42, #ff507e);
  border: none;
  border-radius: 2px;
  margin: 1rem auto;
}

/* ---------- Focus Styles (Accessibility) ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #ff8c42;
  outline-offset: 2px;
}

/* ---------- Link Defaults on Dark Backgrounds ---------- */
.dark-section a {
  color: #ff8c42;
  text-decoration: none;
  transition: color 0.2s;
}

.dark-section a:hover {
  color: #ff507e;
}
