/* =========================================================
 * sportify-v15.css — SportifyVN
 * 1) Tăng tương phản tiêu đề bài viết / tên sân / card (chống "xám khó nhìn").
 * 2) Trang Đăng nhập / Đăng ký riêng (giao diện SportifyVN, không dùng wp-login mặc định).
 * 3) Lưới thư viện ảnh sân + popup xem tất cả ảnh.
 * 4) Nút "Tài khoản" khớp header.
 * ========================================================= */

/* ---------- 1. TIÊU ĐỀ TƯƠNG PHẢN CAO ---------- */
/* Mặc định: đậm rõ trên nền sáng (thay #0B1C2C mờ bằng navy gần đen + weight cao). */
.sf-card-title,
.sf-rel-title,
.sf-hot-title,
.sfv13-block-title,
.sfv13-card-title,
.sfv13-related-title,
.sfv14-card-title,
.sfv-card-title {
  color: #0a1626;
  font-weight: 700;
}

.sf-card-title a,
.sf-rel-title a,
.sf-hot-title a,
.sfv13-related-title a,
.sfv14-card-title a,
.sfv-card-title a {
  color: inherit;
}

/* Tiêu đề nằm trong section nền tối -> bắt buộc trắng (đây là ca "xám khó nhìn"). */
.sf-dark .sf-card-title, .sf-dark .sf-card-title a,
.sf-dark .sf-rel-title, .sf-dark .sf-rel-title a,
.sf-dark .sf-hot-title, .sf-dark .sf-hot-title a,
.sf-dark .sf-aside-title,
.sfv-sel-box--all .sf-card-title,
.sfv-sel-box--all .sf-card-title a,
.sfv-sel-box--all h2, .sfv-sel-box--all h3,
.sfv13-hero .sfv13-h1,
.sfv13-hero .sfv13-block-title,
.sfv13-hero h1, .sfv13-hero h2, .sfv13-hero h3,
.sf-geo-block .sf-geo-title,
.sf-geo-block h2, .sf-geo-block h3 {
  color: #ffffff !important;
}

/* Trong hero cầu lông/các môn: h1 và mọi tiêu đề mục luôn trắng. */
.sportify-hero h1, .sportify-hero h2, .sportify-hero h3,
.sf-hero-navy h1, .sf-hero-navy h2, .sf-hero-navy h3 {
  color: #ffffff;
}

/* Tiêu đề bài viết trong nội dung (nền trắng) — đảm bảo đủ đậm, không bị kế thừa xám. */
.sf-post-body h2, .sf-post-body h3, .sf-post-body h4,
.entry-content h2, .entry-content h3, .entry-content h4 {
  color: #0a1626;
}

