/*
 * Cassiopeia — družstvo (tpl_cassiopeia_bd): the only stylesheet of the child template.
 * Loaded by Cassiopeia as asset `template.user` after its own CSS. Roboto stays
 * (Cassiopeia font scheme); accent only on active elements, no card borders or shadows.
 */

:root {
  --bd-akcent: var(--cassiopeia-color-primary, #1b2a4e);
  --bd-text: #1f2937;
  --bd-text2: #4b5563;
  --bd-tlumena: #6b7280;
  --bd-linka: #e5e7eb;
  --bd-linka2: #eef0f3;
  --bd-podklad: #f3f4f6;
  --bd-banner-podklad: #eef1f7;
  --bd-banner-akcent: #c0392b;
}

/* Type scale */

body {
  color: var(--bd-text);
  font-size: 1rem;
  line-height: 1.6;
}

h1,
.h1 {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.3;
}

h2,
.h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}

h3,
.h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

h4,
.h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

small,
.small {
  font-size: 0.84375rem;
}

/* Muted colour only for plain small text: alerts, form feedback and text-* utilities
   keep their own colours. .text-muted reads Cassiopeia's --secondary-color. */
:is(small, .small):not(.alert *, joomla-alert *, .invalid-feedback, .valid-feedback, .form-control-feedback, .invalid, [class*="text-"]) {
  color: var(--bd-tlumena);
}

.text-muted {
  --secondary-color: var(--bd-tlumena);
}

/* Links: accent colour, underline only on hover/focus. :where() keeps the specificity of
   "main a", so component rules (.bd-dok-nazev a, .bd-nov-nazev a, .bd-form-typy a) win. */

main a:where(:not(.btn)),
.com-content-article a:where(:not(.btn)) {
  color: var(--bd-akcent);
  text-decoration: none;
}

main a:where(:not(.btn)):hover,
main a:where(:not(.btn)):focus,
.com-content-article a:where(:not(.btn)):hover,
.com-content-article a:where(:not(.btn)):focus {
  text-decoration: underline;
}

/* Header: menu left, search and the login button at the right end of the nav row */

.container-header .navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.container-header .container-nav {
  align-items: center;
  gap: 0.75rem 12px;
}

.container-header .mod-menu > li > a {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Joomla 6 wraps the finder form in <search>; Joomla 5 puts the form directly in the nav. */
.container-header .container-nav > .mod-finder,
.container-header .container-nav > search {
  margin-left: auto;
}

.container-header .mod-finder .form-control {
  width: 200px;
  min-height: 40px;
  margin-top: 0;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.container-header .mod-finder .form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.container-header .mod-finder .form-control:focus {
  border-color: #fff;
}

/* Search button: icon only (the word stays for screen readers at font-size 0). */
.container-header .mod-finder .btn {
  min-height: 40px;
  font-size: 0;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-left: 0;
}

.container-header .mod-finder .btn .icon-search {
  margin: 0;
  font-size: 0.875rem;
}

.container-header .mod-finder .btn:hover,
.container-header .mod-finder .btn:focus {
  background: rgba(255, 255, 255, 0.12);
}

/* Login menu module after the search: no stretching, no Cassiopeia underline. */
.container-header .mod-menu:has(.bd-tlacitko) {
  flex: 0 0 auto;
}

.container-header .mod-menu > li:has(> .bd-tlacitko)::after {
  display: none;
}

.container-header .bd-tlacitko,
.container-header .mod-menu > li > a.bd-tlacitko {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
}

.container-header .mod-menu > li > a.bd-tlacitko:hover,
.container-header .mod-menu > li > a.bd-tlacitko:focus {
  color: #fff;
  text-decoration: none;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Breadcrumbs: 13.5 px, muted, no background; .px-3 of the module is cancelled by margin */

.mod-breadcrumbs {
  font-size: 0.84375rem;
  color: var(--bd-tlumena);
  --breadcrumb-divider-color: var(--bd-tlumena);
  --breadcrumb-item-active-color: var(--bd-tlumena);
}

.mod-breadcrumbs.breadcrumb {
  background-color: transparent;
}

.mod-breadcrumbs.px-3 {
  margin-inline: -1rem;
}

.mod-breadcrumbs a {
  color: var(--bd-tlumena);
}

.mod-breadcrumbs a:hover,
.mod-breadcrumbs a:focus {
  color: var(--bd-akcent);
}

/* Side panel .bd-panel: as module class (card chrome) or as menu class (on the <ul>) */

.bd-panel {
  background: var(--bd-podklad);
  border: 0;
  border-radius: 6px;
  padding: 14px 16px;
}

.card:has(.bd-panel) {
  background: transparent;
  border: 0;
}

.card:has(.bd-panel) > .card-body,
.card.bd-panel > .card-body {
  padding: 0;
}

.bd-panel > .card-header,
.bd-panel > h3 {
  margin: 0 0 8px;
  padding: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bd-text);
  background: transparent;
  border-bottom: 1px solid var(--bd-linka);
}

.bd-panel.mod-menu,
.bd-panel .mod-menu {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 2px;
  margin: 0;
  list-style: none;
}

.bd-panel .mod-menu {
  padding: 0;
}

.bd-panel li {
  padding: 0;
}

.bd-panel li a {
  display: block;
  margin: 0 -10px;
  padding: 7px 10px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--bd-text2);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
}

.bd-panel li a:hover,
.bd-panel li a:focus,
.bd-panel li.current > a {
  color: var(--bd-akcent);
  text-decoration: none;
  background: var(--bd-linka);
  border-left-color: var(--bd-akcent);
}

/* Footer: grey band with .bd-patka, without Cassiopeia's gradient and extra padding */

.container-footer {
  color: var(--bd-text2);
  background-color: var(--bd-podklad);
  background-image: none;
  border-top: 1px solid var(--bd-linka);
  margin-top: 2rem;
}

.container-footer .grid-child {
  padding: 0 0.5em;
}

.container-footer a:not(.btn) {
  color: var(--bd-akcent);
  text-decoration: none;
}

.container-footer a:not(.btn):hover,
.container-footer a:not(.btn):focus {
  color: var(--bd-akcent);
  text-decoration: underline;
}

.bd-patka {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 22px 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--bd-text2);
}

