/* =====================================================
   PINOY SUPER LIGA - one shared stylesheet for every page
   Edit colors and sizing here and the whole site updates.
   ===================================================== */

:root {
  --bg: #080a0f;
  --bg-alt: #0c1018;
  --surface: #11151e;
  --card: #171d28;
  --yellow: #f5c400;
  --blue: #2474e8;
  --white: #ffffff;
  --muted: #a9afbb;
  --border: rgba(255, 255, 255, .12);
  --radius: 8px;
  --nav-height: 78px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1160px, 90%); margin: auto; }
.container.wide { width: min(1400px, 94%); }
.yellow, .gold { color: var(--yellow); }

/* ---------- HEADER / NAV ---------- */
header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(8, 10, 15, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar {
  min-height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  position: relative;
}
.logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 900; letter-spacing: 1px; white-space: nowrap;
  color: var(--yellow);
}
.logo img { display: block; width: 52px; height: 52px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 24px); }
.nav-links a {
  color: var(--muted); font-size: 12px; font-weight: 800;
  text-transform: uppercase; transition: color .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--yellow); }

/* Dropdown group (Teams / Schedule / Standings) */
.nav-dropdown { position: relative; }
.nav-drop-toggle {
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
  color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase;
  white-space: nowrap; transition: color .2s;
}
.nav-drop-toggle::after { content: " \25BE"; font-size: 10px; }
.nav-drop-toggle:hover, .nav-drop-toggle.active,
.nav-dropdown:hover .nav-drop-toggle, .nav-dropdown:focus-within .nav-drop-toggle { color: var(--yellow); }
.nav-menu {
  display: none; position: absolute; top: 100%; left: -14px; min-width: 170px;
  padding: 18px 0 8px; z-index: 60;
}
.nav-menu::before { /* keeps hover alive across the gap and draws the panel */
  content: ""; position: absolute; inset: 8px 0 0 0; background: #0b0e15;
  border: 1px solid var(--border); border-top: 2px solid var(--yellow); z-index: -1;
}
.nav-menu a { display: block; padding: 11px 18px; }
.nav-dropdown:hover .nav-menu, .nav-dropdown:focus-within .nav-menu, .nav-dropdown.open .nav-menu { display: block; }
.menu-button {
  display: none; align-items: center; justify-content: center;
  min-width: 44px; min-height: 40px; padding: 8px 12px;
  background: var(--yellow); color: var(--bg);
  border: 0; font-size: 20px; font-weight: 900; cursor: pointer;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; min-height: 46px;
  background: var(--yellow); color: var(--bg);
  border: 1px solid var(--yellow); border-radius: 3px;
  font: inherit; font-size: 12px; font-weight: 900;
  letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; transition: .2s;
}
.btn:hover { background: transparent; color: var(--yellow); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.35); }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-block { width: 100%; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 100px 0;
  background:
    radial-gradient(circle at 85% 30%, rgba(36,116,232,.22), transparent 38%),
    radial-gradient(circle at 12% 100%, rgba(245,196,0,.08), transparent 35%),
    linear-gradient(120deg, #0c111c, #080a0f);
  border-bottom: 3px solid var(--yellow);
}
.hero .container { position: relative; z-index: 2; }
.hero.compact { padding: 70px 0; }
.hero-center { text-align: center; }
.hero-center p { margin-left: auto; margin-right: auto; }
.hero h1 {
  font-size: clamp(42px, 7.5vw, 84px);
  line-height: .98; font-weight: 900; text-transform: uppercase;
  letter-spacing: -1px; margin: 12px 0 22px;
}
.hero.compact h1 { font-size: clamp(38px, 6vw, 68px); }
.hero h1 span { color: var(--yellow); }
.hero p { color: var(--muted); max-width: 620px; font-size: 16px; margin-bottom: 28px; }
.hero-logo {
  position: absolute; z-index: 1; right: 5%; top: 50%; transform: translateY(-50%);
  width: clamp(220px, 29vw, 360px); height: auto;
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.35));
}
.hero-watermark {
  position: absolute; right: 3%; bottom: -70px; z-index: 0;
  font-size: clamp(180px, 28vw, 380px); font-weight: 900; line-height: 1;
  color: rgba(255,255,255,.03); pointer-events: none;
}

