/* ---------------------------------------------------------------------------
   Studentský klub Masařka — stylesheet
   Fonty (Open Sans, Roboto Slab) jsou hostované lokálně ve /static/fonts/,
   stránka tak nedělá žádné požadavky na cizí servery.
--------------------------------------------------------------------------- */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("/static/fonts/open-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("/static/fonts/open-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Roboto Slab";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/roboto-slab-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Roboto Slab";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/roboto-slab-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- barvy ---------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  --brand: #280099; /* modrá z klubového loga */
  --accent: #3a1fc4;
  --accent-strong: #280099;
  --accent-soft: #eeebfb;

  --bg: #f4f4f7;
  --surface: #ffffff;
  --surface-alt: #fafafc;
  --fg: #23232b;
  --muted: #6b6b77;
  --border: #e3e3ea;

  --header-bg: #1c1638;
  --header-fg: #f2f1f8;
  --header-muted: #b3aecd;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 16, 45, 0.06), 0 6px 20px rgba(20, 16, 45, 0.06);
  --container: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #a99bff;
    --accent-strong: #c2b7ff;
    --accent-soft: #241f3d;

    --bg: #121218;
    --surface: #1b1b23;
    --surface-alt: #20202a;
    --fg: #e7e7ef;
    --muted: #a0a0b0;
    --border: #2d2d39;

    --header-bg: #16122b;
    --header-fg: #f2f1f8;
    --header-muted: #b3aecd;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
  }
}

/* --- základ --------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Roboto Slab", Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--fg);
  margin: 2rem 0 0.75rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem);
  margin-top: 0;
}

h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.15rem;
}

h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

code,
pre,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

code {
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--fg);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

/* --- hlavička ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 12px rgba(0, 0, 0, 0.18);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  padding: 0.6rem 0;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
  opacity: 0.85;
}

.brand img {
  display: block;
  height: 2.6rem;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  color: var(--header-fg);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.lang-switch {
  margin-left: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--header-muted) !important;
}

/* mobilní menu — bez JS, jen skrytý checkbox */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: var(--header-fg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 62rem) {
  .site-nav a {
    font-size: 0.72rem;
    padding: 0.45rem 0.5rem;
  }
}

@media (max-width: 48rem) {
  .nav-toggle-label {
    display: block;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .site-nav a {
    font-size: 0.85rem;
    padding: 0.7rem 0.5rem;
    border-radius: 0;
  }

  .lang-switch {
    margin: 0.6rem 0.5rem 0;
    text-align: center;
  }
}

/* --- hero (jen homepage) -------------------------------------------------- */

.hero {
  background: linear-gradient(135deg, var(--header-bg) 0%, #3b2a78 100%);
  color: #f3f2fa;
  padding: clamp(2rem, 1rem + 4vw, 3.5rem) 0;
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.5rem, 1rem + 3vw, 3rem);
}

.hero-logo {
  flex: 0 0 auto;
  width: 9.5rem;
  height: auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-text {
  flex: 1 1 20rem;
}

.hero h1 {
  color: #fff;
  margin: 0 0 0.5rem;
}

.hero-lead {
  color: #d6d2ee;
  font-size: 1.05rem;
  max-width: 44rem;
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #fff;
  color: var(--brand) !important;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff !important;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

/* --- obsah ---------------------------------------------------------------- */

main {
  flex: 1 0 auto;
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem) 0;
}

.content-card {
  max-width: 52rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 2.75rem);
}

.content-card.is-wide {
  max-width: var(--container);
}

.content-card > *:last-child {
  margin-bottom: 0;
}

.content-card ul,
.content-card ol {
  padding-left: 1.35rem;
}

.content-card li + li {
  margin-top: 0.25rem;
}

.content-card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.content-card figure {
  margin: 1.5rem 0;
}

.content-card figure:empty,
.content-card li > figure:only-child:empty {
  display: none;
}

.content-card figcaption {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.4rem;
}

/* odkazy na PDF dostanou drobnou značku */
.content-card a[href$=".pdf"]::after {
  content: " PDF";
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: 0.15em;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--surface-alt);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: var(--surface-alt);
}

/* --- výpisy (aktuality, vybavení) ---------------------------------------- */

.page-title {
  max-width: 52rem;
  margin: 0 auto 1.5rem;
}

.page-title h1 {
  margin-bottom: 0.35rem;
}

.page-title p {
  color: var(--muted);
  margin: 0;
}

.page-title.is-wide {
  max-width: var(--container);
}

.card-list {
  list-style: none;
  max-width: 52rem;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.card-list li {
  margin: 0;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  color: inherit;
}

.card:hover,
.card:focus-visible {
  text-decoration: none;
  border-left-color: var(--accent-strong);
  transform: translateY(-1px);
}

.card .card-title {
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--accent);
  display: block;
}

.card:hover .card-title {
  color: var(--accent-strong);
}

.card-grid {
  list-style: none;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.card-grid li {
  margin: 0;
}

.date {
  display: inline-block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-meta {
  margin: -0.25rem 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-block;
  max-width: 52rem;
  margin: 1.25rem auto 0;
  font-size: 0.85rem;
}

.back-link-row {
  max-width: 52rem;
  margin: 1.25rem auto 0;
}

/* --- patička -------------------------------------------------------------- */

.site-footer {
  flex-shrink: 0;
  margin-top: 3rem;
  background: var(--header-bg);
  color: var(--header-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.75rem;
  padding-block: 2.5rem;
}

.site-footer h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  border: 0;
  margin: 0 0 0.75rem;
  padding: 0;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.35rem;
}

.site-footer a {
  color: #cfc9e8;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* --- 404 ------------------------------------------------------------------ */

.error-page {
  text-align: center;
}

.error-code {
  font-family: "Roboto Slab", Georgia, serif;
  font-size: clamp(3.5rem, 2rem + 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .card:hover,
  .btn:hover {
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .back-link,
  .back-link-row {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .content-card {
    border: 0;
    box-shadow: none;
    max-width: none;
    padding: 0;
  }
}

.content-card > *:first-child {
  margin-top: 0;
}

.card-grid li {
  display: flex;
}

.card-grid .card {
  width: 100%;
}

/* v tabulkách je typ souboru zřejmý ze záhlaví sloupce, značka by se dublovala */
.table-wrap a[href$=".pdf"]::after {
  content: none;
}

.table-wrap td:first-child {
  white-space: nowrap;
}
