@import url("/assets/fonts/fonts.css");

/* =========================================================
   Indica Sativa — szablon A "Redakcja"
   Jasny, redakcyjny. Oliwka + sliwka. Naglowki lekkie i duze.
   ========================================================= */
:root {
  --white: #ffffff;
  --paper: #f7f3f3;   /* cieple, jasne tlo sekcji */
  --paper2: #f2f2f2;
  --olive: #829c35;   /* akcent */
  --olive-d: #6f8a2e;
  --olive-soft: #eef2e4;
  --plum: #483c40;    /* naglowki, tekst mocny */
  --grey: #6d6d6d;    /* tekst zwykly */
  --grey-l: #9b9b9b;  /* daty, podpisy */
  --line: #ecebe8;
  --radius: 10px;

  --f-head: "Readex Pro", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --f-body: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--white);
  color: var(--grey);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--olive); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--f-head); color: var(--plum); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.main { flex: 1 0 auto; padding-bottom: 64px; }

/* ===== Naglowek ===== */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
/* ===== Logo (znak + logotyp + deskryptor) ===== */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--olive); }
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--f-head); font-size: 20px; font-weight: 300;
  color: var(--plum); letter-spacing: -.005em;
}
.brand-name b { font-weight: 600; color: var(--olive); }
.brand-sub {
  font-family: var(--f-body); font-size: 8.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--grey-l); margin-top: 3px;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--grey); font-size: 14.5px; font-weight: 400;
  padding: 8px 14px; border-radius: 8px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--plum); background: var(--paper); text-decoration: none; }
.nav a.active { color: var(--olive); font-weight: 600; }
.navtoggle, .burger { display: none; }

/* ===== Naglowek strony / hero ===== */
.hero { padding: 54px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 300; line-height: 1.14; margin: 0 0 12px; max-width: 18ch; }
.hero h1 span { color: var(--olive); font-weight: 400; }
.hero p { margin: 0; color: var(--grey); font-size: 17px; max-width: 60ch; }

.pagehead { padding: 46px 0 22px; }
.pagehead h1 { font-size: clamp(27px, 4vw, 38px); font-weight: 300; margin: 0 0 8px; }
.pagehead p { margin: 0; color: var(--grey); }

.section-title { font-size: 22px; font-weight: 400; margin: 0 0 18px; }

/* ===== Filtr kategorii ===== */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.chip {
  font-family: var(--f-body); font-size: 13px; color: var(--grey);
  padding: 6px 15px; border-radius: 999px; border: 1px solid #dfe3d6;
  background: var(--white); transition: .15s;
}
.chip:hover { border-color: var(--olive); color: var(--plum); text-decoration: none; }
.chip.on { background: var(--olive); border-color: var(--olive); color: #fff; font-weight: 600; }
.chip.on:hover { color: #fff; }

/* ===== Karty ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 21px; display: flex; flex-direction: column;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.card:hover { border-color: #d6dcc6; box-shadow: 0 10px 26px rgba(72, 60, 64, .07); transform: translateY(-2px); }
.card-cat { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--olive); font-weight: 700; }
.card-date { font-size: 11.5px; color: var(--grey-l); margin-top: 3px; font-variant-numeric: tabular-nums; }
.card h3 { font-size: 17px; font-weight: 600; margin: 9px 0 0; line-height: 1.35; }
.card h3 a { color: var(--plum); }
.card h3 a:hover { color: var(--olive); text-decoration: none; }
.card p { margin: 8px 0 14px; color: var(--grey); font-size: 14px; line-height: 1.6; flex: 1; }
.more { font-size: 13px; color: var(--olive); font-weight: 600; }

.empty {
  padding: 34px 24px; text-align: center; color: var(--grey);
  border: 1px dashed #dcdcd8; border-radius: var(--radius); background: var(--paper);
}

/* ===== Pojedynczy wpis / strona ===== */
.post { max-width: 720px; margin: 46px auto 0; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 300; line-height: 1.2; margin: 10px 0 22px; }
.post .content { font-size: 17px; color: #55504f; line-height: 1.8; }
.post .content p { margin: 0 0 18px; }
.back { display: inline-block; margin-top: 30px; font-size: 14px; font-weight: 600; }

/* ===== Stopka ===== */
.site-footer { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--paper); padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--grey); }
.panel-link { color: var(--grey-l); font-size: 12.5px; }
.panel-link:hover { color: var(--olive); }

/* =========================================================
   PANEL ADMINA — ten sam jezyk wizualny
   ========================================================= */
.admin-body { display: block; background: var(--paper); }
.admin-top { background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 0; position: sticky; top: 0; z-index: 20; }
.admin-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-nav a { color: var(--grey); font-size: 14px; padding: 7px 12px; border-radius: 8px; }
.admin-nav a:hover { background: var(--paper); color: var(--plum); text-decoration: none; }
.admin-nav a.active { background: var(--olive-soft); color: var(--olive-d); font-weight: 600; }
.admin-user { font-size: 13px; color: var(--grey-l); }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin: 20px 0; }
.panel h2 { margin: 0 0 16px; font-size: 19px; font-weight: 500; }

