/* ===== Liga bilardowa: tabela wynikow + historia meczow (wlasne, zamiast Tabulatora) ===== */
.link-accent { color: var(--forest-deep); border-bottom: 1px solid var(--gold); font-weight: 600; }
.link-accent:hover { color: var(--gold); }

.liga-card { background: #fff; border: 1px solid var(--line); border-radius: 3px; margin-top: 32px; overflow: hidden; box-shadow: 0 6px 22px rgba(14, 51, 41, 0.05); }
.liga-card-head { padding: 22px 26px; border-bottom: 1px solid var(--line); }
.liga-card-head h3 { margin: 0 0 6px; font-size: 1.3rem; }
.liga-note { margin: 0; font-size: 0.86rem; color: var(--graphite-soft); line-height: 1.55; }
.liga-scroll { overflow-x: auto; }

.liga-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.liga-table th { background: var(--forest); color: var(--cream); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; padding: 13px 14px; text-align: center; white-space: nowrap; }
.liga-table td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--line); color: var(--graphite); vertical-align: middle; }
.liga-table tbody tr:last-child td { border-bottom: 0; }
.liga-table tbody tr:hover { background: var(--cream-warm); }
.ta-left { text-align: left !important; }

.liga-pos { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.2rem; color: var(--forest); width: 56px; }
.liga-player { font-weight: 600; color: var(--forest-deep); white-space: nowrap; }
.liga-win { color: var(--forest); font-weight: 600; }
.liga-standings .is-podium { background: rgba(201, 169, 97, 0.07); }
.liga-standings .is-podium:hover { background: rgba(201, 169, 97, 0.12); }
.is-podium .liga-pos { font-style: normal; font-weight: 700; }
/* Ciemniejsze warianty zlota/srebra/brazu: oryginaly mialy 1.2-1.4:1 na jasnym tle (WCAG FAIL) */
.is-podium.pos-1 .liga-pos { color: var(--gold-text); }
.is-podium.pos-2 .liga-pos { color: #5F6771; }
.is-podium.pos-3 .liga-pos { color: #8A5A33; }

.liga-bar { display: inline-block; width: 60px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 9px; }
.liga-bar > span { display: block; height: 100%; background: var(--gold); }
.liga-bar-val { font-size: 0.82rem; color: var(--graphite-soft); }

.liga-match { white-space: nowrap; }
.liga-vs { color: var(--graphite-soft); font-size: 0.78rem; margin: 0 9px; }
.liga-date { color: var(--graphite-soft); font-size: 0.85rem; white-space: nowrap; }
.liga-score { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.2rem; color: var(--forest-deep); white-space: nowrap; }
.liga-phase { display: inline-block; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-text); border: 1px solid rgba(138, 106, 38, 0.5); border-radius: 999px; padding: 2px 11px; white-space: nowrap; }

.liga-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; padding: 20px; }
.liga-pager-btn { min-width: 38px; height: 38px; padding: 0 11px; border: 1px solid var(--line); background: #fff; color: var(--graphite); font-family: inherit; font-size: 0.9rem; cursor: pointer; border-radius: 2px; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.liga-pager-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--forest-deep); }
.liga-pager-btn.is-current { background: var(--forest); color: var(--cream); border-color: var(--forest-deep); }
.liga-pager-btn:disabled { opacity: 0.35; cursor: default; }
.liga-pager-gap { color: var(--graphite-soft); padding: 0 4px; }

@media (max-width: 560px) {
  .liga-card-head { padding: 18px 18px; }
  .liga-table { font-size: 0.84rem; }
  .liga-table th, .liga-table td { padding: 10px 10px; }
  .liga-bar { width: 40px; }
  .liga-pager-btn { min-width: 34px; height: 34px; }
}

/* Liga: ranking + historia obok siebie (2 kolumny) */
.liga-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; margin-top: 32px; }
.liga-grid .liga-card { margin-top: 0; display: flex; flex-direction: column; }
.liga-grid .liga-scroll { flex: 1 1 auto; }
.liga-rules-note { max-width: 640px; margin: 14px auto 0; font-size: 0.85rem; color: var(--graphite-soft); line-height: 1.55; }
.liga-grid .liga-table th, .liga-grid .liga-table td { padding: 10px 9px; }
.liga-grid .liga-table { font-size: 0.88rem; }
.liga-grid .liga-bar { width: 44px; margin-right: 7px; }
.liga-grid .liga-pos { width: 40px; font-size: 1.05rem; }
.liga-history .liga-match { white-space: nowrap; }
.liga-history .liga-vs { margin: 0 6px; }
.liga-expand { border-top: 1px solid var(--line); text-align: center; padding: 13px; }
.liga-expand-btn { background: none; border: 0; color: var(--forest-deep); font-family: inherit; font-size: 0.85rem; letter-spacing: 0.03em; cursor: pointer; padding: 6px 10px; transition: color 0.2s; }
.liga-expand-btn:hover { color: var(--gold); }
@media (max-width: 880px) {
  .liga-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ===== W okolicy: karty ze zdjeciem w zlotej ramce (hover-reveal + zoom) ===== */
.okolica-card { padding: 0; overflow: hidden; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition); }
.okolica-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.okolica-img { position: relative; overflow: hidden; aspect-ratio: 3 / 2; }
.okolica-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--transition); }
.okolica-card:hover .okolica-img img { transform: scale(1.06); }
.okolica-frame { position: absolute; inset: 12px; border: 1px solid rgba(201, 169, 97, 0.85); z-index: 2; pointer-events: none; }
.okolica-body { padding: 20px 22px 24px; }
.okolica-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.okolica-body p { color: var(--graphite-soft); font-size: 0.92rem; margin: 0; }

