@charset "UTF-8";

/* Farní knihovna Brno-Kohoutovice. Tokeny převzaté ze šablony Mamba farního webu. */
:root {
  --primary: #428bca;
  --primary-dark: #1c5c93;
  --primary-light: #9eccf4;
  --primary-soft: #629fd3;
  --text: #444;
  --muted: #5c768d;
  --navy: #1f3548;
  --section-bg: #f5f9fc;
  --border: #eee;
  --footer: #587187;
  --footer-top: #5c768d;
  --footer-social: #768fa6;
  --success: #18d26e;
  --shadow-box: 0 0 30px rgba(214, 215, 216, 0.6);
  --shadow-header: 0 5px 15px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 0 30px rgba(66, 139, 202, 0.25);
  --font-body: "Open Sans", sans-serif;
  --font-heading: "Raleway", sans-serif;
}

/* --- Obecné --- */
body { font-family: var(--font-body); color: var(--text); background: #fff; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); text-decoration: none; }
h1, h2, h3, h4, h5, h6, .font-primary { font-family: var(--font-heading); }
[hidden] { display: none !important; }

/* --- Topbar (Mamba #topbar) --- */
#topbar { background: #fff; border-bottom: 1px solid var(--border); font-size: 15px; height: 40px; padding: 0; }
#topbar .contact-info a { color: var(--text); transition: 0.3s; }
#topbar .contact-info a:hover { color: var(--primary); }
#topbar .contact-info i { color: var(--primary); margin-right: 5px; }
#topbar .contact-info .phone-icon { margin-left: 15px; }
#topbar .social-links a { color: var(--muted); padding: 4px 12px; display: inline-block; transition: 0.3s; }
#topbar .social-links a:hover { color: var(--primary); }
#topbar .social-links .gallery-link i { color: var(--muted); margin-right: 4px; }

/* --- Hlavička (Mamba #header) --- */
#header { height: 70px; background: #fff; z-index: 997; box-shadow: var(--shadow-header); position: sticky; top: 0; }
#header .logo h1 { font-size: 28px; margin: 0; padding: 10px 0; line-height: 1; font-weight: 400; letter-spacing: 3px; text-transform: uppercase; white-space: nowrap; }
#header .logo h1 a, #header .logo h1 a:hover { color: var(--primary-dark); }
#header .container { flex-wrap: nowrap; gap: 16px; }
@media (max-width: 1399.98px) { #header .logo h1 { font-size: 17px; letter-spacing: 2px; } }
@media (max-width: 1199.98px) { #header .logo h1 { font-size: 14px; letter-spacing: 1px; } }
@media (max-width: 575.98px) { #header .logo h1 { white-space: normal; line-height: 1.15; font-size: 13px; letter-spacing: 1px; } }

/* --- Navigace (Mamba .navbar) --- */
.navbar { padding: 0; }
.navbar ul { margin: 0; padding: 0; display: flex; list-style: none; align-items: center; }
.navbar li { position: relative; }
.navbar a, .navbar a:focus { display: flex; align-items: center; padding: 10px 0 10px 24px; font-family: var(--font-body); font-size: 15px; color: var(--muted); white-space: nowrap; transition: 0.3s; }
.navbar a:hover, .navbar li:hover > a { color: var(--primary); }
@media (max-width: 1399.98px) { .navbar a, .navbar a:focus { padding-left: 18px; font-size: 14px; } }
@media (max-width: 1199.98px) { .navbar a, .navbar a:focus { padding-left: 14px; font-size: 13px; } }
.mobile-nav-toggle { color: var(--navy); font-size: 28px; cursor: pointer; display: none; line-height: 0; transition: 0.5s; }
.mobile-nav-toggle.bi-x { color: #fff; }
@media (max-width: 991px) { .mobile-nav-toggle { display: block; } .navbar ul { display: none; } }
.navbar-mobile { position: fixed; overflow: hidden; top: 0; right: 0; left: 0; bottom: 0; background: rgba(31, 53, 72, 0.9); transition: 0.3s; z-index: 998; }
.navbar-mobile .mobile-nav-toggle { position: absolute; top: 15px; right: 15px; }
.navbar-mobile ul { display: block; position: absolute; top: 55px; right: 15px; bottom: 15px; left: 15px; padding: 10px 0; background: #fff; overflow-y: auto; transition: 0.3s; }
.navbar-mobile a, .navbar-mobile a:focus { padding: 10px 20px; font-size: 15px; color: var(--navy); }
.navbar-mobile a:hover { color: var(--primary); }

/* --- Breadcrumbs (Mamba .breadcrumbs) --- */
.breadcrumbs { padding: 15px 0; background: var(--section-bg); min-height: 40px; }
.breadcrumbs h2 { font-size: 24px; font-weight: 300; margin: 0; color: var(--text); }
.breadcrumbs h2 i { color: var(--primary); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; font-size: 14px; color: #6c757d; }
.breadcrumbs ol li + li { padding-left: 10px; }
.breadcrumbs ol li + li::before { display: inline-block; padding-right: 10px; color: #6c757d; content: "·"; }
@media (max-width: 768px) { .breadcrumbs .d-flex { display: block !important; } .breadcrumbs ol { display: block; } .breadcrumbs ol li { display: inline; } }

/* --- Sekce --- */
section.knihovna { padding: 60px 0; background: var(--section-bg); }
@media (max-width: 768px) { section.knihovna { padding: 30px 0; } }
.knihovna-frame { background: #fff; box-shadow: var(--shadow-box); border-radius: 4px; padding: 24px; }
@media (max-width: 768px) { .knihovna-frame { padding: 16px; } }

/* --- Tlačítka --- */
.btn-farnost { font-family: var(--font-heading); font-weight: 500; font-size: 14px; letter-spacing: 1px; padding: 12px 32px; border-radius: 5px; border: 0; color: #fff; background: var(--primary); transition: 0.5s; line-height: 1; }
.btn-farnost:hover, .btn-farnost:focus { background: var(--primary-dark); color: #fff; }
.btn-farnost.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-outline-farnost { font-family: var(--font-heading); font-weight: 500; font-size: 14px; letter-spacing: 1px; padding: 10px 24px; border-radius: 5px; border: 1px solid var(--primary); color: var(--primary); background: #fff; transition: 0.3s; line-height: 1.2; }
.btn-outline-farnost:hover { background: var(--primary); color: #fff; }
.btn-outline-farnost.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-link { color: var(--muted); }
.btn-link:hover { color: var(--primary); }

/* --- Filtry --- */
.info-box { background: var(--section-bg); padding: 20px; border-radius: 4px; }
.filter-label { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.filter-label i { color: var(--primary); margin-right: 4px; }
.form-control:focus, .form-select:focus { border-color: var(--primary-light); box-shadow: 0 0 0 0.2rem rgba(66, 139, 202, 0.2); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 0.2rem rgba(66, 139, 202, 0.2); }
.theme-filter-container { max-height: 420px; overflow-y: auto; padding-right: 4px; }
.theme-filter-container .form-check { margin-bottom: 4px; min-height: 0; }
.theme-filter-container small { color: var(--muted); font-size: 12px; display: inline; margin-left: 4px; }
.theme-filter-container .form-check-label { line-height: 1.35; font-size: 13px; }
.theme-filter-container .theme-badge { min-width: 30px; text-align: center; }
@media (min-width: 992px) { .sidebar-sticky { position: sticky; top: 85px; max-height: calc(100vh - 100px); overflow-y: auto; } }

/* --- Výsledky --- */
.results-count { color: var(--muted); font-size: 14px; }
.results-count strong { color: var(--text); }
.view-switch .btn { border: 1px solid var(--primary); color: var(--primary); background: #fff; padding: 6px 14px; }
.view-switch .btn:hover { background: var(--section-bg); color: var(--primary-dark); }
.view-switch .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.stats-text { color: var(--muted); font-size: 13px; }
.empty-state { background: var(--section-bg); border-radius: 4px; padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state i { font-size: 48px; color: var(--primary-light); display: block; margin-bottom: 12px; }
.empty-state h4 { font-weight: 600; color: var(--muted); }

/* --- Karty knih --- */
.card-book { border: 0; border-radius: 4px; box-shadow: var(--shadow-box); background: #fff; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; height: 100%; display: flex; flex-direction: column; }
.card-book:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.book-cover-wrap { position: relative; aspect-ratio: 2 / 3; background: var(--section-bg); border-radius: 4px 4px 0 0; overflow: hidden; }
.book-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.theme-tag { position: absolute; top: 8px; left: 8px; font-family: var(--font-heading); font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.badge-novinka { position: absolute; top: 8px; right: 8px; background: var(--success); color: var(--navy); font-family: var(--font-heading); font-weight: 700; font-size: 10px; letter-spacing: 1px; padding: 3px 8px; border-radius: 3px; }
.rating-badge { position: absolute; bottom: 8px; right: 8px; background: rgba(255, 255, 255, 0.92); color: var(--text); font-size: 11px; padding: 2px 6px; border-radius: 3px; }
.card-book .card-body { padding: 12px; text-align: center; }
.card-book .card-title { font-family: var(--font-heading); font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 2px; }
.card-book .card-subtitle { font-size: 12px; color: var(--muted); }
.card-book .card-author { font-size: 13px; color: var(--muted); display: block; margin-top: 4px; }

/* --- Tabulky --- */
.results-table { background: #fff; border-radius: 4px; box-shadow: var(--shadow-box); overflow: hidden; }
.results-table thead th { background: var(--section-bg); font-family: var(--font-heading); font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-bottom: 0; }
.results-table tbody tr { cursor: pointer; }
.results-table tbody tr:hover { background: var(--section-bg); }
.results-table td { vertical-align: middle; }
.table-cover { width: 40px; height: 60px; object-fit: cover; border-radius: 3px; background: var(--section-bg); }

/* --- Štítky témat --- */
.theme-badge { display: inline-block; font-family: var(--font-heading); font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 3px; line-height: 1.4; vertical-align: middle; }
.theme-badge-lg { font-size: 13px; padding: 5px 12px; }
.VZ { background-color: rgb(0, 56, 130); color: #fff; }
.MS { background-color: rgb(0, 131, 53); color: #fff; }
.ŽR { background-color: rgb(255, 237, 0); color: #000; }
.DŽ { background-color: rgb(195, 149, 191); color: #fff; }
.ZN { background-color: rgb(94, 13, 139); color: #fff; }
.DM { background-color: rgb(255, 178, 184); color: #000; }
.CČ { background-color: rgb(151, 191, 13); color: #000; }
.CI { background-color: rgb(247, 168, 0); color: #fff; }
.BI { background-color: rgb(118, 83, 28); color: #fff; }
.KA { background-color: rgb(181, 35, 114); color: #fff; }
.DL { background-color: rgb(229, 55, 68); color: #fff; }
.FT { background-color: rgb(203, 187, 157); color: #fff; }
.SK { background-color: rgb(150, 150, 150); color: #fff; }
.BE { background-color: #8e5572; color: #fff; }
.CD { background-color: #1f7a70; color: #fff; }
.NEW { background-color: var(--success); color: var(--navy); }
.theme-default { background-color: #6c757d; color: #fff; }

/* --- Modal --- */
.modal-content { border: 0; border-radius: 4px; box-shadow: var(--shadow-box); }
.modal-title { font-family: var(--font-heading); font-weight: 600; color: var(--muted); }
.modal-author { font-family: var(--font-heading); font-weight: 600; color: var(--primary); }
.modal-cover { max-width: 100%; max-height: 320px; border-radius: 4px; box-shadow: var(--shadow-box); background: var(--section-bg); }
.modal-rating { color: var(--primary-dark); font-weight: 700; }
.modal-desc { color: var(--text); white-space: pre-line; max-height: 200px; overflow-y: auto; font-size: 14px; line-height: 1.6; }
.modal-facts { background: var(--section-bg); padding: 12px 16px; border-radius: 4px; }
.modal-facts th { color: var(--muted); font-weight: 600; font-family: var(--font-heading); }
@media (max-width: 767px) { .mobile-hidden-cover { display: none; } }

/* --- Patička (Mamba #footer) --- */
#footer { background: var(--footer); color: #fff; font-size: 14px; }
#footer .footer-top { background: var(--footer-top); border-top: 1px solid #768fa6; border-bottom: 1px solid #67839c; padding: 60px 0 30px 0; }
#footer .footer-top .footer-info { margin-bottom: 30px; }
#footer .footer-top .footer-info h3 { font-size: 24px; margin: 0 0 20px 0; padding: 2px 0; line-height: 1; font-weight: 700; }
#footer .footer-top .footer-info p { font-size: 14px; line-height: 24px; margin-bottom: 0; font-family: var(--font-heading); color: #fff; }
#footer .footer-top .footer-info a { color: #fff; }
#footer .footer-top .footer-info a:hover { color: var(--primary-light); }
#footer .footer-top .social-links a { font-size: 18px; display: inline-block; background: var(--footer-social); color: #fff; line-height: 1; padding: 8px 0; margin-right: 4px; border-radius: 50%; text-align: center; width: 36px; height: 36px; transition: 0.3s; }
#footer .footer-top .social-links a:hover { background: var(--primary); color: #fff; }
#footer .footer-top h4 { font-size: 16px; font-weight: 600; color: #fff; position: relative; padding-bottom: 12px; }
#footer .footer-top .footer-links { margin-bottom: 30px; }
#footer .footer-top .footer-links ul { list-style: none; padding: 0; margin: 0; }
#footer .footer-top .footer-links ul i { padding-right: 2px; color: var(--primary-light); font-size: 18px; line-height: 1; }
#footer .footer-top .footer-links ul li { padding: 10px 0; display: flex; align-items: center; }
#footer .footer-top .footer-links ul li:first-child { padding-top: 0; }
#footer .footer-top .footer-links ul a { color: #fff; transition: 0.3s; display: inline-block; line-height: 1; }
#footer .footer-top .footer-links ul a:hover { color: var(--primary-light); }
#footer .copyright { text-align: center; padding: 30px 0; }

/* --- Back to top --- */
.back-to-top { position: fixed; visibility: hidden; opacity: 0; right: 15px; bottom: 15px; z-index: 996; background: var(--primary); width: 40px; height: 40px; border-radius: 4px; transition: all 0.4s; }
.back-to-top i { font-size: 24px; color: #fff; line-height: 0; }
.back-to-top:hover { background: var(--primary-soft); color: #fff; }
.back-to-top.active { visibility: visible; opacity: 1; }
