/* =====================================================
   Bulls Academy — aplikácia
   Palette: bulls red / ice white / frost blue / coal
   Type: Barlow Condensed (display, jersey italic) + Barlow (body)
   ===================================================== */

:root {
  --red: #b5121f;
  --red-dark: #8c0d17;
  --ice: #f2f6f9;
  --frost: #d8e3ec;
  --frost-line: #c3d4e2;
  --blue-line: #2456a0;
  --coal: #171a20;
  --coal-soft: #232833;
  --white: #ffffff;
  --text: #2a2f38;
  --text-soft: #5a6472;
  --green: #1d7a3d;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", sans-serif;

  --container: 1120px;
  --radius: 10px;
  --shadow: 0 18px 40px -18px rgba(23, 26, 32, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--ice);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.01em;
  color: var(--coal);
}

h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 10px; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.35rem; letter-spacing: 0.03em; }

.accent { color: var(--red); }

a { color: var(--blue-line); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.eyebrow {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.9rem;
  color: var(--red);
  margin-bottom: 8px;
}

main.container { padding-top: 40px; padding-bottom: 72px; flex: 1; }

/* ---------- header ---------- */
.site-header {
  background: var(--coal);
  border-bottom: 3px solid var(--red);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo { height: 44px; width: auto; }

.brand-name {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.02em;
}

.brand-name em { color: var(--red); font-style: italic; }

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }

.site-nav a {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.02rem;
  color: var(--frost);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
}

.site-nav a:hover { color: var(--white); background: var(--coal-soft); }
.site-nav a.active { color: var(--white); background: var(--red); }

.nav-user {
  color: var(--text-soft);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.05rem;
  display: inline-block;
  padding: 11px 26px;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--blue-line); outline-offset: 3px; }

.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }

.btn-ghost {
  background: transparent;
  color: var(--coal);
  box-shadow: inset 0 0 0 2px var(--frost-line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--coal); }

.btn-sm { font-size: 0.92rem; padding: 7px 16px; }

.btn-danger-ghost {
  background: transparent;
  color: var(--red);
  box-shadow: inset 0 0 0 2px var(--frost-line);
}
.btn-danger-ghost:hover { box-shadow: inset 0 0 0 2px var(--red); }

/* ---------- flash ---------- */
.flash {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-weight: 500;
  border-left: 5px solid;
}

.flash-success { background: #e5f3ea; border-color: var(--green); color: #14522a; }
.flash-error { background: #fbe7e9; border-color: var(--red); color: var(--red-dark); }

/* ---------- cards / panels ---------- */
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.training-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 4px solid var(--red);
}

.training-card h3 a { color: var(--coal); text-decoration: none; }
.training-card h3 a:hover { color: var(--red); }

.training-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.training-meta strong { color: var(--text); font-weight: 600; }

.training-card .card-tag {
  align-self: flex-start;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  background: var(--ice);
  color: var(--blue-line);
  border-radius: 4px;
  padding: 3px 10px;
}

.card-tag.tag-full { background: #fbe7e9; color: var(--red-dark); }
.card-tag.tag-open { background: #e5f3ea; color: var(--green); }

.card-actions { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  text-align: left;
  background: var(--coal);
  color: var(--frost);
  padding: 12px 16px;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--frost);
  vertical-align: middle;
}

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

td .btn { margin: 0; }

/* ---------- forms ---------- */
form { max-width: 640px; }

form.inline-form { display: inline; max-width: none; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 5px;
  color: var(--coal);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--frost-line);
  border-radius: 6px;
  background: var(--white);
  font: inherit;
  color: var(--text);
  margin-bottom: 4px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-line);
  box-shadow: 0 0 0 3px rgba(36, 86, 160, 0.15);
}

form > div, .form-row-item { margin-bottom: 18px; }

.form-help { color: var(--text-soft); font-size: 0.85rem; }

ul.form-errors, .form-error { list-style: none; color: var(--red-dark); font-size: 0.9rem; margin: 3px 0 0; }

.suggest-wrap { position: relative; }

.suggest-list {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--frost-line);
  border-radius: 0 0 6px 6px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
}

.suggest-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--ice);
}

.suggest-item:last-child { border-bottom: 0; }

.suggest-item:hover,
.suggest-item.hl { background: var(--ice); color: var(--red); font-weight: 600; }

.map-embed {
  height: 320px;
  border-radius: var(--radius);
  margin-top: 18px;
  box-shadow: var(--shadow);
  z-index: 0;
}

.map-link {
  color: var(--blue-line);
  text-decoration: none;
  border-bottom: 1px dotted var(--blue-line);
}

.map-link:hover { color: var(--red); border-color: var(--red); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ice);
  border: 1.5px solid var(--frost-line);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
  flex-shrink: 0;
}

.checkbox-row label { margin: 0; font-weight: 600; flex: 1; cursor: pointer; }
.checkbox-row .muted { font-weight: 400; color: var(--text-soft); font-size: 0.88rem; }

/* ---------- auth pages ---------- */
.auth-wrap {
  max-width: 460px;
  margin: 48px auto;
  width: 100%;
  padding: 0 24px;
  flex: 1;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--red);
  padding: 34px;
}

.auth-card .btn { width: 100%; margin-top: 8px; }

.auth-logo { height: 72px; margin: 0 auto 18px; }

.auth-card h1 { text-align: center; font-size: 2rem; }
.auth-sub { text-align: center; color: var(--text-soft); margin-bottom: 22px; font-size: 0.97rem; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--coal);
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer a { color: var(--frost); text-decoration: none; }

/* ---------- helpers ---------- */
.muted { color: var(--text-soft); }
.empty-note {
  background: var(--white);
  border: 1.5px dashed var(--frost-line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--text-soft);
}

.section-gap { margin-top: 44px; }

/* ---------- mobilný sidebar ---------- */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.sidebar-open .nav-toggle span:nth-child(2) { opacity: 0; }
.sidebar-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 84vw);
  background: var(--coal);
  border-left: 3px solid var(--red);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 22px;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.sidebar-open .sidebar { transform: translateX(0); }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 26, 32, 0.55);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--coal-soft);
  margin-bottom: 14px;
}

.sidebar-logo { height: 44px; }

.sidebar-user { display: flex; flex-direction: column; line-height: 1.3; }
.sidebar-user strong { color: var(--white); }
.sidebar-user span {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--red);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar-nav a {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.25rem;
  color: var(--frost);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 6px;
}

.sidebar-nav a:hover { color: var(--white); background: var(--coal-soft); }
.sidebar-nav a.active { color: var(--white); background: var(--red); }

.sidebar-logout { margin-top: auto; text-align: center; }

@media (max-width: 820px) {
  .site-nav, .nav-user { display: none; }
  .nav-toggle { display: block; }
}

@media (min-width: 821px) {
  .sidebar, .sidebar-backdrop { display: none; }
}