/* ============================================================
   BLOG: lista (rowna siatka kafli) + szablon artykulu
   ============================================================ */

/* --- Naglowek listy: ciemny pas (bez zdjecia), zeby fixed-header byl czytelny --- */
.blog-head { background: var(--forest); color: var(--cream); text-align: center; padding: 140px 0 64px; }
.blog-head .eyebrow { color: var(--gold-soft); display: block; margin-bottom: 14px; }
.blog-head h1 { color: var(--cream); margin-bottom: 16px; }
.blog-head-intro { max-width: 640px; margin: 0 auto; color: rgba(250, 247, 240, 0.85); font-size: 1.12rem; line-height: 1.6; }
.blog-head .btn { margin-top: 24px; }

/* --- Filtr kategorii --- */
.blog-list { padding: 64px 0 96px; }
.blog-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 56px; }
.blog-cat {
  font-family: 'Inter', sans-serif; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 100px; cursor: pointer;
  background: transparent; color: var(--graphite-soft); border: 1px solid var(--line);
  transition: all 0.25s var(--transition);
}
.blog-cat:hover { border-color: var(--gold); color: var(--forest); }
.blog-cat.is-active { background: var(--forest); color: var(--cream); border-color: var(--forest); }

/* --- Siatka rownych kafli --- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.blog-card { background: var(--cream); }
.blog-card[hidden] { display: none; }
.blog-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.blog-card-media { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--cream-warm); }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--transition); }
.blog-card-link:hover .blog-card-media img { transform: scale(1.06); }
.blog-card-frame {
  position: absolute; inset: 12px; border: 1px solid rgba(201, 169, 97, 0.85); z-index: 2; pointer-events: none;
  }
.blog-card-cat {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  font-family: 'Inter', sans-serif; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(14, 51, 41, 0.82); color: var(--gold-soft); padding: 6px 12px; border-radius: 100px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.blog-card-body { padding: 22px 2px 0; display: flex; flex-direction: column; flex: 1; }
.blog-card-title { font-size: 1.32rem; line-height: 1.25; margin-bottom: 10px; transition: color 0.25s var(--transition); }
.blog-card-link:hover .blog-card-title { color: var(--forest); }
.blog-card-excerpt { color: var(--graphite-soft); font-size: 0.92rem; line-height: 1.6; margin-bottom: 16px; }
.blog-card-meta { margin-top: auto; font-family: 'Inter', sans-serif; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--gold); text-transform: uppercase; }
.blog-empty { text-align: center; color: var(--graphite-soft); padding: 40px 0; }

/* --- Artykul: hero ze zdjeciem --- */
.article-hero { position: relative; min-height: 60vh; display: flex; align-items: flex-end; padding: 120px 0 56px; overflow: hidden; }
.article-hero-bg { position: absolute; inset: 0; z-index: 0; }
.article-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.article-hero::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.4) 55%, rgba(0,0,0,0.72) 100%); }
.article-hero-inner { position: relative; z-index: 2; color: var(--cream); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: 'Inter', sans-serif; font-size: 0.78rem; margin-bottom: 20px; }
.breadcrumb a { color: rgba(250, 247, 240, 0.82); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold-soft); }
.breadcrumb span { color: rgba(250, 247, 240, 0.5); }
.breadcrumb .breadcrumb-current { color: var(--gold-soft); }
.article-cat { display: inline-block; font-family: 'Inter', sans-serif; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 14px; }
.article-hero h1 { color: var(--cream); max-width: 900px; margin-bottom: 18px; text-shadow: 0 2px 18px rgba(0,0,0,0.4); }
.article-meta { font-family: 'Inter', sans-serif; font-size: 0.84rem; color: rgba(250, 247, 240, 0.85); letter-spacing: 0.03em; }