.bd-patka p {
  margin: 0;
}

.bd-patka strong {
  color: var(--bd-text);
}

.bd-patka__drobne {
  font-size: 0.8125rem;
  color: var(--bd-tlumena);
}

.bd-patka__copyright {
  white-space: nowrap;
}

/* Contacts: table with hairlines, muted 13 px header */

.bd-kontakty {
  width: 100%;
  margin: 0 0 1.5rem;
  border-collapse: collapse;
}

.bd-kontakty thead th {
  padding: 0 10px 8px 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bd-tlumena);
  text-align: left;
  border-bottom: 1px solid var(--bd-linka);
}

.bd-kontakty thead th a {
  color: inherit;
}

/* The name is the row header (th scope="row"): looks like a normal cell. */
.bd-kontakty td,
.bd-kontakty tbody th {
  padding: 11px 10px 11px 0;
  font-weight: 400;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--bd-linka2);
}

.bd-kontakty__funkce {
  color: var(--bd-text2);
}

.bd-kontakty__kontakt {
  font-size: 0.875rem;
  color: var(--bd-tlumena);
  white-space: nowrap;
}

.bd-kontakty-kategorie {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.com-contact-categories__items {
  padding: 10px 0;
  border-bottom: 1px solid var(--bd-linka2);
}

.com-contact-categories .item-title {
  margin: 0;
  font-size: 1.125rem;
  border: 0;
}

.com-contact-categories .badge.bg-info {
  --bg-opacity: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--bd-tlumena);
}

/* Contact detail: quiet definition list, muted labels */

/* Cassiopeia's contact grid styles h3 only (row 1, full width) and puts the photo right;
   the override's h2 and dl.bd-kontakt-udaje take the heading and position slots. */
.com-contact__container > h2 {
  grid-column: 1 / 5;
  margin: 0;
}

.com-contact__container > .bd-kontakt-udaje {
  grid-area: 2 / 1 / 3 / 3;
}

.bd-kontakt-udaje {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 6px 20px;
  margin: 0 0 1.5rem;
}

.bd-kontakt-udaje dt {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.85;
  color: var(--bd-tlumena);
}

.bd-kontakt-udaje dd {
  margin: 0;
}

/* Article */

.bd-clanek-meta {
  margin: 6px 0 20px;
  font-size: 0.84375rem;
  color: var(--bd-tlumena);
}

.com-content-article__body h2 {
  margin: 28px 0 8px;
}

