/* ================================================================
   MKS KORSZE — template.css v8.0
   Design: Professional football club, inspired by lechia.pl
   Fonts: Oswald (headings) + Inter (body)
   Colors: green #006B3C, red #C8102E, white #fff
================================================================ */
:root {
    --green:     #006B3C;
    --green-dk:  #004d2a;
    --green-lt:  #e8f5ee;
    --red:       #C8102E;
    --red-dk:    #a00e24;
    --dark:      #0f0f0f;
    --dark2:     #141414;
    --dark3:     #1a1a1a;
    --dark4:     #222;
    --white:     #fff;
    --bg:        #f4f5f7;
    --border:    #e2e6ea;
    --text:      #1a1a1a;
    --muted:     #6b7280;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-head: 'Oswald', 'Inter', system-ui, sans-serif;
    --hdr-h:     84px;
    --wrap:      1240px;
    --r:         6px;
    --t:         .2s ease;
    --shadow:    0 2px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--green-dk); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); line-height: 1.15; }

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

/* ════════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--green-dk) 0%, var(--green) 100%);
    border-bottom: 4px solid var(--red);
    box-shadow: 0 4px 24px rgba(0,0,0,.4);
    overflow: visible; /* allow crest to overflow below */
}

.hdr {
    display: flex;
    align-items: center;
    height: var(--hdr-h);
    gap: 20px;
    padding-left: 16px; /* extra space so herb doesn't touch the edge */
}

/* Logo — large overflowing crest */
.hdr__logo {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    text-decoration: none;
    position: relative;
    z-index: 2;
}
.hdr__logo img {
    width: 132px;
    height: 132px;
    object-fit: contain;
    /* shift down so herb overflows below, not above */
    position: relative;
    top: 26px;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,.55));
    flex-shrink: 0;
}
.hdr__logo-text strong {
    display: block;
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hdr__logo-text span {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    color: rgba(255,255,255,.7);
    text-transform: uppercase;
    letter-spacing: .18em;
    margin-top: 5px;
}

/* Nav */
.hdr__nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.hdr__nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hdr__nav ul li a,
.hdr__nav ul li span {
    display: block;
    padding: 9px 18px;
    font-family: var(--font-head);
    font-size: .85rem;
    font-weight: 500;
    color: rgba(255,255,255,.92);
    text-transform: uppercase;
    letter-spacing: .08em;
    border-radius: 5px;
    background: rgba(0,0,0,.25);
    transition: color var(--t), background var(--t);
    cursor: pointer;
}
.hdr__nav ul li a:hover,
.hdr__nav ul li span:hover {
    color: #fff;
    background: rgba(0,0,0,.45);
}
.hdr__nav ul li.active > a,
.hdr__nav ul li.current > a {
    color: #fff;
    background: rgba(0,0,0,.5);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.hdr__nav ul li span { color: rgba(255,255,255,.45); cursor: default; }
.hdr__nav ul li span:hover { background: rgba(0,0,0,.25); }

/* Hamburger */
.hdr__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 8px;
    flex-shrink: 0;
}
.hdr__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform var(--t), opacity var(--t);
}
.hdr__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hdr__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hdr__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 68vh;
    display: flex;
    align-items: flex-end;
    /* background-image set inline from PHP */
    background-color: var(--dark);
}

.hero__inner {
    padding-bottom: 0;
    padding-top: 50px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.hero__content {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    max-width: 680px;
    padding-bottom: 15px;
}

/* Karty meczowe wewnątrz hero */
.hero__matches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px 0 28px;
    border-top: 1px solid rgba(255,255,255,.15);
}


.hero__match-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: .7rem;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 10px;
}

.hero__crest {
    width: 90px;
    height: 90px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.5));
}

.hero__league {
    font-family: var(--font-body);
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255,255,255,.55);
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 10px;
}

.hero__title {
    font-family: var(--font-head);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 400;
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1;
    margin-bottom: 12px;
    transition: opacity 1.5s ease;
}
.hero__title strong {
    font-weight: 700;
    color: #fff;
}

.hero__sub {
    font-size: .95rem;
    color: rgba(255,255,255,.85);
    letter-spacing: .04em;
}