.login-box { max-width: 390px; margin: 8vh auto; }
.login-box .brand { justify-content: center; display: flex; margin-bottom: 20px; }

label { display: block; font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--plum); margin: 15px 0 6px; }
input[type=text], input[type=password], input[type=url], input[type=number], textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 8px;
  background: var(--white); border: 1px solid #dcdcd8; color: var(--plum);
  font-family: var(--f-body); font-size: 15px; outline: none; transition: .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(130, 156, 53, .14); outline: none; }
textarea { min-height: 200px; resize: vertical; line-height: 1.7; }

.btn {
  display: inline-block; cursor: pointer; border: 1px solid var(--olive); font-family: var(--f-body);
  background: var(--olive); color: #fff; font-weight: 600; font-size: 14.5px;
  padding: 10px 20px; border-radius: 8px; transition: .15s;
}
.btn:hover { background: var(--olive-d); border-color: var(--olive-d); text-decoration: none; }
.btn-ghost { background: var(--white); color: var(--plum); border: 1px solid #dcdcd8; }
.btn-ghost:hover { background: var(--paper); border-color: #c9c9c4; }
.btn-danger { background: #fff; color: #a33a3a; border: 1px solid #e6c9c9; }
.btn-danger:hover { background: #fdf3f3; border-color: #d9a9a9; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.tbl th, table.tbl td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--grey-l); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
table.tbl td { color: var(--plum); }
table.tbl tr:hover td { background: var(--paper); }
.tbl-scroll { overflow-x: auto; }

.alert { padding: 12px 15px; border-radius: 8px; margin: 12px 0; font-size: 14.5px; }
.alert-ok { background: var(--olive-soft); border: 1px solid #cfdcae; color: var(--olive-d); }
.alert-err { background: #fdf3f3; border: 1px solid #e6c9c9; color: #a33a3a; }
.badge { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 5px; }
.badge-on { background: var(--olive-soft); color: var(--olive-d); }
.badge-off { background: var(--paper2); color: var(--grey); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 17px 19px; }
.stat b { display: block; font-family: var(--f-head); font-size: 30px; font-weight: 300; color: var(--olive); line-height: 1.2; }
.stat span { font-size: 13px; color: var(--grey); }
.hint { font-size: 13px; color: var(--grey-l); margin-top: 6px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; background: var(--paper2); padding: 1px 5px; border-radius: 4px; color: var(--plum); }

/* ===== Mobile ===== */
@media (max-width: 760px) {
  .burger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
  .burger span { display: block; width: 22px; height: 2px; background: var(--plum); border-radius: 2px; }
  .nav {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 22px 16px;
    background: var(--white); border-bottom: 1px solid var(--line);
  }
  .navtoggle:checked ~ .nav { display: flex; }
  .hero { padding: 36px 0 22px; }
  .post { margin-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}
