/* FC Manager - Nowoczesny styl dla systemu zarządzania klubem piłkarskim */

/* Reset i podstawowe style z kompatybilnością dla wszystkich przeglądarek */
* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main content z paddingiem dla menu */
.main-content {
    padding-top: 0; /* Hero ma swój padding */
}

.main-content > .container:not(.hero *) {
    padding-top: 20px; /* Padding dla sekcji po hero */
}

/* Nawigacja z kompatybilnością */
.navbar {
    background: #ffffff;
    background: rgba(255, 255, 255, 1);
    -webkit-box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Nowoczesna nawigacja z gradientem i efektem szkła */
.navbar {
    background: rgba(26, 34, 51, 0.9);
    -webkit-box-shadow: 0 4px 24px 0 rgba(0,0,0,0.13);
    -moz-box-shadow: 0 4px 24px 0 rgba(0,0,0,0.13);
    box-shadow: 0 4px 24px 0 rgba(0,0,0,0.13);
    padding: 0.7rem 0;
    position: fixed; /* zmiana na fixed żeby było nad hero */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* wyższy z-index żeby był nad hero */
    backdrop-filter: blur(8px);
    border-bottom: 1.5px solid rgba(255,255,255,0.07);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.nav-brand i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.3rem;
    border-radius: 12px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-size: 1.08rem;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 2;
}

.nav-link:hover,
    .nav-link.active {
    background: linear-gradient(90deg, #e11d48 60%, #1a2233 100%);
    color: #fff;
    box-shadow: 0 2px 12px 0 rgba(225,29,72,0.13);
    text-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.nav-link::after {
    display: none;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.admin-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.98rem;
    font-weight: 700;
    box-shadow: 0 2px 8px #667eea22;
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.logout-link {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white !important;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.98rem;
    font-weight: 700;
    box-shadow: 0 2px 8px #ef444422;
}
/* Dropdown menu z nowoczesnym stylem */
.nav-dropdown {
    position: relative;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.13);
    border-radius: 14px;
    overflow: hidden;
    z-index: 10;
    padding: 0.3em 0;
    animation: dropdownFade 0.22s;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: block;
}
@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.7em;
    color: #1a2233;
    padding: 0.9em 1.3em;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.18s, color 0.18s;
    font-size: 1.04rem;
    border-radius: 0;
}
.dropdown-menu a:hover {
    background: #f3f4f6;
    color: #e11d48;
}

.logout-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Sparta Position Banner */
.sparta-position-banner {
    background: linear-gradient(135deg, #059669, #10b981);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.position-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.position-number {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.position-details h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    color: white;
}

.position-details p {
    opacity: 0.9;
    font-size: 0.95rem;
    color: white;
}

.season-info {
    text-align: right;
    color: white;
}

.season-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.season-info p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* No Matches Banner */
.no-matches-banner {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: white;
}

.no-matches-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.no-matches-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.no-matches-content p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Login Prompt Banner */
.login-prompt-banner {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: white;
}

.login-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.login-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.login-content p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Venue Type Styling */
.venue-type {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    margin-top: 0.25rem;
    display: inline-block;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #059669;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section - Główna sekcja strony */
.hero {
    position: relative;
    background: linear-gradient(120deg, #1a2233 60%, #e11d48 100%);
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px; /* miejsce na stałe menu */
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://www.transparenttextures.com/patterns/football-no-lines.png'),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,0.08) 0, transparent 60%),
        linear-gradient(120deg, #1a2233 60%, #e11d48 100%);
    opacity: 0.22;
    z-index: 1;
    pointer-events: none;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
}

/* Nowoczesna grafika piłkarza */
.hero-player-graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 18px;
    margin-top: -10px;
    position: relative;
    z-index: 2;
}
.hero-player-graphic svg {
    max-width: 220px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 24px rgba(0,0,0,0.13));
    background: linear-gradient(180deg, #f8fafc 60%, #e0e7ef 100%);
    border-radius: 18px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.07);
}
.jersey-color-label {
    margin-top: 8px;
    font-size: 1.08rem;
    font-weight: 600;
    color: #e11d48;
    background: #fff6fa;
    border-radius: 8px;
    padding: 2px 16px 3px 16px;
    box-shadow: 0 1px 4px 0 rgba(225,29,72,0.07);
    letter-spacing: 0.5px;
    transition: color 0.3s, background 0.3s;
    user-select: none;
    pointer-events: none;
}
@media (max-width: 600px) {
    .hero-player-graphic svg {
        max-width: 150px;
    }
    .jersey-color-label {
        font-size: 0.98rem;
        padding: 2px 10px 3px 10px;
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Hero Dashboard */
.hero-dashboard {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1000px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(120deg, #fff 70%, #f3f4f6 100%);
    border-radius: 18px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.09);
    padding: 1.7rem 1.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 120px;
    margin: 0.5rem 0.7rem;
    transition: box-shadow 0.18s, transform 0.18s;
    position: relative;
    border: 1.5px solid #f3f4f6;
}

.stat-card:hover {
    box-shadow: 0 8px 32px 0 rgba(225,29,72,0.13);
    transform: translateY(-4px) scale(1.04);
}

.stat-icon {
    font-size: 2.3rem;
    color: #e11d48;
    margin-bottom: 0.7rem;
    filter: drop-shadow(0 2px 8px #e11d4822);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a2233;
    margin-bottom: 0.2rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px #e11d480a;
    transition: color 0.2s;
}
.stat-label {
    font-size: 1.12rem;
    color: #6b7280;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.stat-card.players .stat-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card.matches .stat-icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card.wins .stat-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.stat-card.goals .stat-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); }

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* Next Match Banner */
.next-match-banner {
    background: linear-gradient(135deg, #059669, #10b981);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.match-countdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.countdown-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.countdown-days {
    font-size: 2rem;
    font-weight: 700;
}

.match-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
}

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        background: #1a2233;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 8px 32px 0 rgba(0,0,0,0.13);
        border-radius: 0 0 18px 18px;
        padding: 1.2rem 0;
        display: none;
        z-index: 99;
        gap: 0;
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-link {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1.13rem;
        border-radius: 0;
    }
    .dropdown-menu {
        position: static;
        min-width: 100%;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }
    .dropdown-menu a {
        padding: 1em 2em;
    }
    .hamburger {
        display: flex;
    }
.stat-widget h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.stat-widget h3 i {
    color: #059669;
}

/* Player Spotlight */
.player-spotlight .player-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
}

.player-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.player-info h4 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.player-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.player-stats {
    display: flex;
    gap: 1rem;
}

.player-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #374151;
}

.player-stats i {
    color: #059669;
}

/* Top Scorers */
.scorers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scorer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #059669;
}

.rank {
    width: 30px;
    height: 30px;
    background: #059669;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.player-name {
    flex: 1;
    font-weight: 500;
    color: #374151;
}

.goals {
    background: #e5f3ff;
    color: #0369a1;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Recent Events */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.event-item:hover {
    background: #e2e8f0;
    transform: translateX(4px);
}

.event-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.event-player {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.event-details {
    color: #64748b;
    font-size: 0.8rem;
}

.event-match {
    color: #9ca3af;
    font-size: 0.75rem;
}

.event-date {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section - duplikat usunięty, używamy definicji powyżej */

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><path d="M0,20 Q250,80 500,20 T1000,20 V100 H0 Z"/></svg>');
    background-size: 100% 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fbbf24;
}

.stat p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1e293b;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.bg-gray {
    background: #f8fafc;
}

/* Cards */
.matches-grid,
.results-grid,
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.match-card,
.result-card,
.news-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.match-card:hover,
.result-card:hover,
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.match-date {
    text-align: center;
    margin-bottom: 1rem;
}

.match-date .date {
    font-size: 1.2rem;
    font-weight: 600;
    color: #059669;
}

.match-date .time {
    font-size: 0.9rem;
    color: #64748b;
    display: block;
    margin-top: 0.25rem;
}

.match-teams,
.result-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

/* Specyficzne style dla logotypów drużyn w sekcji meczów na stronie głównej */
.match-team-logo {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    flex-shrink: 0 !important;
}

.team img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.team span {
    font-weight: 500;
    font-size: 0.95rem;
}

.vs {
    font-weight: 700;
    color: #64748b;
    margin: 0 1rem;
}

.score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    margin: 0 1rem;
}

.match-venue,
.result-date {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* Tabela ligowa */
.table-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.league-table {
    width: 100%;
    border-collapse: collapse;
}

.league-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.league-table td {
    padding: 1rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.league-table tr:hover {
    background: #f8fafc;
}

.league-table tr.our-team {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    font-weight: 600;
}

.team-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left !important;
}

.team-name img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.points {
    font-weight: 700;
    color: #059669;
}

/* News Cards */
.news-card {
    overflow: hidden;
}

/* WAŻNE: Style dla pełnej wysokości obrazów - MAXIMUM PRIORITY */
.news-card .news-image img,
.gallery-item img,
.gallery-section .gallery-item img,
.gallery-grid .gallery-item img,
img[src*="image_url"],
img[src*="gallery"] {
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    border: 2px solid #00ff00 !important; /* debug border green */
}

.news-card .news-image,
.gallery-item .gallery-image,
.gallery-section .gallery-item,
.gallery-grid .gallery-item {
    min-height: 300px !important;
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: #eeeeee !important; /* debug background */
}

/* Galeria na stronie głównej - MAXIMUM PRIORITY */
.gallery-section .gallery-item {
    position: relative !important;
    min-height: 300px !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
    background: #f9f9f9 !important; /* debug background */
}

.gallery-section .gallery-item img {
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    flex: 1 !important;
    border: 2px solid #ff0000 !important; /* debug border */
}

.news-image {
    margin: -1.5rem -1.5rem 1rem;
    min-height: 150px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.news-content p {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-meta .date {
    color: #64748b;
    font-size: 0.9rem;
}

.read-more {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #047857;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
    position: relative;
    z-index: 100; /* Wysoki z-index aby był zawsze na wierzchu */
    clear: both; /* Wymusza pozycjonowanie poniżej innych elementów */
    margin-top: 2rem; /* Dodatkowy margines na górze */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fbbf24;
}

.footer-section p {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.footer-section i {
    margin-right: 0.5rem;
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding: 2rem 0;
        transition: right 0.3s ease;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .next-match-banner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .match-details {
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .matches-grid,
    .results-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }

    .league-table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-dashboard {
        padding: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .player-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .player-stats {
        justify-content: center;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .match-card,
    .result-card,
    .news-card {
        padding: 1rem;
    }

    .team span {
        font-size: 0.85rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Animacje */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-in-out;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* ===========================================
   SEKCJE CMS - AKTUALNOŚCI I GALERIA
   =========================================== */

/* Sekcja aktualności */
.news-section {
    margin: 3rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.news-image {
    position: relative;
    min-height: 150px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(45deg, #f59e0b, #f97316);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.news-content {
    padding: 1.5rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-title {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.news-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-title a:hover {
    color: #e11d48;
}

.news-excerpt {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #e11d48;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.read-more:hover {
    color: #be185d;
    transform: translateX(2px);
}

/* Sekcja galerii */
.gallery-section {
    margin: 3rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-item {
    position: relative;
    min-height: 250px !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gallery-overlay p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Responsywność dla sekcji CMS */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* GALLERY ITEMS: zachowaj wysokość auto zamiast fixed 150px */
    .gallery-item {
        min-height: 200px !important;
        height: auto !important;
    }
}
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .news-content {
        padding: 1rem;
    }
}

/* ================================
   ULTRA AGGRESSIVE GALLERY STYLES - KOŃCOWE NADPISANIE
   ================================ */

/* DESKTOP - bez media queries - maksymalny priorytet */
html body .main-content .gallery-section img,
html body .main-content .gallery-grid img,
html body .main-content .gallery-item img,
html body div[class*="gallery"] img,
html body *[class*="gallery"] img {
    min-height: 250px !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    border: 3px solid #ff6600 !important; /* orange debug border */
}

/* DESKTOP - kontenery galerii - maksymalny priorytet */
html body .main-content .gallery-section .gallery-item,
html body .main-content .gallery-grid .gallery-item,
html body div[class*="gallery-item"] {
    min-height: 300px !important;
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(255, 255, 0, 0.1) !important; /* yellow debug background */
}

/* Każdy obraz w galerii - maksymalny priorytet */
.gallery-section img,
.gallery-grid img,
.gallery-item img,
div[class*="gallery"] img,
*[class*="gallery"] img {
    min-height: 250px !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    border: 3px solid #ff6600 !important; /* orange debug border */
}

/* Kontenery galerii - maksymalny priorytet */
.gallery-section .gallery-item,
.gallery-grid .gallery-item,
div[class*="gallery-item"] {
    min-height: 300px !important;
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(255, 255, 0, 0.1) !important; /* yellow debug background */
}

/* Responsive override dla mobile */
@media (max-width: 768px) {
    .gallery-item {
        min-height: 250px !important;
        height: auto !important;
    }
    
    .gallery-item img {
        min-height: 200px !important;
    }
}
