/**
 * eLfilms.cz - Responzivní styly pro stránku knih
 *
 * @package    eLfilms
 * @subpackage Frontend
 * @file       css/knihy-responsive.css
 * @version    4.1 - SEO Enhanced Edition
 * @datum      Březen 2026
 * @author     eLfilms Team
 * @copyright  2009-2026 eLfilms.cz
 *
 * Responzivní styly pro stránku prohlížení knih (knihy.php).
 *
 * STYLUJE:
 * - Tablet landscape (992px - 1199px)
 * - Tablet portrait (768px - 991px)
 * - Mobil (do 767px) - burger menu, grid 2 sloupce, overlay sidebar
 * - Desktop (1200px+)
 *
 * 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 (iPad Mini 768px dostane tabletový layout)
 * - Sidebar se na mobilu zobrazuje jako overlay (fixed) po kliknutí na burger
 */

/* ============================================
   RESPONSIVE - TABLET LANDSCAPE (992px - 1199px)
   ============================================ */
@media (min-width: 992px) and (max-width: 1199px) {

    .page-container {
        padding: 40px 40px 60px;
        gap: 35px;
    }

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

    .item-poster {
        margin-bottom: 10px;
        border-width: 3px;
    }

    .item-title {
        font-size: 13px;
    }

    .item-author {
        font-size: 12px;
    }

    .item-year {
        font-size: 11px;
    }
}

/* ============================================
   RESPONSIVE - TABLET PORTRAIT (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {

    .page-container {
        grid-template-columns: 220px 1fr;
        padding: 30px 20px 40px;
        gap: 30px;
    }

    .sidebar {
        position: sticky;
        top: 80px;
        padding-right: 0;
    }

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

    .filter-title {
        font-size: 10px;
    }

    .type-toggle button {
        padding: 8px 12px;
        font-size: 12px;
    }

    .vazba-list {
        gap: 6px;
    }

    .vazba-item {
        padding: 3px 0;
    }

    .vazba-item span {
        font-size: 12px;
    }

    .range-current {
        font-size: 11px;
    }

    .filter-select {
        padding: 8px 10px;
        font-size: 12px;
    }

    .reset-filters-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

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

    .item-poster {
        margin-bottom: 8px;
    }

    .item-title {
        font-size: 13px;
    }

    .item-author {
        font-size: 12px;
    }

    .item-year {
        font-size: 11px;
    }
}

/* ============================================
   RESPONSIVE - MOBIL (do 767px)
   ============================================ */
@media (max-width: 767px) {

    .hero-section {
        height: auto;
        padding: 100px 20px 30px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .hero-right {
        text-align: center;
        padding-right: 0;
    }

    .hero-logo {
        max-width: 200px;
        top: 0;
    }

    .hero-subtitle {
        font-size: 16px;
        top: 0;
    }

    .hero-description {
        font-size: 15px;
    }

    .page-container {
        grid-template-columns: 1fr;
        padding: 20px 15px 40px;
    }

    .sidebar {
        position: static;
        padding-right: 0;
    }

    /* Kategorie toggle + Burger na jednom řádku */
    .filter-section:first-child {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        margin-bottom: 20px;
    }

    .filter-section:first-child .filter-title {
        display: none;
    }

    .type-toggle {
        flex: 1;
        max-width: 200px;
    }

    .type-toggle button {
        padding: 10px 15px;
        font-size: 13px;
    }

    .filters-burger {
        display: flex;
    }

    /* Ostatní filtry - skryté, zobrazí se po kliknutí */
    .sidebar.filters-hidden .filter-section:not(:first-child) {
        display: none;
    }

    /* Sidebar jako overlay */
    .sidebar.filters-open {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: #0b334f;
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
        animation: slideIn 0.3s ease-out;
    }

    @keyframes slideIn {
        from { transform: translateX(-100%); }
        to   { transform: translateX(0); }
    }

    .sidebar.filters-open .filter-section:first-child {
        display: block;
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 20px;
    }

    .sidebar.filters-open .filter-section:first-child .filter-title {
        display: block;
    }

    .sidebar.filters-open .type-toggle {
        max-width: none;
    }

    .sidebar.filters-open .filters-burger {
        display: none;
    }

    /* Overlay pozadí */
    .filters-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 999;
    }

    .filters-overlay.active {
        display: block;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .content-tools {
        width: 100%;
        justify-content: space-between;
    }

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

    .item-title {
        font-size: 12px;
    }

    .view-list .item-card {
        flex-direction: column;
    }

    .view-list .item-poster {
        width: 100%;
        max-width: 180px;
    }

    .view-list .item-title {
        font-size: 18px;
    }

    .view-list .item-description {
        font-size: 13px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* ============================================
   RESPONSIVE - VELKÝ DESKTOP (1200px+)
   ============================================ */
@media (min-width: 1200px) {

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