/* ============================================
   CYL CLINIC v2.0 — Layout
   Header · Footer · Grid · Section · Drawer · Hero · Quick Contact
   ============================================ */

/* === Container / Grid ======================= */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--sp-5); }
.section { padding: var(--sp-9) 0; }
.section-sm { padding: var(--sp-7) 0; }
.section-warm { background: var(--color-bg-warm); }
.section-soft { background: var(--color-bg-soft); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 641px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid { gap: var(--sp-6); }
}

/* === Section header ========================= */
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--sp-7); }
.section-head h2 { margin-top: var(--sp-3); }
.section-head p { color: var(--color-muted); font-size: var(--fs-lg); }

/* === Header / Nav =========================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-line-soft);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: 500; letter-spacing: 0.06em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dk) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #FFF; font-weight: 700; font-family: var(--font-sans); font-size: 0.9rem;
  letter-spacing: 0;
}

.nav-main { display: none; }
.nav-main ul { display: flex; gap: var(--sp-5); list-style: none; padding: 0; margin: 0; }
.nav-main a { font-size: var(--fs-sm); font-weight: 500; padding: 0.5rem 0; position: relative; }
.nav-main a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--color-gold);
  transition: width var(--t-base) var(--ease);
}
.nav-main a:hover::after, .nav-main a.is-active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); }

/* Language switch */
.lang-switch { position: relative; }
.lang-switch button {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--color-line); border-radius: var(--radius-pill);
  background: var(--color-surface);
  transition: all var(--t-fast) var(--ease);
}
.lang-switch button:hover { border-color: var(--color-gold); }
.lang-switch__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 140px;
  display: none;
  z-index: 10;
  list-style: none;
}
.lang-switch.is-open .lang-switch__menu { display: block; }
.lang-switch__menu li { list-style: none; }
.lang-switch__menu button {
  width: 100%; text-align: left;
  padding: 0.6rem 0.8rem; border: 0; background: transparent;
  font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0;
  border-radius: var(--radius-sm);
  text-transform: none;
}
.lang-switch__menu button:hover { background: var(--color-bg-warm); }
.lang-switch__menu button.is-active { color: var(--color-gold-dk); font-weight: 700; }

/* Hamburger */
.hamburger {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
}
.hamburger span { display: block; width: 18px; height: 2px; background: var(--color-ink); position: relative; }
.hamburger span::before, .hamburger span::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: var(--color-ink);
  transition: transform var(--t-fast) var(--ease), top var(--t-fast) var(--ease);
}
.hamburger span::before { top: -6px; }
.hamburger span::after  { top: 6px; }

@media (min-width: 1025px) {
  .nav-main { display: block; }
  .hamburger { display: none; }
}

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0;
  background: rgba(26,26,26,0.45);
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}
.drawer.is-open { display: block; opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0;
  width: min(86vw, 380px); height: 100%;
  background: var(--color-surface);
  padding: var(--sp-5) var(--sp-5) var(--sp-7);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.drawer__close {
  width: 40px; height: 40px;
  margin-bottom: var(--sp-5);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.drawer ul { list-style: none; padding: 0; margin: 0; }
.drawer li a {
  display: block; padding: 1rem 0;
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  border-bottom: 1px solid var(--color-line-soft);
}

/* === Hero — Fullscreen Video Background ====== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}

/* Video layer */
.hero__bg-video {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero__bg-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Dark overlay for text readability */
.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.15) 100%
  );
  z-index: 2;
}

/* Content layer */
.hero__inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--sp-10) 0;
}
.hero__copy {
  max-width: 640px;
}
.hero__tag {
  display: inline-block;
  color: var(--color-gold-lt);
}
.hero__title {
  font-size: var(--fs-4xl);
  font-weight: 400;
  margin: var(--sp-4) 0 var(--sp-5);
  color: #FFF;
}
.hero__title em {
  font-style: italic;
  color: var(--color-gold);
  font-weight: 500;
}
.hero__desc {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--sp-6);
}
.hero__cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.hero__cta .btn-outline {
  color: #FFF;
  border-color: rgba(255,255,255,0.5);
}
.hero__cta .btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-7);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,0.2);
}
.hero__stat-num {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  color: var(--color-gold);
  margin-bottom: 0.2rem;
}
.hero__stat-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .hero__inner {
    align-items: flex-end;
    padding: var(--sp-5) 0 var(--sp-7);
  }
  .hero__bg-overlay {
    background: linear-gradient(
      180deg,
      rgba(0,0,0,0.1) 0%,
      rgba(0,0,0,0.25) 40%,
      rgba(0,0,0,0.7) 100%
    );
  }
  .hero__copy {
    max-width: 100%;
    padding: 0 var(--sp-4);
  }
  .hero__title { font-size: var(--fs-3xl); }
  .hero__desc { font-size: var(--fs-base); margin-bottom: var(--sp-4); }
  .hero__cta .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--fs-sm);
  }
  .hero__stats {
    margin-top: var(--sp-5);
    padding-top: var(--sp-4);
  }
  .hero__stat-num { font-size: var(--fs-xl); }
}

