/* --- ZÁKLADNÍ NASTAVENÍ A BARVY --- */
:root {
    --bg-dark: #07070a;
    --bg-card: #121218;
    --bg-card-hover: #1a1a24;
    --text-main: #ffffff;
    --text-muted: #8e8e9f;
    --accent: #3b82f6;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); overflow-x: hidden; }

/* --- NAVIGACE --- */
header {
    background-color: rgba(7, 7, 10, 0.95); border-bottom: 1px solid #1f1f2e;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; position: sticky; top: 0; z-index: 1000;
}
.logo { font-size: 1.5rem; font-weight: bold; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo i { color: var(--accent); }
nav ul { list-style: none; display: flex; gap: 2rem; }
nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
nav a:hover, nav a.active { color: var(--text-main); }
.social-links { display: flex; gap: 1.5rem; }
.social-links a { color: var(--text-main); font-size: 1.2rem; transition: 0.3s; }
.social-links a:hover { color: var(--accent); }

/* --- OBECNÉ TŘÍDY PRO STRÁNKY --- */
.page-content { display: none; padding: 2rem 5%; min-height: 80vh; }
.page-content.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.section-title { margin-bottom: 1.5rem; }
.subtitle { color: #d1d1d6; margin-top: 10px; font-size: 1.1rem; }

/* --- DOMŮ --- */
.hero {
    /* Použití placehold.co pro hlavní obrázek */
    background: linear-gradient(rgba(7, 7, 10, 0.6), rgba(7, 7, 10, 1)), url('https://placehold.co/1920x600/0a0a0f/3b82f6?text=Uvodni+Obrazek+Mesta') center/cover;
    padding: 100px 0; margin-bottom: 3rem; border-radius: 10px;
}
.hero-text { max-width: 600px; padding-left: 2rem; }
.hero h1 { font-size: 3rem; margin-bottom: 1rem; line-height: 1.2; }

/* --- DOMŮ --- */
.cards-grid, .wiki-grid { display: grid; gap: 1.5rem; }
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 2rem; }

.home-card-img {
    background: transparent; /* Zbavíme se jakéhokoliv podkreslení */
    width: 100%;
}

.home-card-img img { 
    width: 100%; 
    height: auto; /* Výška se přizpůsobí automaticky, obrázek se nedeformuje */
    display: block; 
    border: none; 
    outline: none;
    /* Odstranili jsme aspect-ratio a object-fit */
}

.home-card-content { padding: 1.5rem; }
.home-card h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.home-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* --- PRAVIDLA --- */
.rules-layout { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; }
@media (max-width: 900px) { .rules-layout { grid-template-columns: 1fr; } }
.rules-header { margin-bottom: 2rem; border-bottom: 1px solid #1f1f2e; padding-bottom: 1rem; }
.rules-header h1 { margin-top: 10px; font-size: 2rem; }
.breadcrumbs { color: var(--text-muted); font-size: 0.9rem; }
.rule-block { margin-bottom: 2rem; background: var(--bg-card); padding: 2rem; border-radius: 8px; }
.rule-block h2 { margin-bottom: 1.5rem; font-size: 1.5rem; color: var(--accent); }
.rule-block li { color: #d1d1d6; line-height: 1.7; margin-bottom: 0.8rem; font-size: 0.95rem; margin-left: 1.2rem;}
.rules-sidebar { background: var(--bg-card); padding: 1.5rem; border-radius: 8px; height: fit-content; position: sticky; top: 100px; }
.rules-sidebar h3 { margin-bottom: 1rem; border-bottom: 1px solid #1f1f2e; padding-bottom: 0.5rem; }
.rules-sidebar ul { list-style: none; }
.rules-sidebar li { margin-bottom: 0.5rem; cursor: pointer; color: var(--text-muted); transition: 0.3s; }
.rules-sidebar li:hover { color: var(--accent); }

/* --- WIKI --- */
.wiki-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.wiki-header h1 { border-bottom: 2px solid var(--accent); padding-bottom: 5px; }
.search-bar { background: var(--bg-card); padding: 0.5rem 1rem; border-radius: 20px; display: flex; align-items: center; border: 1px solid #1f1f2e; }
.search-bar input { background: transparent; border: none; color: white; outline: none; margin-left: 10px; }
.wiki-grid { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.wiki-card { background: var(--bg-card); border: 1px solid #1f1f2e; border-radius: 12px; padding: 1.5rem; display: flex; align-items: center; gap: 1.5rem; cursor: pointer; transition: 0.3s; }
.wiki-card:hover { background: var(--bg-card-hover); border-color: #3b82f655; transform: scale(1.02); }
.wiki-icon { background: #1a1a24; width: 60px; height: 60px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-main); flex-shrink: 0; }
.wiki-text h3 { margin-bottom: 0.3rem; }
.wiki-text p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; }

/* --- ÚPRAVA KARET NA DOMOVSKÉ STRÁNCE (HOVER EFEKT) --- */
.home-card {
    background: var(--bg-card);
    border: 1px solid #1f1f2e;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer; /* Změní kurzor na ručičku */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-card:hover {
    transform: translateY(-8px); /* Nadzvednutí karty */
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15); /* Jemný stín v barvě accentu */
    border-color: #3b82f655;
}

/* --- DETAIL ČLÁNKU (ZNALOSTNÍ BÁZE) --- */
/* --- DETAIL ČLÁNKU (ZNALOSTNÍ BÁZE) --- */
.article-header { 
    margin-bottom: 2rem; 
}
.back-btn {
    background: transparent; 
    border: 1px solid var(--accent); 
    color: var(--accent);
    padding: 0.6rem 1.2rem; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: 0.3s;
    font-size: 1rem; 
    display: flex; 
    align-items: center; 
    gap: 8px;
    font-weight: bold;
}
.back-btn:hover { 
    background: var(--accent); 
    color: #fff; 
}

/* --- DETAIL ČLÁNKU (ZNALOSTNÍ BÁZE) --- */

/* --- DETAIL ČLÁNKU (ZNALOSTNÍ BÁZE) --- */
.article-hero { 
    width: 100%; 
    border-radius: 12px; 
    margin-bottom: 2rem; 
    overflow: hidden; 
}

.article-hero img { 
    width: 50%; 
    height: auto; 
    display: block; 
    margin: 0 auto; 
    border-radius: 12px; /* Tímto přidáme zaoblené rohy přímo na obrázek */
}

.article-content-box { 
    background: var(--bg-card); 
    padding: 3rem; 
    border-radius: 12px; 
    border: 1px solid #1f1f2e; 
}
/* ... zbytek stylů ... */

/* --- ÚPRAVA DVA BLOKY V DETAILU ČLÁNKU --- */

/* Přidat margin mezi dva nové bloky */
.article-desc-box {
    margin-bottom: 2rem;
}

/* Styl pro nadpis OOC mechaniky */
.article-ooc-box h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent); /* Modrá barva akcentu z tvých root proměnných */
}

/* Styl pro ikonku v nadpisu */
.article-ooc-box h3 i {
    color: var(--accent); /* Stejná modrá barva */
}

/* Styl pro text mechaniky, identický styl jako na tvém obrázku */
#article-ooc-text {
    font-style: italic; /* Často se pro OOC používá kurzíva */
    color: var(--text-muted); /* Mírně tlumená barva pro OOC text */
    line-height: 1.8;
    font-size: 1rem;
}

/* Výchozí nastavení pro OOC blok, JS ho zobrazí jen když je třeba */
.article-ooc-box {
    display: none;
    margin-top: 2rem; /* Mezera nad blokem */
}

/* --- PATIČKA (FOOTER) --- */
footer {
    background-color: rgba(7, 7, 10, 0.95);
    border-top: 1px solid #1f1f2e;
    padding: 2rem 5%;
    margin-top: 4rem;
    text-align: center;
}
.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.footer-content .disclaimer {
    font-size: 0.75rem;
    opacity: 0.7;
    max-width: 800px;
    margin: 0 auto 1rem auto;
}
.legal-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
}
.legal-links a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* --- MOBILNÍ VERZE (RESPONZIVITA) --- */

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }
.mobile-only-link { display: none; }

/* Pravidla, která se aplikují jen na displejích menších než 768px (telefony a malé tablety) */
@media (max-width: 768px) {
    /* Hlavička a Menu */
    .menu-toggle { display: block; }
    .desktop-only { display: none; }
    .mobile-only-link { display: block; margin-top: 1rem; border-top: 1px solid #1f1f2e; padding-top: 1rem; }
    
    nav#main-nav { 
        display: none; /* Skryto ve výchozím stavu */
        position: absolute; top: 100%; left: 0; width: 100%; 
        background: rgba(7, 7, 10, 0.98); border-bottom: 1px solid #1f1f2e; 
        padding: 1.5rem 0; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    nav#main-nav.open { display: block; animation: fadeIn 0.3s ease; }
    nav#main-nav ul { flex-direction: column; align-items: center; gap: 1.2rem; }
    
    /* Obsah a texty */
    .page-content { padding: 1.5rem 5%; }
    .hero { padding: 60px 0; background-position: left center; }
    .hero h1 { font-size: 2rem; }
    .hero-text { padding-left: 1rem; padding-right: 1rem; }
    
    /* Karty a Grid (aby nebyly na mobilu stlačené vedle sebe, ale pod sebou) */
    .cards-grid { grid-template-columns: 1fr; } 
    .wiki-grid { grid-template-columns: 1fr; }
    
    /* Znalostní báze - úprava rozložení */
    .wiki-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .search-bar { width: 100%; }
    .wiki-card { flex-direction: column; text-align: center; padding: 1.5rem; }
    .wiki-icon { margin: 0 auto 10px auto; }
    
    /* Detail článku */
    .article-hero img { width: 90%; } /* Zvětšíme obrázek, na mobilu by 50% bylo titěrné */
    .article-content-box { padding: 1.5rem; }
    .article-ooc-box h3 { font-size: 1.2rem; }
    
    /* Pravidla */
    .rules-header h1 { font-size: 1.5rem; }
    .rule-block { padding: 1.2rem; }
    .rule-block h2 { font-size: 1.2rem; }
    .rules-sidebar { position: static; height: auto; margin-top: 2rem; border-top: 2px solid var(--accent); }
}