/* ============================================
   WING CHUN TEAM — Custom Styles
   Dark cosmic theme with red accents
   ============================================ */

:root {
  /* Core palette */
  --color-bg-deep: #0a0a12;
  --color-bg: #0f0f1a;
  --color-bg-card: #151525;
  --color-bg-card-hover: #1a1a30;
  --color-surface: #1c1c2e;
  --color-border: #2a2a3d;
  --color-border-subtle: #1e1e32;
  
  /* Red accent system */
  --color-red: #dc2626;
  --color-red-bright: #ef4444;
  --color-red-dark: #991b1b;
  --color-red-glow: rgba(220, 38, 38, 0.3);
  --color-red-subtle: rgba(220, 38, 38, 0.08);
  
  /* Text */
  --color-text: #e8e8f0;
  --color-text-secondary: #9999b0;
  --color-text-muted: #666680;
  
  /* Spacing */
  --header-height: 72px;
}

/* ---- Base ---- */
* { box-sizing: border-box; }

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg-deep);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Cosmic background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(220, 38, 38, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(100, 40, 200, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(220, 38, 38, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Stars effect */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 40% 10%, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.08), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.14), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.06), transparent),
    radial-gradient(1px 1px at 90% 85%, rgba(255,255,255,0.11), transparent),
    radial-gradient(1.5px 1.5px at 35% 90%, rgba(255,255,255,0.13), transparent),
    radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.09), transparent),
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.07), transparent),
    radial-gradient(1.5px 1.5px at 75% 60%, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
  z-index: 0;
}

main, section, footer, header {
  position: relative;
  z-index: 1;
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-subtle);
  z-index: 100;
  transition: background 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 10, 18, 0.95);
  border-bottom-color: var(--color-border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
}

.logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.logo-text span {
  color: var(--color-red-bright);
}

/* Navigation */
.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
}

.nav-desktop a {
  padding: 0.5rem 1rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--color-text);
  background: var(--color-red-subtle);
}

.nav-desktop a.active {
  color: var(--color-red-bright);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

@media (min-width: 768px) {
  .hamburger { display: none; }
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

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

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

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

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: rgba(10, 10, 18, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  z-index: 99;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  display: block;
  padding: 0.85rem 1.5rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--color-red-bright);
  background: var(--color-red-subtle);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 18, 0.5) 0%,
    rgba(10, 10, 18, 0.7) 50%,
    rgba(10, 10, 18, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--color-red-subtle);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 100px;
  color: var(--color-red-bright);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--color-red-bright), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  color: white;
  box-shadow: 0 4px 20px var(--color-red-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(220, 38, 38, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-red);
  color: var(--color-red-bright);
}

/* ---- Section base ---- */
.section {
  padding: 5rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.section-header h2 span {
  color: var(--color-red-bright);
}

.section-header p {
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---- Cards grid ---- */
.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--color-red);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.card-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--color-red-subtle);
  color: var(--color-red-bright);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-body p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-footer {
  padding: 0 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ---- Features grid (homepage) ---- */
.features-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--color-red);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--color-red-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--color-red-bright);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- Team ---- */
.team-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.team-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.team-card:hover {
  border-color: var(--color-red);
  transform: translateY(-3px);
}

.team-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-bg), var(--color-surface));
}

.team-photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--color-bg), var(--color-surface));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--color-text-muted);
}

.team-info {
  padding: 1.5rem;
}

.team-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.team-role {
  color: var(--color-red-bright);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.team-info p {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---- Events ---- */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.event-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: border-color 0.2s, transform 0.2s;
}

.event-card:hover {
  border-color: var(--color-red);
  transform: translateY(-2px);
}

.event-date {
  flex-shrink: 0;
  width: 72px;
  text-align: center;
  padding: 0.75rem;
  background: var(--color-red-subtle);
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.event-date .day {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-red-bright);
  line-height: 1;
}

.event-date .month {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-details h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.event-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.event-details p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.event-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.event-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--color-red-subtle);
  color: var(--color-red-bright);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.event-link:hover {
  background: rgba(220, 38, 38, 0.15);
}

.event-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-badge.upcoming {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.event-badge.past {
  background: var(--color-red-subtle);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-subtle);
}

/* ---- Contact form ---- */
.contact-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--color-red-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-red-bright);
}

.contact-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.contact-item p,
.contact-item a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--color-red-bright);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-link {
  width: 44px;
  height: 44px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.social-link:hover {
  border-color: var(--color-red);
  color: var(--color-red-bright);
  background: var(--color-red-subtle);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text-secondary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-red);
  box-shadow: 0 0 0 3px var(--color-red-glow);
}

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

/* Anti-spam */
.honey-pot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ---- Blog article expand ---- */
.blog-article-full {
  display: none;
  padding: 2rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  margin-top: 1.5rem;
}

.blog-article-full.open {
  display: block;
}

.blog-article-full h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.blog-article-full p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.blog-close {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-red-bright);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0;
  margin-top: 0.5rem;
}

.blog-close:hover {
  text-decoration: underline;
}

/* ---- Page hero (sub-pages) ---- */
.page-hero {
  position: relative;
  padding: calc(var(--header-height) + 3rem) 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 18, 0.6) 0%,
    rgba(10, 10, 18, 0.9) 100%
  );
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.page-hero h1 span {
  color: var(--color-red-bright);
}

.page-hero p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-subtle);
  padding: 4rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  margin-bottom: 3rem;
}

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

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 1rem;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  padding: 0.3rem 0;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--color-red-bright);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.footer-bottom .social-links {
  margin-top: 0;
}

/* ---- Responsive helpers ---- */
@media (max-width: 639px) {
  .event-card {
    flex-direction: column;
    align-items: stretch;
  }
  .event-date {
    width: auto;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    justify-content: center;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--color-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-red-dark);
}

/* ---- Selection ---- */
::selection {
  background: var(--color-red);
  color: white;
}