@media (min-width: 1025px) {
  .hero__title { font-size: clamp(2.5rem, 4vw, 3.5rem); }
}

/* === Page Hero (subpages) =================== */
.page-hero {
  padding: var(--sp-8) 0 var(--sp-7);
  background: var(--color-bg-soft);
  text-align: center;
}
.page-hero__tag { display: inline-block; margin-bottom: var(--sp-3); }
.page-hero h1 { margin-bottom: var(--sp-3); }
.page-hero p { color: var(--color-muted); font-size: var(--fs-lg); max-width: 600px; margin: 0 auto; }

/* === Footer ================================= */
.site-footer {
  background: var(--color-ink);
  color: rgba(255,255,255,0.78);
  padding: var(--sp-9) 0 var(--sp-5);
  margin-top: var(--sp-9);
}
.site-footer h5 { color: #FFF; font-family: var(--font-sans); font-size: var(--fs-sm); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: var(--color-gold-lt); }
.site-footer__brand .brand { color: #FFF; }
.site-footer__brand p { color: rgba(255,255,255,0.65); margin-top: var(--sp-3); }
.site-footer__grid { display: grid; gap: var(--sp-7); }
@media (min-width: 641px) { .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; font-size: var(--fs-sm); }
.site-footer__bottom {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.10);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3);
  font-size: var(--fs-xs); color: rgba(255,255,255,0.55);
}

/* === Quick contacts (sticky FAB) ============ */
.quick-contact {
  position: fixed; right: var(--sp-4); bottom: var(--sp-4);
  z-index: 40;
  display: grid; gap: 0.625rem;
}
.quick-contact a {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  font-size: 1.1rem;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  cursor: pointer;
}
.quick-contact a svg { width: 28px; height: 28px; }
.quick-contact a:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}
.quick-contact a.qc-zalo:hover { background: #0068FF; border-color: #0068FF; }
.quick-contact a.qc-zalo:hover svg path { fill: #fff; }
.quick-contact a.qc-kakao:hover { background: #FEE500; border-color: #FEE500; }
.quick-contact a.qc-wechat:hover { background: #07C160; border-color: #07C160; }
.quick-contact a.qc-wechat:hover svg path { fill: #fff; }

/* WeChat QR Modal */
.wechat-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center; justify-content: center;
}
.wechat-modal-overlay.is-open { display: flex; }
.wechat-modal {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(0.9); } to { opacity:1; transform: scale(1); } }
.wechat-modal__close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  font-size: 24px; color: #999; cursor: pointer;
  width: 32px; height: 32px; line-height: 32px;
}
.wechat-modal__close:hover { color: #333; }
.wechat-modal__title {
  font-size: 1rem; font-weight: 700; color: var(--color-ink);
  margin-bottom: 4px;
}
.wechat-modal__desc {
  font-size: 0.8rem; color: #888;
  margin-bottom: 16px;
}
.wechat-modal__qr {
  width: 240px; height: 240px;
  border-radius: 12px;
  border: 1px solid #eee;
  object-fit: contain;
}
/* Mobile actions: Save QR + Open WeChat */
.wechat-modal__actions {
  display: none;
  flex-direction: column; gap: 10px;
  margin-top: 18px; width: 100%;
}
.wechat-modal__actions.is-mobile { display: flex; }
.wechat-modal__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px;
  border-radius: 12px; border: none;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity 0.2s;
}
.wechat-modal__btn:hover { opacity: 0.85; }
.wechat-modal__btn--save {
  background: #07C160; color: #fff;
}
.wechat-modal__btn--open {
  background: #f0f0f0; color: #333;
}
.wechat-modal__btn svg { width: 20px; height: 20px; flex-shrink: 0; }
/* Desktop instruction */
.wechat-modal__desktop-msg {
  display: block; margin-top: 14px;
  font-size: 0.78rem; color: #999; line-height: 1.5;
}
.wechat-modal__desktop-msg.is-hidden { display: none; }
/* Mobile instruction */
.wechat-modal__mobile-tip {
  display: none;
  margin-top: 8px;
  font-size: 0.75rem; color: #07C160; line-height: 1.4;
}
.wechat-modal__mobile-tip.is-mobile { display: block; }
.wechat-modal__brand {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 16px;
  font-size: 0.75rem; color: #07C160; font-weight: 600;
}
.wechat-modal__brand svg { width: 20px; height: 20px; }
