

.btn {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid #d4d4d8;
  border-radius: 0.5rem;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #fafafa;
}

.btnPrimary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.btnPrimary:hover {
  background: #1d4ed8;
}

.btnGhost {
  border-color: transparent;
  background: transparent;
}

.btnSmall {
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
}

.pageContent>* {
  max-width: 100%;
}

.boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding:1.5rem 0.7rem 0.7rem 0.7rem ;
}

/* Společná dlaždice; šířka řádku: .box1 … .box4 (legacy: jen .box = jako .box4) */
.box {
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.095);
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  display: flow-root;
}

.box.article{
  max-height: 560px;
}

.box.box--has-overflow {
  padding-bottom: 2.5rem;
}

.box img{
  border-radius: 0.3rem;
}

.boxes .box img.pg{
  float:right;
  width: min(120px,40%) !important;
  margin-left:0.5rem;
  
}

.boxes .box p{
  font-size:0.9rem;
}

.boxes .box h2{

  font-size:1.1rem;
}

.boxes .box h3{
  font-size:1rem;
}

.box.box--has-overflow{
  isolation: isolate;
}

.box.box--has-overflow::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.25rem;
  pointer-events: none;
  z-index: 1;
  border-radius: 0 0 0.75rem;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    #fff
  );
}

.box .boxExpandBtn {
  position: absolute;
  right: 0.5rem;
  bottom: 0.45rem;
  z-index: 2;
  min-width: 2.25rem;
  padding: 0.25rem 0.5rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  letter-spacing: 0.05em;
  border: 1px solid #d4d4d8;
  border-radius: 0.4rem;
  background: #fff;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.box .boxExpandBtn:hover {
  background: #fafafa;
}

.box .boxExpandBtn[hidden] {
  display: none !important;
}

/* Plovoucí okno s celým obsahem dlaždice */
.boxExpandOverlay {
  position: fixed;
  inset: 0;
  z-index: 100500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 15, 20, 0.45);
  box-sizing: border-box;
}

.boxExpandDialog {
  position: relative;
  width: min(39rem, calc(100vw - 2rem));
  max-height: min(90vh, calc(100dvh - 2rem));
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.boxExpandClose {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0.4rem;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: #3f3f46;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.boxExpandClose:hover {
  background: #fff;
  color: #18181b;
}

.boxExpandBody {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}

.boxExpandRich {
  padding: 1rem;
  display: flow-root;
}

.boxExpandRich ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.boxExpandRich p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.boxExpandRich p:last-child {
  margin-bottom: 0;
}

.boxExpandRich img {
  max-width: 100%;
  height: auto;
}

.boxExpandRich img.imgl {
  float: left;
  margin: 0 2rem 0.5rem 0;
  max-width: min(50%, 22rem);
  border-radius: 0.75rem;
}

.boxExpandRich img.imgr {
  float: right;
  margin: 0 0 0.5rem 2rem;
  max-width: min(50%, 22rem);
  border-radius: 10px;
}

.boxExpandRich img.thx {
  display: block;
  width: calc(100% + 2rem);
  max-width: none;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  margin-left: -1rem;
  margin-right: -1rem;
  margin-bottom: 0.5rem;
}

.boxExpandRich--plainFallback {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Dlaždice bez viditelného rámu — pozadí vždy průhledné (i proti --site-bg-box*) */
.box.noborder {
  padding: 1px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none;
}

.box video, .box iframe{
  width:100%;
  margin:0 !important;
}

.box1 {
  flex: 0 0 100%;
  min-width: 0;
}

.box2 {
  flex: 0 0 calc((100% - 2rem) / 2);
  min-width: 0;
}

.box3 {
  flex: 0 0 calc((100% - 4rem) / 3);
  min-width: 0;
}

.box4{
  flex: 0 0 calc((100% - 6rem) / 4);
  min-width: 0;
}

.box1.noborder,
.box2.noborder,
.box3.noborder,
.box4.noborder {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow:none;
  border:none;
}

.box ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.box p {
  margin: 0;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.box p:last-child {
  margin-bottom: 0;
}

/* Obrázek vlevo / vpravo v dlaždici (float) */
.box img.imgl {
  float: left;
  margin: 0 2rem 0.5rem 0;
  max-width: min(50%, 22rem);
  height: auto;
  display: block;
  border-radius: 0.75rem;
}

.box img.imgr {
  float: right;
  margin: 0 0 0.5rem 2rem;
  max-width: min(50%, 22rem);
  height: auto;
  display: block;
  border-radius: 10px;
}

.box img.thx {
  display: block;
  width: calc(100% + 2rem);
  max-width: none;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  margin-bottom: 0.5rem;
  margin-left: -1rem;
  margin-right: -1rem;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  border-radius: 2px;
}


.content .box h2,
.content .box h3,
.content .box h4,
.content .box h5
{
	margin: 0px 0px 10px;
}




.loginPage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Přihlášení / změna hesla: pod sdílenou hlavičkou vycentrovat box */
.loginPage .siteMain--auth {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.loginBox {
  width: 100%;
  max-width: 22rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 0.75rem;
}

.loginBox h1 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.loginError {
  margin: 0 0 0.75rem;
  color: #b91c1c;
  font-size: 0.9rem;
}

.loginSuccess {
  margin: 0 0 0.75rem;
  color: #15803d;
  font-size: 0.9rem;
}

.loginLabel {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.loginInput {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.6rem;
  font: inherit;
  border: 1px solid #d4d4d8;
  border-radius: 0.5rem;
}

.loginBack {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.loginBack a {
  color: #2563eb;
}

@media (max-width: 900px) {
  .siteMain {
    padding: 1rem;
  }

  .boxes {
    align-items: flex-start;
  }

  .box2,
  .box3,
  .box4,
  .box:not(.box1):not(.box2):not(.box3) {
    flex: 0 0 100%;
  }

  .box img.imgl,
  .box img.imgr {
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 0 0.5rem 0;
  }

  .box img.imgl[src^="data:image/"],
  .box img.imgr[src^="data:image/"] {
    display: none;
  }

  img.logo{
    top:0.1rem;
    left:0.6rem;
  }
}

@media (max-width: 520px) {
  .footerContent img.imgx {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto;
    max-height: none !important;
    float: none !important;
    margin: 0;
  }

}
