/* Podstawowe style */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    color: #333;
    max-width: 1200px;
    margin: 0 auto; /* Wyśrodkowanie zawartości */
}

/* Zastosowanie czcionki do kluczowych elementów dla spójności */
h1, h2, h3, button, .tag, th, input, textarea {
    font-family: 'Inter', sans-serif;
}

/* Style dla nagłówka i chmury tagów */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.title-section {
    flex: 1;
    min-width: 300px;
    margin-right: 20px;
}

h1 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.intro {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.1em;
}

/* Chmura tagów */
.tag-cloud {
    flex: 1;
    min-width: 300px;
    max-width: 550px;
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

.tag-cloud-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
}

.show-all-btn {
    background-color: #e6ecf7;
    color: #3366cc;
    border: 1px solid #c7d6f3;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-all-btn:hover {
    background-color: #d0e0ff;
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: #e6ecf7;
    border-radius: 20px;
    color: #3366cc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px;
    border: 1px solid #c7d6f3;
}

.tag:hover {
    background-color: #d0e0ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tag-large {
    font-size: 16px;
    font-weight: 600;
    padding: 6px 14px;
}

/* Style tabeli */
.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
}

table {
    width: 100%;
    table-layout: fixed; /* Zmienione z auto na fixed dla lepszego kontrolowania szerokości */
    border-collapse: collapse;
}

/* Zmniejszona czcionka i padding w tabeli */
th, td {
    border: 1px solid #ddd;
    padding: 4px 6px; /* Bardziej zmniejszony padding */
    overflow-wrap: break-word;
    font-size: 12px; /* Dalej zmniejszono rozmiar czcionki */
    white-space: normal;
    vertical-align: top;
    text-align: left;
    line-height: 1.3; /* Dodano mniejszą interlinię */
}

th {
    background-color: #f5f7fa;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    text-align: center;
    font-size: 12.5px; /* Nieco mniejsza czcionka nagłówków */
    white-space: nowrap;
    padding: 4px 3px; /* Mniejszy padding dla nagłówków */
}

/* Strzałki sortowania */
th[data-sort]::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent; /* Zmniejszono rozmiar strzałki */
    border-right: 4px solid transparent;
    margin-left: 5px;
    opacity: 0.3;
    vertical-align: middle;
}
th[data-sort="asc"]::after {
    border-bottom: 4px solid #333; /* Zmniejszono rozmiar strzałki */
    opacity: 1;
}
th[data-sort="desc"]::after {
    border-top: 4px solid #333; /* Zmniejszono rozmiar strzałki */
    opacity: 1;
}

th:hover {
    background-color: #e9eef5;
}

/* Szerokości kolumn - zoptymalizowane, aby uniknąć przewijania poziomego */
/* Nazwa */
table td:nth-child(1), table th:nth-child(1) { width: 7%; font-weight: 500; }
/* Wersja */
table td:nth-child(2), table th:nth-child(2) { width: 9%; }
/* Twórca */
table td:nth-child(3), table th:nth-child(3) { width: 6%; }
/* Link do chata */
table td:nth-child(4), table th:nth-child(4) { 
    width: 11%; 
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 8px;
    padding-right: 8px;
}
/* Uwagi */
table td:nth-child(5), table th:nth-child(5) { width: 12%; }
/* Krótki opis */
table td:nth-child(6), table th:nth-child(6) { width: 18%; }
/* Najlepszy do */
table td:nth-child(7), table th:nth-child(7) { width: 18%; }
/* Kraj pochodzenia */
table td:nth-child(8), table th:nth-child(8) { width: 6%; text-align: center; }
/* Ciekawostka */
table td:nth-child(9), table th:nth-child(9) { width: 13%; }

