/*
 * CMS — Frontend styles
 * Barevné schéma: Varianta A — červená primár (#CC0000), logo modrá sekundár (#3069B3)
 */

/* FONTY: Přidejte vlastní @font-face zde */

/* ================================================================
   BRAND PROMĚNNÉ + BOOTSTRAP OVERRIDE
================================================================ */
:root {
    /* ── Barvy projektu ── */
    --hs-red:              #CC0000;
    --hs-red-dark:         #990000;
    --hs-red-hover:        #B30000;
    --hs-red-light:        #F8E0E0;
    --hs-blue:             #3069B3;
    --hs-blue-dark:        #1E4A8A;
    --hs-blue-light:       #EBF1FA;

    /* ── Bootstrap 5 variable overrides ── */
    --bs-primary:          #CC0000;
    --bs-primary-rgb:      204, 0, 0;
    --bs-link-color:       #3069B3;
    --bs-link-color-rgb:   48, 105, 179;
    --bs-link-hover-color: #1E4A8A;
    --bs-link-hover-color-rgb: 30, 74, 138;

    /* ── Typografie ── */
    --bs-body-font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-heading-color:    #1A1A1A;
}

/* ================================================================
   BOOTSTRAP COMPONENT OVERRIDES — primární červená
================================================================ */

/* Tlačítka */
.btn-primary {
    --bs-btn-bg:                #CC0000;
    --bs-btn-border-color:      #CC0000;
    --bs-btn-hover-bg:          #990000;
    --bs-btn-hover-border-color:#990000;
    --bs-btn-active-bg:         #880000;
    --bs-btn-active-border-color:#880000;
    --bs-btn-color:             #fff;
    --bs-btn-hover-color:       #fff;
    --bs-btn-active-color:      #fff;
    --bs-btn-focus-shadow-rgb:  204, 0, 0;
}
.btn-outline-primary {
    --bs-btn-color:              #CC0000;
    --bs-btn-border-color:       #CC0000;
    --bs-btn-hover-bg:           #CC0000;
    --bs-btn-hover-border-color: #CC0000;
    --bs-btn-hover-color:        #fff;
    --bs-btn-active-bg:          #990000;
    --bs-btn-active-border-color:#990000;
    --bs-btn-active-color:       #fff;
}

/* Sekundární modrá tlačítka */
.btn-secondary {
    --bs-btn-bg:                #3069B3;
    --bs-btn-border-color:      #3069B3;
    --bs-btn-hover-bg:          #1E4A8A;
    --bs-btn-hover-border-color:#1E4A8A;
    --bs-btn-color:             #fff;
    --bs-btn-hover-color:       #fff;
}
.btn-outline-secondary {
    --bs-btn-color:              #3069B3;
    --bs-btn-border-color:       #3069B3;
    --bs-btn-hover-bg:           #3069B3;
    --bs-btn-hover-border-color: #3069B3;
    --bs-btn-hover-color:        #fff;
}

