/*
 * Kooperacija redesign (Nov 2026).
 * Loaded after app.css + blog.css on the public pages, so it overrides them.
 * Brand red #ED302B is used for marks (#) and decoration; the slightly darker
 * #C8221C is used where red carries text (buttons, tags, links) so it stays readable.
 */
:root {
  --k-red: #ED302B;
  --k-red-text: #C8221C;
  --k-ink: #141414;
  --k-text: #4a4a4a;
  --k-muted: #5c5c5c;
  --k-line: #e6e4e1;
  --k-placeholder: #e7e5e2;
  --k-max: 1200px;
}

body.font-sans,
body.font-sans .bg-gray-100 {
  font-family: 'Gothic', 'Century Gothic', 'Questrial', sans-serif;
  background: #ffffff;
  color: var(--k-ink);
}

/* ---------- Site header ---------- */
.k-site-header { background: #fff; border-bottom: 1px solid var(--k-line); }
.k-wrap { max-width: var(--k-max); margin: 0 auto; padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
.k-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.k-brand { display: flex; align-items: center; gap: 12px; color: var(--k-ink) !important; text-decoration: none !important; }
.k-brand svg { width: 40px; height: 32px; flex: 0 0 auto; }
.k-brand-name { font-size: 26px; font-weight: bold; letter-spacing: -0.5px; white-space: nowrap; }
.k-brand-name .k-hash { color: var(--k-red); }

.k-menu { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: bold; }
.k-menu a { color: var(--k-ink) !important; text-decoration: none !important; }
.k-menu a:hover { color: var(--k-red-text) !important; }
.k-menu .k-btn { color: #fff !important; }

.k-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--k-red-text); color: #fff !important; font-weight: bold; font-size: 15px;
  text-decoration: none !important; cursor: pointer; white-space: nowrap;
}
.k-btn:hover { background: #a91b16; color: #fff !important; }
.k-btn-dark { background: var(--k-ink); }
.k-btn-dark:hover { background: #000; }
.k-btn-outline { background: transparent; color: var(--k-ink) !important; border: 2px solid var(--k-ink); }
.k-btn-outline:hover { background: var(--k-ink); color: #fff !important; }

.k-user { display: flex; align-items: center; gap: 10px; }
.k-user img, .k-user svg.k-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.k-burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; align-items: center; justify-content: center; }
.k-mobile-menu { display: none; border-top: 1px solid var(--k-line); padding: 12px 16px 20px; }
.k-mobile-menu.is-open { display: flex; flex-direction: column; gap: 4px; }
.k-mobile-menu a { padding: 10px 0; font-size: 16px; font-weight: bold; color: var(--k-ink) !important; }
.k-mobile-menu form { margin: 0; }

.k-cats {
  display: flex; gap: 4px 26px; flex-wrap: wrap; font-size: 15px; font-weight: bold;
}
.k-cats a {
  padding: 12px 0 13px; border-bottom: 3px solid transparent;
  color: #4f4f4f !important; text-decoration: none !important; white-space: nowrap;
}
.k-cats a .k-hash { color: var(--k-red); }
.k-cats a:hover { color: var(--k-ink) !important; }
.k-cats a.is-active { color: var(--k-ink) !important; border-bottom-color: var(--k-red); }

/* ---------- Page heading (the @section('header') block on every page) ---------- */
body.font-sans > div > header.bg-white.shadow,
header.bg-white.shadow { box-shadow: none !important; background: #fff; }
header.bg-white.shadow > div { max-width: var(--k-max) !important; padding: 36px 32px 8px !important; }
.header > a:first-child,
.header .social { display: none !important; }   /* logo now lives in the site header, social icons in the footer */
.header h2 {
  font-size: 44px !important; font-weight: bold !important; line-height: 1.1;
  letter-spacing: -1px; margin: 0 !important; color: var(--k-ink);
}
.k-page-sub { margin: 6px 0 0; font-size: 16px; color: var(--k-muted); flex-basis: 100%; }

/* ---------- Two-column layout (posts + sidebar) ---------- */
main.bg-white.shadow { box-shadow: none !important; }
main .container-fluid { max-width: var(--k-max); margin: 0 auto; padding: 24px 32px 64px; }
main .container-fluid > .row { margin: 0 !important; }
.border-body, #border-body { border: 0 !important; margin-left: 0 !important; padding-left: 0; padding-right: 48px; }
.border-body-sm { border: 0 !important; border-left: 1px solid var(--k-line) !important; padding-left: 32px !important; }
@media (min-width: 768px) {
  .border-body-sm { flex: 0 0 33.333%; max-width: 33.333%; }
}

/* ---------- Post list ---------- */
.k-list { display: flex; flex-direction: column; gap: 48px; padding-top: 8px; }
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 44px 32px; }

.k-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.k-thumb {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: 6px; background: var(--k-placeholder);
}
.k-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.k-card:hover .k-thumb img, .k-featured:hover .k-thumb img { transform: scale(1.03); }
.k-tag {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: var(--k-red-text); color: #fff; font-size: 12px; font-weight: bold;
  letter-spacing: .4px; text-transform: uppercase; padding: 5px 9px; border-radius: 3px;
}
.k-card-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.k-card h3 { margin: 4px 0 0; font-size: 21px; line-height: 1.25; font-weight: bold; color: var(--k-ink); }
.k-card h3 a, .k-featured h2 a { color: var(--k-ink) !important; text-decoration: none !important; }
.k-card h3 a:hover, .k-featured h2 a:hover { color: var(--k-red-text) !important; }
.k-excerpt { margin: 0; font-size: 15px; line-height: 1.55; color: var(--k-text); }
.k-meta { margin: 0; font-size: 13px; color: var(--k-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.k-meta a { font-weight: bold; color: var(--k-ink) !important; }
.k-meta img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

.k-featured {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: center;
  padding-bottom: 48px; border-bottom: 1px solid var(--k-line);
}
.k-featured .k-thumb { aspect-ratio: 4 / 3; }
.k-featured-body { display: flex; flex-direction: column; gap: 14px; }
.k-featured h2 { margin: 0; font-size: 34px; line-height: 1.15; font-weight: bold; letter-spacing: -.5px; }
.k-featured .k-excerpt { font-size: 17px; line-height: 1.6; }

.k-pager { display: flex; justify-content: center; }
.k-pager nav, .k-pager .pagination { margin: 0; }
.k-pager a, .k-pager span { font-weight: bold; }
.k-empty { padding: 32px; text-align: center; color: var(--k-muted); border: 1px dashed var(--k-line); border-radius: 8px; }

/* ---------- Sidebar ---------- */
.border-body-sm .side-box, .border-body-sm .date-picker { margin: 0 0 36px !important; }
.border-body-sm .side-box h1, .border-body-sm .date-picker h1 {
  text-align: left !important; padding: 0 !important; margin: 0 0 14px; font-size: 18px !important; font-weight: bold;
}
.border-body-sm hr { display: none; }
.border-body-sm .side-box a:hover { padding: 0; background: none; color: var(--k-red-text); }
.border-body-sm .banner-img { border-radius: 6px; }
.border-body-sm iframe { max-width: 100%; border-radius: 6px; }
.border-body-sm > .side-box { margin-top: 0 !important; }

.k-authors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.k-authors a, .k-authors span { display: block; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; background: var(--k-placeholder); }
.k-authors img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.k-authors a:hover img { transform: scale(1.06); }
.k-link { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: bold; color: var(--k-red-text) !important; }

.k-podcast { background: var(--k-ink); color: #fff; border-radius: 8px; padding: 22px; }
.k-podcast .k-eyebrow { color: #ff8a84; }
.k-podcast h1 { color: #fff; }
.k-podcast audio { width: 100% !important; margin: 4px 0 0; }
.k-podcast .k-link { color: #fff !important; text-decoration: underline; }
.k-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; color: var(--k-muted); }

#images { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 !important; }
#images img { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover; margin: 0 !important; border-radius: 4px; }

.date-picker button[type=submit] { margin-top: 8px; }

/* ---------- Single post ---------- */
.k-article-title { font-size: 40px !important; line-height: 1.15; font-weight: bold !important; color: var(--k-ink) !important; letter-spacing: -.5px; }
.post-body { font-size: 18px !important; line-height: 1.7 !important; color: #2a2a2a; max-width: 70ch; }
.post-body p { margin-bottom: 1.1em; }
.post-body img { max-width: 100%; height: auto; border-radius: 6px; }

/* ---------- Footer ---------- */
.k-footer { background: var(--k-ink); color: #e9e9e9; }
.k-footer a { color: #e9e9e9 !important; }
.k-footer a:hover { color: #fff !important; text-decoration: underline; }
.k-footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-top: 48px; padding-bottom: 40px; }
.k-newsletter { flex: 1 1 360px; max-width: 480px; }
.k-newsletter h2 { margin: 0 0 8px; font-size: 24px; font-weight: bold; color: #fff; }
.k-newsletter p { margin: 0 0 18px; font-size: 15px; line-height: 1.5; color: #c4c4c4; }
.k-newsletter form { display: flex; flex-wrap: wrap; gap: 10px; }
.k-newsletter input {
  flex: 1 1 220px; min-width: 0; height: 48px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #4a4a4a; background: #1f1f1f; color: #fff; font-size: 15px;
}
.k-newsletter input::placeholder { color: #9a9a9a; }
.k-newsletter .k-btn { height: 48px; }
.k-footer-cols { display: flex; flex-wrap: wrap; gap: 48px; font-size: 15px; }
.k-footer-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.k-footer-cols .k-eyebrow { color: #9a9a9a; margin-bottom: 4px; }
.k-footer-legal { border-top: 1px solid #2c2c2c; padding-top: 24px; padding-bottom: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; font-size: 13px; line-height: 1.6; color: #a8a8a8; }
.k-footer-legal h3 { margin: 0 0 6px; font-size: 12px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; color: #9a9a9a; }
.k-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 24px; font-size: 13px; color: #9a9a9a; }
.k-social { display: flex; gap: 14px; }
.k-social svg { width: 24px; height: 24px; fill: #e9e9e9; }

.k-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ---------- Phones and tablets ---------- */
@media (max-width: 991px) {
  .k-menu { display: none; }
  .k-burger { display: inline-flex; }
  .k-cats { flex-wrap: nowrap; overflow-x: auto; gap: 22px; -webkit-overflow-scrolling: touch; }
  .border-body, #border-body { padding-right: 0; }
}
@media (max-width: 767px) {
  .k-wrap, main .container-fluid { padding-left: 16px; padding-right: 16px; }
  header.bg-white.shadow > div { padding: 24px 16px 4px !important; }
  .k-brand svg { width: 30px; height: 24px; }
  .k-brand-name { font-size: 20px; }
  .header h2 { font-size: 32px !important; }
  .border-body-sm { border-left: 0 !important; padding-left: 15px !important; margin-top: 48px; }
  .k-featured h2 { font-size: 26px; }
  .k-grid { grid-template-columns: 1fr; gap: 28px; }
  .k-grid .k-card { flex-direction: row; gap: 14px; align-items: flex-start; }
  .k-grid .k-thumb { flex: 0 0 120px; height: 90px; aspect-ratio: auto; }
  .k-grid .k-tag, .k-grid .k-excerpt { display: none; }
  .k-grid .k-card h3 { font-size: 17px; margin: 0; }
  .k-card-cat { display: inline !important; }
  .k-article-title { font-size: 28px !important; }
  .post-body { font-size: 17px !important; }
}
.k-card-cat { display: none; font-size: 12px; font-weight: bold; letter-spacing: .4px; text-transform: uppercase; color: var(--k-red-text); }
