/* style.css - WERSJA MOBILE PERFECT (FIXED CENTERING & RESPONSIVE) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Teko:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #ff5100;
    --primary-glow: rgba(255, 81, 0, 0.7);
    --bg-dark: #0a0a0a;
    --bg-panel: #141414;
    --text-light: #ffffff;
    --text-grey: #b3b3b3;
    --transition-speed: 0.2s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
}

/* --- TYPOGRAFIA --- */
h1, h2, h3, .logo, .nav-links a, .hero-title, .btn, .tab-btn, thead th {
    font-family: 'Teko', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- NAV --- */
header {
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 15px var(--primary-glow);
}

.logo span { 
    background: linear-gradient(90deg, #fff 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a {
    color: #fff; text-decoration: none; font-size: 1.4rem; font-weight: 500;
    transition: all var(--transition-speed) ease; position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; height: 3px; bottom: -5px; left: 50%;
    transform: translateX(-50%); width: 0; background-color: var(--primary-color);
    transition: width var(--transition-speed); box-shadow: 0 0 10px var(--primary-color); border-radius: 2px;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 80%; }
.hamburger { display: none; cursor: pointer; font-size: 2rem; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh; 
    min-height: 600px;
    background: url('https://images.unsplash.com/photo-1517466787929-bc90951d0974?q=80&w=1920&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 0; 
    box-shadow: none; 
}

.hero::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.60) 50%, #0a0a0a 100%);
    z-index: 1; pointer-events: none;
}

.hero-content {
    position: relative; z-index: 2; max-width: 900px; padding: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-tag {
    color: var(--primary-color); font-weight: 700; letter-spacing: 4px;
    margin-bottom: 15px; display: block; font-size: 0.9rem; text-transform: uppercase;
}

.hero-title {
    font-size: 5.5rem; line-height: 0.9; margin-bottom: 25px;
    text-shadow: 2px 2px 0px #000;
}

.hero-title span { color: #fff; -webkit-text-stroke: 1px var(--primary-color); text-shadow: none; }

/* --- NAPRAWIONE PRZYCISKI (FLEXBOX CENTERING) --- */
.btn-main {
    display: inline-flex;       /* KLUCZ DO SUKCESU */
    justify-content: center;    /* Centrowanie poziom */
    align-items: center;        /* Centrowanie pion */
    text-align: center;
    padding: 16px 45px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(255, 81, 0, 0.3);
}

.btn-main:hover {
    background: transparent; color: var(--primary-color);
    transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* --- GRID & LAYOUT --- */
.container { max-width: 1200px; margin: 0 auto 4rem auto; padding: 0 20px; flex: 1; width: 100%; }
.section-title {
    font-size: 3rem; margin-bottom: 2rem; position: relative;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: linear-gradient(90deg, #fff 0%, var(--primary-color) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block;
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 4px; background: var(--primary-color);
    margin-top: 5px; border-radius: 2px; box-shadow: 0 0 10px var(--primary-color);
}

/* FIX: Zmniejszona szerokość minimalna dla mobile (z 350px na 290px) */
.grid-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); 
    gap: 30px; 
}
.profile-layout { grid-template-columns: 2fr 1fr; }

/* --- NEWS CARDS --- */
.news-card {
    background: #141414; border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden; position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    height: 420px; display: flex; flex-direction: column; justify-content: flex-end;
}
.news-card img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.5; transition: opacity 0.3s ease, transform 0.5s ease;
}
article.news-card img { border-radius: 0; aspect-ratio: auto; }
.news-card:hover {
    transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border-color: var(--primary-color);
}
.news-card:hover img { opacity: 0.3; transform: scale(1.03); }
.news-content {
    position: relative; z-index: 2; padding: 25px;
    background: linear-gradient(0deg, #000 0%, rgba(0,0,0,0.8) 60%, transparent 100%);
}
.news-date {
    color: var(--primary-color); font-weight: 700; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; display: block;
}
.news-card h3 {
    font-family: 'Montserrat', sans-serif; font-size: 1.4rem; line-height: 1.3;
    margin: 5px 0 10px 0; font-weight: 700; color: #fff;
}
.news-card p {
    color: #aaa; font-size: 0.9rem; line-height: 1.5; margin-bottom: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* --- TABS --- */
.tabs-control { margin-bottom: 20px; display: flex; gap: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }

/* FIX: Wyśrodkowanie tekstu w przyciskach TAB */
.tab-btn {
    background: transparent; color: #666; border: none; padding: 10px 20px;
    cursor: pointer; font-size: 1.2rem; font-weight: 500; transition: all var(--transition-speed);
    border-radius: 30px; position: relative; overflow: hidden; z-index: 1;
    display: inline-flex; justify-content: center; align-items: center; white-space: nowrap;
}
.tab-btn:hover { color: #fff; }
.tab-btn.active { background: var(--primary-color); color: #fff; border-bottom: none; box-shadow: 0 0 20px rgba(255, 81, 0, 0.4); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.4s ease-out; }

/* --- TABLES (PRO LEAGUE STYLE) --- */
.table-container {
    background: #141414; border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border-radius: 8px;
    padding: 0; overflow-x: auto; position: relative;
}
table { width: 100%; border-collapse: collapse; border-spacing: 0; min-width: 800px; font-family: 'Montserrat', sans-serif; }
thead th {
    background-color: #0f0f0f; color: #666; font-weight: 600; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 1px; padding: 18px 15px;
    text-align: center; border-bottom: 2px solid rgba(255,255,255,0.1); white-space: nowrap;
}
thead th:nth-child(2) { text-align: left; padding-left: 20px; }
tbody tr { background-color: #141414; border-bottom: 1px solid rgba(255, 255, 255, 0.03); transition: background-color 0.1s ease; }
tbody tr:nth-child(even) { background-color: #181818; }
tbody tr:hover { background-color: #222 !important; }
tbody td { padding: 14px 15px; text-align: center; color: #ccc; font-size: 0.9rem; font-weight: 500; border: none; vertical-align: middle; }
tbody td:first-child { font-weight: bold; color: #666; width: 50px; }
.team-cell { display: flex; align-items: center; gap: 15px; text-align: left; padding-left: 5px; }
.team-crest { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.team-name { font-weight: 600; font-size: 1rem; color: #fff; text-decoration: none; white-space: nowrap; }
.team-name:hover { color: var(--primary-color); }
tbody td:nth-child(3), tbody td:nth-child(4), tbody td:nth-child(5), tbody td:nth-child(6), tbody td:nth-child(7), tbody td:nth-child(8) { color: #999; font-family: 'Montserrat', sans-serif; }
tbody td:nth-child(9) { font-family: 'Teko', sans-serif; font-size: 1.4rem; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.03); border-left: 1px solid rgba(255,255,255,0.02); border-right: 1px solid rgba(255,255,255,0.02); }

.zone-promotion { box-shadow: inset 4px 0 0 #00ff88 !important; background: linear-gradient(90deg, rgba(0, 255, 136, 0.05) 0%, transparent 100%) !important; }
.zone-relegation { box-shadow: inset 4px 0 0 #ff3333 !important; background: linear-gradient(90deg, rgba(255, 51, 51, 0.05) 0%, transparent 100%) !important; }
tbody tr.zone-neutral { box-shadow: none; }
.form-guide { display: flex; gap: 4px; justify-content: center; }
.form-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; opacity: 0.8; }
.form-w { background-color: #00ff88; box-shadow: 0 0 5px rgba(0, 255, 136, 0.4); }
.form-d { background-color: #888; }
.form-l { background-color: #ff3333; }

/* --- TERMINARZ --- */
.filters-bar { display: flex; gap: 15px; margin-bottom: 30px; background: transparent; padding: 0; border: none; flex-wrap: wrap; }
.sub-filters { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; }
.sub-btn {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888; padding: 8px 18px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 600;
    transition: all 0.2s ease; font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 1px;
    display: inline-flex; justify-content: center; align-items: center; /* FIX BUTTONS */
}
.sub-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.sub-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); box-shadow: 0 4px 15px rgba(255, 81, 0, 0.2); }

.match-section { display: block; animation: fadeInUp 0.4s ease-out; }
.match-section.hidden { display: none !important; }
.match-row {
    background: #141414; border-left: 4px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); margin-bottom: 8px;
    display: flex; align-items: center; justify-content: space-between; padding: 20px 30px;
    border-radius: 4px; transition: background 0.2s, transform 0.2s; position: relative;
}
.match-row:hover { background: #1a1a1a; border-left-color: var(--primary-color); transform: translateX(5px); box-shadow: 0 5px 20px rgba(0,0,0,0.2); }
.match-info {
    font-size: 0.75rem; color: #666; min-width: 140px; display: flex; flex-direction: column; gap: 4px;
    font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 0.5px;
}
.match-date { display: block; color: #ccc; font-weight: 600; font-size: 0.9rem; }
.match-center { display: flex; align-items: center; gap: 30px; flex: 1; justify-content: center; }
.match-team {
    display: flex; align-items: center; gap: 15px; width: 300px;
    font-family: 'Montserrat', sans-serif; font-size: 1.1rem; font-weight: 600; color: #eee;
    text-transform: uppercase; transition: color 0.2s; text-decoration: none !important;
}
.match-team:hover { color: var(--primary-color); text-decoration: none !important; }
.team-home { justify-content: flex-end; text-align: right; }
.team-away { justify-content: flex-start; text-align: left; }
.match-team img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.match-score {
    background: rgba(255,255,255,0.03); padding: 5px 15px; border-radius: 4px;
    font-family: 'Teko', sans-serif; font-size: 2.4rem; font-weight: 500; color: #fff; min-width: 100px;
    text-align: center; letter-spacing: 2px; border: 1px solid rgba(255,255,255,0.05);
}
.match-vs { font-family: 'Teko', sans-serif; font-size: 1.8rem; color: #444; font-weight: 300; }
.match-status { min-width: 110px; text-align: right; display: flex; justify-content: flex-end; }
.status-badge { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; letter-spacing: 1px; display: inline-block; }
.status-upcoming { color: #888; background: rgba(255,255,255,0.05); }
.status-finished { color: #fff; background: #333; }
.status-live { background: rgba(255, 0, 0, 0.15); color: #ff3333; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,0,0,0.3); animation: pulse-border 2s infinite; }
.live-dot { width: 6px; height: 6px; background-color: #ff3333; border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse-border { 0% { border-color: rgba(255,0,0,0.3); } 50% { border-color: rgba(255,0,0,0.8); } 100% { border-color: rgba(255,0,0,0.3); } }

/* --- OTHER --- */
.rank-1 { color: #ffd700; font-weight: bold; font-size: 1.2rem; text-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.rank-2 { color: #c0c0c0; font-weight: bold; }
.rank-3 { color: #cd7f32; font-weight: bold; }

/* --- ZASADY --- */
.rules-section {
    background: #141414; padding: 30px; border-left: 5px solid var(--primary-color);
    margin-bottom: 30px; border-radius: 0 8px 8px 0; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeInUp 0.5s ease-out;
}
.rules-section h3 { color: #fff; font-family: 'Teko', sans-serif; font-size: 2rem; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; letter-spacing: 1px; }
.rules-list { list-style: none; margin-left: 10px; }
.rules-list li { margin-bottom: 12px; color: #ccc; font-size: 1rem; position: relative; padding-left: 20px; line-height: 1.5; }
.rules-list li::before { content: '■'; color: var(--primary-color); position: absolute; left: 0; top: -2px; font-size: 0.8rem; }

/* --- FOOTER --- */
.site-footer { background-color: #000; border-top: 3px solid var(--primary-color); padding: 60px 20px 20px 20px; margin-top: 80px; font-family: 'Montserrat', sans-serif; }
.footer-content { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-family: 'Teko', sans-serif; font-size: 1.8rem; margin-bottom: 20px; letter-spacing: 1px; }
.footer-desc { color: #888; font-size: 0.9rem; line-height: 1.6; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #bbb; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-color); padding-left: 5px; text-shadow: 0 0 5px var(--primary-color); }
.social-icons { display: flex; gap: 15px; margin-top: 20px; }
.social-btn { width: 40px; height: 40px; background: #222; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; border-radius: 50%; transition: all 0.2s; }
.social-btn:hover { background: var(--primary-color); transform: translateY(-3px); box-shadow: 0 0 15px #fff; }
.footer-bottom { text-align: center; border-top: 1px solid #222; padding-top: 20px; color: #555; font-size: 0.8rem; }

/* --- UTILS --- */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.4s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.loader-spinner {
    width: 40px !important; height: 40px !important; margin: 40px auto 15px auto !important; display: block !important;
    border: 4px solid rgba(255, 81, 0, 0.3); border-top: 4px solid var(--primary-color); border-radius: 50%;
    animation: spin 0.8s linear infinite; box-shadow: 0 0 15px var(--primary-color);
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; border: 2px solid #050505; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* --- OKRĄGŁE LOGA (FIX) --- */
.team-crest, .club-logo-large, .match-team img, .catalog-item img, .team-cell img {
    border-radius: 50% !important; aspect-ratio: 1 / 1 !important; object-fit: cover !important;
    transform: scale(1.1); border: 1px solid rgba(255,255,255,0.8) !important;
    background-color: #fff !important; padding: 0 !important; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* --- FIX KATALOGU KLUBÓW --- */
.catalog-item { height: 100%; display: flex; flex-direction: column; }
.catalog-item .news-card { height: 100% !important; min-height: 300px; justify-content: flex-start !important; padding-top: 40px !important; padding-bottom: 30px !important; }
.catalog-item h3 { min-height: 3.2rem; display: flex; align-items: center; justify-content: center; margin-bottom: 10px !important; line-height: 1.2; }
.catalog-item img { margin-bottom: 20px !important; position: relative !important; width: 80px !important; height: 80px !important; }

/* --- FIX PROFILU DRUŻYNY --- */
.club-logo-large {
    width: 140px !important; height: 140px !important; min-width: 140px; border-radius: 50% !important;
    border: 4px solid rgba(255, 255, 255, 0.2) !important; background: #fff !important; padding: 5px !important;
    object-fit: contain !important; transform: none !important; box-shadow: 0 0 30px rgba(255, 81, 0, 0.3) !important;
}
.club-hero {
    background: linear-gradient(0deg, var(--bg-dark) 0%, rgba(0,0,0,0.8) 100%), 
                url('https://images.unsplash.com/photo-1511886929837-354d827aae26?q=80&w=1920&auto=format&fit=crop');
    background-size: cover; background-position: center; padding: 60px 20px; margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
    border-bottom: none !important; /* Usuwa kreskę 1px na dole */
    box-shadow: none !important;    /* Usuwa ewentualny cień */
    padding-bottom: 0 !important;   /* Dociska zawartość do samej krawędzi */
}
.club-header-content { display: flex; align-items: center; gap: 30px; max-width: 1200px; margin: 0 auto; }
#team-matches-container .match-row { padding: 15px !important; flex-wrap: nowrap; }
#team-matches-container .match-center { gap: 15px !important; }
#team-matches-container .match-team { width: auto !important; flex: 1; font-size: 0.9rem !important; min-width: 0; }
#team-matches-container .team-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#team-matches-container .match-score { font-size: 1.8rem !important; min-width: 70px !important; padding: 2px 10px !important; }

/* --- FIX LOADERA GRID --- */
#news-container .loader-spinner, #news-container p, #teams-catalog .loader-spinner, #teams-catalog p { grid-column: 1 / -1 !important; }
#news-container p, #teams-catalog p { width: 100% !important; text-align: center !important; }

/* =================================================================================
   MOBILE MASTERPIECE (RESPONSYWNOŚĆ)
   ================================================================================= */

@media screen and (max-width: 768px) {
    /* --- 1. NAV & HAMBURGER --- */
    .hamburger { display: block; cursor: pointer; z-index: 1001; width: 30px; height: 25px; position: relative; background: transparent; border: none; font-size: 0; }
    .hamburger .bar { display: block; width: 100%; height: 3px; background-color: #fff; margin: 5px 0; transition: all 0.3s ease-in-out; border-radius: 3px; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--primary-color); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--primary-color); }

    .nav-links {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(5, 5, 5, 0.98); backdrop-filter: blur(25px);
        display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 35px;
        transform: translateY(-100%); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        z-index: 1000; opacity: 1;
    }
    .nav-links.active { transform: translateY(0); right: 0; }
    .nav-links li { opacity: 0; transform: translateY(20px); transition: all 0.4s ease; }
    .nav-links.active li { opacity: 1; transform: translateY(0); }
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    
    .nav-links a { font-size: 2.5rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; color: #eee; text-shadow: 0 5px 20px rgba(0,0,0,0.8); }

    /* --- 2. GENERAL LAYOUT --- */
    .container { padding: 0 12px; }
    .hero { min-height: 55vh; padding-top: 80px; }
    .hero-title { font-size: 2.8rem; line-height: 1.0; padding: 0 10px; }
    .section-title { font-size: 2.2rem; margin-bottom: 1.5rem; border-left: none; text-align: center; width: 100%; }
    .section-title::after { margin: 5px auto 0 auto; }

    .table-container { width: 100%; overflow-x: auto; padding: 5px; background: rgba(20,20,20,0.5); border-radius: 10px; }
    table { min-width: 100%; font-size: 0.85rem; }
    thead th { padding: 8px 4px; font-size: 0.75rem; letter-spacing: 0.5px; }
    tbody td { padding: 10px 4px; }
    .team-crest { width: 25px; height: 25px; }

    /* Ukrywanie zbędnych kolumn tabeli */
    thead th:nth-child(5), tbody td:nth-child(5),
    thead th:nth-child(6), tbody td:nth-child(6),
    thead th:nth-child(7), tbody td:nth-child(7),
    thead th:nth-child(10), tbody td:nth-child(10) { display: none; }
    
    .team-name { font-size: 0.8rem; white-space: normal; line-height: 1.1; max-width: 130px; display: inline-block; }
    tbody td:first-child { width: 30px; font-size: 0.8rem; }
    tbody td:nth-child(9) { font-size: 1.2rem; padding: 5px 8px; }

    .club-header-content { flex-direction: column; gap: 10px; text-align: center; }
    .club-logo-large { width: 90px; height: 90px; padding: 5px; }
    .club-info h1 { font-size: 2.5rem; }
    .stats-bar { gap: 8px; flex-wrap: wrap; } 
    .stat-box { min-width: 48%; padding: 10px; flex: 1 1 45%; margin-bottom: 10px; }

    /* --- 3. TERMINARZ MOBILE --- */
    .match-section { padding: 0; }
    .match-row > .match-status { display: none; }
    .match-row {
        flex-direction: column; padding: 0; margin-bottom: 15px;
        background: #141414; border: 1px solid rgba(255,255,255,0.08);
        border-left: 4px solid var(--primary-color); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    .match-row:hover { transform: none; background: #141414; }
    .match-info {
        width: 100%; background: #1a1a1a; padding: 10px 15px; border-bottom: 1px solid rgba(255,255,255,0.05);
        flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 0;
    }
    .match-date { font-size: 0.8rem; margin: 0; color: #fff; }
    .match-center {
        display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; width: 100%; padding: 20px 10px; gap: 10px;
    }
    .match-team {
        width: 100% !important; flex-direction: column !important; align-items: center !important;
        justify-content: flex-start !important; text-align: center !important; gap: 10px !important;
        font-size: 0.8rem; line-height: 1.3; color: #ddd;
    }
    .match-team img { width: 50px !important; height: 50px !important; margin: 0 !important; }
    .team-home, .team-away { text-align: center !important; }
    .match-score { font-size: 2rem; background: transparent; border: none; padding: 0; margin-top: 5px; color: #fff; min-width: auto; }
    .match-vs { margin-top: 15px; font-size: 1.2rem; color: #555; }
    
    /* Tabs & Filters */
    .tabs-control { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .tab-btn { font-size: 1rem; padding: 8px 16px; flex: 1 1 auto; }
    
    .profile-layout { grid-template-columns: 1fr; }
    #team-matches-container .match-row { flex-direction: column !important; }
    #team-matches-container .match-center { display: grid; grid-template-columns: 1fr auto 1fr; }
    #team-matches-container .match-team { width: 100% !important; white-space: normal !important; }
}

@media screen and (max-width: 360px) {
    .match-team img { width: 40px !important; height: 40px !important; }
    .match-score { font-size: 1.8rem; }
    .match-team { font-size: 0.7rem !important; }
    .hero-title { font-size: 2rem; }
}



/* ==============================================
   PREMIUM TEAM PROFILE (DODATEK DO DRUZYNA.HTML)
   ============================================== */

/* 1. Ulepszony Pasek Statystyk (Efekt Szkła) */
.stats-bar {
    background: rgba(20, 20, 20, 0.8); /* Półprzezroczyste tło */
    backdrop-filter: blur(10px);       /* Rozmycie tła pod spodem */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: -40px; /* Wjeżdża lekko na zdjęcie Hero */
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    justify-content: space-around;
}

.stat-box {
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.05);
    flex: 1;
}
.stat-box:last-child { border-right: none; }

.stat-box h4 {
    color: #888; font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 5px;
}
.stat-box .value {
    font-family: 'Teko', sans-serif; font-size: 2.5rem; line-height: 1; color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* 2. Karta Lidera (Złoty Gradient) */
.leader-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    position: relative; overflow: hidden; border: 1px solid rgba(255,215,0,0.2);
}
.leader-card::before {
    content: '\f521'; /* Ikona korony w tle */
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; top: -20px; right: -20px;
    font-size: 10rem; color: rgba(255, 215, 0, 0.05);
    transform: rotate(20deg);
}

/* 3. Ulepszona Tabela Składu */
.squad-table-row { transition: transform 0.2s, background 0.2s; }
.squad-table-row:hover {
    background: rgba(255, 81, 0, 0.1) !important;
    transform: scale(1.01);
    border-left: 3px solid var(--primary-color);
}
.pos-tag {
    font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; font-weight: bold; letter-spacing: 1px;
}
.pos-br { background: #ffd700; color: #000; } /* Bramkarz - Złoty */
.pos-ob { background: #3498db; color: #fff; } /* Obrońca - Niebieski */
.pos-pom { background: #2ecc71; color: #fff; } /* Pomocnik - Zielony */
.pos-nap { background: #e74c3c; color: #fff; } /* Napastnik - Czerwony */

/* 4. Poprawki mobilne dla tego stylu */
@media screen and (max-width: 768px) {
    .stats-bar { margin-top: 0; border-radius: 0; background: #141414; }
    .stat-box { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 10px 0; }
    .stat-box:last-child { border-bottom: none; }
    .leader-card::before { font-size: 8rem; }
}




/* --- FIX ODSTĘPÓW I NACHODZENIA (DRUZYNA.HTML) --- */

/* 1. Naprawa Hero: Dajemy miejsce na logo, ale bez dolnej krawędzi */
.club-hero {
    padding-bottom: 80px !important; /* Dużo miejsca na dole na logo */
    margin-bottom: 0 !important;     /* Usuwamy margines zewnętrzny */
    border-bottom: none !important;  /* Upewniamy się, że nie ma kreski */
}

/* 2. Naprawa Paska Statystyk: Wjeżdża na Hero, ale odpycha to co pod nim */
.stats-bar {
    margin-top: -50px !important;    /* Wciągamy pasek do góry na zdjęcie */
    margin-bottom: 60px !important;  /* ODPYCHAMY tabelę w dół (tu brakowało oddechu) */
    position: relative;
    z-index: 5;                      /* Musi być nad Hero, ale pod menu */
}

/* 3. Fix dla Telefonów (Mobile) */
@media screen and (max-width: 768px) {
    .club-hero {
        padding-bottom: 40px !important; /* Mniejszy odstęp na telefonie */
    }
    
    .stats-bar {
        margin-top: 0 !important;       /* Na telefonie NIE wjeżdżamy na zdjęcie */
        transform: translateY(-20px);   /* Lekkie przesunięcie w górę dla stylu */
        margin-bottom: 40px !important; /* Odstęp od tabeli */
    }
    
    .club-header-content {
        margin-bottom: 10px;            /* Oddech między logiem a dołem sekcji */
    }
}


/* ==============================================
   FIX NA SKACZĄCE TŁO (HERO JUMP FIX)
   ============================================== */

@media screen and (max-width: 1024px) {
    /* Wyłączamy efekt parallax na dotykowych ekranach */
    .hero, .club-hero {
        background-attachment: scroll !important;
        background-position: center top !important; /* Lepiej pozycjonuje głowy piłkarzy */
    }
}


/* --- USUNIĘCIE NIEBIESKIEGO PODŚWIETLENIA (TAP HIGHLIGHT) --- */
* {
    -webkit-tap-highlight-color: transparent; /* Dla Chrome/Safari na mobile */
    -webkit-touch-callout: none;              /* Wyłącza menu kontekstowe przy przytrzymaniu (opcjonalne) */
}

/* Opcjonalnie: Usuń też ramkę 'focus' przy kliknięciu (niebieska obwódka) */
button:focus, a:focus, input:focus, textarea:focus {
    outline: none;
}

/* ==============================================
   FIX PRZYCISKÓW (UKŁAD: WSZYSTKIE NA GÓRZE)
   ============================================== */

@media screen and (max-width: 768px) {
    .tabs-control {
        display: flex !important;      /* Wracamy do elastycznego Flexa */
        flex-wrap: wrap;               /* Pozwalamy spadać do nowej linii */
        gap: 8px;                      /* Delikatny odstęp */
        justify-content: center;
    }

    /* 1. Przycisk "Wszystkie" (Pierwszy) - ZAWSZE SZEROKI NA GÓRZE */
    .tab-btn:first-child {
        flex: 1 1 100%;                /* Zajmij 100% szerokości */
        width: 100%;
        margin-bottom: 5px;            /* Mały odstęp od reszty */
        order: -1;                     /* Upewniamy się, że jest pierwszy */
    }

    /* 2. Pozostałe przyciski (Dywizje) - DZIELĄ SIĘ MIEJSCEM */
    .tab-btn:not(:first-child) {
        flex: 1 1 auto;                /* Podzielcie się resztą miejsca równo */
        min-width: 80px;               /* Minimalna szerokość, żeby było czytelnie */
        padding: 8px 10px;             /* Standardowy padding, bez powiększania */
    }
}