.com-content-article__body h3 {
  margin: 20px 0 6px;
}

/* Login page */

.bd-prihlaseni {
  max-width: 420px;
}

.bd-prihlaseni form,
.bd-prihlaseni fieldset,
.bd-prihlaseni .well {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.bd-prihlaseni label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bd-text);
}

.bd-prihlaseni .form-control {
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 4px;
}

.bd-prihlaseni .btn-primary {
  min-height: 44px;
  color: #fff;
  background-color: var(--bd-akcent);
  border-color: var(--bd-akcent);
}

.bd-prihlaseni .list-group-item {
  padding: 4px 0;
  background: transparent;
  border: 0;
}

/* Pagination: quiet, accent only on the current page */

.pagination {
  --pagination-bg: transparent;
  --pagination-border-width: 0;
  --pagination-color: var(--bd-akcent);
  --pagination-hover-color: var(--bd-akcent);
  --pagination-hover-bg: var(--bd-podklad);
  --pagination-active-bg: var(--bd-akcent);
  --pagination-active-border-color: var(--bd-akcent);
  --pagination-disabled-bg: transparent;
  --pagination-disabled-color: var(--bd-tlumena);
  gap: 4px;
  margin: 1rem 0;
}

.page-link {
  min-width: 36px;
  border-radius: 4px;
  text-align: center;
}

/* Error page */

body.error_site h1,
body.error_site .page-header h1 {
  font-size: 1.625rem;
}

/* No bordered card around the error message, content stays */

body.error_site .card {
  border: 0;
  background: transparent;
}

body.error_site .card > .card-body {
  padding: 0;
}

/* Own components (.com-bd-*): their palettes read --bs-* fallbacks, map them to the tokens */

.com-bd-dokumenty,
.com-bd-formulare,
.com-bd-hlasovani,
.com-bd-novinky {
  --bs-link-color: var(--bd-akcent);
  --bs-secondary-color: var(--bd-tlumena);
  --bs-border-color: var(--bd-linka);
  --bs-body-color: var(--bd-text2);
}

.com-bd-hlasovani .card {
  --card-border-width: 0;
  background: var(--bd-podklad);
  border-radius: 6px;
}

/* Banner: a flat band with text (Custom module in position banner, markup .bd-banner)
   instead of the image. The banner container spans the content columns like the component
   and the side panel, so its edges line up with the news and the panel. */

.site-grid > .container-banner.full-width {
  grid-column: main-start / main-end;
}

.container-banner .mod-custom {
  margin: 0;
}

.bd-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 200px;
  padding: 32px 16px;
  text-align: center;
  background-color: var(--bd-banner-podklad);
}

.bd-banner p {
  margin: 0;
}

.bd-banner__nadpis {
  font-size: 2.375rem;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--bd-banner-akcent);
}

.bd-banner__podtitul {
  font-size: 1.375rem;
  font-weight: 300;
  line-height: 1.3;
  color: var(--bd-tlumena);
}

/* Mobile */

@media (max-width: 760px) {
  h1,
  .h1 {
    font-size: 1.375rem;
  }

  h2,
  .h2 {
    font-size: 1.25rem;
  }

  /* Search and login stack under the menu, both full width. */
  .container-header .container-nav > .mod-finder,
  .container-header .container-nav > search {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .container-header .mod-finder .form-control,
  .container-header .mod-finder .awesomplete {
    width: 100%;
    max-width: none;
  }

  .container-header .mod-menu:has(.bd-tlacitko) {
    flex: 1 0 100%;
  }

  .container-header .bd-tlacitko {
    display: flex;
    width: 100%;
  }

  .bd-patka {
    font-size: 0.8125rem;
  }

  .bd-banner {
    min-height: 140px;
    padding: 24px 12px;
  }

  .bd-banner__nadpis {
    font-size: 1.5rem;
    letter-spacing: 2px;
  }

  .bd-banner__podtitul {
    font-size: 1.125rem;
  }

  .bd-kontakty thead {
    display: none;
  }

  .bd-kontakty tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--bd-linka2);
  }

  .bd-kontakty td,
  .bd-kontakty tbody th {
    display: block;
    padding: 3px 0;
    border: 0;
  }

  .bd-kontakty td:empty {
    display: none;
  }

  .bd-kontakty__kontakt {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .bd-kontakt-udaje {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .bd-kontakt-udaje dd {
    margin-bottom: 8px;
  }
}
