:root {
  --max-width: 1100px;
  --bg-page: #f4f4f4;
  --bg-content: #fff;
  --text-color: #333;
  --shadow-default: 0 0 8px rgba(0,0,0,0.05);
  --shadow-header: 0 0px 0px rgba(0,0,0,0);
  --gray-muted: #666;
  --gray-dark: #333;
  --color-success-bg: #d4edda;
  --color-success-text: #155724;
  --color-success-border: #c3e6cb;
  --color-error-bg: #f8d7da;
  --color-error-text: #721c24;
  --color-error-border: #f5c6cb;
  --daily-color: #007BFF;
}

/* ————————————————————————————
   Webfont N27
   ————————————————————————————*/
@font-face { font-family: 'N27'; src: url('font/n27-thin-webfont.woff2') format('woff2'); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-extralight-webfont.woff2') format('woff2'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-light-webfont.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-regular-webfont.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-medium-webfont.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-bold-webfont.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* Italic variants */
@font-face { font-family: 'N27'; src: url('font/n27-thinitalic-webfont.woff2') format('woff2'); font-weight: 100; font-style: italic; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-extralightitalic-webfont.woff2') format('woff2'); font-weight: 200; font-style: italic; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-lightitalic-webfont.woff2') format('woff2'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-regularitalic-webfont.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-mediumitalic-webfont.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'N27'; src: url('font/n27-bolditalic-webfont.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; }

/* ————————————————————————————
   Základní nastavení
   ————————————————————————————*/
body {
  font-family: 'N27', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-color);
  line-height: 1.6;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Global link styles */
a {
  text-decoration: none;
  color: var(--text-color);
  transition: text-decoration 0.2s;
}
a:hover {
  text-decoration: none; /* fix: bylo "noe" */
  color: var(--daily-color);
}

/* Layout containers */
header, main, footer {
  width: var(--max-width);
  margin: 0 auto;
  background-color: var(--bg-content);
  box-shadow: var(--shadow-default);
  position: relative;
  z-index: 1;
}

/* Navigation */
nav, .lang-switcher { position: relative; z-index: 3; }
.main-nav a:hover { text-decoration: none; color: var(--daily-color); }
.main-nav a.active { color: var(--daily-color); }

/* Header */
header {
  height: 125px;
  display: flex;
  align-items: flex-end;
  padding: 0 25px 10px;
  box-shadow: var(--shadow-header);
  z-index: 2;
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

/* Main navigation links */
.main-nav, .lang-switcher {
  font-size: 24px;
  font-weight: 900;
  display: flex;
  align-items: center;
}
.main-nav a + a, .lang-switcher a + a { margin-left: 15px; }

/* Background canvases – ODDĚLENĚ */
#bgCanvas {
  position: absolute;
  top: 0;
  left: calc(25px + 15px);            /* padding headeru 25px + požadovaný posun 15px */
  width: calc(100% - 50px - 15px);    /* 100% - (levý+pravý padding) - posun */
  height: 125px;
  pointer-events: none;
  background: transparent;
  z-index: 2;                         /* nad obsahem headeru */
}
#backgroundCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Main */
main { padding: 15px 25px; z-index: 1; font-size: 18px }

/* Footer */
footer {
  background-color: #373737;
  padding: 20px;
  color: #989898;
  text-align: center;
  font-size: 1em;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}
footer a { color: var(--daily-color); }
footer a:hover { color: #fdca55; }

/* Utility */
.site-title { font-size: 2.5em; font-weight: 900; color: #555; margin: 0 0 10px 20px; }

/* Alerts */
.success, .error { max-width: 800px; margin: 20px auto; padding: 10px; border-radius: 4px; }
.success { background-color: var(--color-success-bg); color: var(--color-success-text); border: 1px solid var(--color-success-border); }
.error   { background-color: var(--color-error-bg);   color: var(--color-error-text);   border: 1px solid var(--color-error-border); }

/* Event table */
.event-table { width: 100%; border-spacing: 0; }  /* fix: "0 px" */
.event-row   { border-bottom: 1px solid var(--daily-color); }
.event-row td {
  vertical-align: top;
  padding: 5px;
  border-bottom: 2px dotted var(--daily-color);
}
.event-dateblock { width: 120px; text-align: center; font-weight: bold; margin-right: 10px; }
.event-month { text-transform: uppercase; font-weight: bold; font-size: 20px; margin-bottom: 0px; }
.event-day   { font-size: 40px; font-weight: 900; color: var(--text-color); }
.event-time  { font-size: 20px; margin-bottom: 2px; color: var(--gray-muted); }
.event-infoblock > * { margin-bottom: 3px; }
.event-title { font-size: 40px; font-weight: 900; margin-bottom: 0px; }
.event-popis1, .event-popis2 { font-size: 20px; margin-bottom: 0px; }

/* Zamezit zalamovani popis2 a bottomrow */
.event-popis2, .event-bottomrow { white-space: nowrap; }
.event-popis2 { display: inline-block; vertical-align: middle; }
.event-bottomrow { display: inline-flex; align-items: center; gap: 30px; margin-left: 1rem; vertical-align: bottom; }
.event-delsiinfo { padding-right: 50px; padding-top: 20px; }
.event-lang { font-size: 14px; color: var(--gray-dark); }
.event-register a { font-weight: bold; border: 1px solid var(--text-color); padding: 4px 10px; border-radius: 3px; transition: background 0.2s; }
.event-register a:hover { background: var(--daily-color); color: white; }

/* News & Mission */
.news-detail, .mission-text { max-width: 800px; margin: 40px auto; padding: 0 0px; line-height: 1.6; }
.mission-text img { width: 100%; }
.news-title { font-size: 2em; margin-bottom: 10px; }
.news-summary { font-style: italic; margin-bottom: 15px; }
.news-meta { font-size: 0.9em; color: var(--gray-muted); margin-bottom: 20px; }
.news-author, .news-date { margin-right: 15px; font-weight: bold; }
.news-image-container { margin-bottom: 20px; }
.news-image img { width: 100%; height: auto; display: block; }
.news-content { line-height: 1.6; margin-bottom: 40px; }
.news-content img { display: block; max-width: 100%; max-height: 350px; width: auto; height: auto; padding-bottom: 5px; padding-top: 5px; }

.news-list-title { text-align: center; font-size: 2em; margin-top: 40px; }
.news-grid { column-count: 3; column-gap: 20px; display: block; }

.news-tile {
  display: inline-block;
  width: 100%;
  margin-bottom: 1rem;
  vertical-align: top;
  overflow: hidden;
  transition: transform 0.2s;
}
/* Smazána rozbitá řádka "hidden; transition: ..." */

.news-tile:hover { -webkit-filter: grayscale(0%); }
.news-tile-image { position: relative; isolation: isolate; }
.news-tile-image img { width: 100%; height: auto; display: block; -webkit-filter: grayscale(100%); position: relative; z-index: 1; }
.news-tile-image img:hover { -webkit-filter: grayscale(0%); }
.news-tile-title { font-size: 24px; line-height: 28px; padding-top: 10px; font-weight: 900; margin: 0 12px 3px 0px; }
.news-tile-summary { font-size: 1em; line-height: 1em; color: var(--gray-dark); margin: 0px 12px 12px 0px; }
.news-tile-summary a:hover { text-decoration: none; }
.news-tile-date { font-size: 0.7em; color: var(--gray-muted); margin: 0 12px 12px 0px; }

/* Waves styles */
.wave-container { position: fixed; bottom: 0; left: 0; width: 100%; height: 300px; overflow: hidden; pointer-events: none; z-index: 0; }
canvas.wave-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; }

#wave-sine, #wave-triangle, #wave-sawtooth, #wave-square, #bgCanvas { pointer-events: none; }

.btn-flat {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--daily-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease;
  box-shadow: none;
}
.btn-flat:hover { color: #000000; }

.sedivka { background-color: #f2f2f2; padding: 20px; border-radius: 10px; }
h2 { padding-bottom: 0px; }

.open-slots{
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px 0;
  background: rgba(0,0,0,0.04); /* fallback */
}

@supports (background: color-mix(in srgb, white 50%, black)) {
  .open-slots{
    background: color-mix(in srgb, var(--daily-color) 10%, white);
  }
}

.open-slots-label{
  font-weight: 700;
  margin-bottom: 8px;
}

.open-slots-days{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.open-slots-day{
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(0,0,0,0.08);
  font-size: 14px;
}
.open-slots{
  padding: 12px 14px;
  margin: 0 0 16px 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(0,0,0,0.04);
}

@supports (background: color-mix(in srgb, white 50%, black)) {
  .open-slots{
    background: color-mix(in srgb, var(--daily-color) 10%, white);
  }
}

.open-slots-left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-slots-label{
  font-weight: 700;
}

.open-slots-days{
  display: inline;
}

.open-slots-sep{
  opacity: 0.65;
}

.open-slots-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.open-slots-btn{
  display: inline-block;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.20);
  background: rgba(255,255,255,0.70);
  text-decoration: none;
}
.open-slots{
  padding: 12px 14px;
  margin: 0 0 16px 0;
  border-radius: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  background: rgba(0,0,0,0.04);
}

@supports (background: color-mix(in srgb, white 50%, black)) {
  .open-slots{
    background: color-mix(in srgb, var(--daily-color) 10%, white);
  }
}

.open-slots-text{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-slots-actions{
  display: flex;
  gap: 12px;
  white-space: nowrap;
}

/* sjednocený vzhled akčních slov */
.btn-open{
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  cursor: pointer;
}
.btn-open{
  padding: 0;
  border: 0;
  background: none;
  color: var(--daily-color);
  text-decoration: underline;
  cursor: pointer;
}

.btn-open:hover{
  opacity: 0.75;
}
.btn-open{
  padding: 0;
  border: 0;
  background: none;
  color: var(--daily-color);
  text-decoration: none;
  cursor: pointer;
}

.btn-opent:hover{
  opacity: 0.75;
}
.open-slots-sep{
  color: var(--daily-color);
  font-weight: 400;
}