/* Badges a bg utility */
.bg-primary   { background-color: #CC0000 !important; }
.bg-secondary { background-color: #3069B3 !important; }
.text-primary { color: #CC0000 !important; }
.text-secondary { color: #3069B3 !important; }
.border-primary { border-color: #CC0000 !important; }

/* Form focus ring */
.form-control:focus,
.form-select:focus {
    border-color: #CC0000;
    box-shadow: 0 0 0 .25rem rgba(204, 0, 0, .2);
}

/* Pagination */
.page-item.active .page-link {
    background-color: #CC0000;
    border-color:     #CC0000;
}
.page-link {
    color: #3069B3;
}
.page-link:hover {
    color: #1E4A8A;
}

/* Progress, nav-tabs active */
.nav-tabs .nav-link.active {
    color: #CC0000;
    border-bottom-color: #CC0000;
}

/* Alerts */
.alert-primary {
    --bs-alert-color:       #880000;
    --bs-alert-bg:          #F8E0E0;
    --bs-alert-border-color:#f5c2c2;
}

/* ================================================================
   TYPOGRAFIE
================================================================ */
body {
    font-family: var(--bs-body-font-family);
    color: #1A1A1A;
}

h1, h2, h3, h4, h5, h6 {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Nadpisy H1/H2 — červená jako na stávajícím webu */
h1, h2 {
    color: var(--hs-red);
}

/* H3/H4/H5 — logo modrá */
h3, h4, h5 {
    color: var(--hs-blue-dark);
}

a {
    color: var(--hs-blue);
}
a:hover {
    color: var(--hs-blue-dark);
}

/* ================================================================
   NAVBAR — tmavá navy modrá (z loga HŠ), červená jako accent border
   Logo (modré + červené srdce) vynikne na tmavém modrém pozadí.
   Červená zůstává dominantní na celé stránce (tlačítka, nadpisy).
================================================================ */
:root {
    --hs-navy:       #1A3A5C;   /* tmavá navy — navbar bg */
    --hs-navy-dark:  #122A44;   /* navbar scrolled */
}

.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    background-color: var(--hs-navy) !important;
    border-bottom: 3px solid var(--hs-red);   /* červený accent proužek */
    transition: padding-top .3s, padding-bottom .3s, box-shadow .3s;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Scrolled stav — o malinko tmavší + shadow */
.site-navbar.navbar-scrolled {
    padding-top: .35rem;
    padding-bottom: .35rem;
    background-color: var(--hs-navy-dark) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .35) !important;
}

/* Loga */
.site-navbar .navbar-logo-school {
    height: 72px;
    width: auto;
    object-fit: contain;
    transition: height .3s;
}
.site-navbar .navbar-logo-founder {
    height: 60px;
    max-width: 160px;
    object-fit: contain;
    transition: height .3s, max-width .3s;
}
.site-navbar.navbar-scrolled .navbar-logo-school  { height: 38px; }
.site-navbar.navbar-scrolled .navbar-logo-founder { height: 32px; max-width: 100px; }

/* Text a linky v navbaru — bílé */
.site-navbar .navbar-brand,
.site-navbar .nav-link,
.site-navbar .navbar-text {
    color: rgba(255, 255, 255, .92) !important;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: #fff !important;
    background-color: rgba(0, 0, 0, .18);
    border-radius: .25rem;
}
.site-navbar .nav-link.active {
    font-weight: 600;
}

/* Hamburger */
.site-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, .5);
}
.site-navbar .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* Dropdown */
.site-navbar .dropdown-menu {
    background-color: #0F2438;   /* tmavší navy — plynulé navázání na navbar */
    border: none;
    border-top: 2px solid var(--hs-red);  /* jemný červený accent nahoře */
    border-radius: 0 0 .375rem .375rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.site-navbar .dropdown-item {
    color: rgba(255, 255, 255, .85);
}
.site-navbar .dropdown-item:hover,
.site-navbar .dropdown-item:focus {
    background-color: rgba(255, 255, 255, .08);
    color: #fff;
}
.site-navbar .dropdown-item.active {
    background-color: rgba(204, 0, 0, .25);  /* červený tón pro aktivní položku */
    color: #fff;
    font-weight: 600;
}
.site-navbar .dropdown-divider {
    border-color: rgba(255, 255, 255, .12);
}

/* Pravý sloupec (logo zřizovatele + vyhledávání) */
.site-navbar .navbar-right-col {
    min-width: 160px;
    max-width: 200px;
}
/* Při scrollu schovej vyhledávání — navbar je příliš nízký */
.site-navbar.navbar-scrolled .navbar-right-col form {
    display: none !important;
}

/* Vyhledávací pole v navbaru */
.site-navbar .form-control {
    background-color: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .4);
    color: #fff;
}
.site-navbar .form-control::placeholder { color: rgba(255, 255, 255, .65); }
.site-navbar .form-control:focus {
    background-color: rgba(255, 255, 255, .25);
    border-color: #fff;
    box-shadow: none;
    color: #fff;
}
.site-navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}
.site-navbar .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, .2);
}