.match-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.match-card__dot--gray  { background: #888; }
.match-card__dot--green { background: var(--green); box-shadow: 0 0 6px var(--green); }

/* ════════════════════════════════════════════════════════════
   MATCH CARD — moduły wyniki / terminarz
════════════════════════════════════════════════════════════ */
.mks-match-card {
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 16px 20px 12px;
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: 0 4px 24px rgba(0,0,0,.2);
}

.mks-match-card__fixture {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mks-match-card__team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.mks-match-card__crest {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mks-match-card__crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255,255,255,.95)) drop-shadow(0 0 22px rgba(255,255,255,.6)) drop-shadow(0 0 40px rgba(255,255,255,.3));
}
.mks-match-card__crest-ph {
    width: 36px;
    height: 36px;
    background: #d1d5db;
    border-radius: 50%;
    display: block;
}

.mks-match-card__name {
    font-family: var(--font-head);
    font-size: .72rem;
    font-weight: 500;
    color: rgba(255,255,255,.9);
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.2;
}
.mks-match-card__name--ours {
    color: #6ee7a0;
    font-weight: 700;
}

.mks-match-card__score {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    min-width: 70px;
    justify-content: center;
    color: #fff;
}
.mks-match-card__score-sep {
    color: rgba(255,255,255,.5);
    font-size: 1.6rem;
}
.mks-match-card__score--vs {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255,255,255,.8);
    letter-spacing: .08em;
    min-width: 40px;
}

.mks-match-card__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.2);
    font-size: .72rem;
    color: rgba(255,255,255,.7);
    font-weight: 500;
    letter-spacing: .04em;
}
.mks-match-card__meta span + span::before {
    content: '·';
    margin-right: 10px;
    color: rgba(255,255,255,.4);
}

