/* Futsal Maniax release polish v1. Loaded last across the public theme. */
:root {
  --fmx-polish-yellow: #ffe500;
  --fmx-polish-ink: #111;
  --fmx-polish-muted: #646464;
  --fmx-polish-line: #e6e6e6;
  --fmx-polish-surface: #fff;
  --fmx-polish-soft: #f6f6f4;
  --fmx-polish-radius: 14px;
  --fmx-polish-shadow: 0 12px 32px rgba(0, 0, 0, .07);
  --fmx-polish-width: 1240px;
}

html { overflow-x: clip; scroll-behavior: smooth; }
body { color: var(--fmx-polish-ink); text-rendering: optimizeLegibility; }
body.mega-menu-open { overflow: hidden; }
img, svg, video, iframe { max-width: 100%; }
button, input, select, textarea { font: inherit; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }

/* Shared header: must work even when database-page styles are not enqueued. */
.fm-site-header {
  position: sticky;
  z-index: 900;
  top: 0;
  width: 100%;
  min-height: 68px;
  color: #fff;
  background: rgba(12, 12, 12, .97);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
}
.fm-site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  width: min(100%, var(--fmx-polish-width));
  min-height: 68px;
  margin: 0 auto;
  padding: 0 84px 0 24px;
}
.fm-site-header__logo { display: inline-flex; flex: 0 0 auto; align-items: center; }
.fm-site-header__logo img { display: block; width: clamp(142px, 13vw, 180px); height: auto; }
.fm-site-header__nav { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: clamp(13px, 1.5vw, 24px); min-width: 0; }
.fm-site-header__nav a { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.fm-site-header__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.fm-site-header__search {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  cursor: pointer;
}
.fm-site-header__search span { width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; }
.fm-site-header__search span::after { display: block; width: 7px; height: 2px; margin: 11px 0 0 10px; background: currentColor; content: ""; transform: rotate(45deg); }
.fm-site-header__cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; color: #111; background: var(--fmx-polish-yellow); border-radius: 7px; font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.fmx-header-search-form {
  position: absolute;
  z-index: 5;
  top: calc(100% + 10px);
  right: 84px;
  display: flex;
  width: min(480px, calc(100vw - 48px));
  padding: 10px;
  background: #fff;
  border: 1px solid var(--fmx-polish-line);
  border-radius: 12px;
  box-shadow: var(--fmx-polish-shadow);
}
.fmx-header-search-form[hidden] { display: none; }
.fmx-header-search-form input { flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 0 14px; border: 1px solid #ccc; border-radius: 7px 0 0 7px; }
.fmx-header-search-form button { min-width: 76px; min-height: 46px; color: #111; background: var(--fmx-polish-yellow); border: 0; border-radius: 0 7px 7px 0; font-weight: 800; cursor: pointer; }
.fmx-fixed-menu-button { position: fixed; z-index: 1100; top: 0; right: 0; display: grid; place-items: center; align-content: center; width: 68px; height: 68px; padding: 8px; color: #111; background: var(--fmx-polish-yellow); border: 0; cursor: pointer; }
.fmx-menu-trigger__mark { display: grid; gap: 4px; width: 24px; }
.fmx-menu-trigger__mark span { display: block; width: 100%; height: 2px; background: currentColor; }
.fmx-menu-trigger__label { margin-top: 5px; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.fmx-mega-v5__panel { overflow-y: auto; max-height: 100dvh; }
.fmx-mega-v5__body { min-width: 0; }
.fmx-mega-v5__site-search { display: grid; grid-template-columns: minmax(150px, .5fr) minmax(280px, 1fr); grid-column: 1 / -1; align-items: center; gap: 24px; padding: 20px 24px; background: #171717; border-radius: var(--fmx-polish-radius); color: #fff; }
.fmx-mega-v5__site-search div { display: grid; gap: 3px; }
.fmx-mega-v5__site-search span { color: var(--fmx-polish-yellow); font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.fmx-mega-v5__site-search strong { font-size: clamp(18px, 2vw, 24px); }
.fmx-mega-v5__site-search form { display: flex; min-width: 0; }
.fmx-mega-v5__site-search input { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 14px; border: 0; border-radius: 8px 0 0 8px; }
.fmx-mega-v5__site-search button { min-width: 82px; min-height: 48px; color: #111; background: var(--fmx-polish-yellow); border: 0; border-radius: 0 8px 8px 0; font-weight: 900; cursor: pointer; }

/* Shared rhythm, readable content and interaction targets. */
.container, .fm-teamdb-container, .fm-leaguedb-container {
  width: min(100%, var(--fmx-polish-width));
  margin-inline: auto;
  padding-inline: clamp(16px, 2.5vw, 28px);
}
.layout-with-sidebar { align-items: start; gap: clamp(28px, 4vw, 48px); }
.layout-with-sidebar > *, .fm-teamdb-layout > *, .fm-leaguedb-layout > * { min-width: 0; }
.entry-content { line-height: 1.9; }
.entry-content h2 { margin-top: clamp(36px, 5vw, 60px); line-height: 1.35; }
.entry-content h3 { margin-top: 32px; line-height: 1.45; }
.entry-content p, .entry-content li { overflow-wrap: anywhere; }
.entry-content table { display: block; overflow-x: auto; max-width: 100%; }
.page-header { padding-block: clamp(42px, 6vw, 78px); }
.page-header h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.18; }
.entry, .side-box, .search-result-card, .archive-card { border-radius: var(--fmx-polish-radius); }
.sidebar { min-width: 0; }
.sidebar img { height: auto; }
.pagination a, .pagination span, .nav-links a, .nav-links span { display: inline-grid; min-width: 44px; min-height: 44px; place-items: center; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], select, textarea { max-width: 100%; min-height: 48px; }
textarea { min-height: 150px; }
.wpcf7-form label { display: block; font-weight: 700; }
.wpcf7-form input:not([type="submit"]), .wpcf7-form select, .wpcf7-form textarea { width: 100%; margin-top: 7px; padding: 11px 13px; border: 1px solid #cfcfcf; border-radius: 8px; }
.wpcf7-form input[type="submit"] { min-height: 48px; padding: 0 24px; background: var(--fmx-polish-yellow); border: 0; border-radius: 8px; font-weight: 900; cursor: pointer; }

/* Content-first guide blocks used by fixed pages and database archives. */
.fmx-content-guide {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  gap: clamp(22px, 4vw, 46px);
  margin: 0 0 clamp(32px, 5vw, 56px);
  padding: clamp(24px, 4vw, 40px);
  color: #fff;
  background: #171717;
  border-left: 6px solid var(--fmx-polish-yellow);
  border-radius: var(--fmx-polish-radius);
}
.fmx-content-guide > header { align-self: center; }
.fmx-content-guide > header > span { color: var(--fmx-polish-yellow); font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.fmx-content-guide h2 { margin: 8px 0 12px; color: #fff; font-size: clamp(24px, 3vw, 36px); line-height: 1.3; }
.fmx-content-guide p { margin: 0; color: #d4d4d4; line-height: 1.8; }
.fmx-content-guide__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fmx-content-guide__links a { display: grid; align-content: center; min-height: 92px; padding: 15px 17px; color: #111; background: #fff; border-radius: 10px; text-decoration: none; }
.fmx-content-guide__links strong { font-size: 15px; }
.fmx-content-guide__links span { margin-top: 5px; color: var(--fmx-polish-muted); font-size: 12px; line-height: 1.55; }
.fm-f-guide-intro { margin: clamp(30px, 5vw, 56px) 0; padding: clamp(24px, 4vw, 40px); background: #f6f6f4; border-left: 6px solid var(--fmx-polish-yellow); border-radius: var(--fmx-polish-radius); }
.fm-f-guide-intro h2 { margin: 8px 0 14px; font-size: clamp(26px, 4vw, 40px); }
.fm-f-guide-intro p { max-width: 74ch; margin: 8px 0 0; line-height: 1.85; }

/* Home and database pages. */
.fm-home-final .fm-final-container { width: min(100%, var(--fmx-polish-width)); margin-inline: auto; padding-inline: clamp(16px, 2.5vw, 28px); }
.fm-home-final section { scroll-margin-top: 86px; }
.fm-home-final .fm-final-section { padding-block: clamp(50px, 7vw, 88px); }
.fm-home-final .fm-final-hero__title { font-size: clamp(38px, 5vw, 68px); line-height: 1.08; }
.fm-home-final .fm-final-hero__lead { max-width: 58ch; line-height: 1.85; }
.fm-teamdb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fm-teamdb-card, .fm-leaguedb-card { min-width: 0; border-radius: var(--fmx-polish-radius); box-shadow: 0 6px 20px rgba(0,0,0,.045); }
.fm-teamdb-card img { object-fit: contain; }
.fm-teamdb-filter select, .fm-teamdb-filter input { min-height: 48px; }
.fm-single-team-v14 .fm-v14-hero, .fm-single-league-v14 .fm-v14-hero { min-height: clamp(280px, 34vw, 410px); }
.fm-single-team-v14 .fm-v14-section, .fm-single-league-v14 .fm-v14-section { padding-block: clamp(44px, 6vw, 76px); }
.fm-single-team-v14 .fm-v14-official a, .fm-single-league-v14 .fm-v14-official a { min-height: 44px; }
.fm-single-league-v14 .fm-v14-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fm-fat-footer a { min-height: 32px; }

@media (hover: hover) {
  .fm-site-header__nav a:hover { color: var(--fmx-polish-yellow); }
  .fm-site-header__cta:hover, .fmx-header-search-form button:hover, .fmx-mega-v5__site-search button:hover { filter: brightness(.94); }
  .fm-teamdb-card:hover, .fm-leaguedb-card:hover, .search-result-card:hover { transform: translateY(-2px); box-shadow: var(--fmx-polish-shadow); }
}

@media (max-width: 1100px) {
  .fm-site-header__nav { display: none; }
  .fm-site-header__actions { margin-left: auto; }
  .layout-with-sidebar, .fm-teamdb-layout, .fm-leaguedb-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .fm-teamdb-side, .fm-leaguedb-side { width: 100%; }
}

@media (max-width: 760px) {
  .fm-site-header, .fm-site-header__inner { min-height: 62px; }
  .fm-site-header__inner { padding: 0 70px 0 16px; }
  .fm-site-header__logo img { width: 138px; }
  .fm-site-header__actions { display: none; }
  .fmx-fixed-menu-button { width: 62px; height: 62px; }
  .fmx-header-search-form { right: 70px; width: calc(100vw - 86px); }
  .fmx-mega-v5__site-search { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
  .fmx-mega-v5__site-search form { width: 100%; }
  .page-header { padding-block: 38px; }
  .page-header h1 { font-size: clamp(30px, 10vw, 42px); }
  .layout-with-sidebar { gap: 32px; }
  .entry-content { line-height: 1.82; }
  .fm-home-final .fm-final-section { padding-block: 44px; }
  .fm-home-final .fm-final-hero__title { font-size: clamp(34px, 11vw, 48px); }
  .fm-teamdb-grid, .fm-single-league-v14 .fm-v14-team-grid { grid-template-columns: 1fr; }
  .fm-teamdb-card, .fm-leaguedb-card { border-radius: 12px; }
  .fm-single-team-v14 .fm-v14-section, .fm-single-league-v14 .fm-v14-section { padding-block: 42px; }
  .fm-fat-footer__grid { grid-template-columns: 1fr; }
  .fmx-content-guide { grid-template-columns: 1fr; }
  .fmx-content-guide__links { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .fm-site-header__logo img { width: 126px; }
  .fmx-mega-v5__site-search form { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .fmx-mega-v5__site-search input, .fmx-mega-v5__site-search button { width: 100%; border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
