/* --- ZÁKLADNÍ NASTAVENÍ (LOCK PROTI UJÍŽDĚNÍ MOBILU) --- */
:root {
    --bg: #090A0F;
    --card: #0E111A;
    --border: #1E293B;
    --text: #F4F4F5;
    --text-muted: #A1A1AA;
}

html, body {
    background-color: var(--bg) !important;
    color: var(--text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Zámek proti posunu do stran */
    position: relative;
}

/* --- LAYOUT A MŘÍŽKA --- */
.max-width-container {
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

.main-content {
    flex-grow: 1;
    padding-top: 48px;
    padding-bottom: 48px;
    width: 100%;
    box-sizing: border-box;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- HEADER & NAVIGACE (OPRAVA ODSZENÍ A HAMBURGERU) --- */
header {
    border-bottom: 1px solid #18181b;
    background-color: rgba(7, 8, 12, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px; /* Fix odsazení od krajů */
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo {
    max-height: 34px;
    width: auto;
    display: block;
}

.logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gradient-start, #3b82f6), var(--gradient-end, #ec4899));
    color: white;
    font-weight: 900;
    font-size: 20px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

/* Navigace na desktopu */
.desktop-nav {
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav li a:hover, .nav li.nav-current a {
    color: white;
}

/* Hamburger Tlačítko */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 4px;
    z-index: 110;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Mobilní menu rozbalovací */
.mobile-nav-drawer {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #07080C;
    border-bottom: 1px solid #18181b;
    padding: 24px;
    box-sizing: border-box;
    z-index: 99;
}

.mobile-nav-drawer .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .hamburger-btn {
        display: flex;
    }
    .mobile-nav-drawer.active {
        display: block;
    }
    /* Animace hamburgeru na křížek */
    .hamburger-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* --- VYHLEDÁVACÍ PORTÁLOVÁ LIŠTA --- */
.search-container {
    max-width: 500px;
    margin: 24px auto 0 auto;
    padding: 0 16px;
}

.search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #0E111A;
    border: 1px solid #1E293B;
    padding: 12px 16px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-bar:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.search-placeholder-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.search-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.search-shortcut {
    background-color: #1E293B;
    color: var(--text-muted);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
}

/* --- KARTY ČLÁNKŮ S OBRÁZKY (V2.0) --- */
.post-card {
    border-radius: 16px;
    background-color: var(--card);
    border: 1px solid rgba(30, 41, 59, 0.8);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}

.post-card:hover {
    border: 1px solid transparent;
    background: linear-gradient(#0E111A, #0E111A) padding-box,
                linear-gradient(135deg, var(--gradient-start, #3b82f6), var(--gradient-end, #ec4899)) border-box;
    transform: translateY(-2px);
}

/* Styl kontejneru pro obrázek 16:9 */
.card-image-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Poměr 16:9 */
    overflow: hidden;
    background-color: #050508;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .card-image {
    transform: scale(1.05); /* Jemný zoom efekt */
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #52525b;
}

.card-meta .tag {
    color: #60a5fa;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 12px 0 8px 0;
    line-height: 1.4;
}

.card-title a {
    color: white;
    text-decoration: none;
}

.card-title a:hover {
    text-decoration: underline;
}

.card-excerpt {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.card-footer {
    border-top: 1px solid rgba(30, 41, 59, 0.4);
    padding-top: 16px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-time {
    font-size: 11px;
    color: #52525b;
}

.read-more {
    font-size: 12px;
    font-weight: 700;
    color: #60a5fa;
    text-decoration: none;
}

/* --- HERO SEKCE --- */
.hero-section {
    text-align: center;
    margin-bottom: 48px;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 48px;
    }
}

.hero-gradient {
    background: linear-gradient(to right, var(--gradient-start, #3b82f6), var(--gradient-end, #ec4899));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- DETAIL ČLÁNKU --- */
.post-container {
    max-width: 768px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.post-header {
    text-align: center;
    margin-bottom: 32px;
}

.post-header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #52525b;
    margin-bottom: 16px;
}

.post-main-title {
    font-size: 28px;
    font-weight: 900;
    color: white;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .post-main-title {
        font-size: 36px;
    }
}

.post-excerpt {
    color: var(--text-muted);
    font-style: italic;
    font-size: 15px;
    max-width: 600px;
    margin: 16px auto 0 auto;
    line-height: 1.6;
}

.post-image-box {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(30, 41, 59, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 32px;
}

.post-image-box img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- OBSAH EDITU (GHOST CONTENT) --- */
.gh-content {
    font-size: 17px;
    line-height: 1.8;
    color: #d4d4d8;
}

.gh-content p {
    margin-bottom: 24px;
}

.gh-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-top: 48px;
    margin-bottom: 16px;
}

.gh-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #60a5fa;
    margin-top: 32px;
    margin-bottom: 12px;
}

/* --- POVINNÉ GHOST TŘÍDY PRO OBRÁZKY --- */
.kg-width-wide {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 32px auto;
}

.kg-width-wide img {
    width: 100%;
    border-radius: 16px;
}

.kg-width-full {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-top: 32px;
    margin-bottom: 32px;
    box-sizing: border-box;
}

.kg-width-full img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
}

/* --- STRÁNKOVÁNÍ --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #18181b;
    font-size: 13px;
    color: var(--text-muted);
}

.pagination a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 700;
}
