/* ========== CID barvy Matcha Tea (manuál 2021) ========== */
:root {
    --matcha-light: #76B729;
    --matcha-dark: #387931;
    --matcha-night: #1C3318;
    --violet: #B8338B;
    --pink: #F087B6;
    --bg: #F7F9F4;
    --bg-card: #FFFFFF;
    --text: #1C3318;
    --text-muted: #6B7568;
    --border: #E5EAE1;
    --shadow: 0 2px 10px rgba(28, 51, 24, 0.06);
    --shadow-hover: 0 6px 24px rgba(28, 51, 24, 0.12);
    --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--matcha-dark);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== HERO ========== */
.hero {
    color: #fff;
    padding: 60px 24px 110px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 580px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.club-logo-band {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    padding: 0 16px 24px;
    margin-top: -76px;
    position: relative;
    z-index: 3;
}
.club-logo-band-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 12px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(28, 51, 24, 0.25);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 3px solid #fff;
}
.club-logo-band-link img {
    width: 128px;
    height: 128px;
    object-fit: contain;
    display: block;
}
.club-logo-band-link:hover {
    transform: scale(1.05);
    box-shadow: 0 14px 36px rgba(28, 51, 24, 0.35);
    text-decoration: none;
}
.hero-club-logo img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    display: block;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    text-decoration: none;
}
.hero-bg picture,
.hero-bg img {
    display: block;
    width: 100%;
    height: 100%;
}
.hero-bg img {
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.4s ease;
}
.hero-bg:hover img {
    transform: scale(1.02);
}
.hero-inner {
    pointer-events: none;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg,
            rgba(28, 51, 24, 0.25) 0%,
            rgba(28, 51, 24, 0.35) 45%,
            rgba(28, 51, 24, 0.75) 100%);
    pointer-events: none;
}
.hero-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}
.hero-text {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}
.hero-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    background: rgba(118, 183, 41, 0.95);
    color: var(--matcha-night);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 14px;
    text-shadow: none;
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.hero .tagline {
    font-size: 1.15rem;
    opacity: 0.95;
    margin: 0;
    font-weight: 500;
}
.hero .last-sync {
    font-size: 0.88rem;
    opacity: 0.92;
    margin: 4px 0 0;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* ========== SPONZOŘI (samostatná sekce) ========== */
.sponsors-strip {
    background: #fff;
    padding: 48px 24px 52px;
    border-bottom: 4px solid var(--matcha-light);
    position: relative;
}
.sponsors-title {
    margin: 0 0 28px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--matcha-dark);
}
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.sponsor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 32px 24px 24px;
    border-radius: 16px;
    background: #fff;
    border: 2px solid var(--border);
    transition: all 0.18s ease;
    color: var(--matcha-night);
}
.sponsor-card:hover {
    transform: translateY(-4px);
    border-color: var(--matcha-light);
    box-shadow: 0 12px 40px rgba(118, 183, 41, 0.18);
    text-decoration: none;
}
.sponsor-logo-wrap {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    width: 100%;
}
.sponsor-logo-wrap img {
    max-height: 140px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}
.sponsor-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--matcha-night);
    margin-bottom: 4px;
}
.sponsor-card-url {
    font-size: 0.88rem;
    color: var(--matcha-dark);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.sponsor-card:hover .sponsor-card-url {
    color: var(--matcha-light);
}

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: 6px;
}
.pill-ok {
    background: var(--matcha-light);
    color: var(--matcha-night);
}
.pill-err {
    background: var(--violet);
    color: #fff;
}

