/* Additive responsive layer; original Tirza styles and content stay intact. */
:root {
  --tirza-ink: #302b20;
  --tirza-paper: #fffdf7;
  --tirza-sand: #e4d3a9;
  --tirza-line: #d4c7aa;
}
html { scroll-padding-top: 1rem; }
#conteiner, #conteiner *, #conteiner *::before, #conteiner *::after, .bks-skip { box-sizing: border-box; }
body { margin: 0; color: var(--tirza-ink); line-height: 1.65; font-size: 17px; }
button { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #946a27; outline-offset: 4px;
}
#conteiner { width: min(1180px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; }
#header {
  height: auto; min-height: 110px; margin: 0;
  display: grid; grid-template-columns: 1fr minmax(0,530px) 1fr;
  align-items: center; gap: 24px;
}
.header-left, .header-center, .header-right {
  float: none; width: auto; height: auto; padding: 0; margin: 0;
}
.header-left { display: flex; flex-wrap: wrap; gap: 2px; }
.header-left a { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 44px; background: #fffdf7d9; }
.header-left a img { float: none; padding: 0; background: none; width: 20px; height: auto; }
.header-center a { display: block; }
.header-center img { display: block; max-width: 100%; height: auto; }
.header-right { justify-self: end; }
.header-right a { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; background: #fffdf7d9; }
#sliderT { width: 100%; height: auto; margin: 0 0 12px; }
#slider-wrapper img { display: block; width: 100% !important; height: auto; }
#top-nav { height: auto; margin: 0 0 20px; background: #302b20f2; position: relative; z-index: 5; }
ul.navigation1 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
ul.navigation1 > li { float: none; width: auto !important; height: auto; background: none; }
.navigation1 li a {
  display: flex; float: none; width: 100%; min-height: 52px; height: 100%; padding: 9px 14px;
  align-items: center; justify-content: center; font-size: 19px; line-height: 1.4;
  border-right: 1px solid #e4d3a933; color: #f4e8c9;
}
.navigation1 > li.active > a { background: #e4d3a91f; box-shadow: inset 0 -3px var(--tirza-sand); }
.navigation1 li a:hover { background: #e4d3a91f; color: white; }
.navigation1 li:focus-within > .subnav { visibility: visible; }
.navigation1 .subnav { top: 100%; left: 0; background: #302b20; }
.content-box { display: grid; grid-template-columns: 186px minmax(0,1fr) 186px; gap: 20px; align-items: start; }
.content-left, .content-center, .content-right { width: auto; float: none; min-width: 0; margin: 0; }
.content-center { background: var(--tirza-paper); padding: 26px 30px 32px; min-height: 360px; }
.content-center::after { content: ''; display: table; clear: both; }
.content-center :where(h1,h2,h3,h4,h5,h6,p,div,ul,ol,table) { padding-left: 0; padding-right: 0; }
.content-center h1 { font-size: clamp(28px,3.1vw,38px); line-height: 1.16; margin: 0 0 22px; overflow-wrap: anywhere; }
.content-center h2 { font-size: 28px; line-height: 1.25; margin: 28px 0 14px; }
.content-center h3 { font-size: 23px; line-height: 1.3; margin: 22px 0 12px; }
.content-center p { margin: 0 0 16px; overflow-wrap: anywhere; }
.content-center p:has(> em:only-child) { font-size: .88em; color: #696151; line-height: 1.5; }
.content-center ul, .content-center ol { padding-inline-start: 1.4em; margin-bottom: 18px; }
.content-center a:not(:has(img)) { text-decoration: underline; text-underline-offset: 3px; }
.content-center img { max-width: 100%; height: auto !important; vertical-align: middle; }
.content-center iframe, .content-center video { max-width: 100%; }
.content-center video { height: auto; }
.content-center iframe[src*="youtube"], .content-center iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16/9; }
.content-center table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.content-center td, .content-center th { font-size: inherit; }
.content-center pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }
.side-contents-box { width: 100%; margin: 0 0 8px; padding: 0; background: #fffdf7e8; text-align: left; }
.side-contents-box h4 { font-size: 18px; line-height: 1.35; font-weight: 600; }
.side-contents-box h4 a { display: flex; min-height: 48px; align-items: center; padding: 11px 16px; color: var(--tirza-ink); }
.side-contents-box a:hover { background: #f0e5cc; }
.gal-item { float: none; display: inline-block; width: calc(25% - 10px); margin: 0 10px 10px 0; padding: 0; vertical-align: top; }
.gal-item a { display: block; }
.gal-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.galerija-tituls { float: none; display: inline-block; width: calc(50% - 14px); height: auto; margin: 0 12px 22px 0; padding: 0; vertical-align: top; }
.galerija-tituls a img { max-width: 100%; height: auto; margin-bottom: 8px; }
.galerija-tituls p { line-height: 1.45; }
.blogPost { width: 100%; margin: 0; padding: 20px 0; }
.blog-source, .blog-pic { float: none; width: auto; max-width: 100%; margin: 0 0 14px; }
#foter { margin: 24px 0 0; padding: 24px 30px; font-size: 15px; background: #302b20f2; }
.bks-menu-toggle, .bks-secondary-links { display: none; }
.bks-skip { position: fixed; top: -100px; left: 16px; z-index: 1000; background: var(--tirza-paper); padding: 12px 18px; }
.bks-skip:focus { top: 8px; }
/* Native dialog: image always fits its viewport; no changes to Gallery records. */
body.bks-gallery-open { overflow: hidden; }
dialog.bks-gallery { padding: 0; border: 1px solid #e4d3a95e; width: min(1100px,calc(100% - 24px)); max-width: none; height: calc(100vh - 24px); height: calc(100dvh - 24px); max-height: none; margin: auto; color: var(--tirza-ink); background: var(--tirza-paper); }
.bks-gallery::backdrop { background: #16140fed; }
.bks-gallery, .bks-gallery * { box-sizing: border-box; }
.bks-gallery-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.bks-gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; background: #302b20; color: #f4e8c9; }
.bks-gallery-header h2 { color: inherit; font: inherit; margin: 0; font-size: 17px; }
.bks-gallery button { color: inherit; cursor: pointer; min-width: 48px; min-height: 44px; border: 1px solid #b8aa8b; background: transparent; font: inherit; padding: 8px 16px; line-height: 1.4; }
.bks-gallery button:hover { background: #e4d3a92b; }
.bks-gallery button:disabled { opacity: .4; cursor: default; }
.bks-gallery button:focus-visible { outline-color: #c59c4d; outline-offset: -4px; }
.bks-gallery .bks-gallery-close { border-color: transparent; padding: 0 8px; font-size: 32px; line-height: 1; }
.bks-gallery-figure { margin: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; }
.bks-gallery-image-area { min-height: 0; min-width: 0; padding: 12px; background: #191813; }
.bks-gallery-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.bks-gallery-caption { margin: 0; padding: 12px 20px 0; max-height: 6em; overflow-y: auto; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.bks-gallery-caption:empty { display: none; }
.bks-gallery-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.bks-gallery-count { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 16px; }
@media (max-width: 450px) {
  .bks-gallery .bks-gallery-action-name { display: none; }
  .bks-gallery-footer { padding: 10px 12px; }
  .bks-gallery-image-area { padding: 6px; }
}
@media (max-width: 1040px) {
  #conteiner { width: calc(100% - 32px); }
  .content-box { grid-template-columns: 156px minmax(0,1fr) 156px; gap: 12px; }
  .content-center { padding: 24px; }
  .side-contents-box h4 { font-size: 17px; }
  .side-contents-box h4 a { padding: 10px 12px; }
  #header { gap: 16px; grid-template-columns: 1fr minmax(0,480px) 1fr; }
  .header-left { max-width: 90px; }
}
@media (max-width: 900px) {
  body { background-attachment: scroll; }
  #conteiner { display: flex; flex-direction: column; }
  #header { order: 0; grid-template-columns: 1fr auto; min-height: 0; padding: 18px 0 12px; gap: 10px; }
  .header-center { grid-column: 1/-1; grid-row: 1; width: min(530px,100%); justify-self: center; }
  .header-left { grid-column: 1; grid-row: 2; max-width: none; }
  .header-right { grid-column: 2; grid-row: 2; }
  #top-nav { order: 1; margin-bottom: 12px; }
  #sliderT { order: 2; margin-bottom: 16px; }
  .content-box { order: 3; grid-template-columns: minmax(0,1fr); gap: 16px; }
  .content-center { grid-row: 1; padding: 28px; }
  .content-left, .content-right { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .side-contents-box { margin: 0; }
  #foter { order: 4; }
  .bks-menu-toggle { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: space-between; background: transparent; color: #f4e8c9; border: 0; padding: 12px 18px; cursor: pointer; text-align: left; font-weight: 600; }
  .bks-menu-toggle::after { content: '+'; font-size: 28px; line-height: 1; font-weight: 400; }
  .bks-menu-toggle[aria-expanded="true"]::after { content: '−'; }
  .navigation1 { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .navigation1 li a { justify-content: flex-start; font-size: 18px; border-top: 1px solid #e4d3a926; min-height: 50px; }
  .bks-nav-ready #bks-menu-panel { display: none; }
  .bks-nav-open #bks-menu-panel { display: block; }
  .bks-nav-ready .content-left, .bks-nav-ready .content-right { display: none; }
  .bks-secondary-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: 20px 18px; border-top: 1px solid #e4d3a955; }
  .bks-secondary-links h2 { color: var(--tirza-sand); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
  .bks-secondary-links a { display: flex; min-height: 44px; align-items: center; color: white; line-height: 1.4; padding: 8px 0; font-size: 17px; }
  .bks-secondary-links a:hover { text-decoration: underline; }
  .gal-item { width: calc(25% - 10px); }
}
@media (max-width: 520px) {
  #conteiner { width: calc(100% - 24px); }
  body { font-size: 17px; line-height: 1.65; }
  .content-center { padding: 22px 20px; }
  .content-center h1 { font-size: 30px; }
  .content-center h2 { font-size: 25px; }
  .navigation1 { grid-template-columns: 1fr !important; }
  .navigation1 li a { border-right: 0; }
  .bks-secondary-links { grid-template-columns: 1fr; gap: 20px; }
  .gal-item { width: calc(33.333% - 10px); }
  .galerija-tituls { width: 100%; margin-right: 0; }
  #foter { margin-top: 16px; padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
@media print {
  body { background: white; }
  #conteiner { width: 100%; }
  #header, #sliderT, #top-nav, .content-left, .content-right, #foter { display: none !important; }
  .content-box { display: block; }
  .content-center { padding: 0; }
}