/* --- Artykul: tresc (kolumna do czytania) --- */
.article-body { padding: 64px 0 80px; }
.article-body > p { font-size: 1.08rem; line-height: 1.85; color: var(--graphite); margin-bottom: 26px; }
.article-body > p:first-of-type { font-size: 1.2rem; line-height: 1.7; color: var(--forest-deep); }
.article-h2 { font-size: 1.7rem; margin: 44px 0 18px; color: var(--forest-deep); }
.article-h3 { font-size: 1.3rem; margin: 32px 0 14px; color: var(--forest-deep); }
.article-list { margin: 0 0 26px; padding-left: 0; list-style: none; }
.article-list li { position: relative; padding-left: 28px; margin-bottom: 12px; font-size: 1.05rem; line-height: 1.7; color: var(--graphite); }
.article-list li::before { content: ''; position: absolute; left: 6px; top: 12px; width: 7px; height: 7px; background: var(--gold); border-radius: 50%; }
ol.article-list { counter-reset: art; }
ol.article-list li { counter-increment: art; padding-left: 38px; }
ol.article-list li::before { content: counter(art); top: 1px; left: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--forest); color: var(--cream); font-size: 0.74rem; font-family: 'Inter', sans-serif; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.article-quote { margin: 36px 0; padding: 6px 0 6px 28px; border-left: 3px solid var(--gold); font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; line-height: 1.45; font-style: italic; color: var(--forest-deep); }

/* inline CTA w srodku artykulu */
.article-cta { margin: 44px 0; padding: 32px 36px; background: var(--cream-warm); border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.article-cta-text h3 { font-size: 1.4rem; margin-bottom: 6px; color: var(--forest-deep); }
.article-cta-text p { color: var(--graphite-soft); font-size: 0.96rem; margin: 0; max-width: 480px; }
.article-cta .btn { white-space: nowrap; flex-shrink: 0; }

.article-back { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-back a { color: var(--forest); text-decoration: none; font-family: 'Inter', sans-serif; font-size: 0.9rem; letter-spacing: 0.04em; transition: color 0.2s; }
.article-back a:hover { color: var(--gold); }

.blog-related { padding: 80px 0; }

/* --- Responsywnosc bloga --- */
@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 680px) {
  .blog-head { padding: 120px 0 48px; }
  .blog-grid { grid-template-columns: 1fr; gap: 28px; }
  .blog-cats { margin-bottom: 40px; }
  .article-hero { min-height: 52vh; padding: 110px 0 40px; }
  .article-cta { flex-direction: column; align-items: flex-start; padding: 26px 24px; }
}

/* ===== Galeria: masonry + filtry kategorii + lightbox ===== */
.gallery-section { padding: 60px 0 88px; }
.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.gallery-chip { background: none; border: 1px solid var(--line); color: var(--graphite-soft); font-family: inherit; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: background 0.25s var(--transition), color 0.25s var(--transition), border-color 0.25s var(--transition); }
.gallery-chip:hover { border-color: var(--gold); color: var(--forest-deep); }
.gallery-chip.is-active { background: var(--forest); color: var(--cream); border-color: var(--forest-deep); }

.gallery-grid { column-count: 4; column-gap: 16px; }
.gallery-item { break-inside: avoid; margin: 0 0 16px; }
.gallery-link { display: block; position: relative; overflow: hidden; cursor: pointer; background: var(--cream-warm); }
.gallery-link img { display: block; width: 100%; height: auto; transition: transform 0.6s var(--transition); }
.gallery-link:hover img { transform: scale(1.05); }
.gallery-frame { position: absolute; inset: 10px; border: 1px solid rgba(201, 169, 97, 0.85); pointer-events: none; }
.gallery-item.is-hidden { display: none; }
@media (max-width: 1100px) { .gallery-grid { column-count: 3; } }
@media (max-width: 720px)  { .gallery-grid { column-count: 2; } }
@media (max-width: 440px)  { .gallery-grid { column-count: 1; } }

.lightbox { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; background: rgba(8, 20, 16, 0.94); opacity: 0; transition: opacity 0.3s ease; }
.lightbox.open { display: flex; opacity: 1; }
.lightbox-stage { margin: 0; max-width: 90vw; max-height: 86vh; display: flex; align-items: center; justify-content: center; }
.lightbox-stage img { max-width: 90vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5); }
.lightbox-close, .lightbox-nav { position: absolute; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(250, 247, 240, 0.3); color: var(--cream); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.lightbox-close { top: 22px; right: 22px; width: 46px; height: 46px; border-radius: 50%; }
.lightbox-close svg { width: 22px; height: 22px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; }
.lightbox-nav svg { width: 26px; height: 26px; }
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--gold); border-color: var(--gold); color: var(--forest-deep); }
.lightbox-counter { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(250, 247, 240, 0.8); font-size: 0.85rem; letter-spacing: 0.08em; }
@media (max-width: 560px) {
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-prev { left: 10px; } .lightbox-next { right: 10px; }
  .lightbox-close { top: 14px; right: 14px; }
}
