/* Globalne usprawnienia UI/UX */

/* Animacje przejścia stron */
body {
    opacity: 1 !important;
    transition: none !important;
}

body.page-loaded {
    opacity: 1;
}

/* Animacje pojawiania się elementów */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Przycisk "Powrót do góry" */
#back-to-top {
    position: fixed;
    bottom: -60px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: bottom 0.3s ease, background-color 0.3s ease;
    font-size: 1.2rem;
}

#back-to-top:hover {
    background-color: var(--secondary-color);
}

#back-to-top.show {
    bottom: 30px;
}

/* System powiadomień */
/* ==================== */
/* SYSTEM POWIADOMIEŃ O MECZACH */
/* ==================== */

#notification-system {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1100;
    width: 340px;
    max-width: calc(100% - 40px);
}

.notification {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideInNotification 0.4s ease forwards;
}

.notification.hidden {
    display: none !important;
}

@keyframes slideInNotification {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Nowe powiadomienie o meczu */
.match-notification {
    position: relative;
    display: flex;
    flex-direction: column;
    border-left: 4px solid #1a4c8b;
}

.notification-close-x {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #999;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10;
}

.notification-close-x:hover {
    color: #333;
}

.notification-header {
    background: linear-gradient(135deg, #1a4c8b 0%, #2d6bb3 100%);
    padding: 10px 15px;
    text-align: center;
}

.notification-badge {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    gap: 10px;
}

.notification-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.notification-team-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    margin-bottom: 6px;
}

.notification-team-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.notification-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 5px;
}

.notification-vs .vs-text {
    font-size: 1rem;
    font-weight: 700;
    color: #1a4c8b;
}

.notification-date {
    font-size: 0.7rem;
    color: #666;
    margin-top: 2px;
    white-space: nowrap;
}

.notification-footer {
    padding: 0 15px 15px;
}

.notification-btn-primary {
    display: block;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #1a4c8b 0%, #2d6bb3 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.notification-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 76, 139, 0.3);
    color: white;
}

/* Mobile - powiadomienie na dole, nad cookie banner */
@media (max-width: 768px) {
    #notification-system {
        left: 10px;
        right: 10px;
        bottom: 80px;
        top: auto;
        width: auto;
        max-width: none;
    }

    .notification {
        max-width: 100%;
    }

    .notification-team-logo {
        width: 35px;
        height: 35px;
    }

    .notification-team-name {
        font-size: 0.65rem;
    }

    .notification-match {
        padding: 10px 8px;
        gap: 5px;
    }

    .notification-vs .vs-text {
        font-size: 0.85rem;
    }

    .notification-date {
        font-size: 0.6rem;
    }

    .notification-header {
        padding: 8px 12px;
    }

    .notification-badge {
        font-size: 0.7rem;
    }

    .notification-footer {
        padding: 0 10px 10px;
    }

    .notification-btn-primary {
        padding: 8px;
        font-size: 0.8rem;
    }
}

/* Stare style dla kompatybilności */
.notification-icon {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.notification-content {
    padding: 15px;
    flex: 1;
}

.notification-content h4 {
    margin: 0 0 5px;
    color: var(--primary-color);
}

.notification-content p {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

.notification-actions {
    display: flex;
    gap: 10px;
}

.notification-btn {
    padding: 5px 10px;
    background: none;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Wyszukiwarka */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

#search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 0.9rem;
    width: 180px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

#search-input:focus {
    width: 220px;
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(255, 193, 7, 0.3);
}

#search-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    position: absolute;
    right: 10px;
}

#search-btn:hover {
    background: linear-gradient(135deg, #AE802F, #FFEFA7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results li {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #eee;
}

.search-results li:last-child {
    border-bottom: none;
}

.search-results a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.search-results a:hover {
    background-color: #f5f5f5;
}

.search-results p {
    padding: 10px 15px;
    margin: 0;
    color: #777;
}

.highlight {
    background: linear-gradient(135deg, #AE802F, #FFEFA7);
    padding: 0 2px;
}

.result-category {
    font-size: 0.8rem;
    color: #999;
    margin-left: 5px;
}

/* Efekty hover dla linków */
a {
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Spójne style nawigacji */
.nav-right {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

/* Ulepszone karty aktualności */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.news-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

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

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.news-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.25rem;
    color: #333;
    transition: color 0.3s ease;
}

.news-card:hover h3 {
    color: #007bff;
}

.news-card p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
    flex-grow: 1;
}

.read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-align: center;
    align-self: flex-start;
}

.read-more:hover {
    background-color: #0056b3;
}

/* Ulepszone przyciski filtrowania */
.news-filter {
    margin-bottom: 30px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

.filter-btn.active {
    background-color: #007bff;
    color: white;
}

/* Ulepszona paginacja */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 5px;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #e0e0e0;
}

.pagination a.active {
    background-color: #007bff;
    color: white;
}

/* Kategoria aktualności */
.news-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 123, 255, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 1;
}

/* ============================================
   WYSZUKIWARKA - STYLE DLA PODSWIETLANIA
   ============================================ */

/* Podswietlenie znalezionych fragmentow na stronie */
.search-highlight {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 2px 4px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Aktywne (aktualnie wybrane) podswietlenie */
.search-highlight-active {
    background: linear-gradient(135deg, #FF6B35, #FF4444);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
    transform: scale(1.05);
    outline: 3px solid rgba(255, 68, 68, 0.3);
}

/* Panel wynikow wyszukiwania - nakladka */
.search-results {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
    overflow-y: auto;
}

.search-results.active {
    display: flex;
}

.search-results-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: searchResultsSlideIn 0.3s ease;
}

@keyframes searchResultsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Przycisk zamykania wynikow */
.search-results-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background-color: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.search-results-close:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

.search-results-close i {
    font-size: 1rem;
    color: #666;
}

/* Zawartosc wynikow */
#search-results-content {
    padding: 25px;
}

/* Naglowek wynikow */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.search-results-header p {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

/* Nawigacja miedzy wynikami */
.search-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 20px;
}

.search-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background-color: #1a4c8b;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-nav-btn:hover {
    background: linear-gradient(135deg, #AE802F, #FFEFA7);
    color: #1a4c8b;
    transform: scale(1.1);
}

#search-counter {
    font-weight: 600;
    color: #1a4c8b;
    min-width: 60px;
    text-align: center;
}

/* Lista wynikow */
.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results-item {
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.search-results-item:hover {
    background-color: #f0f0f0;
    border-left-color: #1a4c8b;
    transform: translateX(5px);
}

.search-result-section {
    font-weight: 600;
    color: #1a4c8b;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.search-result-section i {
    margin-right: 8px;
    color: #AE802F;
}

.search-result-context {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.search-result-context mark {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 1px 3px;
    border-radius: 2px;
    color: #333;
}

.search-result-count {
    font-size: 0.8rem;
    color: #888;
}

/* Brak wynikow */
.search-no-results {
    text-align: center;
    padding: 40px 20px;
}

.search-no-results p {
    margin: 10px 0;
    color: #666;
}

/* Stopka wynikow */
.search-results-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.search-hint {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-hint i {
    color: #AE802F;
}

/* Responsywnosc */
@media (max-width: 768px) {
    #back-to-top {
        width: 40px;
        height: 40px;
        right: 20px;
    }

    .search-results {
        padding-top: 20px;
    }

    .search-results-container {
        width: 95%;
        max-height: 90vh;
    }

    #search-results-content {
        padding: 15px;
    }

    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-navigation {
        width: 100%;
        justify-content: center;
    }

    .search-results-item {
        padding: 12px;
    }
}
