/**
 * eLfilms.cz - Styly pro stránku knih (Knihy)
 *
 * @package    eLfilms
 * @subpackage Frontend
 * @file       css/knihy.css
 * @version    4.1 - SEO Enhanced Edition
 * @datum      Březen 2026
 * @author     eLfilms Team
 * @copyright  2009-2026 eLfilms.cz
 *
 * Styly pro stránku prohlížení knih (knihy.php).
 *
 * STYLUJE:
 * - Skip to content (accessibility)
 * - Hlavní layout (page-container, sidebar, main-content)
 * - Sidebar filtry (kategorie toggle, range slidery, select, checkboxy)
 * - Burger menu tlačítko (mobil)
 * - Content header (název, řazení, přepínač pohledu)
 * - Grid knih (grid-4, list view)
 * - Item card (poster, info, overlay)
 * - Stránkování
 * - Loading overlay
 * - Responsive breakpointy
 *
 * POUŽÍVÁ:
 * - knihy.php (parent stránka)
 *
 * DESIGN:
 * - Barvy: tmavě modrá (#0d1b2a, #0b334f–#1a4f72), zlatá (#EEB500)
 * - Max šířka obsahu: 1200px
 *
 * NOTE:
 * - Mobilní breakpoint: max-width: 767px
 * - .range-slider-second nahrazuje inline style="margin-top: -6px;"
 * - .skip-to-content nahrazuje inline style na skip odkazu v PHP
 */

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

/* ============================================
   BODY
   ============================================ */
body {
    font-family: Arial, sans-serif;
    background-color: #0b334f;
    color: white;
    min-height: 100vh;
}

/* ============================================
   LINKS
   ============================================ */
a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   ACCESSIBILITY - SKIP TO CONTENT
   ============================================ */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    background: #EEB500;
    color: #0b334f;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}

.skip-to-content:focus {
    left: 10px;
    top: 10px;
}

/* ============================================
   HLAVNÍ LAYOUT
   ============================================ */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px 60px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    min-height: calc(100vh - 60px);
}

/* ============================================
   SIDEBAR - FILTRY
   ============================================ */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    padding-right: 20px;
}

.filter-section {
    margin-bottom: 28px;
}

.filter-title {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
    font-weight: 600;
}

/* ============================================
   TYP TOGGLE - TLAČÍTKA ČESKÉ/ZAHRANIČNÍ
   ============================================ */
.type-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
}

.type-toggle button {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.type-toggle button:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.type-toggle button:last-child {
    border-radius: 0 8px 8px 0;
}

.type-toggle button:hover {
    background: rgba(255,255,255,0.15);
}

.type-toggle button.active {
    background: #EEB500;
    color: #0b334f;
    font-weight: 600;
    border-color: #EEB500;
}

/* ============================================
   VAZBA - CHECKBOXY
   ============================================ */
.vazba-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vazba-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.2s;
}

.vazba-item:hover {
    color: #EEB500;
}

.vazba-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #EEB500;
    cursor: pointer;
    flex-shrink: 0;
}

.vazba-item span {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    flex: 1;
}

.vazba-item:hover span {
    color: #EEB500;
}

/* ============================================
   RANGE SLIDERY
   ============================================ */
.range-container {
    padding: 5px 0;
}

.range-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.range-slider-second {
    margin-top: -6px;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #EEB500;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #EEB500;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.range-current {
    text-align: center;
    margin-top: 5px;
    font-size: 13px;
    color: #EEB500;
    font-weight: 500;
}

/* ============================================
   SELECT DROPDOWN
   ============================================ */