/* ---------- SECTIONS ---------- */
.section { padding: 85px 0; scroll-margin-top: var(--nav-height); }
.section-alt { background: var(--bg-alt); }
.section-heading { margin-bottom: 38px; }
.section-heading.center { text-align: center; max-width: 700px; margin-left: auto; margin-right: auto; }
.section-heading h2 {
  font-size: clamp(32px, 5vw, 50px); line-height: 1.08;
  text-transform: uppercase; font-weight: 900;
}
.section-heading h2 span { color: var(--yellow); }
.section-heading p { color: var(--muted); max-width: 650px; margin-top: 14px; }
.section-heading.center p { margin-left: auto; margin-right: auto; }
.eyebrow {
  color: var(--yellow); font-size: 12px; font-weight: 800;
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px;
}
.tag {
  display: inline-block; background: var(--yellow); color: var(--bg);
  padding: 6px 12px; font-size: 10px; font-weight: 900; letter-spacing: 1px;
}

/* ---------- CARDS & GRIDS ---------- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; transition: .25s;
}
a.card:hover, .card.hover:hover { transform: translateY(-5px); border-color: var(--yellow); }
.card h3 { font-size: 22px; text-transform: uppercase; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 14px; }
.card-number { color: var(--yellow); font-size: 12px; font-weight: 900; letter-spacing: 2px; margin-bottom: 26px; }
.card.accent-top { border-top: 4px solid var(--yellow); }
.card.accent-left { border-left: 4px solid var(--yellow); }
.card.featured { border-color: var(--yellow); }
.card .arrow { position: absolute; right: 26px; bottom: 18px; font-size: 46px; font-weight: 900; color: rgba(245,196,0,.14); }
a.card { position: relative; display: block; overflow: hidden; }

/* feature banner (event / split panel) */
.feature { display: grid; grid-template-columns: 1.4fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature-main { padding: 48px; }
.feature-main h3 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; margin: 20px 0; text-transform: uppercase; }
.feature-main p { color: var(--muted); margin-bottom: 22px; }
.feature-side {
  padding: 44px; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(145deg, rgba(36,116,232,.75), rgba(8,10,15,.95)), #17243a;
}
.feature-side h3 { font-size: clamp(46px, 7vw, 70px); line-height: .92; color: var(--yellow); text-transform: uppercase; }
.feature-side p { margin-top: 22px; max-width: 260px; }
.meta-row { display: flex; gap: 28px; flex-wrap: wrap; margin: 24px 0; }
.meta-row small { display: block; color: var(--yellow); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.meta-row strong { font-size: 15px; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: #0d1119; border-bottom: 1px solid var(--border); }
.stat { padding: 30px 15px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 24px; font-weight: 900; color: var(--yellow); }
.stat span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; }

/* detail boxes */
.detail-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.detail-box small { display: block; color: var(--yellow); font-size: 10px; font-weight: 800; letter-spacing: 1px; margin-bottom: 8px; }
.detail-box strong { font-size: 15px; }

/* check lists */
.check-list { list-style: none; margin: 20px 0; }
.check-list li { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: #e4e8ef; }
.check-list li::before { content: "✓"; color: var(--yellow); font-weight: bold; margin-right: 12px; }
.check-list ul { list-style: none; margin: 8px 0 0 22px; }

/* price */
.price { font-size: 48px; color: var(--yellow); font-weight: 900; margin: 10px 0; }

/* timeline */
.timeline { border-left: 2px solid var(--yellow); margin-left: 8px; padding-left: 28px; }
.timeline-item { position: relative; padding-bottom: 28px; }
.timeline-item::before { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); left: -35px; top: 6px; }
.timeline-item small { color: var(--yellow); font-weight: bold; letter-spacing: 1px; }
.timeline-item h3 { font-size: 20px; margin: 5px 0; }
.timeline-item p { color: var(--muted); font-size: 14px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; background: none; border: 0; color: var(--white);
  padding: 22px 0; text-align: left; font: inherit; font-size: 16px; font-weight: bold;
  cursor: pointer; display: flex; justify-content: space-between; gap: 20px;
}
.faq-question span { color: var(--yellow); font-size: 22px; }
.faq-answer { display: none; padding: 0 0 22px; color: var(--muted); font-size: 14px; }
.faq-item.open .faq-answer { display: block; }

/* CTA / contact box */
.cta-box {
  padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 30px;
  background: linear-gradient(120deg, rgba(36,116,232,.22), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
}
.cta-box h2 { font-size: clamp(32px, 5vw, 54px); line-height: 1.05; text-transform: uppercase; margin-bottom: 14px; }
.cta-box p { color: var(--muted); max-width: 540px; }
.cta-box .email { display: inline-block; color: var(--yellow); margin-top: 16px; font-weight: bold; overflow-wrap: anywhere; }

/* notice */
.notice {
  margin-top: 28px; padding: 16px 18px;
  background: rgba(36,116,232,.12); border: 1px solid rgba(36,116,232,.35);
  border-radius: var(--radius); color: #c8d7e8; font-size: 13px;
}

/* ---------- TABS ---------- */
.tabs { display: flex; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.tab {
  padding: 13px 25px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); border-radius: 6px; font: inherit; font-weight: 900; cursor: pointer;
}
.tab.active { background: var(--yellow); color: var(--bg); border-color: var(--yellow); }
.segmented { display: flex; gap: 10px; margin: 0 0 26px; flex-wrap: wrap; }
.segmented a {
  padding: 12px 22px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); border-radius: 6px; font-size: 13px; font-weight: 900; text-transform: uppercase;
}
.segmented a:hover { border-color: var(--yellow); color: var(--yellow); }
.segmented a.active { background: var(--yellow); color: var(--bg); border-color: var(--yellow); }
.panel { display: none; }
.panel.active { display: block; }

.division-heading {
  display: flex; justify-content: space-between; align-items: center; gap: 15px;
  border-bottom: 2px solid var(--yellow); padding-bottom: 15px; margin-bottom: 25px;
}
.division-heading h2 { font-size: clamp(25px, 4vw, 36px); text-transform: uppercase; }
.pill { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 2px; border: 1px solid var(--border); border-radius: 30px; padding: 7px 14px; white-space: nowrap; }

/* ---------- TABLES (schedules) ---------- */
.pool-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; align-items: start; }
.pool-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; min-width: 0; }
.table-heading { padding: 16px 18px; background: linear-gradient(120deg, #252d39, #111720); border-bottom: 2px solid var(--yellow); }
.pool-card .table-heading { text-align: center; }
.table-heading h3 { color: var(--yellow); font-size: 22px; text-transform: uppercase; }
.table-heading p { color: var(--muted); font-size: 11px; margin-top: 3px; }
.bracket-section { margin-bottom: 32px; }
.table-scroll { overflow-x: auto; width: 100%; }
.bracket-section .table-scroll { background: var(--card); border: 1px solid var(--border); border-radius: 0 0 10px 10px; }
.bracket-section .table-heading { border-bottom: 0; border-left: 4px solid var(--yellow); border-radius: 10px 10px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; white-space: nowrap; }
thead { background: #202a38; }
th { color: var(--yellow); font-size: 10px; padding: 12px 8px; text-transform: uppercase; }
td { padding: 12px 8px; border-bottom: 1px solid var(--border); color: #e4e8ef; }
tbody tr:hover { background: rgba(245,196,0,.06); }
td.time, td.court, td.bracket { color: var(--yellow); font-weight: 900; }
td.team { font-weight: 800; }
td.vs { color: var(--yellow); font-weight: 900; }
td.type { color: var(--muted); font-size: 10px; }

/* team lookup */
.lookup { padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 40px; }
.lookup-heading { text-align: center; margin-bottom: 22px; }
.lookup-heading h2 { font-size: 30px; margin: 6px 0; text-transform: uppercase; }
.lookup-heading p { color: var(--muted); font-size: 13px; }
.lookup-form { max-width: 600px; margin: auto; display: flex; flex-direction: column; gap: 12px; }
.team-schedule:empty { display: none; }
.team-schedule { margin-top: 28px; }
.team-profile { padding: 20px; background: var(--card); border: 1px solid var(--yellow); border-radius: 9px; margin-bottom: 18px; }
.team-profile h3 { color: var(--yellow); font-size: 24px; }
.team-profile p { color: var(--muted); font-size: 12px; }
.schedule-day-title { color: var(--yellow); font-size: 16px; margin: 22px 0 12px; text-transform: uppercase; }
.team-game { display: grid; grid-template-columns: 100px 110px 1fr; gap: 15px; align-items: center; background: var(--card); border: 1px solid var(--border); padding: 15px; margin-bottom: 9px; border-radius: 7px; }
.team-game strong { color: var(--yellow); }
.team-game small { color: var(--muted); }
.no-games { color: var(--muted); padding: 15px; background: var(--card); border-radius: 7px; }

/* team cards */
.team-card { background: linear-gradient(145deg, #1a2432, #111720); border: 1px solid var(--border); padding: 24px; border-radius: 14px; min-height: 180px; transition: .2s; }
.team-card:hover { transform: translateY(-4px); border-color: rgba(245,196,0,.65); }
.team-number { font-size: 11px; letter-spacing: 2px; color: var(--yellow); font-weight: 900; }
.team-mark { width: 58px; height: 58px; margin: 16px 0 12px; border-radius: 50%; display: grid; place-items: center; background: rgba(245,196,0,.1); border: 1px solid rgba(245,196,0,.4); color: var(--yellow); font-size: 19px; font-weight: 900; }
.team-card h3 { font-size: 19px; text-transform: uppercase; }
.team-card p { margin-top: 4px; color: var(--muted); font-size: 13px; }

/* ---------- FORMS ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); padding: 35px; border-radius: var(--radius); }
.form-card.narrow { max-width: 850px; margin: auto; }
.form-card h2 { font-size: 26px; margin-bottom: 10px; }
.form-intro { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.form-section-title { color: var(--yellow); font-size: 15px; font-weight: 900; letter-spacing: 1px; margin: 8px 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 8px; }
input, select, textarea { font-family: inherit; }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=tel], .form-group input[type=number],
.form-group select, .form-group textarea, .lookup-form select, .search-select {
  width: 100%; padding: 14px; background: var(--bg); border: 1px solid #383838;
  border-radius: 4px; color: var(--white); font-size: 14px; outline: none;
}
.lookup-form select { font-weight: 800; cursor: pointer; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .lookup-form select:focus { border-color: var(--yellow); }
select option { background: var(--surface); color: var(--white); }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group small { display: block; color: #888; font-size: 11px; margin-top: 6px; }
.choice-row { display: flex; gap: 12px; flex-wrap: wrap; }
.choice-row label { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid #383838; padding: 12px 18px; border-radius: 4px; cursor: pointer; margin: 0; }
.choice-row input, .terms input { accent-color: var(--yellow); }
.terms { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; color: #bbb; font-size: 13px; }
.terms input { margin-top: 5px; }
.form-note { color: #888; font-size: 12px; margin-top: 14px; text-align: center; }

/* contact page */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.contact-info h2 { font-size: 27px; margin-bottom: 14px; }
.contact-info > p { color: var(--muted); margin-bottom: 28px; }
.info-card { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--yellow); padding: 20px; margin-bottom: 14px; border-radius: 5px; }
.info-card h3 { color: var(--yellow); font-size: 14px; letter-spacing: 1px; margin-bottom: 5px; }
.info-card p, .info-card a { color: #ddd; font-size: 14px; overflow-wrap: anywhere; }
.info-card a:hover { color: var(--yellow); }

/* about page */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 55px; align-items: center; }
.split p { color: var(--muted); margin-bottom: 16px; }
.big-year { font-size: 56px; font-weight: 900; color: var(--yellow); line-height: 1.1; margin-bottom: 8px; }
.card h4 { color: var(--yellow); font-size: 19px; margin-bottom: 10px; }
.list-points { list-style: none; margin-top: 22px; }
.list-points li { padding: 12px 0; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; }
.list-points li::before { content: "✦"; color: var(--yellow); margin-right: 12px; }

/* program rows */
.program-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.program-row.reverse .program-visual { order: 2; }
.program-visual {
  min-height: 340px; padding: 38px; display: flex; align-items: flex-end;
  background: linear-gradient(145deg, rgba(36,116,232,.7), rgba(8,10,15,.95));
  border: 1px solid var(--border); border-radius: var(--radius);
}
.program-visual.yellow-bg { background: linear-gradient(145deg, rgba(245,196,0,.35), rgba(8,10,15,.95)); }
.program-visual h3 { font-size: clamp(42px, 6vw, 70px); line-height: .95; font-weight: 900; text-transform: uppercase; }
.program-text h2 { font-size: clamp(30px, 5vw, 46px); line-height: 1.05; margin-bottom: 18px; text-transform: uppercase; }
.program-text h2 span { color: var(--yellow); }
.program-text p { color: var(--muted); margin-bottom: 18px; font-size: 15px; }
.section.divided { border-bottom: 1px solid var(--border); }

/* ---------- GALLERY ---------- */
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.filter-list { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { padding: 10px 14px; border: 1px solid var(--border); background: transparent; color: #c5cad2; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; border-radius: 3px; }
.filter-button:hover, .filter-button.active { border-color: var(--yellow); color: var(--yellow); }
.gallery-count { text-align: right; }
.gallery-count strong { display: block; color: var(--yellow); font-size: 30px; line-height: 1; }
.gallery-count span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.empty-gallery { grid-column: 1 / -1; min-height: 280px; padding: 40px 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: linear-gradient(145deg, #151c28, #0e121a); border: 1px dashed rgba(245,196,0,.4); border-radius: var(--radius); }
.empty-gallery[hidden] { display: none; }
.empty-gallery h3 { font-size: 21px; margin-bottom: 8px; }
.empty-gallery p { max-width: 460px; color: var(--muted); font-size: 13px; }
.gallery-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .2s, border-color .2s; }
.gallery-card:hover { transform: translateY(-4px); border-color: rgba(245,196,0,.65); }
.gallery-image-button { display: block; width: 100%; padding: 0; border: 0; background: var(--bg); cursor: zoom-in; overflow: hidden; }
.gallery-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .35s; }
.gallery-image-button:hover img { transform: scale(1.035); }
.gallery-card-info { padding: 15px 17px 17px; }
.gallery-category { color: var(--yellow); font-size: 10px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; }
.gallery-card h3 { margin-top: 6px; font-size: 16px; line-height: 1.3; }
.gallery-card p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.lightbox { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 60px 70px; background: rgba(0,0,0,.94); }
.lightbox.open { display: flex; }
.lightbox figure { max-width: min(1000px, 88vw); max-height: 82vh; text-align: center; }
.lightbox figure img { display: block; max-width: 100%; max-height: 75vh; margin: auto; object-fit: contain; }
.lightbox figcaption { padding-top: 12px; color: #fff; font-size: 13px; }
.lightbox-close, .lightbox-arrow { position: absolute; border: 0; background: transparent; color: #fff; cursor: pointer; }
.lightbox-close { top: 15px; right: 25px; font-size: 42px; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); font-size: 54px; padding: 12px; }
.lightbox-arrow.prev { left: 12px; }
.lightbox-arrow.next { right: 12px; }

/* ---------- FOOTER ---------- */
footer { background: #050609; border-top: 1px solid var(--border); padding: 36px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand-block { display: flex; align-items: center; gap: 14px; }
.footer-brand-block img { width: 60px; height: 60px; object-fit: contain; }
.footer-brand { font-size: 17px; font-weight: 900; }
.footer-brand span { color: var(--yellow); }
footer p, footer a { color: var(--muted); font-size: 12px; }
footer a:hover { color: var(--yellow); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.footer-right { text-align: right; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1180px) {
  .menu-button { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: -5%; right: -5%;
    padding: 22px 5%; background: #0b0e15; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-drop-toggle { font-size: 14px; }
  /* in the mobile menu the group is always expanded and indented */
  .nav-drop-toggle { cursor: default; pointer-events: none; }
  .nav-drop-toggle::after { content: ""; }
  .nav-menu { display: flex; flex-direction: column; position: static; min-width: 0; padding: 12px 0 0 16px; gap: 14px; }
  .nav-menu::before { display: none; }
  .nav-menu a { padding: 0; }
  .nav-dropdown { width: 100%; }
}
@media (max-width: 1050px) {
  .pool-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .section { padding: 65px 0; }
  .hero { padding: 75px 0; }
  .hero-logo { right: -22px; width: 190px; opacity: .2; }
  .grid-2, .grid-3, .grid-4, .feature, .split, .program-row, .contact-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .program-row.reverse .program-visual { order: 0; }
  .program-visual { min-height: 240px; }
  .feature-main, .feature-side { padding: 32px 24px; }
  .cta-box { flex-direction: column; align-items: flex-start; padding: 36px 24px; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--border); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery-toolbar { flex-direction: column; align-items: flex-start; }
  .footer-right { text-align: left; }
}
@media (max-width: 560px) {
  .logo { font-size: 14px; gap: 8px; letter-spacing: 0; }
  .logo img { width: 42px; height: 42px; }
  .pool-grid, .gallery-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 24px 18px; }
  .division-heading { flex-direction: column; align-items: flex-start; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .tab { padding: 12px 6px; font-size: 11px; }
  .segmented a { flex: 1; text-align: center; }
  .team-game { grid-template-columns: 1fr 1fr; gap: 8px; }
  .team-game .opponent { grid-column: 1 / -1; }
  .lightbox { padding: 50px 18px; }
  .lightbox-arrow.prev { left: 0; }
  .lightbox-arrow.next { right: 0; }
  .lookup { padding: 18px; }
}


/* ---------- SCOREBOARD: results, standings, admin ---------- */
.live-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: -10px 0 24px; }
.live-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #3ecf6e; flex: none; }
.live-status.offline::before { background: #e5484d; }
.live-status.offline { color: #ffb4b6; }

td.score { font-weight: 900; color: var(--white); }
td.score small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 2px; }
td.score .pending { color: var(--muted); font-weight: 400; }
td.team.win { color: var(--yellow); }
td.team small, td.rank small, .team-cell small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
td.team.tbd { color: var(--muted); font-weight: 400; font-style: italic; }
tr.stale td { background: rgba(229, 72, 77, .08); }
.badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); }
.badge.stale { color: #ffb4b6; border-color: #e5484d; }
.badge.done { color: #3ecf6e; border-color: #3ecf6e; }

.standings-table td.rank { color: var(--yellow); font-weight: 900; }
.standings-table td.name { text-align: left; font-weight: 800; }
.standings-table tr.advance td { background: rgba(245, 196, 0, .05); }
.standings-table td.num { font-variant-numeric: tabular-nums; }
.standings-table td.strong { font-weight: 900; color: var(--white); }
.standings-block { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 30px; }
.standings-block .table-heading { text-align: left; }
.rule-note { color: var(--muted); font-size: 12px; margin: 0 0 22px; }
.progress { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.progress strong { color: var(--yellow); }
.sub-heading { color: var(--yellow); font-size: 18px; text-transform: uppercase; margin: 34px 0 14px; }
.champion { display: flex; align-items: center; gap: 14px; padding: 18px 22px; margin-bottom: 18px; background: linear-gradient(120deg, rgba(245,196,0,.16), rgba(245,196,0,.04)); border: 1px solid var(--yellow); border-radius: 10px; }
.champion .trophy { font-size: 30px; line-height: 1; }
.champion small { display: block; color: var(--muted); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.champion strong { font-size: 20px; text-transform: uppercase; }
.champ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 8px; }
.champ-grid .champion { margin-bottom: 0; }

/* admin */
.admin-login { max-width: 460px; margin: 0 auto; }
.form-error { color: #ffb4b6; font-size: 13px; margin: 0 0 14px; min-height: 18px; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-bar p { color: var(--muted); font-size: 13px; }
.btn.small { padding: 8px 14px; font-size: 11px; }
.score-input { width: 52px; padding: 8px 4px; background: var(--bg); border: 1px solid #383838; border-radius: 4px; color: var(--white); font-size: 14px; text-align: center; }
.score-input:focus { border-color: var(--yellow); outline: none; }
.score-input:disabled { opacity: .4; }
.set-sep { color: var(--muted); margin: 0 2px; }
.set-group { display: inline-flex; align-items: center; gap: 2px; margin: 0 6px; }
.row-actions { display: flex; gap: 6px; justify-content: center; }
.row-msg { display: block; font-size: 10px; min-height: 14px; margin-top: 3px; color: var(--muted); }
.row-msg.err { color: #ffb4b6; }
.row-msg.ok { color: #3ecf6e; }
tr.saved td:first-child { box-shadow: inset 3px 0 0 #3ecf6e; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 24px; }
.name-grid label { display: block; font-size: 12px; font-weight: 800; color: var(--yellow); margin-bottom: 5px; }
.name-grid input { width: 100%; padding: 11px; background: var(--bg); border: 1px solid #383838; border-radius: 4px; color: var(--white); font-size: 14px; }
.name-grid input:focus { border-color: var(--yellow); outline: none; }
.admin-toast { position: fixed; right: 18px; bottom: 18px; background: var(--card); border: 1px solid var(--yellow); padding: 12px 18px; border-radius: 8px; font-size: 13px; z-index: 2000; display: none; }
.admin-toast.show { display: block; }
.footer-links a.admin-link { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .champion strong { font-size: 17px; } }

.pool-grid.fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }

[hidden] { display: none !important; }
td.name small { display: block; }

/* team cards are links; roster page */
a.team-card { display: block; color: inherit; }
.stats.four { grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); }
@media (max-width: 560px) { .stats.four { grid-template-columns: repeat(2, 1fr); } .stats.four .stat { border-bottom: 1px solid var(--border); } }
.roster-edit input { width: 100%; padding: 9px; background: var(--bg); border: 1px solid #383838; border-radius: 4px; color: var(--white); font-size: 14px; }
.roster-edit input:focus, .bulk-names:focus { border-color: var(--yellow); outline: none; }
.roster-edit td { padding: 5px 6px; }
.roster-edit input.num { width: 70px; text-align: center; }
.roster-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.roster-pick { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.roster-pick select { padding: 11px; background: var(--bg); border: 1px solid #383838; border-radius: 4px; color: var(--white); font-size: 14px; min-width: 260px; }
.bulk-names { width: 100%; min-height: 130px; padding: 11px; background: var(--bg); border: 1px solid #383838; border-radius: 4px; color: var(--white); font-size: 14px; font-family: inherit; }

/* =========================
   PSL INTRO ANIMATION
========================= */

#psl-intro {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #080a0f;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    animation: introExit 0.6s ease forwards;
    animation-delay: 2.4s;
}

.intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.intro-content img {
    width: 340px;
    max-width: 80vw;
    height: auto;
    object-fit: contain;
    opacity: 0;
    animation: logoAppear 1.8s ease forwards;
}

.intro-line {
    width: 0;
    height: 3px;
    background: #f5c400;
    box-shadow: 0 0 15px #f5c400;
    animation: lineReveal 1.2s ease forwards;
    animation-delay: 0.6s;
}

/* LOGO REVEAL */
@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: scale(0.65);
        filter: brightness(0.4);
    }

    60% {
        opacity: 1;
        transform: scale(1.08);
        filter: brightness(1.4);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

/* GOLD LIGHT LINE */
@keyframes lineReveal {
    from {
        width: 0;
    }

    to {
        width: 220px;
    }
}

/* INTRO FADE OUT */
@keyframes introExit {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .intro-content img {
        width: 270px;
    }
}
/* ---------- PRE-REGISTRATION (Hilaga Series) ---------- */
.form-group.invalid input, .form-group.invalid select { border-color: #e5484d; }
.form-group.valid input, .form-group.valid select { border-color: #3ecf6e; }
.form-group .field-msg { color: #ffb4b6; }
.form-group .field-msg:empty { display: none; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-info h2 span { color: var(--yellow); }
.contact-info .timeline { margin-bottom: 10px; }

#prereg-card { scroll-margin-top: calc(var(--nav-height) + 20px); }
@media (max-width: 800px) { #prereg-card { order: -1; } } /* form first on phones */

.prereg-success { text-align: center; }
.prereg-success .form-intro { max-width: 480px; margin-left: auto; margin-right: auto; }
.prereg-success .form-intro strong { color: var(--white); }
.prereg-check {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 34px; font-weight: 900;
  color: var(--bg); background: var(--yellow);
}
.ref-code {
  display: inline-block; margin: 4px 0 24px; padding: 12px 24px;
  border: 2px dashed var(--yellow); border-radius: var(--radius);
  color: var(--yellow); font-size: 26px; font-weight: 900; letter-spacing: 3px;
}
.prereg-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; margin-bottom: 24px; }
.prereg-summary strong { overflow-wrap: anywhere; }
.prereg-success .button-row { justify-content: center; }
@media (max-width: 560px) {
  .prereg-summary { grid-template-columns: 1fr; }
  .prereg-success .button-row .btn { width: 100%; }

   /* ---------- CONTACT FORM ---------- */
.form-group.invalid textarea { border-color: #e5484d; }
.form-group.valid textarea { border-color: #3ecf6e; }
.form-group .char-count { text-align: right; }
#contact-card { scroll-margin-top: calc(var(--nav-height) + 20px); }
}
