/* =========================================================
   TS Florian Koszary - arkusz stylow
   Kolorystyka oparta na logo klubu: navy / czerwien / zloto
   ========================================================= */

:root {
  --navy: #0a2942;
  --navy-dark: #071c30;
  --navy-light: #123a5c;
  --red: #b23531;
  --red-dark: #8f2a27;
  --gold: #e5a91c;
  --gold-dark: #c68f14;
  --steel: #55606a;

  --bg: #f3f5f7;
  --white: #ffffff;
  --text: #1c2732;
  --text-light: #5c6b77;
  --border: #e1e6ea;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 10px rgba(10, 41, 66, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 41, 66, 0.14);

  --font-heading: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Pasek gorny ---------- */
.top-bar {
  background: var(--navy-dark);
  color: #b9c6d1;
  font-size: 0.8rem;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
  flex-wrap: wrap;
  gap: 6px;
}
.top-bar-links a {
  color: #d9e2ea;
  margin-left: 16px;
}
.top-bar-links a:hover { color: var(--gold); text-decoration: none; }

/* ---------- Naglowek ---------- */
.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 16px;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-img {
  height: 56px;
  width: 56px;
  object-fit: contain;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: var(--white);
  font-family: var(--font-heading);
}
.logo-text strong {
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}
.logo-text small {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.main-nav a {
  color: #dfe7ee;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.main-nav a.active { background: rgba(255,255,255,0.12); color: var(--gold); }
.main-nav a.nav-highlight {
  background: var(--red);
  color: var(--white);
}
.main-nav a.nav-highlight:hover { background: var(--red-dark); }
.main-nav a.nav-highlight.active { background: var(--red-dark); color: var(--white); }

.badge {
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50px;
  padding: 1px 7px;
  margin-left: 6px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  display: block;
}

/* ---------- Flash / komunikaty ---------- */
.flash {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.flash-success { background: #e4f3e6; color: #276332; border: 1px solid #bfe3c5; }
.flash-error { background: #fbe7e6; color: #8c2a26; border: 1px solid #f3c3c0; }

/* ---------- Uklad glowny / siatka z sidebarem ---------- */
main { min-height: 60vh; padding-bottom: 60px; }

.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 34px;
  margin-top: 24px;
  align-items: start;
}
.home-main { min-width: 0; }

.section-title {
  border-bottom: 3px solid var(--red);
  padding-bottom: 8px;
  margin-top: 40px;
  margin-bottom: 20px;
}
.page-title { margin-top: 24px; }

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Karta artykulu (hero) ---------- */
.hero-article {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  color: var(--white);
}
.hero-article-img { position: relative; display: block; min-height: 260px; }
.hero-article-img img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.hero-article-body { padding: 28px 30px; display: flex; flex-direction: column; justify-content: center; }
.hero-article-body h1 { color: var(--white); font-size: 1.7rem; margin-bottom: 12px; }
.hero-article-body h1 a { color: var(--white); text-decoration: none; }
.hero-article-body p { color: #cfd9e2; }
.hero-article .article-card-meta { color: var(--gold); }

.tag {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 600;
}
.tag-on-image { position: absolute; top: 14px; left: 14px; }
.tag-small { background: var(--gold); color: var(--navy-dark); font-size: 0.65rem; margin-left: 6px; }

/* ---------- Siatka artykulow ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 20px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.article-card-img { position: relative; display: block; aspect-ratio: 16/10; background: var(--navy); overflow: hidden; }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-img-placeholder { object-fit: contain; padding: 20px; background: var(--navy); }
.article-card-body { padding: 16px 18px 18px; }
.article-card-body h3 { font-size: 1.02rem; margin-bottom: 8px; }
.article-card-body h3 a { color: var(--navy); text-decoration: none; }
.article-card-body h3 a:hover { color: var(--red); }
.article-card-excerpt {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.article-card-meta { color: var(--text-light); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }

.section-more { margin-top: 26px; text-align: center; }

/* ---------- Sidebar ---------- */
.sidebar-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-box h3 { border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 12px; font-size: 1rem; }
.sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar-list li { border-bottom: 1px solid var(--border); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
  display: block;
  padding: 9px 2px;
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
}
.sidebar-list a:hover { color: var(--red); }
.sidebar-list a.active { color: var(--red); font-weight: 600; }

.sidebar-cta { background: var(--navy); color: var(--white); }
.sidebar-cta h3 { color: var(--white); border-color: rgba(255,255,255,0.2); }
.sidebar-cta p { color: #cfd9e2; font-size: 0.9rem; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.88rem;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); text-decoration: none; }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-small { padding: 6px 12px; font-size: 0.75rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Formularze ---------- */
.form { max-width: 640px; }
.form-inline { display: flex; gap: 10px; max-width: 420px; }
.form-inline input { flex: 1; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--navy); }
.form-group label small { font-weight: 400; color: var(--text-light); text-transform: none; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="file"],
textarea, select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(178, 53, 49, 0.12);
}
input:disabled { background: var(--bg); color: var(--text-light); }
.form-group small, small.hint { display: block; color: var(--text-light); font-size: 0.8rem; margin-top: 4px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  font-size: 0.92rem;
  cursor: pointer;
}
.checkbox-row input { width: auto; margin-top: 3px; }

.hidden-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.inline-form { display: inline-block; }

/* ---------- Strony statyczne / auth ---------- */
.static-page { max-width: 820px; margin: 24px auto 0; }
.static-page-narrow { max-width: 560px; }
.static-page .lead { font-size: 1.1rem; color: var(--text-light); }

.auth-page {
  max-width: 480px;
  margin: 50px auto;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
}
.auth-card h1 { text-align: center; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-light); font-size: 0.92rem; margin-bottom: 26px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 0.92rem; }

.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 4rem; color: var(--red); }
.error-details { text-align: left; background: #fff; padding: 16px; border-radius: var(--radius-sm); overflow: auto; font-size: 0.8rem; }

/* ---------- Artykul (widok pelny) ---------- */
.article-full { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px; margin-top: 24px; }
.article-full h1 { margin-top: 8px; }
.breadcrumbs { font-size: 0.85rem; color: var(--text-light); margin: 0 0 6px; }
.article-full-meta { color: var(--text-light); font-size: 0.85rem; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.03em; }
.article-full-img { width: 100%; border-radius: var(--radius-sm); margin-bottom: 20px; max-height: 420px; object-fit: cover; }
.article-full-content { font-size: 1.02rem; }
.article-full-content p { margin: 0 0 1.1em; }

/* ---------- Komentarze ---------- */
.comments-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 30px; margin-top: 24px; }
.comments-empty { color: var(--text-light); }
.comments-list { list-style: none; margin: 0 0 22px; padding: 0; }
.comment { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-avatar {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; }
.comment-meta strong { color: var(--navy); }
.comment-meta time { color: var(--text-light); font-size: 0.78rem; }
.comment-body p, .forum-content { margin: 0; white-space: pre-wrap; word-break: break-word; }
.comment-form { margin-top: 10px; }
.comment-as { font-size: 0.9rem; color: var(--text-light); }
.comment-hint { font-size: 0.85rem; color: var(--text-light); }

/* ---------- Strefa czlonka ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 22px 0 10px;
}
.dashboard-tile {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  border-left: 4px solid var(--red);
  transition: transform 0.15s, box-shadow 0.15s;
}
.dashboard-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.dashboard-tile h3 { margin-bottom: 6px; }
.dashboard-tile p { margin: 0; color: var(--text-light); font-size: 0.9rem; }
.dashboard-tile-admin { border-left-color: var(--gold); }

.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-list li {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.topic-list a.topic-title, .topic-list > li > a { font-weight: 600; color: var(--navy); text-decoration: none; }
.topic-list a:hover { color: var(--red); }
.topic-meta { color: var(--text-light); font-size: 0.8rem; }
.topic-list-full li { padding: 16px 20px; }

.forum-post { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; display: flex; gap: 14px; }
.forum-post-original { border-left: 4px solid var(--gold); }

.profile-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; margin-bottom: 22px; }

/* ---------- Tabele (panel admina, lista czlonkow) ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 16px;
}
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table th { background: var(--navy); color: var(--white); font-family: var(--font-heading); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.03em; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.row-highlight { background: #fff7e8; }
.data-table select { padding: 6px 8px; font-size: 0.85rem; }
.actions-cell { display: flex; gap: 8px; }

/* ---------- Panel admina - extra ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
.stat-tile {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.stat-tile strong { display: block; font-family: var(--font-heading); font-size: 2rem; color: var(--red); }
.stat-tile span { color: var(--text-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-quick-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.admin-thumb { max-width: 160px; border-radius: var(--radius-sm); margin: 8px 0; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; margin-top: 20px; align-items: start; }
.contact-info { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 24px; }
.contact-info h3 { color: var(--gold); }
.contact-info p { margin: 0 0 8px; color: #d9e2ea; }
.contact-info .hint { font-size: 0.78rem; color: #92a3b1; margin-top: 14px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; margin: 28px 0; }
.pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
.pagination a.active { background: var(--red); color: var(--white); }

/* ---------- Stopka ---------- */
.site-footer { background: var(--navy-dark); color: #b9c6d1; margin-top: 60px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 40px 20px 30px;
}
.footer-logo { height: 60px; width: 60px; object-fit: contain; margin-bottom: 10px; }
.footer-col h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 12px; }
.footer-col a { display: block; color: #b9c6d1; text-decoration: none; margin-bottom: 8px; font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { margin: 0 0 6px; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 16px 0; text-align: center; font-size: 0.78rem; color: #7c8b98; }

/* ---------- Responsywnosc ---------- */
@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .hero-article { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    background: var(--navy-dark);
    border-radius: var(--radius-sm);
    margin-top: 10px;
    padding: 6px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .site-header-inner { flex-wrap: wrap; }
  .top-bar-inner { flex-direction: column; align-items: flex-start; height: auto; padding: 6px 0; }
  .form-row-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
}