.mks-match-card__goals {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    justify-content: center;
}
.mks-match-card__goals span {
    font-size: .7rem;
    color: #6ee7a0;
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   SCHEDULE — mod_liga_terminarz
════════════════════════════════════════════════════════════ */

/* Wrapper sekcji — identyczny z mks-stat-wrap */
.mks-schedule-section {
    max-width: 70%;
    margin-top: 56px;
    margin-left: auto;
    margin-right: auto;
}

/* Collapsible: details/summary owijające section-header */
.mks-schedule-details { border: none; }
.mks-schedule-details > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.mks-schedule-details > summary::-webkit-details-marker { display: none; }
/* Nagłówek sekcji (section-header) jako toggle */
.mks-schedule-details .section-header {
    justify-content: space-between;
}
.mks-schedule-details .section-header:hover .section-header__title {
    color: var(--green-dk);
}
.mks-schedule-chevron {
    width: 11px;
    height: 11px;
    border-right: 2.5px solid var(--green);
    border-bottom: 2.5px solid var(--green);
    transform: rotate(45deg) translateY(-3px);
    transition: transform .2s;
    flex-shrink: 0;
    margin-left: auto;
    margin-bottom: 4px;
}
.mks-schedule-details[open] .mks-schedule-chevron {
    transform: rotate(-135deg) translateY(-3px);
}

/* Lista meczów */
.mks-schedule {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 12px;
}
.mks-schedule__match {
    background: var(--bg);
    border-radius: 6px;
    padding: 7px 10px;
    border-left: 3px solid var(--border);
}
.mks-schedule__match--win  { border-left-color: #16a34a; }
.mks-schedule__match--draw { border-left-color: #d97706; }
.mks-schedule__match--loss { border-left-color: #dc2626; }
.mks-schedule__round {
    font-size: .58rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 3px;
}
.mks-schedule__fixture {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mks-schedule__team {
    flex: 1;
    font-family: var(--font-head);
    font-size: 25px;
    font-weight: 400;
    letter-spacing: .02em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.mks-schedule__team--home { text-align: right; }
.mks-schedule__team--away { text-align: left; }
.mks-schedule__team--ours { color: var(--green); font-weight: 700; }
.mks-schedule__crest {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mks-schedule__crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.mks-schedule__score {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    font-family: var(--font-head);
    font-size: 25px;
    font-weight: 700;
    color: var(--text);
}
.mks-schedule__score-sep {
    color: var(--muted);
    margin: 0 1px;
}
.mks-schedule__score--vs {
    font-size: 25px;
    color: var(--muted);
    font-weight: 400;
}
.mks-schedule__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    font-size: .6rem;
    color: var(--muted);
    margin-top: 2px;
}
.mks-schedule__stats {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mks-schedule__goals,
.mks-schedule__cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1px 8px;
}
.mks-schedule__goals span {
    font-size: .65rem;
    color: #166534;
    font-weight: 600;
}
.mks-schedule__cards span {
    font-size: .65rem;
    color: #92400e;
    font-weight: 600;
}
.mks-schedule__cards span.red { color: #991b1b; }

/* Match result card content */
.match-result__teams {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}
.match-result__team {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.match-result__score {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .04em;
    padding: 2px 14px;
    background: rgba(255,255,255,.06);
    border-radius: 4px;
    white-space: nowrap;
}
.match-result__meta {
    font-size: .75rem;
    color: rgba(255,255,255,.35);
    letter-spacing: .04em;
}

/* Next match card content */
.match-next__teams {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}
.match-next__team {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.match-next__vs {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: .1em;
    padding: 2px 12px;
    border: 1px solid var(--green);
    border-radius: 4px;
}
.match-next__meta {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    letter-spacing: .04em;
    margin-bottom: 4px;
}
.match-next__venue {
    font-size: .72rem;
    color: rgba(255,255,255,.3);
}

/* ════════════════════════════════════════════════════════════
   SECTION HEADERS
════════════════════════════════════════════════════════════ */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}
.section-header--dark {
    border-bottom-color: rgba(255,255,255,.1);
}
.section-header__title {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--dark);
    position: relative;
}
.section-header__title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--green);
    border-radius: 2px;
    margin-top: 6px;
}
.section-header--dark .section-header__title { color: #fff; }
.section-header__more {
    font-size: .8rem;
    font-weight: 600;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
}
.section-header__more:hover { color: var(--green-dk); }
.section-header__sub {
    font-size: .78rem;
    color: rgba(255,255,255,.4);
    font-weight: 500;
    letter-spacing: .06em;
}

/* ════════════════════════════════════════════════════════════
   NEWS SECTION
════════════════════════════════════════════════════════════ */
.news-section {
    background: var(--bg);
    padding: 64px 0;
}

/* News grid — com_content blog override outputs .news-grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: var(--white);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--t), box-shadow var(--t);
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.news-card__img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--dark3);
    position: relative;
}
.news-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.news-card:hover .news-card__img img { transform: scale(1.04); }
.news-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark3) 0%, var(--dark4) 100%);
}
.news-card__img-placeholder span {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255,255,255,.15);
    text-transform: uppercase;
    letter-spacing: .1em;
}

.news-card__body {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-card__cat {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 8px;
}
.news-card__title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.3;
    margin-bottom: 10px;
    flex: 1;
}
.news-card__title a { color: inherit; }
.news-card__title a:hover { color: var(--green); }
.news-card__intro {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card__meta {
    font-size: .72rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.news-card__readmore {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: .08em;
    transition: gap var(--t);
}
.news-card__readmore:hover { gap: 8px; color: var(--green-dk); }

/* Joomla default blog layout fallback */
.items-leading, .items-row { margin-bottom: 0; }

/* ════════════════════════════════════════════════════════════
   TABLE SECTION
════════════════════════════════════════════════════════════ */
.table-section {
    background: var(--white);
    padding: 64px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.table-section .section-header__title { color: var(--green); }
.table-section .section-header__title::after { background: var(--green); }
.table-section .section-header { border-bottom-color: var(--border); }
.table-section .section-header__sub { color: var(--muted); }

/* ── Liga tabela (nowy styl) ── */
.lt-wrap { overflow-x: auto; }

.lt {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    color: var(--text);
}

.lt thead tr {
    border-bottom: 3px solid var(--red);
}
.lt thead th {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 12px;
    text-align: center;
    white-space: nowrap;
}
.lt thead th.lt__team { text-align: left; }
.lt thead th.lt__pos  { text-align: center; width: 36px; }

.lt tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--t);
}
.lt tbody tr:last-child { border-bottom: none; }
.lt tbody tr:hover td { background: #f0fdf4; }

.lt td {
    padding: 11px 12px;
    text-align: center;
    vertical-align: middle;
}
.lt__pos {
    width: 36px;
    font-weight: 600;
    color: var(--muted);
    font-size: .82rem;
}
.lt .lt__team {
    text-align: left;
}
.lt__herb {
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
    margin-right: 8px;
    background: transparent !important;
}
.lt__name, .lt__pkt, .lt__num, .lt__bilans, .lt__pos { font-size: 25px; }
.lt__name {
    font-family: var(--font-head);
    font-weight: 400;
    letter-spacing: .02em;
    white-space: nowrap;
    vertical-align: middle;
    background: transparent !important;
}
.lt__pkt {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--text);
}
.lt__num, .lt__bilans { color: #374151; }
.lt__bilans { color: var(--muted); }
.lt__herb { min-width: 32px; min-height: 32px; width: 32px; height: 32px; }

/* Nazwa sezonu nad tabelą */
.lt__sezon { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase;
             letter-spacing: .04em; padding: 0 0 .5rem; }
.lt__sezon small { display: block; font-weight: 400; font-size: .75rem; }

/* Lider */
.lt__row--leader td { background: rgba(0,107,60,.08); }
.lt__row--leader:hover td { background: rgba(0,107,60,.14) !important; }

/* Strefa awansu */
.lt__row--promotion td { background: rgba(0,107,60,.10); }
.lt__row--promotion:hover td { background: rgba(0,107,60,.17) !important; }

/* Zagrożeni spadkiem */
.lt__row--danger td { background: rgba(200,16,46,.07); }
.lt__row--danger:hover td { background: rgba(200,16,46,.13) !important; }

/* Nasz wiersz — ciemnozielony jak Lechia */
.lt__row--ours {
    border-bottom-color: var(--green-dk) !important;
}
.lt__row--ours td {
    background: var(--green) !important;
    color: #fff !important;
}
.lt__row--ours:hover td { background: var(--green-dk) !important; }
.lt__row--ours .lt__pkt { color: #fff !important; }
.lt__row--ours .lt__pos,
.lt__row--ours .lt__bilans,
.lt__row--ours .lt__num { color: rgba(255,255,255,.85) !important; }
.lt__row--ours .lt__name { font-weight: 700; }

/* ════════════════════════════════════════════════════════════
   STATYSTYKI MODULE
════════════════════════════════════════════════════════════ */
.mks-stat-wrap {
    max-width: 70%;
    margin-top: 56px;
    margin-left: auto;
    margin-right: auto;
}

.mks-stat__tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 12px;
    gap: 2px;
}
.mks-stat__tab {
    flex: 1;
    padding: 8px 4px;
    font-family: var(--font-head);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color var(--t), border-color var(--t);
}
.mks-stat__tab:hover { color: var(--text); }
.mks-stat__tab--active { color: var(--green); border-bottom-color: var(--green); }

.mks-stat__panel--hidden { display: none; }

.mks-stat__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
}
.mks-stat__row:last-child { border-bottom: none; }
.mks-stat__pos {
    width: 20px;
    text-align: right;
    color: var(--muted);
    font-size: .8rem;
    flex-shrink: 0;
}
.mks-stat__name {
    flex: 1;
    font-family: var(--font-head);
    font-weight: 400;
    font-size: 25px;
}
.mks-stat__name small { color: var(--muted); font-weight: 400; font-size: 20px; }
.mks-stat__val {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 25px;
    flex-shrink: 0;
}
.mks-stat__pos { font-size: 25px; width: 30px; }
.mks-stat__val--green { color: var(--green); }
.mks-stat__val--yellow { color: #d97706; }
.mks-stat__val--red    { color: var(--red); }
.mks-stat__empty { color: var(--muted); font-size: .85rem; padding: 8px 0; margin: 0; }

/* ════════════════════════════════════════════════════════════
   SPONSORS SECTION
════════════════════════════════════════════════════════════ */
.sponsors-section {
    background: var(--white);
    padding: 48px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.sponsors-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
}
.sponsors-list p {
    width: 100%;
    text-align: center;
}
.sponsors-list img {
    max-width: 100%;
    height: auto;
    opacity: .9;
    transition: opacity var(--t);
}
.sponsors-list img:hover {
    opacity: 1;
}

/* ════════════════════════════════════════════════════════════
   SOCIAL BAR
════════════════════════════════════════════════════════════ */
.social-bar {
    background: var(--green);
    padding: 28px 0;
}
.social-bar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px 32px;
}
.social-bar__label {
    color: rgba(255,255,255,.75);
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0;
}
.social-bar__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.social-bar__link {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .05em;
    padding: 10px 22px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,.35);
    transition: background .2s, border-color .2s, transform .15s;
}
.social-bar__link:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.7);
    transform: translateY(-2px);
}

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--dark);
    border-top: 3px solid var(--green);
    padding: 48px 0 0;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer__col--center { text-align: center; }

/* Tekst w stopce */
.site-footer,
.site-footer p,
.site-footer a,
.site-footer li {
    color: rgba(255,255,255,.65);
    font-size: .88rem;
    line-height: 1.7;
}
.site-footer a:hover { color: #fff; }
.site-footer strong,
.site-footer h3,
.site-footer h4 {
    display: block;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 14px;
}

/* Menu w stopce (footer-center) */
.footer__col--center ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer__col--center ul li a {
    display: inline-block;
    padding: 3px 0;
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .06em;
    color: rgba(255,255,255,.55);
    transition: color var(--t);
}
.footer__col--center ul li a:hover { color: #fff; }
.footer__col--center ul li.active > a,
.footer__col--center ul li.current > a { color: var(--green); }

/* Pasek copyright */
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 14px 0;
    font-size: .72rem;
    color: rgba(255,255,255,.25);
    letter-spacing: .06em;
}

/* ════════════════════════════════════════════════════════════
   JOOMLA COMPONENT — article view styles
════════════════════════════════════════════════════════════ */
.item-page h1, .item-page h2, .item-page h3 { font-family: var(--font-head); }

.blog-featured, .blog-items { margin: 0; }

/* ════════════════════════════════════════════════════════════
   SYSTEM MESSAGES
════════════════════════════════════════════════════════════ */
.system-message-container { margin-bottom: 20px; }
.alert { padding: 12px 18px; border-radius: var(--r); margin-bottom: 12px; font-size: .88rem; }
.alert-success { background: var(--green-lt); color: var(--green-dk); border: 1px solid #b2dcc4; }
.alert-warning { background: #fff8e1; color: #7a6000; border: 1px solid #ffe082; }
.alert-error   { background: #fff0f1; color: #a00; border: 1px solid #f5b7bb; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet ≤900px
════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .match-card { padding: 22px 24px; }
    .match-result__score { font-size: 1.5rem; }
    .match-result__team,
    .match-next__team { font-size: .95rem; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile ≤660px
════════════════════════════════════════════════════════════ */
@media (max-width: 660px) {
    .wrap { padding: 0 16px; }

    /* Header */
    .hdr__nav { display: none; flex-direction: column; position: absolute; top: var(--hdr-h); left: 0; right: 0; background: var(--green-dk); padding: 12px 0 20px; border-bottom: 3px solid rgba(0,0,0,.3); z-index: 999; }
    .hdr__nav.is-open { display: flex; }
    .hdr__nav ul { flex-direction: column; gap: 0; width: 100%; }
    .hdr__nav ul li a, .hdr__nav ul li span { border-radius: 0; padding: 12px 20px; font-size: .9rem; background: transparent; }
    .hdr__burger { display: flex; }
    .site-header { position: relative; overflow: visible; }

    /* Hero */
    .hero { min-height: 55vh; }
    .hero__inner { padding-bottom: 48px; padding-top: 30px; }
    .hero__content { gap: 18px; }
    .hero__crest { width: 60px; height: 60px; }
    /* Logo on mobile — smaller overflowing crest */
    .hdr__logo img { width: 72px; height: 72px; top: 14px; }
    .hdr__logo-text strong { font-size: 1.4rem; }
    .hdr__logo-text span { display: none; } /* ukryj długi podtytuł na mobile */
    .hero__title { font-size: clamp(2.2rem, 10vw, 3.5rem); }

    /* Matches */
    .hero__matches { grid-template-columns: 1fr; gap: 12px; }

    /* News */
    .news-section { padding: 44px 0; }
    .news-grid { grid-template-columns: 1fr; }
    .section-header { flex-direction: column; gap: 8px; align-items: flex-start; }

    /* Table */
    .table-section { padding: 44px 0; }
    .mks-stat-wrap { max-width: 100%; margin-top: 40px; }
    .mks-schedule-section { max-width: 100%; margin-top: 40px; }
    .lt--hide-sm { display: none; }
    .lt thead th { font-size: 13px; padding: 6px 5px; }
    .lt td { padding: 8px 5px; }
    .lt__name { font-size: 14px; }
    .mks-schedule__team { font-size: 14px; }
    .mks-schedule__score { font-size: 14px; width: 46px; }
    .mks-schedule__score--vs { font-size: 14px; }
    .lt__pkt, .lt__num, .lt__pos, .lt__bilans { font-size: 14px; }
    .lt__herb { min-width: 20px; min-height: 20px; width: 20px; height: 20px; }

    /* Footer */
    .footer__inner { grid-template-columns: 1fr; gap: 28px; }
    .footer__col--center { text-align: left; }
}

/* ================================================================
   PAGINACJA
   ================================================================ */
.mks-pagination { margin: 32px 0 8px; }
.mks-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
}
.mks-pagination li a,
.mks-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 2px solid var(--green);
    border-radius: 4px;
    color: var(--green);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.mks-pagination li a:hover {
    background: var(--green);
    color: #fff;
}
.mks-pagination li.active a {
    background: var(--green);
    color: #fff;
    pointer-events: none;
}
.mks-pagination li.disabled span {
    border-color: #ccc;
    color: #aaa;
}

/* ================================================================
   POJEDYNCZY ARTYKUŁ
   ================================================================ */
.mks-article-wrap {
    max-width: 100%;
}
.mks-article {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
    overflow: hidden;
    margin-bottom: 32px;
}
.mks-article__hero-img img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}
.mks-article__inner {
    padding: 36px 40px 40px;
}
.mks-article__title {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 12px;
    line-height: 1.2;
}
.mks-article__meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.mks-article__cat {
    background: var(--green);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.mks-article__body {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
}
.mks-article__body p { margin: 0 0 1em; }
.mks-article__body img { max-width: 100%; height: auto; border-radius: 6px; }
.mks-article__body a { color: var(--green); }

/* Nawigacja prev/next artykułu */
.mks-article-nav { margin-top: 8px; }
.mks-article-nav .pager {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mks-article-nav .pager__next { margin-left: auto; }
.mks-article-nav .pager li a,
.mks-article-nav .pager__prev a,
.mks-article-nav .pager__next a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid var(--green);
    border-radius: 6px;
    color: var(--green);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.mks-article-nav .pager li a:hover,
.mks-article-nav .pager__prev a:hover,
.mks-article-nav .pager__next a:hover {
    background: var(--green);
    color: #fff;
}

@media (max-width: 600px) {
    .mks-article__inner { padding: 24px 20px 28px; }
    .mks-article-nav .pager { flex-direction: column; }
}

/* ================================================================
   DOSTĘPNOŚĆ
   ================================================================ */

/* Skip link — widoczny tylko przy nawigacji klawiaturą */
.skip-link {
    position: absolute;
    top: -100%;
    left: 12px;
    z-index: 10000;
    padding: 10px 20px;
    background: var(--green);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .95rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top .15s;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Widoczny focus dla nawigacji klawiaturą */
:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 3px;
    border-radius: 2px;
}
/* W ciemnym tle (hero, header, footer) — biały outline */
.hero :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible,
.social-bar :focus-visible {
    outline-color: #fff;
}
/* Elementy które mają własny styl hover — nie nadpisuj ich */
.news-card__readmore:focus-visible,
.mks-pagination li a:focus-visible,
.mks-article-nav .pager__prev a:focus-visible,
.mks-article-nav .pager__next a:focus-visible {
    outline-offset: 4px;
}
