/* =====================================================================
   NSW.cz - vlastni styly nad Bootstrap 5.3
   ===================================================================== */

:root {
    --nsw-header-bg:  #2494cc;
    --nsw-primary:    #2494cc;
    --nsw-accent:     #2d7de5;
    --nsw-accent-h:   #6ca4ed;
    --nsw-footer-bg:  #f3f3f3;
}

html, body { font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* Bootstrap primary override */
.btn-primary, .bg-primary { background-color: var(--nsw-accent) !important; border-color: var(--nsw-accent) !important; }
.btn-primary:hover, .btn-primary:focus { background-color: var(--nsw-accent-h) !important; border-color: var(--nsw-accent-h) !important; }
.btn-outline-primary { color: var(--nsw-accent); border-color: var(--nsw-accent); }
.btn-outline-primary:hover { background-color: var(--nsw-accent); color: white; border-color: var(--nsw-accent); }
a, .text-primary { color: var(--nsw-accent); }
a:hover { color: var(--nsw-accent-h); }

/* ===== HEADER ===== */
/* Vyssi z-index nez sidebar (sticky), aby pri scrollu neprekryval menu hlavicku */
.nsw-header {
    z-index: 1030;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Sidebar pod hlavickou  offset = vyska sticky headeru */
.nsw-sidebar-sticky {
    position: sticky;
    top: var(--nsw-header-offset, 88px);
    z-index: 1010;
    max-height: calc(100vh - var(--nsw-header-offset, 88px) - 1rem);
    overflow-y: auto;
}
.nsw-header .navbar-brand img.nsw-logo { max-height: 56px; width: auto; }
.nsw-header .nav-link { font-weight: 500; padding-left: 1rem; padding-right: 1rem; }
.nsw-header .nav-link:hover { color: rgba(255,255,255,0.85) !important; }
.nsw-header .dropdown-menu { border-radius: 0; margin-top: 0; }
.nsw-header .input-group .form-control { background: rgba(255,255,255,0.15); color: white; border: 0; }
.nsw-header .input-group .form-control::placeholder { color: rgba(255,255,255,0.7); }
.nsw-header .input-group .form-control:focus { background: rgba(255,255,255,0.95); color: #212529; box-shadow: none; }

/* ===== HERO ===== */
.nsw-hero {
    min-height: 380px;
    display: flex;
    align-items: center;
}
.nsw-hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08) 0, transparent 50%);
    pointer-events: none;
}

/* ===== ?EEN - feature cards ===== */
.nsw-feature-card { transition: transform .2s ease, box-shadow .2s ease; color: inherit; }
.nsw-feature-card:hover { transform: translateY(-4px); }
.nsw-feature-card:hover .card { box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important; }
.nsw-feature-icon {
    width: 88px; height: 88px;
    font-size: 2.2rem;
}

/* ===== PAGE HEADER ===== */
.nsw-page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ===== CONTENT (HTML z editoru) ===== */
.nsw-content h2, .nsw-content h3, .nsw-content h4 {
    color: var(--nsw-primary);
    font-weight: 600;
    margin-top: 1.75rem;
}
.nsw-content h2 { font-size: 1.75rem; }
.nsw-content h3 { font-size: 1.4rem; }
.nsw-content p { line-height: 1.7; margin-bottom: 1rem; }
.nsw-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }
/* Import z WP: SVG ikony stahovani bez rozmeru */
.nsw-content img[src*="file-type-icons"],
.nsw-content img[src$=".svg"] {
    max-width: 3rem;
    max-height: 3rem;
    width: auto;
    height: auto;
    margin: 0.25rem 0.5rem 0.25rem 0;
    vertical-align: middle;
}
.nsw-content ul, .nsw-content ol { line-height: 1.7; padding-left: 1.5rem; }
.nsw-content blockquote {
    border-left: 4px solid var(--nsw-accent);
    padding-left: 1rem;
    margin-left: 0;
    color: var(--bs-secondary-color);
    font-style: italic;
}
.nsw-content table { width: 100%; margin: 1rem 0; }
.nsw-content table th, .nsw-content table td { padding: 8px 12px; border: 1px solid var(--bs-border-color); }
.nsw-content table th { background: var(--bs-tertiary-bg); font-weight: 600; }

/* ===== WIKI kategorie card hover ===== */
.nsw-cat-card { transition: transform .15s, box-shadow .15s; color: inherit; }
.nsw-cat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important; }

/* ===== FOOTER ===== */
.nsw-footer a { color: inherit; }
.nsw-footer a:hover { color: var(--nsw-accent); }
[data-bs-theme="dark"] .nsw-footer { background-color: var(--bs-tertiary-bg) !important; }

/* ===== ADMIN ===== */
.nsw-admin-sidebar {
    background: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color);
    min-height: calc(100vh - 56px);
}
.nsw-admin-sidebar .nav-link {
    color: var(--bs-body-color);
    border-radius: 0;
    padding: 0.625rem 1rem;
}
.nsw-admin-sidebar .nav-link.active {
    background: var(--nsw-accent);
    color: white;
}
.nsw-admin-sidebar .nav-link:hover { background: var(--bs-tertiary-bg); }

/* TinyMCE v administraci  plna sirka, nahled jako na webu */
.nsw-tinymce-wrap .tox-tinymce { border-radius: var(--bs-border-radius); }
.nsw-page-edit-form .tox-tinymce { width: 100% !important; }
/* Scrollovani obsahu v iframe (bez autoresize pluginu) */
.nsw-tinymce-wrap .tox .tox-edit-area {
    overflow: hidden;
}
.nsw-tinymce-wrap .tox .tox-edit-area__iframe {
    display: block;
}
textarea.nsw-html-editor.nsw-html-editor-ready { display: none; }

/* ===== Dark mode tweaks ===== */
[data-bs-theme="dark"] .nsw-header { box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
[data-bs-theme="dark"] body { background-color: #1a1d20; }

/* ===== Util ===== */
.bg-white-50 { background-color: rgba(255,255,255,0.15); }

/* ===== Responsive tweaks ===== */
@media (max-width: 991.98px) {
    .nsw-hero { min-height: auto; padding: 3rem 0; }
}