.filter-select {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.filter-select:hover,
.filter-select:focus {
    border-color: #EEB500;
    background: rgba(255,255,255,0.12);
}

.filter-select option {
    background: #0b334f;
    color: white;
    padding: 10px;
}

/* ============================================
   RESET FILTRŮ TLAČÍTKO
   ============================================ */
.reset-filters-btn {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reset-filters-btn:hover {
    border-color: #EEB500;
    color: #EEB500;
}

/* ============================================
   HLAVNÍ OBSAH
   ============================================ */
.main-content {
    min-width: 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.content-header h1 {
    font-size: 25px;
    font-weight: 600;
    color: white;
}

.content-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ============================================
   ŘAZENÍ
   ============================================ */
.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.sort-select {
    background: transparent;
    border: none;
    color: #EEB500;
    padding: 8px 5px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.sort-select option {
    background: #0b334f;
    color: white;
}

/* ============================================
   PŘEPÍNAČ POHLEDŮ
   ============================================ */
.view-toggle {
    display: flex;
    gap: 5px;
    background: rgba(255,255,255,0.05);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.view-btn.active {
    background: #EEB500;
    color: #0b334f;
}

/* ============================================
   POČET VÝSLEDKŮ
   ============================================ */
.results-count {
    margin-bottom: 20px;
    font-size: 20px;
    color: rgba(255,255,255,0.6);
}

.results-count span {
    color: #EEB500;
    font-weight: 600;
}

/* ============================================
   GRID KNIH
   ============================================ */
.items-grid {
    display: grid;
    gap: 30px;
}

.items-grid.view-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.items-grid.view-list {
    grid-template-columns: 1fr;
    gap: 0;
}

/* ============================================
   KARTA - GRID 4 SLOUPCE
   ============================================ */
.item-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.item-card:hover {
    transform: translateY(-8px);
}

.item-poster {
    position: relative;
    aspect-ratio: 2/3;
    background: rgba(255,255,255,0.05);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 12px;
    border: 5px solid #ffffff;
    box-sizing: border-box;
}

.item-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.item-card:hover .item-poster img {
    transform: scale(1.05);
}

.item-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    gap: 10px;
}

.item-poster-placeholder i {
    font-size: 40px;
    opacity: 0.5;
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 12px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover .item-overlay {
    opacity: 1;
}

.item-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #EEB500;
}

.item-rating i {
    font-size: 12px;
}

.item-info {
    padding: 0 5px;
}

.item-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.item-card:hover .item-title {
    color: #EEB500;
}

.item-author {
    font-size: 13px;
    color: #EEB500;
    display: block;
    margin-bottom: 2px;
}

.item-year {
    font-size: 12px;
    color: white;
}

.item-subtitle {
    display: none;
}

/* ============================================
   KARTA - LIST VIEW (seznam)
   ============================================ */
.view-list .item-card {
    flex-direction: row;
    gap: 25px;
    padding: 25px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 0;
    border-radius: 0;
}

.view-list .item-card:first-child {
    padding-top: 0;
}

.view-list .item-card:hover {
    transform: none;
    background: transparent;
}

.view-list .item-card:last-child {
    border-bottom: none;
}

.view-list .item-poster {
    width: 120px;
    min-width: 120px;
    aspect-ratio: 2/3;
    margin-bottom: 0;
    border-radius: 0;
    border: 3px solid #fff;
    box-sizing: border-box;
}

.view-list .item-overlay {
    display: none;
}

.view-list .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 5px 0;
}

.view-list .item-title {
    font-size: 20px;
    font-weight: 600;
    color: #EEB500;
    margin-bottom: 5px;
    -webkit-line-clamp: 1;
}

.view-list .item-card:hover .item-title {
    color: #ffd700;
}

.view-list .item-author {
    font-size: 15px;
    color: #EEB500;
    margin-bottom: 8px;
}

/* ============================================
   META ŘÁDEK (list view)
   ============================================ */
.item-meta-line {
    display: none;
}

.view-list .item-meta-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}

.view-list .item-meta-line .separator {
    color: rgba(255,255,255,0.3);
}

/* ============================================
   HODNOCENÍ ŘÁDEK (list view)
   ============================================ */
.item-rating-line {
    display: none;
}

.view-list .item-rating-line {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.view-list .item-rating-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: white;
}

.view-list .item-rating-stars i {
    color: #EEB500;
    font-size: 16px;
}

.view-list .item-rate-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: color 0.3s;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 20px;
}

.view-list .item-rate-btn:hover {
    color: #EEB500;
}

.view-list .item-rate-btn i {
    font-size: 14px;
}

/* ============================================
   POPIS (list view)
   ============================================ */
.item-description {
    display: none;
}

.view-list .item-description {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    text-align: justify;
}

.view-list .item-year,
.view-list .item-subtitle {
    display: none;
}

/* ============================================
   STRÁNKOVÁNÍ
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    padding-bottom: 20px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
}

.pagination a:hover {
    border-color: #EEB500;
    color: #EEB500;
    background: rgba(238,181,0,0.1);
}

.pagination .active {
    background: #EEB500;
    color: #0b334f;
    border-color: #EEB500;
    font-weight: 600;
}

.pagination .disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .dots {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.4);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 51, 79, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: #EEB500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   PRÁZDNÉ VÝSLEDKY
   ============================================ */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255,255,255,0.6);
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: white;
}

.no-results p {
    font-size: 16px;
}

/* ============================================
   BURGER MENU - MOBIL
   ============================================ */
.filters-burger {
    display: none;
    width: 50px;
    height: 50px;
    background: #EEB500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
}

.filters-burger span {
    width: 24px;
    height: 3px;
    background: #0b334f;
    border-radius: 2px;
    transition: all 0.3s;
}

.filters-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.filters-burger.active span:nth-child(2) {
    opacity: 0;
}

.filters-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}