/* Light theme + page background pattern */
:root {
  --bg: #ffffff;
  --text: #1f2328;
  --muted: #57606a;
  --accent: #0059c9;
  --border: #e5e7eb;
  --card: #ffffff;
}


@font-face {
  font-family: Manteka;
  src: url(/fonts/Manteka.woff) format("woff");
}

@font-face {
  font-family: Oswald;
  src: url(/fonts/Oswald-Stencil.ttf);
}

@font-face {
  font-family: OxygenMono;
  src: url(/fonts/OxygenMono-Regular.otf);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background-color: var(--bg);
  background-image: url("/images/background-pattern.png");
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: OxygenMono, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* header | content | footer */
}

/* binkov (header) */
.binkovHeader {
  position: relative;
  height: var(--hero-h);
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;  
  place-items: center;
  text-align: center;
  justify-items: center;
  /* Background image */
  background-image: url("/images/Battle_map_top.png");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  /* subtle white overlay to keep text legible */
  isolation: isolate;
  padding: 8px 16px;
}

.binkovHeader::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.35);
  z-index: 0;
}

.binkovHeader-inner {
  position: relative;
  z-index: 1;
}

.binkovHeader-title {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 40px);
}

.binkovHeader-sub {
  margin: 6px 0 0;
  color: var(--muted);
}

/* Row 1: place figure and logo side-by-side, centered */
.binkov-row{
  display: flex;
  align-items: flex-end;           /* align bottoms */
  justify-content: center;         /* center as a group */
  gap: var(--row-gap);
  width: 100%;
  height: 100%;
}

.binkov-figure-container,
.binkov-logo-container{ flex: 0 0 auto;z-index: 2; }


.binkov-figure {
  width: var(--figure-w);
  height: 180px;
  object-fit: contain;
  transform: translate3d(0,0,0);
  pointer-events: none;
  will-change: transform;
  transition: transform 80ms linear;
  z-index: 2;
}

/* Logo (clickable) */
.binkov-logo-link{ display: inline-block; }
.binkov-logo{
  display: block;
  max-width: var(--logo-max-w);
  max-height: 180px;
  height: auto; width: auto;
}


/* CONTENT */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
}

.controls input {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}

.controls button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.controls button:hover {
  border-color: var(--accent);
}

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

.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #f4f6f8;
}

.card .pad {
  padding: 12px;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.card .meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.card a {
  color: var(--accent);
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

.card p {
  margin: 0;
  color: #3f454b;
  font-size: 14px;
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.card-title-link:hover {
  text-decoration: underline;
}


.status {
  margin-top: 18px;
  min-height: 20px;
  color: var(--muted);
}

.error {
  color: #b42318;
}

.grid.posts {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.section-title {
  margin: 6px 0 18px;
  font-size: 20px;
  color: var(--text);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.04));
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}

.tab {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.tab:hover {
  border-color: var(--accent);
}

.tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}



/* Row 2: tabs pinned to header bottom */
.header-tabs{
  grid-row: 2;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;                       /* sits at the bottom */
  z-index: 2;
}

.header-tabs .tab {
  background: rgba(255, 255, 255, 0.8);
}

/* link to all posts */
.all-link {
  margin-top: 14px;
  text-align: right;
}

.all-link .link {
  color: var(--accent);
  text-decoration: none;
}

.all-link .link:hover {
  text-decoration: underline;
}

.post-badges {
  margin: 10px 0 6px;
}

.post-content {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
  line-height: 1.65;
}

.post-content img,
.post-content iframe,
.post-content video {
  max-width: 100%;
  height: auto;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  margin-top: 1.2em;
}

.pager {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 14px 0;
}

.pager button {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.pager button:disabled {
  opacity: .5;
  cursor: default;
}

.back {
  margin-top: 14px;
}

.post-featured img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: block;
  margin: 8px 0 14px;
}

/* FOOTER */
.site-footer {
  grid-row: 3;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  padding-top: 20px;
  width: 100%;
  color: #2c3e50;
  margin: 0 auto;
  /* IE8 proofing */
}

.site-footer p {
  margin: 10px 0;
  color: var(--muted);
}

/* Accessibility: disable parallax if the user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .binkov-figure {
    transition: none !important;
  }
}