/* ========== PANELY ========== */
main.container {
    padding-top: 40px;
    padding-bottom: 40px;
}
.panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 28px 32px;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}
.panel h2 {
    margin: 0 0 20px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--matcha-night);
    border-left: 4px solid var(--matcha-light);
    padding-left: 12px;
}
.panel h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--matcha-night);
}
.panel h4 {
    margin: 24px 0 12px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--matcha-dark);
    font-weight: 700;
}
.empty {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

/* ========== MATCH CARDS (nejbližší / poslední) ========== */
.match-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}
.match-card {
    background: var(--bg);
    border-left: 4px solid var(--matcha-light);
    border-radius: 8px;
    padding: 14px 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.match-card.home { border-left-color: var(--matcha-light); }
.match-card.away { border-left-color: var(--violet); }

.match-competition-badge {
    display: inline-block;
    background: var(--matcha-night);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 10px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.match-when {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.match-when .weekday {
    background: var(--matcha-night);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}
.match-when .date {
    font-weight: 600;
    color: var(--text);
}
.match-when .time {
    font-weight: 600;
    color: var(--matcha-dark);
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.match-teams .team {
    flex: 1;
    min-width: 100px;
    font-size: 0.95rem;
    line-height: 1.3;
}
.match-teams .team-votocek {
    font-weight: 700;
    color: var(--matcha-night);
}
.match-teams .versus {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0 2px;
}
.score-box {
    background: var(--matcha-night);
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 48px;
    text-align: center;
}

.match-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.match-meta .venue {
    color: var(--matcha-dark);
}

.match-card.result-win { border-left-color: var(--matcha-light); }
.match-card.result-draw { border-left-color: #C9A74C; }
.match-card.result-loss { border-left-color: var(--violet); }

.result-label { font-weight: 700; }
.result-label-win { color: var(--matcha-dark); }
.result-label-draw { color: #9A7D2F; }
.result-label-loss { color: var(--violet); }

/* ========== TABS ========== */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}
.tab-btn {
    background: transparent;
    border: 0;
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s ease;
    position: relative;
    bottom: -2px;
    border-bottom: 3px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tab-btn:hover {
    color: var(--matcha-dark);
    background: var(--bg);
}
.tab-btn.active {
    color: var(--matcha-night);
    border-bottom-color: var(--matcha-light);
    background: var(--bg);
}
.tab-badge {
    background: var(--matcha-light);
    color: var(--matcha-night);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 100px;
    font-weight: 700;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
    flex-wrap: wrap;
}
.source-link {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.notice {
    background: rgba(184, 51, 139, 0.08);
    border-left: 3px solid var(--violet);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 12px 0;
    color: var(--text);
}

/* ========== TABULKY ========== */
.standings-wrap, .matches-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.standings, .matches-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.standings th, .standings td,
.matches-table th, .matches-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.standings th, .matches-table th {
    background: var(--matcha-night);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}
.standings tbody tr:last-child td,
.matches-table tbody tr:last-child td {
    border-bottom: 0;
}
.standings tbody tr:hover,
.matches-table tbody tr:hover {
    background: rgba(118, 183, 41, 0.06);
}
.row-votocek {
    background: rgba(118, 183, 41, 0.14) !important;
}
.row-votocek td {
    font-weight: 600;
}
.team-votocek-row {
    color: var(--matcha-night);
}

.center { text-align: center !important; }
.bold { font-weight: 700; }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-muted); }

.score-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.88rem;
    min-width: 44px;
}
.score-pill.win {
    background: var(--matcha-light);
    color: var(--matcha-night);
}
.score-pill.draw {
    background: #E8D583;
    color: #5C4A14;
}
.score-pill.loss {
    background: var(--pink);
    color: var(--matcha-night);
}
.score-pill.upcoming {
    background: var(--border);
    color: var(--text-muted);
}

/* ========== FOOTER ========== */
footer {
    background: var(--matcha-night);
    color: #fff;
    padding: 28px 0;
    margin-top: 40px;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    text-align: center;
}
.footer-sync {
    font-size: 0.85rem;
}
.footer-sync .pill {
    vertical-align: middle;
}
footer .muted { color: rgba(255, 255, 255, 0.7); }
footer a { color: var(--matcha-light); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .hero {
        display: block;
        padding: 0;
        min-height: 0;
    }
    .hero-bg {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 2482 / 1022;
        overflow: hidden;
    }
    .hero-bg img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
    .hero-overlay {
        background: linear-gradient(180deg,
            rgba(28, 51, 24, 0) 60%,
            rgba(28, 51, 24, 0.35) 100%);
    }
    .hero-inner {
        background: linear-gradient(135deg, var(--matcha-dark) 0%, var(--matcha-night) 100%);
        padding: 28px 16px 30px;
        gap: 14px;
    }
    .hero h1 { font-size: 1.85rem; }
    .hero .tagline { font-size: 0.98rem; }
    .hero-eyebrow { font-size: 0.72rem; padding: 4px 12px; }
    .club-logo-band {
        padding: 0 14px;
        margin-top: -40px;
    }
    .club-logo-band-link {
        padding: 9px;
        border-radius: 14px;
    }
    .club-logo-band-link img {
        width: 96px;
        height: 96px;
    }

    .sponsors-strip { padding: 36px 16px 40px; }
    .sponsors-title { margin-bottom: 22px; font-size: 0.82rem; letter-spacing: 0.18em; }
    .sponsors-grid { gap: 14px; }
    .sponsor-card { padding: 24px 16px 18px; }
    .sponsor-logo-wrap { height: 100px; margin-bottom: 14px; }
    .sponsor-logo-wrap img { max-height: 100px; }
    .sponsor-card-name { font-size: 1rem; }
    .sponsor-card-url { font-size: 0.82rem; }

    .container { padding: 0 16px; }
    .panel { padding: 20px 18px 24px; }
    .match-cards { grid-template-columns: 1fr; }
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.82rem;
    }
    .tab-btn .tab-badge { display: none; }
    .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
    .hero-inner { padding: 24px 14px 26px; }
    .hero h1 { font-size: 1.55rem; }
    .hero .tagline { font-size: 0.9rem; }
    .club-logo-band { margin-top: -34px; }
    .club-logo-band-link img { width: 84px; height: 84px; }
    .club-logo-band-link { padding: 8px; border-radius: 12px; }

    .sponsors-grid { grid-template-columns: 1fr; gap: 14px; max-width: 360px; }
    .sponsor-card { padding: 22px 18px 18px; }
    .sponsor-logo-wrap { height: 110px; }
    .sponsor-logo-wrap img { max-height: 110px; }

    .standings th, .matches-table th,
    .standings td, .matches-table td {
        padding: 8px 6px;
        font-size: 0.82rem;
    }
}
