/**
 * style.css - Design pro Lektorka.cz
 * Stylizace v Dark Mode s plynulými animacemi
 */

:root {
    /* Barevná paleta (Dark Mode podle předlohy) */
    --bg: #000000;
    --card-bg: #111111;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.5);
    --primary: #2563eb;
    --radius: 12px;
    --radius-pill: 50px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER (STYL LEKTORKA.CZ) --- */
.main-header {
    text-align: center;
    padding: 20px 0 15px;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px); /* Moderní efekt rozmazání pozadí */
    z-index: 100;
    margin-bottom: 30px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 20px;
}

.logo-link {
    text-decoration: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.icon-group {
    display: flex;
    gap: 15px;
}

.icon-group svg {
    width: 26px;
    height: 26px;
    stroke: var(--text);
    cursor: pointer;
    transition: opacity 0.2s;
}

.icon-group svg:hover {
    opacity: 0.7;
}

/* --- VYHLEDÁVÁNÍ (PILULKA) --- */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 14px 25px;
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.12); /* Tmavě šedý background */
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: background 0.2s;
}

#searchInput::placeholder {
    color: var(--text-muted);
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.2);
}

/* --- GRID A KARTY --- */
#catalogGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding-bottom: 50px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.08);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.card-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- ANIMACE FILTROVÁNÍ (FLIP) --- */
.card.fade-out {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.card.fading-item {
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.4s ease;
}

/* --- MODAL (DETAIL) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.modal-content {
    background: #1a1a1a;
    border-radius: var(--radius);
    max-width: 600px;
    width: 90%;
    overflow: hidden;
    position: relative;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-body {
    padding: 30px;
}

.modal-body h2 {
    margin-top: 0;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.modal-button {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    font-size: 1rem;
}

/* RESPONZIVITA */
@media (max-width: 600px) {
    .logo-text { font-size: 1.5rem; }
    .main-header { padding: 15px 0; }
    #catalogGrid { grid-template-columns: 1fr; }
}