/* ORIS CORE THEME - Verze: Menu zarovnané přesně nad středovým kontejnerem */

:root {
    --bg-main: #111418;
    --bg-nav: #1a1e23;
    --bg-card: #22272e;
    --accent: #0095ff;
    --accent-glow: rgba(0, 149, 255, 0.3);
    --safety-orange: #f39c12;
    --text-high: #ffffff;
    --text-mid: #9ca3af;
    --border: #30363d;
    --font: 'Segoe UI', Tahoma, Helvetica, sans-serif;
    --header-height: 70px;
    --footer-height: 200px;
}

/* Základní styly */
body {
    font-family: var(--font);
    background: linear-gradient(rgba(17, 20, 24, 0.7), rgba(17, 20, 24, 0.9)), url('background.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-high);
    line-height: 1.6;
    margin: 0;
    /* Odsazení pro fixní prvky */
    padding-top: calc(var(--header-height) + 30px);
    padding-bottom: calc(var(--footer-height) + 40px);
}

a { color: var(--accent); text-decoration: none; transition: 0.3s; }
a:hover { filter: brightness(1.2); }

/* --- HLAVIČKA (Zarovnaná na grid obsahu) --- */
.header-wrapper {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
}

.site-header {
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    max-width: 1800px; 
    display: grid;
    /* Kopíruje strukturu layoutu: Sidebar | Container | Sidebar */
    grid-template-columns: 280px 1fr 280px; 
    gap: 2rem; /* Stejná mezera jako u obsahu pro zarovnání sloupců */
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.site-logo {
    grid-column: 1;
    justify-self: start;
}

.site-logo a {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.site-logo img {
    max-height: 40px;
    width: auto;
}

/* Navigace - Desktop */
.primary-navigation {
    grid-column: 2; /* Umístění nad prostřední sloupec */
    justify-self: right;  /* Vycentrování v rámci sloupce */
}

.primary-navigation ul {
    display: flex; 
    gap: 2.5rem; 
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-navigation a {
    color: var(--text-mid);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

/* Hover efekt pro desktop menu */
.primary-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.primary-navigation a:hover {
    color: var(--text-high);
    text-shadow: 0 0 10px var(--accent-glow);
}

.primary-navigation a:hover::after {
    width: 100%;
}

/* Tlačítko mobilního menu - Hamburger */
.mobile-nav-toggle {
    display: none; 
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    z-index: 2100;
}

/* --- HLAVNÍ LAYOUT (DESKTOP GRID) --- */
.site-content-wrapper {
    display: grid;
    grid-template-columns: 280px minmax(0, 1200px) 280px;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto;
    padding: 0 2rem;
    max-width: 1800px;
    box-sizing: border-box;
}

.container {
    background-color: color-mix(in srgb, var(--bg-card), transparent 20%);
    padding: 2.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    grid-column: 2;
    box-sizing: border-box;
}

/* Boční panely */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#sidebar-left { grid-column: 1; }
#sidebar-right { grid-column: 3; }

/* Widgety v panelech */
.widget {
    background-color: color-mix(in srgb, var(--bg-card), transparent 40%);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.widget-title {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 1rem 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    text-shadow: 0 0 5px var(--accent-glow);
}

.widget-content {
    color: var(--text-mid);
    font-size: 0.9rem;
}

/* --- PATIČKA --- */
.footer-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}

.site-footer {
    width: 100%;
    text-align: center;
    background-color: var(--bg-nav);
    padding: 1rem 2rem;
    border-top: 1px solid var(--border);
    box-sizing: border-box;
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0.5rem 0 1rem 0;
    flex-wrap: wrap;
}

.footer-navigation a {
    color: var(--text-mid);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-mid);
    opacity: 0.8;
}

/* --- OSTATNÍ --- */
article h1 {
    color: var(--accent);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    text-shadow: 0 0 15px var(--accent-glow);
}

.page-content {
    color: var(--text-mid);
    font-size: 1.05rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}
.lightbox.active { display: flex; }
.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border: 2px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

/* --- Plugin USER --- */
.user-form-wrapper {
    max-width: 500px;
    margin: 20px auto;
}

.user-form-container {
    padding: 20px 30px;
    background-color: rgba(249, 249, 249, 0.6); 
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #333; /* Čitelná tmavá barva pro základní text na světlém pozadí */
}

.user-form-container h3, .user-form-container h4 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(238, 238, 238, 0.8);
    padding-bottom: 15px;
    color: var(--accent); /* Zachováváme tvou modrou pro nadpisy */
}

.user-form-container h4 {
    border-bottom: none;
    margin-bottom: 20px;
    text-align: left;
}

.user-form-container p {
    margin: 0 0 15px 0;
    color: #444;
}

.user-form-container p:last-child {
    margin-bottom: 0;
}

.user-form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #222;
}

.user-form-container input[type="text"],
.user-form-container input[type="email"],
.user-form-container input[type="password"],
.user-form-container textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #000; /* Černý text v polích pro maximální čitelnost */
}

.user-form-container input[type="checkbox"] {
    margin-right: 5px;
    vertical-align: middle;
}

.user-form-container button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
}

.user-form-container button:hover {
    filter: brightness(1.1);
}

.user-form-links {
    text-align: center;
    margin-top: 15px;
}

.user-form-links a {
    color: var(--accent);
}

.user-plugin-success, .user-plugin-error {
    padding: 15px; 
    margin-bottom: 20px; 
    border: 1px solid transparent; 
    border-radius: 4px;
}

.user-plugin-success {
    color: #155724; 
    background-color: #d4edda; 
    border-color: #c3e6cb;
}