/* ── Hover dropdown menu na desktopu ── */
@media (min-width: 992px) {
    .site-navbar .dropdown:hover > .dropdown-menu {
        display: block !important;
    }
    .site-navbar .dropdown-menu {
        margin-top: 0 !important;
    }
}

/* ================================================================
   CMS TEXT MODUL
================================================================ */
.cms-text-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

.cms-text-content h2,
.cms-text-content h3,
.cms-text-content h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.cms-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.cms-text-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.cms-text-content table th,
.cms-text-content table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
}

.cms-text-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Horizontální čára — červená */
.cms-text-content hr {
    border-color: var(--hs-red);
    opacity: .4;
}

/* Citace */
.cms-text-content blockquote {
    border-left: 4px solid var(--hs-red);
    padding-left: 1rem;
    color: #555;
    font-style: italic;
}

/* ================================================================
   TOC
================================================================ */
.toc-nav {
    border-radius: 0.5rem;
    border-left: 3px solid var(--hs-red) !important;
}
.toc-nav .nav-link {
    color: var(--hs-blue);
}
.toc-nav .nav-link:hover {
    color: var(--hs-blue-dark);
}

/* ================================================================
   FLASH MESSAGES (rychlé zprávy)
================================================================ */
.quick-message-bar {
    background: #fff3cd;
    border-bottom: 2px solid #ffc107;
    padding: 0.5rem 0;
}
.fm-content p           { margin-bottom: .2rem; }
.fm-content p:last-child { margin-bottom: 0; }
.fm-content ul,
.fm-content ol          { margin-bottom: 0; padding-left: 1.2rem; }
.fm-content li          { margin-bottom: .1rem; }

/* ================================================================
   FOOTER
================================================================ */
footer {
    background-color: #1A1A1A;
    color: rgba(255, 255, 255, .85);
    border-top: 4px solid var(--hs-red);
    /* Reset Bootstrap link proměnné pro patičku */
    --bs-link-color:       rgba(255, 255, 255, .78);
    --bs-link-color-rgb:   255, 255, 255;
    --bs-link-hover-color: #ffffff;
}
footer h5, footer h6 {
    color: #fff;
}
footer a,
footer a:link,
footer a:visited {
    color: rgba(255, 255, 255, .78) !important;
    text-decoration: none;
}
footer a:hover,
footer a:focus {
    color: #fff !important;
    text-decoration: underline !important;
}
footer .text-muted,
footer .text-secondary {
    color: rgba(255, 255, 255, .58) !important;
}
/* Sociální sítě ikony v patičce */
footer .social-icons a {
    color: rgba(255, 255, 255, .65) !important;
    font-size: 1.3rem;
    transition: color .2s;
}
footer .social-icons a:hover {
    color: #fff !important;
    text-decoration: none !important;
}

/* ================================================================
   KARTY (ChildrenModule, obecné)
================================================================ */
.hover-card {
    transition: box-shadow .2s, transform .2s;
    border-top: 3px solid transparent;
}
.hover-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12) !important;
    transform: translateY(-2px);
    border-top-color: var(--hs-red);
}

/* ================================================================
   PASSWORD GATE
================================================================ */
.page-password-card {
    max-width: 420px;
    margin: 4rem auto;
}

/* ================================================================
   GLIGHTBOX
================================================================ */
a.glightbox {
    display: inline-block;
    position: relative;
    cursor: zoom-in;
}
a.glightbox img {
    transition: opacity .2s;
}
a.glightbox:hover img {
    opacity: .88;
}
a.glightbox::after {
    content: '\F52A';
    font-family: 'bootstrap-icons';
    position: absolute;
    bottom: .4rem;
    right: .4rem;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: .9rem;
    line-height: 1;
    padding: .25rem .3rem;
    border-radius: .25rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
}
a.glightbox:hover::after {
    opacity: 1;
}