/* H1 trang chi tiết trên nền tối. */
.sf-single-hero h1, .sf-single-hero h2 { color: #fff; }

/* ---------- 2. TRANG ĐĂNG NHẬP / ĐĂNG KÝ (phong cách Vmito) ---------- */
body.sf-auth-body {
  margin: 0;
  background: #eaf6ee;
  min-height: 100vh;
  font-family: var(--sf-body, "Manrope", system-ui, sans-serif);
  color: #1f2937;
  --sf-accent: #1c8a4e;
  --sf-accent-hover: #166f3e;
}
/* Ẩn header/footer Flatsome trên trang auth để giống app riêng. */
body.sf-auth-body .sf-topbar,
body.sf-auth-body #masthead,
body.sf-auth-body header,
body.sf-auth-body footer,
body.sf-auth-body .sf-footer { display: none !important; }

.sf-auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 56px;
}
.sf-auth-logo {
  display: block;
  text-align: center;
  font-family: var(--sf-head, "Space Grotesk", sans-serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .3px;
  color: #0f172a;
  text-decoration: none;
  margin-bottom: 26px;
}
.sf-auth-logo span { color: var(--sf-accent); }

.sf-auth-panel { width: 100%; max-width: 460px; }
.sf-auth-card {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(15,23,42,.10);
  padding: clamp(26px, 4vw, 40px);
  box-sizing: border-box;
}

.sf-auth-card h1 {
  font-family: var(--sf-head, "Space Grotesk", sans-serif);
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--sf-accent);
  text-align: center;
}
.sf-auth-sub { color: #6b7280; font-size: 14px; margin: 0 0 26px; text-align: center; }

.sf-auth-field { margin-bottom: 16px; }
.sf-auth-field label { display: block; font-size: 13.5px; font-weight: 700; color: #111827; margin-bottom: 7px; }
.sf-auth-field label .sf-req { color: #e11d48; margin-left: 2px; }
.sf-auth-field-wrap { position: relative; }
.sf-auth-field input {
  width: 100%; box-sizing: border-box; border: 1px solid #d7dce2; background: #fff;
  border-radius: 10px; padding: 13px 15px; font-size: 15px; color: #0f172a;
  font-family: var(--sf-body, "Manrope", sans-serif); transition: border-color 160ms ease, box-shadow 160ms ease;
}
.sf-auth-field input::placeholder { color: #9aa3ad; }
.sf-auth-field input:focus { outline: 0; border-color: var(--sf-accent); box-shadow: 0 0 0 3px rgba(28,138,78,.16); }
.sf-auth-field.has-eye input { padding-right: 46px; }
.sf-auth-field select {
  width: 100%; box-sizing: border-box; border: 1px solid #d7dce2; background: #fff;
  border-radius: 10px; padding: 13px 40px 13px 15px; font-size: 15px; color: #0f172a;
  font-family: var(--sf-body, "Manrope", sans-serif); appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.sf-auth-field select:focus { outline: 0; border-color: var(--sf-accent); box-shadow: 0 0 0 3px rgba(28,138,78,.16); }

.sf-eye {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer;
  color: #9aa3ad; display: flex; align-items: center; justify-content: center; padding: 0;
}
.sf-eye:hover { color: #6b7280; }

.sf-auth-labelrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.sf-auth-labelrow label { margin: 0; }
.sf-auth-link { font-size: 13.5px; color: var(--sf-accent); text-decoration: none; font-weight: 600; }
.sf-auth-link:hover { text-decoration: underline; }

.sf-auth-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .sf-auth-grid2 { grid-template-columns: 1fr; gap: 0; } }

.sf-auth-submit {
  width: 100%; border: 0; border-radius: 10px; padding: 15px;
  background: var(--sf-accent); color: #fff; font-family: var(--sf-head, "Space Grotesk", sans-serif);
  font-weight: 700; font-size: 16px; cursor: pointer; margin-top: 6px;
  transition: background-color 160ms ease, transform 160ms ease;
}
.sf-auth-submit:hover { background: var(--sf-accent-hover); }
.sf-auth-submit:disabled { opacity: .7; cursor: default; transform: none; }

.sf-auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: #9aa3ad; font-size: 13px; }
.sf-auth-divider::before, .sf-auth-divider::after { content: ""; flex: 1; height: 1px; background: #e5e9ee; }

.sf-social {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  border: 1px solid #d7dce2; background: #fff; border-radius: 10px; padding: 12px;
  font-family: var(--sf-body, "Manrope", sans-serif); font-size: 14.5px; font-weight: 600; color: #1f2937;
  cursor: pointer; text-decoration: none; margin-bottom: 11px; transition: background-color 160ms ease, border-color 160ms ease;
}
.sf-social:hover { background: #f7f9fb; border-color: #c4cdd9; }
.sf-social svg { width: 18px; height: 18px; }

.sf-auth-msg { border-radius: 10px; padding: 12px 15px; font-size: 13.5px; margin-bottom: 18px; display: none; }
.sf-auth-msg.is-error { display: block; background: #fdeceb; color: #b3261e; border: 1px solid #f7c9c6; }
.sf-auth-msg.is-ok { display: block; background: #e9f7ef; color: #166f3e; border: 1px solid #bfe6cf; }

.sf-auth-foot { text-align: center; margin-top: 22px; font-size: 14px; color: #6b7280; }
.sf-auth-foot a { color: var(--sf-accent); font-weight: 700; text-decoration: none; }
.sf-auth-foot a:hover { text-decoration: underline; }

.sf-auth-note { text-align: center; margin: 14px 0 0; font-size: 12px; color: #9aa3ad; line-height: 1.5; }

/* ---------- 3. THƯ VIỆN ẢNH SÂN + POPUP ---------- */
.sfv13-gallery { margin-top: 18px; }
.sfv13-gal-viewall {
  margin-top: 12px; border: 1px solid #dbe2ea; background: #fff; color: #0B1C2C;
  font-family: var(--sf-head, "Space Grotesk", sans-serif); font-weight: 700; font-size: 13.5px;
  padding: 9px 18px; border-radius: 10px; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease;
}
.sfv13-gal-viewall:hover { background: #f4f6f9; border-color: #c4cdd9; }
.sfv13-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.sfv13-gallery-grid a {
  display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: #eef1f5;
}
.sfv13-gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 220ms ease; }
.sfv13-gallery-grid a:hover img { transform: scale(1.05); }

.sfv13-lightbox {
  position: fixed; inset: 0; z-index: 99999; display: none;
  background: rgba(6,12,22,.92); padding: 24px;
}
.sfv13-lightbox.is-open { display: flex; align-items: center; justify-content: center; animation: sfvLbIn 160ms ease-out; }
@keyframes sfvLbIn { from { opacity: 0; } to { opacity: 1; } }
.sfv13-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; object-fit: contain; }
.sfv13-lb-close {
  position: absolute; top: 18px; right: 20px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 24px; cursor: pointer; line-height: 1;
}
.sfv13-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 24px; cursor: pointer; line-height: 1;
}
.sfv13-lb-prev { left: 18px; }
.sfv13-lb-next { right: 18px; }
.sfv13-lb-close:hover, .sfv13-lb-nav:hover { background: rgba(255,255,255,.26); }

/* ---------- 4. NÚT TÀI KHOẢN HEADER ---------- */
.sf-account-btn { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 768px) {
  .sf-account-btn .sf-account-tx { display: none; }
}

/* ---------- 5. DÒNG "X NGƯỜI ĐANG XEM" ---------- */
.sfv13-viewing {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; color: #7b8a99; margin-top: 7px;
}
.sfv13-viewing .sf-ic { color: #E8724A; }
.sfv13-viewing b { color: #0a1626; font-family: var(--sf-mono, monospace); }
.sfv13-viewing.pulse b { animation: sfvViewPulse 520ms ease-out; }
@keyframes sfvViewPulse { 0% { transform: scale(1); } 40% { transform: scale(1.18); color: #E8724A; } 100% { transform: scale(1); } }
