/* Karate CLB Tân Tiến — mobile-first */

:root {
  --bg: #0c0e12;
  --bg-elevated: #141820;
  --text: #e8eaef;
  --muted: #9aa3b2;
  --accent: #c41e3a;
  --accent-hover: #e02845;
  --gold: #d4af37;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --font: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 1.5rem, 42rem);
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 1.5rem, 72rem);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(12, 14, 18, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #9b1530);
  color: #fff;
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.35);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #b01832);
  text-decoration: none;
  color: #fff;
}

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

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  text-decoration: none;
}

.btn--sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 800;
}

/* Hero */
.hero {
  padding: 2rem 0 1.35rem;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(196, 30, 58, 0.15), transparent 55%);
}

.hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
}

.hero__subtitle {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

/* Chiêu sinh banner */
.promo-banner {
  padding: 0 0 1.15rem;
}

.promo-banner__link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-banner__link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.promo-banner__link:active {
  transform: scale(0.99);
}

.promo-banner__img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Sections */
.section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
}

#hinh-lop.section {
  padding-top: 1.25rem;
}

.section__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.section__lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.85rem;
}

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

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

@media (min-width: 480px) {
  .card-grid--stack {
    grid-template-columns: repeat(1, 1fr);
  }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.card__label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
}

/* List */
.info-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.info-list li {
  margin-bottom: 0.5rem;
}

.info-list strong {
  color: var(--text);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 420px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery__item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: block;
  z-index: 2;
}

.gallery__cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.7rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  z-index: 1;
  pointer-events: none;
}

/* Videos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 420px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.video-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.video-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #000;
}

.video-wrap iframe,
.video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  padding: 1rem;
}

.lightbox--open {
  display: block;
}

.lightbox__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  object-fit: contain;
  border-radius: 14px;
}

.lightbox__close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 24, 32, 0.7);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.lightbox__nav .btn,
.lightbox__prev,
.lightbox__next {
  flex: 1;
  max-width: 7.5rem;
}

.lightbox__prev,
.lightbox__next {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 24, 32, 0.7);
  color: #fff;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.video-card__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  z-index: 2;
}

.video-card__sub {
  margin: 0;
  padding: 0 1rem 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Prose history */
.prose {
  font-size: 0.95rem;
  color: var(--muted);
}

.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Full-width image */
.figure-full {
  margin: 0;
  padding: 0;
}

.figure-full img {
  width: 100%;
  max-height: min(90vh, 720px);
  object-fit: cover;
  object-position: center top;
}

.figure-full figcaption {
  padding: 0.75rem 1rem 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* Form block */
.form-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 520px;
}

.form-block iframe {
  display: block;
  width: 100%;
  height: auto;
  min-height: 3200px;
  border: 0;
}

@media (min-width: 720px) {
  .form-block iframe {
    min-height: 2300px;
    height: auto;
  }
}

.form-success {
  padding: 1.1rem 1.1rem;
  border-radius: var(--radius);
  margin: 1rem;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.28), rgba(212, 175, 55, 0.15));
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.form-success__title {
  margin: 0;
  font-weight: 900;
  font-size: 1.32rem;
  line-height: 1.35;
  text-align: center;
  color: #ffd54f;
}

.form-fallback {
  padding: 1.5rem;
  text-align: center;
}

.form-fallback p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}


/* Sticky CTA bar (mobile) */
.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem calc(0.45rem + var(--safe-bottom));
  background: rgba(12, 14, 18, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.cta-bar .btn {
  flex: 1;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
}

.cta-bar .btn--zalo-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.4rem 0.35rem;
  line-height: 1.1;
  min-width: 0;
}

.cta-bar .btn--zalo-cta .btn__stack-line {
  display: block;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.cta-bar .btn--zalo-cta .btn__stack-line--sub {
  font-size: 0.9em;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  opacity: 1;
}

body.has-cta-bar {
  padding-bottom: calc(4rem + var(--safe-bottom));
}

/* Extra small phones */
@media (max-width: 420px) {
  .cta-bar {
    gap: 0.25rem;
    padding: 0.32rem 0.5rem calc(0.32rem + var(--safe-bottom));
  }

  .cta-bar .btn {
    padding: 0.38rem 0.35rem;
    font-size: 0.78rem;
    line-height: 1.05;
    border-radius: 18px;
  }

  .cta-bar .btn--zalo-cta {
    padding: 0.32rem 0.2rem;
    font-size: 0.7rem;
  }

  .cta-bar .btn--zalo-cta .btn__stack-line {
    font-size: 0.82em;
  }

  .cta-bar .btn--zalo-cta .btn__stack-line--sub {
    font-size: 0.94em;
  }

  body.has-cta-bar {
    padding-bottom: calc(3.2rem + var(--safe-bottom));
  }

  /* Tighten vertical spacing for small phones */
  .hero {
    padding: 1.5rem 0 1rem;
  }

  .hero__subtitle {
    margin: 0 0 1rem;
  }

  .section {
    padding: 1.65rem 0;
  }

  .promo-banner {
    padding: 0 0 0.75rem;
  }

  #hinh-lop.section {
    padding-top: 0.85rem;
  }

  .section__lead {
    margin: 0 0 0.9rem;
  }

  .prose p {
    margin: 0 0 0.85rem;
  }
}

/* Footer */
.site-footer {
  padding: 2rem 1rem 6rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0.35rem 0;
}

.site-footer__privacy {
  max-width: 28rem;
  margin: 0.75rem auto 0;
  font-size: 0.72rem;
  line-height: 1.45;
  opacity: 0.9;
}

.site-footer__privacy a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