/* Style linków w tabeli */
.chat-link {
    color: #3366cc;
    text-decoration: underline;
    white-space: nowrap;
    display: inline-block;
    font-weight: 500;
    font-size: 11px; /* Nieco mniejsza czcionka dla linków */
    max-width: 95%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-link:hover {
    text-decoration: none;
}

/* Sekcja FAQ */
.faq-section {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.faq-item {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}
.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.faq-item p, .faq-item ul, .faq-item ol {
    font-size: 1em;
    color: #444;
    margin-bottom: 10px;
}

.faq-item ul, .faq-item ol {
    padding-left: 25px;
    margin-top: 10px;
}

.faq-item li {
    margin-bottom: 8px;
}

.faq-item ul ul {
    padding-left: 30px;
    margin-top: 5px;
}

.faq-item strong {
    font-weight: 600;
    color: #222;
}

/* Stopka */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
    color: #666;
}
footer p {
    margin-bottom: 8px;
}
footer a {
    color: #3366cc;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}


/* Style dla sekcji dodatkowych informacji o modelach - ZMNIEJSZONA INTERLINIA */
.model-info-section {
    margin: 25px 0;
    padding: 15px 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.model-info-section h2 {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.model-info-section p.intro-text {
    font-size: 0.9em;
    color: #555;
    line-height: 1.2; /* Jeszcze bardziej zmniejszono interlinię */
    margin-bottom: 10px;
}

.model-info-section p.model-detail {
    font-size: 0.85em;
    line-height: 1.2; /* Jeszcze bardziej zmniejszono interlinię */
    margin-bottom: 4px; /* Znacznie zmniejszono odstęp */
    color: #444;
}

.model-info-section p.model-detail strong {
     font-weight: 600;
     color: #333;
}

/* Style dla banera cookie */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 1000;
    border-top: 1px solid #ddd;
    display: none;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-banner p {
    margin: 0 0 10px 0;
}

.cookie-banner a {
    color: #3366cc;
    text-decoration: underline;
    font-weight: 500;
}
 .cookie-banner a:hover {
     text-decoration: none;
 }

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-btn-primary {
    background-color: #3366cc;
    color: white;
    border-color: #3366cc;
}

.cookie-btn-primary:hover {
    background-color: #2855b2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cookie-btn-secondary {
    background-color: #e6ecf7;
    color: #3366cc;
    border-color: #c7d6f3;
}

.cookie-btn-secondary:hover {
    background-color: #d0e0ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Zapobieganie przewijaniu tabeli */
.table-container::-webkit-scrollbar {
    height: 0;  /* Ukrycie suwaka dla WebKit (Chrome, Safari) */
    display: none;  /* Dodatkowe ukrycie */
}

.table-container {
    -ms-overflow-style: none;  /* IE/Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Responsywność */
@media (max-width: 992px) {
    .header-container {
        align-items: center;
    }
    .tag-cloud {
        max-width: 450px;
    }
    th, td {
        font-size: 11.5px; /* Dalsze zmniejszenie na tabletach */
        padding: 4px 5px;
        line-height: 1.25;
    }
    th {
        font-size: 12px;
        padding: 4px 2px;
    }
    
    /* Optymalizacja szerokości kolumn dla tabletów */
    table td:nth-child(1), table th:nth-child(1) { width: 6%; }
    table td:nth-child(2), table th:nth-child(2) { width: 8%; }
    table td:nth-child(4), table th:nth-child(4) { 
        width: 10%; 
        padding-left: 6px;
        padding-right: 6px;
    }
    table td:nth-child(8), table th:nth-child(8) { width: 5%; }
    
    .chat-link {
        font-size: 10.5px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px; /* Mniejszy padding na stronie */
    }
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }

    .title-section {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .tag-cloud {
        margin-top: 0;
        max-width: 100%;
    }

    /* Tabela na małych ekranach */
    th, td {
        padding: 3px 4px;
        font-size: 10.5px; /* Jeszcze mniejsza czcionka na telefonach */
        line-height: 1.2;
    }
    th {
        font-size: 11px;
        padding: 3px 2px;
    }

    table {
        width: 100%;
        table-layout: fixed;
    }
    
    /* Dalsze korekty szerokości dla mobilnych */
    table td:nth-child(1), table th:nth-child(1) { width: 6%; }
    table td:nth-child(2), table th:nth-child(2) { width: 7%; }
    table td:nth-child(3), table th:nth-child(3) { width: 5%; }
    table td:nth-child(4), table th:nth-child(4) { 
        width: 10%;
        padding-left: 4px;
        padding-right: 4px;
    }
    table td:nth-child(8), table th:nth-child(8) { width: 5%; }
    table td:nth-child(9), table th:nth-child(9) { width: 12%; }
    
    .chat-link {
        font-size: 10px;
        max-width: 92%;
    }

    .faq-section h2 {
        font-size: 1.5em;
    }
    .faq-item h3 {
        font-size: 1.1em;
    }

    .cookie-content {
        /* Już obsługiwane przez flex-direction: column; */
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .cookie-btn {
        flex-grow: 1;
        text-align: center;
    }
}

/* Style dla strony Polityki Prywatności */
.privacy-content {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.privacy-content h1 {
    text-align: center;
    margin-bottom: 25px;
}

.privacy-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 1.5em;
}

.privacy-content h3 {
    margin-top: 20px;
    color: #444;
    font-size: 1.2em;
}

.privacy-content p, .privacy-content ul {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #444;
}

.privacy-content ul {
    padding-left: 25px;
    list-style-type: disc;
}

.privacy-content li {
    margin-bottom: 8px;
}

/* Style dla spisu treści FAQ */
.faq-index {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px 25px;
    margin-bottom: 30px;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.faq-index ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.faq-index li {
    margin-bottom: 8px;
    flex: 1 0 45%; /* 2 kolumny na desktop */
}

.faq-index-link {
    color: #333; /* Czarny kolor tekstu */
    text-decoration: none;
    font-size: 0.95em;
    display: inline-block;
    padding: 3px 2px;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.faq-index-link:hover, .faq-index-link:focus {
    color: #3366cc; /* Niebieski kolor po najechaniu */
    border-bottom: 1px solid #3366cc;
    transform: translateY(-1px);
}

/* Dodatkowe style dla elementów FAQ - płynne przewijanie */
html {
    scroll-behavior: smooth; /* Płynne przewijanie do kotwic */
}

/* Poprawka na padding dla płynnego przewijania */
.faq-item {
    scroll-margin-top: 20px; /* Zapewnia odpowiedni margines przy przewijaniu */
}

/* Style responsywne dla spisu treści */
@media (max-width: 768px) {
    .faq-index ul {
        flex-direction: column;
    }
    .faq-index li {
        flex: 1 0 100%; /* Jedna kolumna na mobile */
    }
}