.user-plugin-error {
    color: #721c24; 
    background-color: #f8d7da; 
    border-color: #f5c6cb;
}

/* --- Plugin BLOG (Dark Tech Theme) --- */
.category-admin-container { 
    display: flex; 
    gap: 30px; 
    margin-bottom: 30px;
}

.form-column { flex: 1; }
.list-column { flex: 2; }

/* Widgety v administraci blogu */
.widget-admin { 
    background: var(--bg-card); 
    padding: 20px; 
    border: 1px solid var(--border); 
    border-radius: 4px; 
}

.widget-admin h3 { 
    margin-top: 0; 
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.widget-admin label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: var(--text-high);
}

.widget-admin input[type="text"], 
.widget-admin textarea { 
    width: 100%; 
    padding: 10px; 
    box-sizing: border-box; 
    margin-bottom: 15px; 
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-high);
    border-radius: 4px;
}

.widget-admin input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Tlačítka v blogu */
.button-blog { 
    display: inline-block; 
    padding: 10px 20px; 
    background: var(--accent); 
    color: white; 
    text-decoration: none; 
    border-radius: 4px; 
    border: none; 
    cursor: pointer; 
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: 0.3s;
}

.button-blog:hover { 
    filter: brightness(1.2);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Tabulky administrace blogu */
.blog-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: rgba(255, 255, 255, 0.02);
}

.blog-table th, .blog-table td { 
    padding: 12px; 
    border: 1px solid var(--border); 
    text-align: left; 
}

.blog-table th {
    background: var(--bg-nav);
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.blog-table tr:nth-child(even) { 
    background-color: rgba(255, 255, 255, 0.03); 
}

/* Statusy */
.status-approved { color: #28a745; font-weight: bold; }
.status-pending { color: var(--safety-orange); font-weight: bold; }

/* Samotný blog (frontend) */
.blog-container { 
    max-width: 100%; 
    margin: 0 auto; 
}

.blog-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 20px; 
    margin-bottom: 30px; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.blog-search form { display: flex; }

.blog-search input { 
    background: var(--bg-main);
    border: 1px solid var(--border); 
    padding: 10px; 
    color: var(--text-high);
    border-radius: 4px 0 0 4px; 
}

.blog-search button { 
    border: none; 
    background: var(--accent); 
    color: white; 
    padding: 10px 15px; 
    border-radius: 0 4px 4px 0; 
    cursor: pointer; 
    font-weight: bold;
}

.blog-categories a { 
    margin-right: 20px; 
    text-decoration: none; 
    color: var(--text-mid); 
    font-weight: 600;
    font-size: 0.9rem;
}

.blog-categories a:hover {
    color: var(--accent);
}

.blog-post-item { 
    margin-bottom: 50px; 
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-post-item h2 a { 
    text-decoration: none; 
    color: var(--text-high); 
    transition: 0.3s;
}

.blog-post-item h2 a:hover {
    color: var(--accent);
}

.blog-post-meta { 
    font-size: 0.85rem; 
    color: var(--text-mid); 
    margin-bottom: 15px; 
    display: flex;
    gap: 15px;
}

.blog-post-excerpt { 
    color: var(--text-mid); 
    line-height: 1.7; 
}

/* Komentáře */
.comments-section { 
    margin-top: 50px; 
    border-top: 1px solid var(--border); 
    padding-top: 30px; 
}

.comment { 
    border-bottom: 1px solid var(--border); 
    padding: 20px 0; 
}

.comment-author { 
    font-weight: bold; 
    color: var(--accent);
}

.comment-date { 
    font-size: 0.8rem; 
    color: var(--text-mid); 
    margin-left: 10px;
}

.comment-form textarea { 
    width: 100%; 
    min-height: 120px; 
    padding: 15px; 
    background: var(--bg-main);
    border: 1px solid var(--border); 
    color: var(--text-high);
    border-radius: 4px; 
    margin-bottom: 15px; 
    box-sizing: border-box; 
}

.comment-form button { 
    background: #28a745; 
    color: white; 
    padding: 12px 25px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold;
    text-transform: uppercase;
}

/* --- RESPONZIVITA (MOBIL A TABLET) --- */
@media (max-width: 1150px) {
    .site-content-wrapper {
        display: flex;
        flex-direction: column;
        padding: 0 1rem;
    }

    .site-header {
        display: flex;
        justify-content: space-between;
    }

    .container, .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 2rem 0 !important;
        grid-column: auto !important;
        box-sizing: border-box;
    }

    .container { order: 1; padding: 1.5rem; }
    #sidebar-left { order: 2; }
    #sidebar-right { order: 3; }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger, .hamburger::before, .hamburger::after {
        content: '';
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--text-high);
        position: absolute;
        transition: all 0.3s ease;
    }
    .hamburger { top: 19px; left: 5px; }
    .hamburger::before { top: -8px; }
    .hamburger::after { top: 8px; }

    .primary-navigation {
        position: fixed;
        inset: 0 0 0 20%; 
        background-color: rgba(26, 30, 35, 0.98);
        backdrop-filter: blur(15px);
        z-index: 2000;
        flex-direction: column;
        justify-content: flex-start; 
        padding: 6rem 2rem;
        border-left: 1px solid var(--border);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .primary-navigation[data-visible="true"] {
        transform: translateX(0%);
    }

    .primary-navigation ul {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        align-items: flex-start;
    }

    .primary-navigation a {
        font-size: 1.2rem;
        width: 100%;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .primary-navigation a::after { display: none; }

    .footer-wrapper {
        position: static !important; 
        order: 10 !important; /* Vynutí umístění na konec flexu */
    }

}