/*
Theme Name: Szuflada
Theme URI: https://do-szuflady.pl
Author: Szuflada
Author URI: https://do-szuflady.pl
Description: Motyw magazynu Szuflada.
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: szuflada
*/

/* ========================================================================
      General Sans (variable, self-hosted). Weight axis 200 to 700.
======================================================================== */

@font-face {
  font-family: 'General Sans';
  src: url('fonts/GeneralSans-Variable.woff2') format('woff2'),
       url('fonts/GeneralSans-Variable.woff') format('woff');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'General Sans';
  src: url('fonts/GeneralSans-VariableItalic.woff2') format('woff2'),
       url('fonts/GeneralSans-VariableItalic.woff') format('woff');
  font-weight: 200 700;
  font-style: italic;
  font-display: swap;
}


/* ========================================================================
      0. global styles, variables, etc.
======================================================================== */

:root {
  --szuflada-black: #212021;
  --szuflada-white: #ebebeb;
  --nav-font-size: 16px;
  --logo-size: 160px;
  --logo-margin: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0px;
  padding-top: 70px;
  overflow-x: hidden;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

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

main {
  flex: 1;
  width: 100%;
  display: block;
}

/* ========================================================================
      1. navbar styles
======================================================================== */

h1 {
  text-align: left;
  font-family: 'General Sans', sans-serif;
  font-size: 44px;
  color: var(--szuflada-black);
  margin-top: 20px;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  margin-left: 0%;
  margin-right: 0%;
  padding: 5px 0;
  width: 100%;
  border-top: 2px solid #D4CDCD;
  border-bottom: 2px solid #D4CDCD;
  margin-bottom: 30px;
}

.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--szuflada-black);
  transition: transform 0.3s ease-in-out;
}

.navbar-wrapper.hide {
  transform: translateY(-100%);
}

.navbar {
  width: 100%;
  background-color: var(--szuflada-black);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.szuflada-logo {
  margin-left: 4%;
  display: flex;
  align-items: center;
}

.szuflada-logo svg,
.szuflada-logo img {
  width: var(--logo-size);
  height: auto;
  display: block;
  padding: var(--logo-margin) 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 4%;
}

.navItem {
  position: relative;
}

.navEl {
  color: var(--szuflada-white);
  background-color: transparent;
  padding: 6px 10px;
  min-height: 36px;
  text-decoration: none;
  border: none;
  font-family: 'General Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.navEl:hover {
  background-color: #282828;
  cursor: pointer;
}

.ver-div-nav {
  border-left: 2px solid var(--szuflada-white);
  height: 18px;
  margin: auto 2px;
  align-self: center;
}

.navEl a:link,
.navEl a:visited,
.navEl a:active,
.navEl a:hover {
  color: var(--szuflada-white) !important;
  text-decoration: none !important;
}

/* Container alignment */
.navItem form.header-search-form {
  display: flex !important;
  align-items: center !important;
  background-color: transparent !important;
  border-radius: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: background-color 0.3s ease !important;
  border: none !important;
}

/* The hidden input field - aggressively stripping default styles */
.header-search-form .header-search-input {
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  color: #ebebeb !important;
  font-family: 'General Sans', sans-serif !important;
  font-size: 14px !important;
  transition: width 0.4s ease, padding 0.4s ease !important;
  box-shadow: none !important;
  -webkit-appearance: none !important; /* Strips Apple/Safari default styling */
  appearance: none !important;
}

.header-search-form .header-search-input::placeholder {
  color: #999 !important;
}

/* The button holding the SVG - stripping default gray button look */
.header-search-form .header-search-button {
  background: transparent !important;
  border: none !important;
  padding: 6px 10px !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}

/* Set the SVG color */
.header-search-form .header-search-button svg path {
  fill: #ebebeb !important;
  transition: fill 0.3s ease !important;
}

/* --------------------------------------
   THE HOVER STATE
--------------------------------------- */

.header-search-form:hover,
.header-search-form:focus-within {
  background-color: #282828 !important;
}

.header-search-form:hover .header-search-input,
.header-search-form .header-search-input:focus {
  width: 160px !important;
  padding: 5px 5px 5px 15px !important;
}

/* Wymuszenie czcionki używanej w reszcie Szuflady i biały kolor wpisywanego tekstu */
.header-search-input {
    font-family: inherit;
    color: #ffffff;
}

/* Zmiana "X" (przycisku czyszczenia) na widoczny biały dla przeglądarek WebKit (Chrome, Safari, Edge) */
.header-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>') no-repeat 50% 50%;
    background-size: contain;
    cursor: pointer;
    margin-left: 10px;
}

/* ========================================================================
      DROPDOWN MENU STYLES
======================================================================== */

.navItem.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dropdown-toggle::after {
  content: '';
  border: solid var(--szuflada-white);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-left: 6px;
}

.navItem.dropdown:hover .dropdown-toggle::after,
.navItem.dropdown.active .dropdown-toggle::after {
  transform: rotate(-135deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background-color: var(--szuflada-black);
  border: 1px solid #3a3a3a;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.navItem.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 12px 18px;
  color: var(--szuflada-white);
  text-decoration: none;
  font-family: 'General Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #3a3a3a;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background-color: #282828;
}

@media (max-width: 768px) {
  .navItem.dropdown {
    width: 100%;
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-toggle::after {
    margin-left: auto;
    border-color: var(--szuflada-white);
    padding: 4px;
  }

  .dropdown-menu {
    position: static;
    max-height: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    background-color: #2a2a2a;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .navItem.dropdown:hover .dropdown-menu {
    max-height: 0;
  }

  .navItem.dropdown.active .dropdown-menu {
    max-height: 300px;
  }

  .dropdown-menu a {
    padding: 14px 30px;
  }
}

/* (Obsolete base mobile navbar block removed — the redesigned slim bar and the
   authoritative mobile-menu block near the end of this file define mobile nav.) */

/* ========================================================================
      2. footer styles
======================================================================== */

.site-footer {
  background-color: #212021;
  color: #cfcfcf;
  padding: 3rem 1rem 1rem;
  font-family: 'General Sans', sans-serif;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-col h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #ffffff;
  font-size: 1.1rem;
}

.footer-col p,
.footer-col a {
  font-size: 0.95rem;
  color: #cfcfcf;
  text-decoration: none;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-menu,
.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li,
.social-links li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #2f2f2f;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #999;
}

.footer-logo img,
.footer-logo svg {
  width: var(--logo-size);
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    text-align: center;
  }

  .footer-logo {
    justify-self: center;
  }
}

@media (min-width: 992px) {
  .footer-inner {
    grid-template-columns: 1fr auto auto auto auto;
    text-align: left;
  }

  .footer-logo {
    justify-self: start;
    margin: 0;
  }

  .footer-logo svg,
  .footer-logo img {
    margin: 0;
  }
}

/* ========================================================================
      3. category viewer
======================================================================== */

.singleContainer {
  width: 70%;
  font-family: 'Times New Roman', Times, serif;
  margin-right: 15%;
  margin-left: 15%;
}

.thetitle {
  font-size: 36px;
  font-family: 'General Sans', sans-serif;
}

.category-tags-filter {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: 'General Sans', sans-serif;
}

.category-tags-filter span {
  font-weight: bold;
  color: #333;
}

.category-tags-filter a {
  padding: 6px 14px;
  background-color: #f0f0f0;
  color: #212021;
  text-decoration: none;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.category-tags-filter a:hover {
  background-color: #d4cdcd;
  color: #000;
}

.category-tags-filter a.active {
  background-color: var(--szuflada-black);
  color: var(--szuflada-white);
  font-weight: 600;
}

.category-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  font-family: "Quicksand", sans-serif;
  color: var(--szuflada-white);
}

.category-viewer-title {
  font-size: 42px;
  text-align: left;
  margin-bottom: 2rem;
  color: var(--szuflada-black);
  padding-bottom: 0.5rem;
  font-family: 'General Sans', sans-serif;
  margin-top: 20px;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  margin-left: 0%;
  margin-right: 0%;
  width: 100%;
  border-top: 2px solid #D4CDCD;
  border-bottom: 2px solid #D4CDCD;
}

.category-viewer-title a {
  color: var(--szuflada-black);
  text-decoration: none;
}

.category-viewer-title a:hover {
  text-decoration: underline;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.post-card {
  background-color: #2a2a2a;
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.post-card:hover {
  transform: translateY(-4px);
  background-color: #333;
}

/* ========================================================================
      4. latest posts (main page)
======================================================================== */

.latest-header-label {
  background-color: var(--szuflada-black);
  color: #fff;
  padding: 6px 16px;
  font-family: 'General Sans', sans-serif;
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
  display: inline-block;
  margin-bottom: 30px;
}

.latest-posts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  margin-top: 20px;
}

.latest-posts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

/* ========================================================================
      LARGE POST (LEFT) - FLEXIBLE IMAGE HEIGHT
======================================================================== */

.post-preview-L {
  display: flex;
  flex-direction: column;
  padding: 15px;
  height: 100%;
  background-color: #fff;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.post-preview-L:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.big-post-img-link {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  text-decoration: none;
  overflow: visible;
  position: relative;
}

.post-preview-img-L {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.big-img-prev {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.post-preview-title-L {
  flex: 0 0 auto;
  padding-left: 0;
  width: 100%;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--szuflada-black);
  margin-top: 1rem;
}

.post-preview-title-L .post-title {
  margin: 0;
}

.post-preview-title-L .post-title a {
  font-family: 'General Sans', sans-serif;
  color: var(--szuflada-black);
  font-weight: 600;
  font-style: normal;
  font-size: 34px;
  text-decoration: none;
}

.post-preview-title-L .post-title a:hover {
  text-decoration: underline;
}

.post-preview-content-L {
  flex: 0 0 auto;
  margin-bottom: 20px;
}

.post-preview-tags {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding: 0;
}

/* ========================================================================
      SMALL POSTS (RIGHT) - FLEXIBLE IMAGE HEIGHT
======================================================================== */

.post-preview-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  height: 100%;
}

.post-preview-S {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 15px;
  margin-bottom: 0;
  flex: 1 1 50%;
  width: 100%;
  background-color: #fff;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.post-preview-S:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.small-post-img-link {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  text-decoration: none;
  overflow: visible;
  position: relative;
}

.post-preview-img-S {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.small-img-prev {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.post-preview-title-S {
  flex: 0 0 auto;
  width: 100%;
  padding-bottom: 12px;
  margin-bottom: 15px;
  border-bottom: 2px solid #000000;
  margin-top: 1rem;
}

.post-preview-title-S .post-title {
  font-family: 'General Sans', sans-serif;
  color: var(--szuflada-black);
  font-weight: 600;
  font-style: normal;
  font-size: 26px;
  line-height: 1.2;
  text-decoration: none;
  margin: 0;
}

.post-preview-title-S .post-title a {
  color: var(--szuflada-black);
  text-decoration: none;
}

.post-preview-title-S .post-title a:hover {
  text-decoration: underline;
}

.post-preview-content-S {
  flex: 0 0 auto;
  width: 100%;
  padding: 0;
  margin: 0;
  margin-bottom: 15px;
}

.post-preview-content-S .post-excerpt {
  line-height: 1.3;
  margin-bottom: 0;
}

.post-preview-tags-S {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 0;
  margin-left: 0;
}

/* ========================================================================
      SHARED TAG STYLES
======================================================================== */

.post-preview-tag {
  background-color: var(--szuflada-black);
  color: var(--szuflada-white);
  padding: 4px 8px;
  font-family: "Quicksand", sans-serif;
  border-radius: 0px;
  font-size: 14px;
}

.post-preview-tag a {
  color: var(--szuflada-white);
  text-decoration: none;
}

.post-preview-tag a:hover {
  text-decoration: underline;
}

.post-excerpt {
  font-size: 16px;
  color: var(--szuflada-black);
  font-family: 'General Sans', sans-serif;
  font-weight: 300;
  font-style: normal;
  word-wrap: break-word;
  line-height: 1.45;
}

/* ========================================================================
      CATEGORIES VIEWER ON THE MAIN PAGE
======================================================================== */

.category-latest-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  margin-top: 20px;
}

.category-header {
  display: flex;
  justify-content: flex-start;
  border-bottom: 3px solid var(--szuflada-black);
  margin-top: 50px;
  margin-bottom: 25px;
  padding-bottom: 20px;
}

.category-title {
  margin: 0;
  text-align: left;
  font-family: 'General Sans', sans-serif;
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--szuflada-black);
  line-height: 0.9;
}

.category-header-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background-color: var(--szuflada-black);
  color: #fff;
  padding: 8px 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.category-title-text {
  font-family: 'General Sans', sans-serif;
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}

.category-header-link svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.category-header-link:hover {
  background-color: #D4CDCD !important;
  color: var(--szuflada-black) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-header-link:hover svg {
  transform: translateX(5px);
}

.category-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.category-post-preview {
  background: #fff;
  padding: 15px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.category-post-preview:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.category-post-img img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  margin-bottom: 0.3rem;
}

.category-post-title {
  font-family: 'General Sans', sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 0.3rem;
  color: var(--szuflada-black);
}

.category-post-title a {
  color: var(--szuflada-black);
  text-decoration: none;
}

.category-post-title a:hover {
  text-decoration: underline;
}

.category-post-excerpt {
  font-family: "Quicksand", sans-serif;
  font-size: 14px;
  color: #444;
}

.category-post-link {
  text-decoration: none;
  color: inherit;
  position: relative;
  flex-grow: 1;
  display: block;
  overflow: visible;
}

.category-post-link::after {
  content: "czytaj dalej";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  font-family: "Quicksand", sans-serif;
  max-width: 90vw;
  text-align: center;
}

.category-post-link:hover::after {
  opacity: 1;
  transform: translate(-50%, -10px);
}

/* ========================================================================
      5. 404 page
======================================================================== */

.team-search {
  display: flex;
  justify-content: flex-start;
  margin: 20px 0 40px;
}

.team-search-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  outline: none;
  color: #222;
}

.team-search-input:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0,115,170,0.15);
}

/* ========================================================================
      6. posts of type: page
======================================================================== */

.layout-wrapper {
  display: flex;
  min-height: 100vh;
  font-family: system-ui, sans-serif;
}

.sidebar {
  width: 240px;
  background-color: #212021;
  color: #ffffff;
  padding: 2rem 1rem;
  box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
}

.content-area {
  flex: 1;
  background-color: #ebebeb;
  padding: 2rem;
}

.content-section {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.page-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
}

.page-content h2,
.page-content h3 {
  color: #222;
  margin-top: 2rem;
}

/* ========================================================================
      7. about us page
======================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.team-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.team-card h3 {
  font-family: 'General Sans', sans-serif;
  font-size: 20px;
  color: var(--szuflada-black);
  margin-bottom: 0.5rem;
}

.team-card p {
  font-family: "Quicksand", sans-serif;
  font-size: 16px;
  color: #444;
}

/* ========================================================================
      8. newsletter
======================================================================== */

#tnp-modal {
  background: rgba(33, 32, 33, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

#tnp-modal-content {
  background-color: var(--szuflada-white);
  padding: 30px;
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  position: relative;
  text-align: left;
  font-family: 'General Sans', sans-serif;
}

#tnp-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #555;
  transition: color 0.3s;
}

#tnp-modal-close:hover {
  color: var(--szuflada-black);
}

#tnp-modal-body p {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--szuflada-black);
}

#tnp-modal-body input[type="text"],
#tnp-modal-body input[type="email"] {
  width: 500px;
  padding: 12px 14px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: 'Quicksand', sans-serif;
  font-size: 15px;
  box-sizing: border-box;
}

#tnp-modal-body .tnp-privacy-field label {
  font-size: 14px;
  color: #555;
}

#tnp-modal-body .tnp-privacy-field input[type="checkbox"] {
  margin-right: 8px;
}

#tnp-modal-body .tnp-submit {
  background-color: var(--szuflada-black);
  color: var(--szuflada-white);
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Quicksand', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-weight: 600;
}

#tnp-modal-body .tnp-submit:hover {
  background-color: #444;
  transform: translateY(-2px);
}

.tnp-privacy-field a {
  text-decoration: none;
  color: var(--szuflada-black);
}

/* ========================================================================
      9. search results / pagination
======================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0 60px;
  gap: 8px;
  font-family: 'General Sans', sans-serif;
  font-weight: 700;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  background: #fff;
  color: var(--szuflada-black);
  border: 1px solid #ccc;
  border-radius: 0;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: #D4CDCD !important;
  color: #000 !important;
  border-color: #D4CDCD !important;
}

.pagination .current {
  background: var(--szuflada-black) !important;
  color: #fff !important;
  border-color: var(--szuflada-black) !important;
  cursor: default;
}

.pagination .dots {
  border: none;
  background: transparent;
  min-width: auto;
}

/* ========================================================================
      10. Mobile Optimization
======================================================================== */

@media (max-width: 768px) {
  #tnp-modal-content {
    padding: 20px;
    width: 95%;
  }

  #tnp-modal-body p {
    font-size: 20px;
  }

  .latest-posts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .post-preview-right {
    display: none;
  }

  .post-preview-L {
    padding: 10px;
    background-color: #fff;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
  }

  .big-post-img-link {
    min-height: 200px;
    max-height: 350px;
  }

  .big-img-prev {
    height: auto;
    max-height: 350px;
  }

  .mocny-tekst {
    font-size: 28px;
    line-height: 1.2;
    padding: 4px 0;
  }

  /* (Obsolete base mobile navbar rules removed — see the redesigned slim bar
     and the authoritative mobile-menu block near the end of this file.) */
}

@media (max-width: 600px) {
  .category-tags-filter {
    gap: 6px;
  }

  .category-tags-filter a {
    padding: 4px 10px;
    font-size: 0.85rem;
  }

  .category-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .read-more {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .category-post-link::after {
    display: block;
  }
}

@media (max-width: 480px) {
  .post-preview-title-L .post-title a {
    font-size: 26px;
  }

  .post-preview-title-S .post-title {
    font-size: 18px;
  }

  .category-title {
    margin: 0;
    text-align: left;
    font-family: 'General Sans', sans-serif;
    font-size: 34px;
    color: var(--szuflada-black);
    font-weight: 600;
    padding: 5px;
  }
}

/* ========================================================================
   11. SINGLE PUBLICATION PAGE STYLES
======================================================================== */

/* Container */
.single-publication-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid layout for meta + content */
.single-publication-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

/* Left column (meta) */
.single-publication-meta {
  background: #fafafa;
  padding: 20px;
  border: 1px solid #ddd;
}

.wp-block-embed,
.wp-block-video video {
  margin-left: 0;
  margin-right: 0;
  width: 100% !important;
  height: 100% !important;
}

.publication-featured-img img {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.publication-title {
  font-family: 'General Sans', sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--szuflada-black);
  margin-bottom: 1rem;
}

.publication-excerpt {
  font-family: "Quicksand", sans-serif;
  font-size: 15px;
  color: #555;
  margin-bottom: 1rem;
  text-align: justify;
}

/* Right column (content) */
.single-publication-content {
  font-family: 'General Sans', sans-serif;
  font-size: 16px;
  color: var(--szuflada-black);
  line-height: 1.6;
  text-align: justify;
}

.single-publication-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

.excerpt-container {
  display: grid;
  grid-template-columns: 1fr 4fr;
  gap: 0.5rem;
}

.quote-container {
  background-color: #212021;
  max-height: 75px;
}

.quote {
  color: #EBEBEB;
  font-family: 'General Sans', sans-serif;
  font-size: 80px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -1.6px;
  text-align: center;
  margin: 0;
}


/* ========================================================================
   SINGLE PUBLICATION - RESPONSIVE
======================================================================== */

@media (max-width: 768px) {
  .single-publication-grid {
    grid-template-columns: 1fr;
  }

  .excerpt-container {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .quote-container {
    max-height: none;
    padding: 10px;
    text-align: center;
  }

  .quote {
    font-size: 50px;
  }

  .single-publication-content h2,
  .single-publication-content h2.wp-block-heading {
    font-size: 22px !important;
    gap: 10px !important;
  }

  .single-publication-content h2::before,
  .single-publication-content h2.wp-block-heading::before {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
    min-height: 35px !important;
    font-size: 20px !important;
  }
}

/* ================================
   ANIMATED HAMBURGER TO X
================================ */

.navbar-toggle {
  width: 22px;
  height: 18px;
  margin-right: 2rem;
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  z-index: 1200;
}

.navbar-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--szuflada-white);
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 2px;
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (min-width: 769px) {
  .navbar-toggle {
    display: none;
  }
}

.single-publication-content .wp-block-verse,
.single-publication-content pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: hidden;
  max-width: 100%;
  font-family: inherit;
}

@media (max-width: 768px) {
  .single-publication-content .wp-block-verse,
  .single-publication-content pre {
    font-size: 15px;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ==========================================================
   CATEGORY POSTS - MOBILE VERTICAL LIST
========================================================== */

@media (max-width: 768px) {
  .category-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .category-post-preview {
    flex: none;
    max-width: 100%;
    margin-right: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    padding: 10px;
  }

  .category-posts-grid::before,
  .category-posts-grid::after {
    display: none;
  }

  .category-post-img img {
    height: auto;
    max-height: 250px;
    object-fit: cover;
    width: 100%;
    border-radius: 4px;
    margin-bottom: 1rem;
  }

  .category-post-title {
    font-size: 18px;
    margin: 0 0 0.3rem 0;
  }

  .category-post-excerpt {
    /* no line-clamp: it cuts mid-word; wp_trim_words ends the text on a full word */
    margin-bottom: auto;
  }

  .post-preview-tags {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .category-posts-carousel::-webkit-scrollbar {
    display: none;
  }

  .category-posts-carousel {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

/* ==========================================================
   KARUZELA KATEGORII
========================================================== */

@media (max-width: 768px) {
  .home .category-posts-grid {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding-bottom: 20px;
    grid-template-columns: none;
    align-items: stretch;
  }

  .home .category-posts-grid > a.category-post-link {
    flex: 0 0 60%;
    width: 60%;
    min-width: 60%;
    max-width: 60%;
    scroll-snap-align: center;
    margin-bottom: 0;
    display: flex;
  }

  .home .category-posts-grid .category-post-preview {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    margin: 0;
  }

  .home .category-posts-grid .category-post-img img {
    height: 200px;
    width: 100%;
    object-fit: cover;
  }

  .home .category-posts-grid::-webkit-scrollbar {
    display: none;
  }

  .home .category-posts-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

@media (max-width: 768px) {
  .latest-header-label {
    white-space: nowrap;
    font-size: 18px;
    padding: 8px 12px;
    width: auto;
    margin-bottom: 20px !important;
  }

  .category-title-text {
    font-size: 18px;
    white-space: nowrap;
  }
}

/* ========================================================================
   TOOLTIP FOR BIG & SMALL POST PREVIEWS
======================================================================== */

.big-post-img-link,
.small-post-img-link {
  position: relative;
}

.big-post-img-link::after,
.small-post-img-link::after {
  content: "czytaj dalej";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  font-family: "Quicksand", sans-serif;
}

.big-post-img-link:hover::after,
.small-post-img-link:hover::after {
  opacity: 1;
  transform: translate(-50%, -10px);
}

@media (hover: hover) and (pointer: fine) {
  .big-post-img-link::after,
  .small-post-img-link::after {
    display: block;
  }
}

/* ========================================================================
   TESTY
======================================================================== */

.post-preview-title-L .post-title a,
.post-preview-title-S .post-title a {
  position: relative;
  display: inline;
  background-image: linear-gradient(var(--szuflada-accent), var(--szuflada-accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
}

.post-preview-title-L .post-title a:hover,
.post-preview-title-S .post-title a:hover {
  background-size: 100% 2px;
  text-decoration: none;
}

/* Image zoom on hover */
.big-img-prev,
.small-img-prev {
  transition: transform 0.4s ease;
}

.post-preview-L:hover .big-img-prev,
.post-preview-S:hover .small-img-prev {
  transform: scale(1.02);
}

/* ========================================================================
   QUOTE STYLING
======================================================================== */

.single-publication-content h2 {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  font-family: 'General Sans', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #212021;
  margin-top: 1rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.h2-quote-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #212021;
  color: #ebebeb;
  font-size: 42px;
  font-weight: bold;
  line-height: 0.8;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding-top: 8px;
  margin-top: 3px;
}

@media (max-width: 768px) {
  .single-publication-content h2 {
    font-size: 22px !important;
    gap: 10px !important;
    hyphens: auto;
  }

  .h2-quote-icon {
    width: 35px;
    height: 35px;
    min-width: 35px;
    min-height: 35px;
    font-size: 36px;
    padding-top: 3px;
  }
}

/* ========================================================================
   12. REDESIGN LAYER (loaded after the base, overrides by source order)
======================================================================== */
:root {
  --szuflada-accent: #212021;
  --panel: #212021;
  --ink: #ffffff;
  --mm-muted: #8f8a85;
  --mm-muted-2: #7c7772;
  --mm-rule: rgba(235,235,235,0.16);
  --mm-tag: #c4c0bb;
}

body {
  background: #ebebeb;
  color: #212021;
  font-family: 'General Sans', sans-serif;
}

.mega {
  position: fixed; top: 70px; left: 0; right: 0; z-index: 999;
  background: transparent;
  opacity: 0; visibility: hidden;
  transition: opacity .12s ease, visibility 0s .72s;
}
.mega.open { opacity: 1; visibility: visible; transition: opacity .12s ease, visibility 0s 0s; }
.mega-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }   
.mega-eyebrow { display: none; }

.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; align-items: stretch; }

.mega-col {
  background: var(--panel);
  padding: 40px 32px 46px;
  clip-path: inset(0 0 100% 0);         
  transition: clip-path .66s cubic-bezier(.22,1,.36,1);
  will-change: clip-path;
}

.mega-col:first-child { padding-left: 28px; }
.mega-col:last-child { padding-right: 28px; }

.mega-col + .mega-col { margin-left: -1px; }
.mega.open .mega-col { clip-path: inset(0 0 0 0); }   
.mega.open .mega-col:nth-child(1) { transition-delay: 0s; }
.mega.open .mega-col:nth-child(2) { transition-delay: .10s; }
.mega.open .mega-col:nth-child(3) { transition-delay: .20s; }
.mega.open .mega-col:nth-child(4) { transition-delay: .30s; }
.drawer-inner { }

.mega-cat { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.mega-cat .num { display: none; }
.mega-cat .name {
  font-family: 'General Sans', sans-serif; font-size: 29px; font-weight: 400; color: var(--ink);
  letter-spacing: -0.02em; text-transform: lowercase; transition: opacity .2s ease;
}
.mega-cat .name::after {
  content: '→'; font-size: 15px; margin-left: 8px; opacity: 0; transform: translateX(-4px);
  display: inline-block; transition: opacity .2s ease, transform .2s ease;
}
.mega-cat:hover .name::after { opacity: .5; transform: translateX(0); }
.mega-rule { border: none; border-top: 1px solid var(--mm-rule); margin: 18px 0 22px; }
.mega-tags { list-style: none; margin: 0; padding: 0; }
.mega-tags li { margin: 0 0 14px; }
.mega-tags a {
  font-family: 'General Sans', sans-serif; font-weight: 300; font-size: 16px; color: var(--mm-tag); text-decoration: none;
  line-height: 1.3; display: inline-block; position: relative;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: color .18s ease, background-size .3s ease;
}
.mega-tags a:hover { color: var(--ink); background-size: 100% 1px; }
.mega-all {
  display: inline-block; margin-top: 6px; font-family: 'General Sans', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 1px; color: var(--mm-muted); text-decoration: none; text-transform: uppercase;
}
.mega-all:hover { color: var(--ink); }
.mega-all::after { content: ' →'; }
.mega-scrim {
  position: fixed; inset: 70px 0 0 0; background: transparent; z-index: 998;
  opacity: 0; visibility: hidden; transition: visibility 0s .2s;
}
.mega-scrim.open { opacity: 1; visibility: visible; transition: visibility 0s 0s; }

.page-scrim {
  position: fixed; inset: 0; z-index: 995;
  background: rgba(28,27,28,0.30);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, visibility 0s .3s;
}
.page-scrim.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .3s ease; }

.m-acc { display: none; }
@media (max-width: 768px) {
  .mega, .mega-scrim { display: none !important; }
  .m-acc { background: #141314; }
  .m-acc.open { display: block; padding: 4px 0 12px; }
  .m-acc .m-cat { display: block; padding: 14px 22px; color: var(--ink); font-family: 'General Sans', sans-serif; font-weight: 600; font-size: 16px; text-transform: lowercase; text-decoration: none; }
  .m-acc .m-tags { list-style: none; margin: 0; padding: 0 22px 12px; }
  .m-acc .m-tags a { display: block; padding: 7px 0; color: var(--mm-tag); text-decoration: none; font-weight: 300; font-size: 15px; }
}

body { font-weight: 400; }

.navEl { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; }
.dropdown-menu a { letter-spacing: 0.1em; }

.latest-header-label { font-size: 24px; font-weight: 600; letter-spacing: 0.045em; padding: 7px 18px; }
.category-title-text { font-size: 20px; font-weight: 600; letter-spacing: 0.05em; }

.post-preview-title-L .post-title a { font-size: 38px; font-weight: 600; line-height: 1.06; letter-spacing: -0.03em; }
.post-preview-title-S .post-title,
.post-preview-title-S .post-title a { font-size: 24px; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
.category-post-title { font-size: 20px; font-weight: 600; line-height: 1.16; letter-spacing: -0.02em; }
h1 { font-weight: 600; letter-spacing: -0.025em; }

.post-preview-title-L { border-bottom: none; padding-bottom: 0; margin-bottom: 16px; }
.post-preview-title-S { border-bottom: none; padding-bottom: 0; margin-bottom: 12px; }

.post-preview-title-L .post-title a, .post-preview-title-S .post-title a,
.category-post-title a {
  background-image: none !important; transition: none;
}
.post-preview-title-L .post-title a:hover, .post-preview-title-S .post-title a:hover,
.category-post-title a:hover { text-decoration: none !important; opacity: 1 !important; background-size: 0 !important; }

/* hero (bento) excerpt matches the grid/accordion excerpt: Quicksand, light grey, regular */
.post-excerpt { font-family: 'Quicksand', sans-serif; font-weight: 400; font-size: 15px; line-height: 1.5; letter-spacing: -0.01em; color: #6b6560; }
.category-post-excerpt { font-weight: 400; font-size: 14px; line-height: 1.4; letter-spacing: -0.01em; color: #6b6560; }

.post-preview-tag {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-family: 'General Sans', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: #9a938d !important;
}
.post-preview-tag span { color: inherit !important; }
.post-preview-tag .author, .post-preview-tag .author a { color: #2a2928 !important; text-decoration: none; }
.post-preview-tag[style] { color: #9a938d !important; }
.post-preview-tags, .post-preview-tags-S { gap: 18px; align-items: baseline; }

.latest-posts-section { margin-top: 36px; }
.category-header { margin-top: 64px; border-bottom-width: 1px; border-bottom-color: rgba(33,32,33,0.18); }
.category-posts-grid { gap: 2.4rem; }

.zin-banner-read { letter-spacing: 0.12em; font-weight: 600; }
.mega-tags a { font-weight: 400; letter-spacing: -0.002em; }
.mega-cat .name { font-weight: 500; }

.footer-col h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #d8d3ce; }
.footer-col p, .footer-col a, .footer-menu li, .social-links li { font-size: 14px; }
.footer-bottom { letter-spacing: 0.02em; }

.footer-org { font-size: 13px !important; line-height: 1.7; color: #948e88 !important; margin: 18px 0 0; }
.footer-support { margin-top: 40px; }
.support-lead { margin: 0 0 20px; font-size: 13px; color: #b3aea9 !important; letter-spacing: -0.005em; }
.support-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(235,235,235,0.32); color: #ebebeb !important;
  padding: 14px 24px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.support-btn:hover { background: #ebebeb; color: #212021 !important; border-color: #ebebeb; }
.support-details { margin-top: 24px; }
.support-details summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #7c766f;
  transition: color .2s ease;
}
.support-details summary::-webkit-details-marker { display: none; }
.support-details summary::after { content: '↓'; font-size: 11px; transition: transform .25s ease; }
.support-details[open] summary::after { transform: rotate(180deg); }
.support-details summary:hover { color: #b3aea9; }
.support-transfer { margin-top: 14px; font-size: 12px; line-height: 1.8; color: #8a847e; letter-spacing: 0.01em; }

.navbar-wrapper { border-bottom: 1px solid rgba(235,235,235,0.08); }
.navbar { padding-block: 4px; }
.szuflada-logo svg { width: 150px; }
.nav-links { gap: 30px; }
.ver-div-nav { display: none; }                       
.navEl, .navEl a:link, .navEl a:visited { color: #aca7a2 !important; }
.navEl {
  background: transparent !important; padding: 8px 0 !important; min-height: 0;
  font-size: 12px; font-weight: 500; letter-spacing: 0.16em;
}
.navItem:hover .navEl, .navItem:hover .navEl a, .navItem.open .navEl,
.navEl:hover, .navEl:hover a { color: #ffffff !important; }

.dropdown-toggle::after {
  content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 8px; padding: 0;
  border: 0; position: relative; top: -1px; opacity: .7;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M2 2 6 6 10 2' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M2 2 6 6 10 2' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(0deg);
  transition: transform .5s cubic-bezier(.34,1.5,.5,1), opacity .25s ease;
}
.navItem.dropdown:hover .dropdown-toggle::after,
.navItem.dropdown.open .dropdown-toggle::after,
.navItem.dropdown.active .dropdown-toggle::after { transform: rotate(180deg); opacity: 1; }

.navEl { position: relative; }
.navEl:not(:has(svg))::before {
  content: ''; position: absolute; left: 0; bottom: 2px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.navItem:hover .navEl:not(:has(svg))::before,
.navItem.open .navEl:not(:has(svg))::before { transform: scaleX(1); }

.nav-search-wrapper { position: relative; }
.header-search-form { position: relative; background: transparent !important; }
.header-search-form:hover, .header-search-form:focus-within { background: transparent !important; }
.header-search-form .header-search-button { position: relative; z-index: 2; }
.header-search-form .header-search-button svg path { fill: #aca7a2 !important; transition: fill .25s ease !important; }
.header-search-form:hover .header-search-button svg path,
.header-search-form:focus-within .header-search-button svg path,
.header-search-form.active .header-search-button svg path { fill: #fff !important; }
.header-search-form .header-search-input {
  position: absolute !important; right: 34px; top: 50%; transform: translateY(-50%);
  width: 0 !important; opacity: 0; padding: 0 0 4px !important; margin: 0 !important;
  border: 0 !important; border-bottom: 1px solid transparent !important; background: transparent !important;
  color: #ebebeb !important; font-size: 13px !important; letter-spacing: 0.02em; pointer-events: none;
  transition: width .5s cubic-bezier(.22,1,.36,1), opacity .32s ease, border-color .4s ease !important;
}
.header-search-form:hover .header-search-input,
.header-search-form:focus-within .header-search-input,
.header-search-form.active .header-search-input {
  width: 220px !important; opacity: 1; pointer-events: auto;
  border-bottom-color: rgba(235,235,235,0.3) !important;
}

.dropdown-menu { background: #181718; border: 1px solid rgba(235,235,235,0.1); }
.dropdown-menu a { border-bottom-color: rgba(235,235,235,0.07); letter-spacing: 0.12em; color: #aca7a2; }
.dropdown-menu a:hover { background: #232223; color: #fff; }

body.menu-open { overflow: hidden; }

@media (max-width: 768px) {
  .navbar { padding: 0 18px; }
  .szuflada-logo { margin-left: 0; }
  .szuflada-logo svg { width: 128px; }
  .navbar-toggle { margin-right: 0; margin-left: auto; }

  .nav-links {
    position: fixed; top: calc(var(--navh, 58px) + 6px);
    left: 16px; right: 16px; bottom: auto;
    background: var(--szuflada-black);
    box-shadow: 0 10px 30px rgba(33,32,33,0.22);
    display: flex; flex-direction: column; align-items: stretch;
    gap: 0; margin: 0; padding: 4px 20px 8px;
    max-height: calc(100vh - var(--navh, 58px) - 28px);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .24s ease, transform .28s cubic-bezier(.22,1,.36,1), visibility 0s .28s;
  }
  .nav-links.active {
    opacity: 1; visibility: visible; transform: translateY(0);
    transition: opacity .24s ease, transform .28s cubic-bezier(.22,1,.36,1), visibility 0s 0s;
  }
  .nav-links .navItem:last-child { border-bottom: none; }

  .nav-search-wrapper { order: -1; width: 100%; margin: 12px 0 2px; }
  .header-search-form {
    width: 100% !important; border: none !important;
    border-bottom: 1px solid rgba(235,235,235,0.22) !important; border-radius: 0 !important;
    padding: 0 0 12px !important; background: transparent !important;
  }
  .header-search-input {
    position: static !important; transform: none !important;
    width: 100% !important; opacity: 1 !important; pointer-events: auto !important;
    padding: 4px 0 !important; font-size: 16px !important; color: #ebebeb !important;
    border-bottom: none !important;
  }
  .header-search-form .header-search-button { position: static !important; padding: 4px 0 !important; order: 2; }

  .navItem { width: 100%; border-bottom: 1px solid rgba(235,235,235,0.09); }
  .navEl {
    width: 100%; justify-content: space-between; padding: 17px 0 !important; min-height: 0;
    font-size: 21px !important; font-weight: 500 !important; letter-spacing: -0.012em !important;
    text-transform: lowercase !important;
  }
  .navEl, .navEl a:link, .navEl a:visited { color: #ececea !important; }
  .navItem:hover .navEl, .navEl:hover, .navEl:hover a { color: #ffffff !important; }
  .navEl, .dropdown-toggle, .navbar-toggle { -webkit-tap-highlight-color: transparent; user-select: none; }
  .dropdown-toggle::after { width: 14px; height: 14px; top: 0; padding: 0; opacity: .85; }

  .navbar--slim .dropdown-menu, .dropdown-menu {
    position: static !important; left: auto !important; transform: none !important;
    min-width: 0; width: 100%; margin: 0; padding: 0;
    background: transparent !important; border: none !important; box-shadow: none !important;
    opacity: 1 !important; visibility: visible !important;
    display: block; overflow: hidden; height: 0;   
    transition: height .34s cubic-bezier(.22,1,.36,1);
  }
  .dropdown-menu .dd-inner { padding: 2px 0 6px; }
  .navbar--slim .dropdown-menu a, .dropdown-menu a {
    display: block; padding: 12px 0 12px 18px !important;
    font-size: 16px; color: #b3aea9 !important; text-transform: none; letter-spacing: -0.005em;
    border: none; transition: color .2s ease, padding-left .28s cubic-bezier(.22,1,.36,1);
  }
  .navbar--slim .dropdown-menu a:hover, .dropdown-menu a:hover { color: #fff !important; padding-left: 24px !important; background: transparent; }

  .m-acc { display: block; overflow: hidden; height: 0; background: transparent;
           transition: height .44s cubic-bezier(.22,1,.36,1); }
  .m-acc .m-acc-inner { padding: 2px 0 8px; }
  .m-sub { border-top: 1px solid rgba(235,235,235,0.08); }
  .m-sub:first-child { border-top: none; }
  
  .m-cat-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    background: transparent; border: none; cursor: pointer; padding: 14px 2px;
    font-family: inherit; color: #fff; font-size: 16px; font-weight: 600;
    text-transform: lowercase; letter-spacing: -0.01em;
    -webkit-tap-highlight-color: transparent; text-align: left;
  }
  .m-cat-chev { display: flex; align-items: center; }
  .m-cat-chev svg { width: 16px; height: 16px; display: block; color: #b3aea9; transition: transform .3s ease; }
  .m-sub.open .m-cat-chev svg { transform: rotate(180deg); color: #fff; }
  .m-tags-wrap { height: 0; overflow: hidden; transition: height .34s cubic-bezier(.22,1,.36,1); }
  .m-tags { padding: 0 0 12px; margin: 0; list-style: none; }
  .m-tags a { display: block; padding: 8px 0 8px 14px; font-size: 15px; color: #b3aea9; letter-spacing: -0.005em; text-decoration: none; }
  .m-tags a:hover { color: #fff; }
  
  .m-tags .m-cat-all { margin-bottom: 4px; }
  .m-tags .m-cat-all a {
    color: #fff; font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
    text-transform: uppercase; padding: 6px 0 10px 14px;
  }
  .m-tags .m-cat-all a:hover { opacity: .8; }
}

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .85s cubic-bezier(.22,1,.36,1), transform .85s cubic-bezier(.22,1,.36,1); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; } }

.ast { display: inline-block; vertical-align: middle; line-height: 0; color: inherit; }
.ast svg { display: block; width: 100%; height: 100%; }
.ast-spin { animation: ast-spin 24s linear infinite; }
@keyframes ast-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ast-spin { animation: none; } }

.sec-label { display: flex; align-items: center; gap: 12px; margin: 0 0 30px; }
.sec-label .ast { width: 18px; height: 18px; color: var(--szuflada-black); }
.sec-label .kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #8d8883; }

.post-preview-L, .post-preview-S { position: relative; }
.post-idx { display: none; }
.post-preview-img-L, .post-preview-img-S { overflow: hidden; }
.big-img-prev, .small-img-prev, .post-preview-img-L .ph, .post-preview-img-S .ph { transition: transform 1s cubic-bezier(.22,1,.36,1); }
.post-preview-L:hover .ph, .post-preview-S:hover .ph { transform: scale(1.045); }

.ast-divider { display: flex; justify-content: center; margin: 96px auto; }
.ast-divider .ast { width: 44px; height: 44px; color: var(--szuflada-black); }

.disc-section { max-width: 1200px; margin: 40px auto 0; padding: 0 1rem; }
.disc-index { border-top: 1px solid rgba(33,32,33,0.16); }
.disc-row {
  position: relative; display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 26px; padding: 32px 10px; text-decoration: none;
  color: var(--szuflada-black); border-bottom: 1px solid rgba(33,32,33,0.16); overflow: hidden;
}
.disc-row > * { position: relative; z-index: 1; }
.disc-row::before { content: ''; position: absolute; inset: 0; background: var(--szuflada-black); transform: scaleY(0); transform-origin: bottom; transition: transform .55s cubic-bezier(.22,1,.36,1); z-index: 0; }
.disc-row:hover::before { transform: scaleY(1); }
.disc-row:hover { color: var(--szuflada-white); }
.disc-row .r-ast { width: 20px; height: 20px; color: var(--szuflada-black); opacity: .5; transition: transform .6s cubic-bezier(.22,1,.36,1), opacity .3s, color .3s; }
.disc-row .r-name { font-size: clamp(30px, 4.6vw, 54px); font-weight: 500; letter-spacing: -0.03em; text-transform: lowercase; line-height: 1; transition: transform .55s cubic-bezier(.22,1,.36,1); }
.disc-row .r-count { font-size: 13px; color: #8d8883; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; transition: color .3s; }
.disc-row .r-arrow { width: 40px; height: 40px; display: grid; place-items: center; color: var(--szuflada-black); transition: transform .55s cubic-bezier(.22,1,.36,1), color .3s; }
.disc-row .r-arrow svg { width: 24px; height: 24px; }
.disc-row .r-peek { position: absolute; right: 96px; top: 50%; width: 158px; height: 100px; z-index: 1; overflow: hidden; opacity: 0; transform: translateY(-50%) scale(.92); pointer-events: none; transition: opacity .4s ease, transform .55s cubic-bezier(.22,1,.36,1); }
.disc-row .r-peek span { display: block; width: 100%; height: 100%; }
.disc-row:hover .r-ast { color: var(--szuflada-white); opacity: 1; transform: rotate(90deg); }
.disc-row:hover .r-name { transform: translateX(16px); }
.disc-row:hover .r-count { color: rgba(235,235,235,0.65); }
.disc-row:hover .r-arrow { color: var(--szuflada-white); transform: translateX(6px) rotate(-45deg); }
.disc-row:hover .r-peek { opacity: 1; transform: translateY(-50%) scale(1); }
@media (max-width: 768px) {
  .disc-row { grid-template-columns: auto 1fr auto; gap: 14px; padding: 22px 4px; }
  .disc-row .r-count, .disc-row .r-peek { display: none; }
  .disc-row:hover .r-name { transform: translateX(7px); }
  .ast-divider { margin: 64px auto; }
  .disc-section { margin-top: 28px; }
}

.latest-posts-section { margin-top: 52px; }

.latest-posts-grid .post-preview-L:hover,
.post-preview-right .post-preview-S:hover { transform: translateY(-2px); }

.disc-row { grid-template-columns: 1fr auto auto; width: 100%; border: 0; border-bottom: 1px solid rgba(33,32,33,0.16); background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
.disc-row::before { display: none !important; }               
.disc-row:focus-visible { outline: 2px solid var(--szuflada-black); outline-offset: -3px; }
.disc-row, .disc-row:hover, .disc-item.open > .disc-row { color: var(--szuflada-black); }
.disc-row .r-name { transition: transform .45s cubic-bezier(.22,1,.36,1); }
.disc-row:hover .r-name { transform: translateX(10px); }
.disc-row .r-count { color: #8d8883; text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; font-weight: 600; transition: opacity .35s ease, color .3s ease; }
.disc-row:hover .r-count { color: var(--szuflada-black); }
.disc-item.open > .disc-row .r-count { opacity: 0; }           
.r-arrow { color: var(--szuflada-black) !important; transition: transform .5s cubic-bezier(.22,1,.36,1) !important; }
.disc-row:hover .r-arrow { transform: translateY(2px); }
.disc-item.open > .disc-row .r-arrow,
.disc-item.open > .disc-row:hover .r-arrow { transform: rotate(180deg); }   

.disc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .9s cubic-bezier(.22,1,.36,1); }
.disc-item.open .disc-panel { grid-template-rows: 1fr; }
.disc-panel-inner { overflow: hidden; }
.disc-panel .category-posts-grid { padding: 30px 0 12px; }

.disc-cat-all {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 22px 0 42px 15px;
  padding: 11px 22px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: #ebebeb; text-decoration: none;
  background: #212021; border: 1px solid #212021; border-radius: 999px;
  transition: gap .3s cubic-bezier(.22,1,.36,1), background .25s ease, color .25s ease;
}
.disc-cat-all:hover { background: transparent; color: #212021; gap: 12px; }

.disc-panel .category-post-preview { background: transparent; clip-path: inset(0 0 100% 0); transition: clip-path 1.1s cubic-bezier(.22,1,.36,1), background-color .3s ease, box-shadow .16s linear, transform .4s ease; }
.disc-panel .category-post-preview:hover { background: #fff; box-shadow: 0 8px 26px rgba(33,32,33,0.15); transform: translateY(-3px); }
.disc-panel .category-post-img { overflow: hidden; }
.disc-panel .category-post-img .ph { transition: transform 1s cubic-bezier(.22,1,.36,1); }
.disc-panel .category-post-preview:hover .ph { transform: scale(1.045); }
.disc-item.open .disc-panel .category-post-preview { clip-path: inset(0 0 0 0); }
.disc-item.open .disc-panel .category-post-preview:nth-child(1) { transition-delay: .05s; }
.disc-item.open .disc-panel .category-post-preview:nth-child(2) { transition-delay: .12s; }
.disc-item.open .disc-panel .category-post-preview:nth-child(3) { transition-delay: .19s; }

.post-preview-L, .post-preview-S { background: transparent; box-shadow: none; transition: background-color .3s ease, box-shadow .16s linear, transform .4s ease; }
.latest-posts-grid .post-preview-L:hover, .post-preview-right .post-preview-S:hover { background: #fff; box-shadow: 0 8px 26px rgba(33,32,33,0.15); transform: translateY(-3px); }

.cursor-pill {
  position: fixed; left: 0; top: 0; z-index: 2000; pointer-events: none;
  transform: translate(-50%, -170%);
  will-change: left, top;
}
.cursor-pill .cp-body {
  position: relative; z-index: 1; display: inline-flex;
  background: var(--szuflada-white); color: #2a2928;
  border: 1px solid rgba(33,32,33,0.38);
  font-family: 'General Sans', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; line-height: 1;
  padding: 6px 14px; border-radius: 999px; overflow: hidden;
  opacity: 0;
  transition: opacity .22s ease;
}
.cursor-pill.show .cp-body { opacity: 1; }

.cursor-pill .cp-l {
  display: inline-block;
  clip-path: inset(0 0 100% 0);
  transform: translateY(-0.5em);
  transition: clip-path .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1);
}
.cursor-pill.show .cp-l { clip-path: inset(0 0 0 0); transform: translateY(0); }
.cursor-pill .cp-shadow {
  position: absolute; left: 50%; bottom: -5px; width: 54%; height: 8px;
  transform: translateX(-50%) scaleY(0.4);
  transform-origin: top center;
  background: rgba(33,32,33,0.5);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='ns'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23ns)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='ns'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23ns)'/%3E%3C/svg%3E");
  -webkit-mask-size: 48px 48px; mask-size: 48px 48px;
  filter: blur(2px);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .5s cubic-bezier(.22,1,.36,1) .08s, transform .5s cubic-bezier(.22,1,.36,1) .08s;
}
.cursor-pill.show .cp-shadow { opacity: 0.32; transform: translateX(-50%) scaleY(1); }
@media (hover: none) { .cursor-pill { display: none !important; } }

.post-preview-tag {
  background: transparent !important;
  border: 1px solid rgba(33,32,33,0.38) !important;
  border-radius: 999px !important;
  padding: 6px 14px !important;
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a2928 !important;
  line-height: 1;
}
.post-preview-tag span, .post-preview-tag .author, .post-preview-tag[style] { color: #2a2928 !important; }
.post-preview-tags, .post-preview-tags-S { gap: 10px; align-items: center; }
.post-preview-tag a { color: inherit; text-decoration: none; display: inline-block; }
.post-preview-tag:has(a):hover { background: #212021 !important; border-color: #212021 !important; }
.post-preview-tag:has(a):hover a, .post-preview-tag:has(a):hover .author a { color: #ebebeb !important; }

.category-post-link::after, .big-post-img-link::after, .small-post-img-link::after { content: none !important; display: none !important; }

.big-post-img-link, .small-post-img-link { flex: 0 0 auto; }
.post-preview-img-L { height: auto; aspect-ratio: 4 / 3; }
.post-preview-img-S { height: auto; aspect-ratio: 3 / 2; }
@media (max-width: 768px) { .post-preview-img-L { aspect-ratio: 3 / 2; } }

.r-arrow .ic-x { display: none; }
.disc-item.open > .disc-row .r-arrow,
.disc-item.open > .disc-row:hover .r-arrow { transform: none; }
.disc-item.open > .disc-row .ic-chev { display: none; }
.disc-item.open > .disc-row .ic-x { display: block; }

.latest-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "hero hero big"
    "s1   s2   big";
  gap: 1px;
  background: transparent;
  align-items: stretch;
}
.latest-posts-grid > .b-hero { grid-area: hero; }
.latest-posts-grid > .b-big  { grid-area: big; }
.latest-posts-grid > .b-s1   { grid-area: s1; }
.latest-posts-grid > .b-s2   { grid-area: s2; }

.latest-posts-grid > * {
  background: #ebebeb;
  padding: 26px;
  margin: 0;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  outline: 1px solid rgba(33,32,33,0.16);
}

.hero-box { position: relative; display: flex; flex-direction: column; justify-content: center; }
.hero-title {
  margin: 0 0 24px;
  display: flex; flex-direction: column;
  font-family: 'General Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 3.8vw, 54px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--szuflada-black);
}
.hero-title .hl-row { display: flex; align-items: center; gap: 0; }
.hero-title .hl-text { flex: 0 1 auto; min-width: 0; white-space: nowrap; margin-right: 18px; }
.hero-title .line { flex: 1 1 auto; height: 2.9px; background: #212021; margin-right: -1px; }
.hero-title .hero-ast { flex: 0 0 auto; width: 15.5px; height: 15px; align-self: center; overflow: visible; }
.hero-title .hl-last { display: block; }
.hero-lead {
  margin: 0; max-width: 48ch;
  font-family: 'General Sans', sans-serif;
  font-weight: 400; font-size: 15px; line-height: 1.44; color: #6b6560;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.latest-posts-grid .post-preview-S { display: flex; flex-direction: column; height: 100%; }
.latest-posts-grid .post-preview-L { height: 100%; }
.latest-posts-grid .post-preview-title-S .post-title,
.latest-posts-grid .post-preview-title-S .post-title a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.latest-posts-grid .post-preview-content-S .post-excerpt {
  /* no line-clamp: wp_trim_words already trims on a full word boundary */
}
.latest-posts-grid .post-preview-S .post-preview-tags-S { margin-top: auto; }

.latest-posts-grid [data-reveal] { transform: none; }
.latest-posts-grid .post-preview-L:hover,
.latest-posts-grid .post-preview-S:hover { transform: none; background: #fff; }

@media (max-width: 768px) {
  .latest-posts-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "big" "s1" "s2";
  }
  #treasuresGrid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, auto);
    grid-template-areas: "big" "t1" "t2";
  }
  .latest-posts-grid > * { padding: 20px; min-width: 0; }
  /* keep the asterisk animation on mobile; smaller title so title + line + asterisk fit one row */
  .hero-title { font-size: clamp(22px, 6.5vw, 34px); }
  .hero-title .hl-row { flex-wrap: nowrap; }
  .hero-title .hl-text { white-space: nowrap; margin-right: 12px; min-width: 0; }
  .hero-title .line { min-width: 12px; }
  .hero-title .hero-ast { width: 14px; height: 14px; }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;              
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='grain2'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain2)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  -webkit-mask-image: radial-gradient(130px circle at var(--gx, -999px) var(--gy, -999px), #000 0%, rgba(0,0,0,0.25) 40%, transparent 62%);
  mask-image: radial-gradient(130px circle at var(--gx, -999px) var(--gy, -999px), #000 0%, rgba(0,0,0,0.25) 40%, transparent 62%);
}
body.grain-cursor-on::before { opacity: 0.06; }
@media (hover: none) { body::before { display: none; } }

.post-preview-img-L, .post-preview-img-S, .category-post-img { position: relative; }
.post-preview-img-L::after, .post-preview-img-S::after, .category-post-img::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='gimg'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23gimg)'/%3E%3C/svg%3E");
  background-size: 130px 130px;
  opacity: 0.18;
  mix-blend-mode: multiply;
}

.post-excerpt,
.category-post-excerpt {
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;                 /* needs lang="pl" on the text (set in the templates) to break Polish words */
  hyphenate-limit-chars: 5 2 3;
  overflow-wrap: break-word;
}

.post-preview-tags,
.post-preview-tags-S {
  flex-flow: row wrap;       /* sit on one line when they fit, wrap only when they don't */
  align-items: center;
  min-width: 0;
  overflow: visible;
}
.post-preview-tags .post-preview-tag,
.post-preview-tags-S .post-preview-tag {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: nowrap;       /* each pill stays intact; the row wraps as a group */
}
.post-preview-tag .author {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b-hero .hero-title .line { transform: scaleX(0); transform-origin: left center; }
.b-hero .hero-title .hero-ast { clip-path: inset(0 100% 0 0); }
.b-hero.is-in .hero-title .line { animation: heroLineIn .55s cubic-bezier(.22,1,.36,1) both; }
.b-hero.is-in .hero-title .hero-ast { animation: heroAstIn .5s cubic-bezier(.22,1,.36,1) .5s both; }
@keyframes heroLineIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes heroAstIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .b-hero .hero-title .line { transform: none; }
  .b-hero .hero-title .hero-ast { clip-path: none; }
  .b-hero.is-in .hero-title .line,
  .b-hero.is-in .hero-title .hero-ast { animation: none; }
}

.b-big { position: relative; }

.latest-stage { position: relative; overflow: hidden; border: 1px solid rgba(33,32,33,0.16); }
#defaultGrid { position: relative; z-index: 1; }              
#treasuresGrid {
  position: absolute; inset: 0; z-index: 2;                   
  grid-template-columns: 1.4fr 1fr;                          
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "big t1" "big t2";
  visibility: hidden; pointer-events: none;
  transition: visibility 0s 1.1s;                            
}
#treasuresGrid > .tb-big { grid-area: big; }
#treasuresGrid > .tb-1   { grid-area: t1; }
#treasuresGrid > .tb-2   { grid-area: t2; }
.latest-stage.show-treasures #treasuresGrid { visibility: visible; pointer-events: auto; transition: visibility 0s 0s; }
.latest-stage.show-treasures #defaultGrid { pointer-events: none; }

.t-slot { overflow: hidden; }
.t-slot .big-post-img-link, .t-slot .small-post-img-link { flex: 1 1 auto; min-height: 0; }
.t-slot .post-preview-img-L, .t-slot .post-preview-img-S { height: 100%; aspect-ratio: auto; }
.t-slot .ph { height: 100%; }

.latest-stage [data-dir="left"]  { --ox: -135%; --oy: 0%; }
.latest-stage [data-dir="right"] { --ox: 135%;  --oy: 0%; }
.latest-stage [data-dir="up"]    { --ox: 0%;    --oy: -135%; }
.latest-stage [data-dir="down"]  { --ox: 0%;    --oy: 135%; }

#defaultGrid > *   { transition: transform .4s cubic-bezier(.22,1,.36,1); }
#treasuresGrid > * { transform: translate(var(--ox), var(--oy)); transition: transform .4s cubic-bezier(.22,1,.36,1); }
.latest-stage.show-treasures #defaultGrid > *   { transform: translate(var(--ox), var(--oy)); }
.latest-stage.show-treasures #treasuresGrid > * { transform: translate(0, 0); }

.latest-stage.show-treasures #defaultGrid > *:nth-child(1) { transition-delay: 0s; }
.latest-stage.show-treasures #defaultGrid > *:nth-child(2) { transition-delay: .05s; }
.latest-stage.show-treasures #defaultGrid > *:nth-child(3) { transition-delay: .10s; }
.latest-stage.show-treasures #defaultGrid > *:nth-child(4) { transition-delay: .15s; }
.latest-stage.show-treasures #treasuresGrid > *:nth-child(1) { transition-delay: .50s; }
.latest-stage.show-treasures #treasuresGrid > *:nth-child(2) { transition-delay: .55s; }
.latest-stage.show-treasures #treasuresGrid > *:nth-child(3) { transition-delay: .60s; }
.latest-stage.show-treasures #treasuresGrid > *:nth-child(4) { transition-delay: .65s; }

#treasuresGrid > *:nth-child(1) { transition-delay: 0s; }
#treasuresGrid > *:nth-child(2) { transition-delay: .05s; }
#treasuresGrid > *:nth-child(3) { transition-delay: .10s; }
#treasuresGrid > *:nth-child(4) { transition-delay: .15s; }
#defaultGrid > *:nth-child(1) { transition-delay: .50s; }
#defaultGrid > *:nth-child(2) { transition-delay: .55s; }
#defaultGrid > *:nth-child(3) { transition-delay: .60s; }
#defaultGrid > *:nth-child(4) { transition-delay: .65s; }

.section-tabs { display: flex; gap: 10px; margin: 0 0 22px; flex-wrap: wrap; }
.section-tab {
  display: inline-flex; align-items: center; cursor: pointer;
  background: transparent; border: 1px solid #212021; border-radius: 999px;
  padding: 12px 24px;
  font-family: 'General Sans', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #212021;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.section-tab:hover { background: rgba(33,32,33,0.06); }
.section-tab.is-active { background: #212021; color: #ebebeb; border-color: #212021; }
.section-tab.is-active:hover { background: #212021; }

.navbar--slim { position: relative; justify-content: center; padding-block: 3px; min-height: 46px; }
@media (min-width: 769px) {
  .navbar--slim .nav-links { margin: 0; gap: 36px; justify-content: center; }
}
.navbar--slim .navEl { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; }

.navbar-wrapper {
  background: transparent;                 
  border-bottom: none;
  max-width: 1200px; margin: 0 auto;       
  padding: 14px 16px 0;                    
  pointer-events: none;                    
}
.navbar-wrapper.hide { transform: translateY(-150%); }
.navbar.navbar--slim {
  pointer-events: auto;                    
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--szuflada-black);
  border-radius: 0;                        
  box-shadow: 0 6px 20px rgba(33,32,33,0.16);
  padding: 6px 20px;
  min-height: 50px;
  
}

.navbar-logo { display: none; align-items: center; text-decoration: none; }
.navbar-logo svg { height: 18px; width: auto; display: block; }
.navbar-logo svg path, .navbar-logo svg rect, .navbar-logo svg polygon { fill: #ebebeb; }

.topbar-ig {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  padding: 6px; margin: 0; text-decoration: none;
  color: #aca7a2; display: inline-flex; align-items: center; transition: color .25s ease; z-index: 2;
}
.topbar-ig:hover { color: #fff; }

.masthead {
  background: #ebebeb;
  display: flex; justify-content: center; align-items: center;
  padding: clamp(20px, 3vw, 40px) 4vw clamp(20px, 3vw, 40px);
  border-bottom: 1px solid rgba(33,32,33,0.16);
}
.masthead-logo { display: block; width: min(1120px, 92vw); line-height: 0; }
.masthead-logo svg { display: block; width: 100%; height: auto; overflow: hidden; }

.masthead-logo svg .g {
  transform: translateY(-90px);
  animation: mhDrop .62s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes mhDrop { to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .masthead-logo svg .g { transform: none; animation: none; }
}

@media (max-width: 768px) {
  
  .navbar-wrapper { padding: 10px 16px 0; }
  .navbar.navbar--slim {
    justify-content: space-between;
    padding: 6px 10px 6px 18px; min-height: 48px;
  }
  .navbar-logo { display: inline-flex; }
  .navbar-toggle { margin-left: 0; }
  .topbar-ig { display: none; }          
  .masthead { display: none; }           
}

@media (min-width: 769px) {
  .navbar--slim .dropdown-menu {
    background: #212021; border: 1px solid rgba(235,235,235,0.10);
    min-width: 230px; padding: 10px 0;
    left: 50%; transform: translateX(-50%) translateY(-8px);
  }
  .navbar--slim .navItem.dropdown:hover .dropdown-menu,
  .navbar--slim .navItem.dropdown.open .dropdown-menu,
  .navbar--slim .navItem.dropdown.active .dropdown-menu { transform: translateX(-50%) translateY(0); }
  
  .navbar--slim .navItem.dropdown.active .dropdown-menu { opacity: 1; visibility: visible; }
  .navbar--slim .dropdown-menu a {
    display: block; padding: 11px 26px; border-bottom: 0;
    font-family: 'General Sans', sans-serif;
    font-size: 15px; font-weight: 400; letter-spacing: -0.005em; text-transform: none;
    color: #c4c0bb;
    transition: color .2s ease, padding-left .28s cubic-bezier(.22,1,.36,1);
  }
  .navbar--slim .dropdown-menu a:hover { color: #fff; background: transparent; padding-left: 32px; }
}

@media (max-width: 768px) {
  body { padding-top: 54px; }

  .masthead { padding: 14px 18px 12px; }
  .masthead-logo { width: 82vw; }

  .section-tabs { margin: 0 0 14px; flex-wrap: nowrap; gap: 8px; }
  .section-tab { padding: 9px 12px; font-size: clamp(9px, 2.7vw, 11px); letter-spacing: 0.03em; white-space: nowrap; flex: 0 1 auto; }

  .latest-posts-section { margin-top: 18px; }
  .hero-title { margin-bottom: 14px; }
  .hero-lead { font-size: 14px; line-height: 1.4; }

  .latest-posts-grid > * { padding: 15px; }
  .post-preview-img-L { aspect-ratio: 16 / 10; }
  .post-preview-img-S { aspect-ratio: 16 / 9; }
  .post-preview-title-L .post-title a { font-size: 28px; }

  .disc-section { margin-top: 20px; }
  .sec-label { margin-bottom: 16px; }
  .disc-row { padding: 18px 4px; }
  .disc-panel .category-posts-grid { padding: 18px 0 10px; }
  .category-header { margin-top: 36px; margin-bottom: 18px; padding-bottom: 12px; }
  .category-posts-grid { gap: 1.4rem; }
}

@media (max-width: 768px) {
  
  .latest-stage { position: relative; overflow: hidden; transition: height .5s cubic-bezier(.22,1,.36,1); }
  #defaultGrid, #treasuresGrid {
    position: absolute; top: 0; left: 0; right: auto; bottom: auto; width: 100%;
    grid-template-columns: minmax(0, 1fr);
    transition: opacity .42s ease, transform .5s cubic-bezier(.22,1,.36,1);
  }
  #defaultGrid { grid-template-areas: "hero" "big" "s1" "s2"; opacity: 1; transform: none; pointer-events: auto; }
  #treasuresGrid {
    visibility: visible;
    grid-template-rows: min-content min-content min-content;   
    grid-template-areas: "big" "t1" "t2";
    align-content: start; row-gap: 1px;
    opacity: 0; transform: translateY(14px); pointer-events: none;
  }
  .latest-stage.show-treasures #defaultGrid { opacity: 0; transform: translateY(-14px); pointer-events: none;
    transition: opacity .42s ease, transform .5s cubic-bezier(.22,1,.36,1); }
  
  .latest-stage.show-treasures #treasuresGrid { opacity: 1; transform: none; pointer-events: auto;
    transition: opacity .42s ease, transform .5s cubic-bezier(.22,1,.36,1); }
  
  #defaultGrid > *, #treasuresGrid > * { transform: none !important; transition: none !important; }

  #treasuresGrid { align-items: start; }
  #treasuresGrid .t-slot { height: auto; }   
  .t-slot .big-post-img-link, .t-slot .small-post-img-link { flex: 0 0 auto; }
  .t-slot .post-preview-img-L { height: auto; aspect-ratio: 16 / 10; }
  .t-slot .post-preview-img-S { height: auto; aspect-ratio: 16 / 9; }
  .t-slot .ph { height: 100%; }
  .t-slot .post-preview-tags, .t-slot .post-preview-tags-S { margin-top: 14px; }

  .disc-panel .category-posts-grid {
    display: flex; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px; padding: 18px 2px 16px;
    scrollbar-width: none;
  }
  .disc-panel .category-posts-grid::-webkit-scrollbar { display: none; }
  .disc-panel .category-post-preview {
    flex: 0 0 80%; min-width: 0; scroll-snap-align: start;
    background: #fff; box-shadow: 0 4px 14px rgba(33,32,33,0.10);
  }
  /* keep long titles/words from forcing a card wider than its 80% basis */
  .disc-panel .category-post-preview .category-post-title,
  .disc-panel .category-post-preview .category-post-excerpt { overflow-wrap: anywhere; }
  .disc-panel .category-post-img .ph { height: 170px; }
}

/* ZIN 01 banner */
.zin-banner { max-width: 1200px; margin: 20px auto 0; padding: 0 1rem; box-sizing: border-box; }
.zin-banner-line { background: #212021; color: #ebebeb; font-family: 'General Sans', sans-serif; font-size: 14px; line-height: 1.4; padding: 10px 18px; box-sizing: border-box; display: flex; align-items: center; width: 100%; overflow: hidden; white-space: nowrap; }
.zin-banner-static { flex-shrink: 0; }
.zin-banner-marquee { flex: 1 1 0; min-width: 0; overflow: hidden; position: relative; }
.zin-banner-marquee-track { display: inline-block; white-space: nowrap; animation: zin-marquee 180s linear infinite; will-change: transform; }
.zin-banner-name { color: #ebebeb; font-weight: 500; }
.zin-banner-sep { color: #888; }
.zin-banner-read { color: #ABD583; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; text-transform: uppercase; letter-spacing: 0.12em; flex-shrink: 0; }
.zin-banner-read:hover { color: #fff; }
@keyframes zin-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .zin-banner-marquee-track { animation: none; transform: none; } }
@media (max-width: 768px) {
  .zin-banner { margin: 22px auto 26px; }
  .zin-banner-static, .zin-banner-marquee, .zin-banner-marquee-track { font-size: 12px; }
  .zin-banner-line { font-size: 12px; padding: 14px 14px; line-height: 1.5; }
}

/* footer logo fill (paths carry no fill attribute) */
.footer-logo svg path, .footer-logo svg rect, .footer-logo svg polygon { fill: #ebebeb; }

/* inner pages: no masthead, so show the compact logo in the bar on desktop too */
@media (min-width: 769px) {
  .navbar--haslogo { justify-content: space-between; }
  .navbar--haslogo .navbar-logo { display: inline-flex; }
  .navbar--haslogo .nav-links { margin: 0; }
}

/* ========================================================================
   13. CATEGORY / ARCHIVE PAGE
======================================================================== */

/* page heading — matches the accordion row names (big, lowercase, no box) */
.category-main .latest-header { border-bottom: 1px solid rgba(33,32,33,0.16); padding-bottom: 18px; margin: 8px 0 20px; }
.category-main .latest-header-label {
  display: inline-block; background: transparent; color: #212021;
  padding: 0; margin: 0; border: none; width: auto;
  font-family: 'General Sans', sans-serif;
  font-weight: 500; font-size: clamp(30px, 4.6vw, 54px); line-height: 1;
  letter-spacing: -0.03em; text-transform: lowercase; white-space: normal;
}

/* toolbar row: arrow-only back button to the left of the filter menu */
.cat-toolbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 34px 0 32px; }
.cat-back {
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: transparent; color: #6b6560; border: 1px solid rgba(33,32,33,0.22);
  text-decoration: none;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.cat-back:hover { background: #212021; color: #ebebeb; border-color: #212021; }
.cat-back svg { width: 16px; height: 16px; }
.cat-toolbar .category-tags-filter { margin: 0; padding-left: 0; border-left: none; }

/* category heading row: back arrow sits to the LEFT of the title, centred against it */
.category-main .cat-head { display: flex; align-items: center; gap: 20px; }
.category-main .cat-head .cat-back { align-self: center; position: relative; top: 2px; }

/* filter chips as pills; solid fill reserved for the active filter */
.category-tags-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 12px; }
.category-tags-filter span { font-weight: 600; color: #6b6560; letter-spacing: 0.04em; }
.category-tags-filter a {
  padding: 8px 16px; background: transparent; color: #212021;
  border: 1px solid rgba(33,32,33,0.32); border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.category-tags-filter a:hover { background: rgba(33,32,33,0.06); }
.category-tags-filter a.active { background: #212021; color: #ebebeb; border-color: #212021; }
.category-tags-filter .clear-filter { border-color: transparent; color: #8d8883; }

/* pagination — centered circular page buttons */
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 48px 0 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; box-sizing: border-box;
  background: transparent; color: #212021; border: 1px solid rgba(33,32,33,0.22);
  font-family: 'General Sans', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: 0; text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pagination a:hover { background: rgba(33,32,33,0.06); }
.pagination .current { background: #212021; color: #ebebeb; border-color: #212021; cursor: default; }
.pagination .dots { border: none; background: transparent; width: auto; min-width: 0; color: #8d8883; }
.pagination .next, .pagination .prev { width: auto; border-radius: 999px; padding: 0 20px; text-transform: lowercase; letter-spacing: 0.04em; }

@media (max-width: 768px) {
  /* toolbar: back button stays on its own line; filters get a full-width row below */
  .cat-toolbar { gap: 12px 14px; margin: 26px 0 24px; }
  .cat-toolbar .cat-back { width: 38px; height: 38px; }

  /* filters become one tidy, swipeable row instead of a ragged multi-line wrap */
  .cat-toolbar .category-tags-filter {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 6px;
    border-left: none;
    /* soft fade on the right edge hints there's more to swipe */
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }
  .cat-toolbar .category-tags-filter::-webkit-scrollbar { display: none; }
  .category-tags-filter span { flex: 0 0 auto; }
  .category-tags-filter a { flex: 0 0 auto; white-space: nowrap; }
}

/* ========================================================================
   14. PAGE / ARCHIVE HEADINGS (global) + SINGLE POST META
======================================================================== */

/* every page/archive title uses the accordion heading (big, lowercase, no box) */
.latest-header-label {
  display: block; width: 100%; box-sizing: border-box;
  background: transparent; color: #212021;
  padding: 0 0 18px; margin: 8px 0 24px;
  border: none; border-bottom: 1px solid rgba(33,32,33,0.16);
  font-family: 'General Sans', sans-serif; font-weight: 500;
  font-size: clamp(30px, 4.6vw, 54px); line-height: 1.05;
  letter-spacing: -0.03em; text-transform: lowercase;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word; hyphens: auto;
}
/* category keeps its heading inside a wrapper — avoid a double rule there */
.category-main .latest-header { border: none; padding: 0; margin: 0; }
/* post titles keep the author's original capitalization (lowercase is only for section names) */
.single-publication-main .latest-header-label { text-transform: none; }

/* single post: meta column spans the full height of the article; tags wrap */
.single-publication-meta .post-preview-tags { flex-wrap: wrap; overflow: visible; gap: 8px; }

/* ========================================================================
   15. MOBILE NAV FIXES (reconcile old base rules with the redesigned bar)
======================================================================== */
@media (max-width: 768px) {
  /* base theme set .nav-links{width:100%}; with the fixed overlay's left/right:16px
     that made it 100vw wide and overflow the right edge (iOS horizontal shift). */
  .navbar--slim .nav-links {
    width: auto;
    max-height: calc(100vh - var(--navh, 58px) - 28px);
    overflow-y: auto;
  }
  /* base .navbar > a:not(.navbar-toggle){display:none} was hiding the compact logo */
  .navbar.navbar--slim .navbar-logo { display: inline-flex; }
  /* belt-and-braces: never let anything push past the viewport width */
  html, body { overflow-x: clip; }
}

/* single post: small return arrow above the title */
.single-back { margin: 4px 0 16px; }

/* ========================================================================
   16. MOBILE MENU — authoritative overrides (beat leftover base-theme rules)
======================================================================== */
@media (max-width: 768px) {
  /* the bar itself: logo left, hamburger right, never wrap */
  .navbar.navbar--slim { flex-wrap: nowrap !important; justify-content: space-between !important; }
  .navbar.navbar--slim .navbar-logo { display: inline-flex !important; width: auto !important; flex: 0 0 auto; margin: 0; }
  .navbar.navbar--slim .navbar-toggle { display: flex !important; width: 22px; flex: 0 0 auto; margin: 0 0 0 auto; }

  .navbar-wrapper .nav-links {
    padding: 6px 18px 10px !important;
    width: auto !important;
    max-height: calc(100vh - var(--navh, 58px) - 28px) !important;
    overflow-y: auto !important;
  }
  .navbar-wrapper .nav-links .navItem { width: 100%; border-bottom: 1px solid rgba(235,235,235,0.09); }
  .navbar-wrapper .nav-links .navItem:last-child { border-bottom: none; }
  .navbar-wrapper .nav-links .navEl {
    width: 100%; justify-content: space-between; min-height: 0;
    padding: 16px 0 !important;
    font-size: 20px !important; font-weight: 500 !important;
    text-transform: lowercase !important; letter-spacing: -0.01em !important;
    color: #ececea !important;
  }
  .navbar-wrapper .nav-links .navEl:hover,
  .navbar-wrapper .nav-links .navItem:hover .navEl { color: #ffffff !important; }

  /* kill the base border-triangle chevron; use a clean down-chevron */
  .navbar-wrapper .nav-links .dropdown-toggle::after {
    content: '' !important; display: inline-block !important;
    width: 13px !important; height: 13px !important;
    border: 0 !important; padding: 0 !important; margin: 0 0 0 8px !important;
    background-color: currentColor !important; opacity: .8;
    transform: rotate(0deg) !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M2 2 6 6 10 2' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat !important;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M2 2 6 6 10 2' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat !important;
    transition: transform .3s ease !important;
  }
  .navbar-wrapper .navItem.dropdown.active .dropdown-toggle::after { transform: rotate(180deg) !important; }
}

/* ========================================================================
   17. MOBILE — card tag stacking, smaller radius, tidy "zobacz więcej"
======================================================================== */
@media (max-width: 768px) {
  /* tags flow on one line and wrap only when they genuinely don't fit —
     no more forced vertical stack when a row would sit comfortably. */
  .category-post-preview .post-preview-tags,
  .latest-posts-grid .post-preview-tags,
  .latest-posts-grid .post-preview-tags-S,
  .t-slot .post-preview-tags,
  .t-slot .post-preview-tags-S {
    flex-flow: row wrap; align-items: center;
    gap: 8px 10px; overflow: visible;
  }
  .category-post-preview .post-preview-tag,
  .latest-posts-grid .post-preview-tag,
  .t-slot .post-preview-tag { max-width: 100%; flex: 0 1 auto; }
  /* a very long author name gets its own row and ellipsises rather than breaking layout */
  .post-preview-tag .author { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* smaller card corners on mobile */
  .category-post-preview { border-radius: 4px; }

  /* the "zobacz więcej" pill sat indented with a big gap — align it under the cards */
  .disc-cat-all { margin: 4px 0 24px 0 !important; }
}

/* ========================================================================
   18. CARD CONTENT RHYTHM — even cards + consistent internal spacing
======================================================================== */
/* fixed image ratio so every card image is the same height */
.category-post-img { aspect-ratio: 3 / 2; overflow: hidden; margin-bottom: 0; }
.category-post-img img { width: 100%; height: 100%; object-fit: cover; max-height: none; margin: 0; display: block; }
/* content flows top-down with fixed gaps (no space-between / grow that jumps) */
.category-post-preview { justify-content: flex-start; }
.category-post-link { flex-grow: 0; }
.category-post-title { margin: 0.7rem 0 0.4rem; }
/* reserve a consistent excerpt block so the tags start at the same place on every card */
.category-post-excerpt { min-height: 4.2em; margin: 0; }
.category-post-preview .post-preview-tags { margin-top: 14px; }

/* ========================================================================
   19. Frosted blur band just past the top nav (content blurs as it scrolls under)
======================================================================== */
.top-blur {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--navh, 60px) + 26px);
  z-index: 900;              /* under the nav (1000) + mega, above page content */
  pointer-events: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(var(--navh, 60px) - 6px), rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 calc(var(--navh, 60px) - 6px), rgba(0,0,0,0) 100%);
}
@media (prefers-reduced-motion: reduce) { .top-blur { display: none; } }

/* ========================================================================
   20. Member card drawer — tap-to-open state (works alongside hover)
======================================================================== */
.flip-card.is-open .flip-card-back { transform: translateY(0) !important; }

/* on touch devices, sticky :hover must not pin the drawer open — only the tap state controls it */
@media (hover: none) {
  .flip-card:not(.is-open) .flip-card-back { transform: translateY(-100%) !important; }
}

/* ========================================================================
   21. TOP NAV LAYOUT — 3-zone desktop grid + IG / search placement
   (authoritative: replaces the old absolute .topbar-ig that overlapped items)
======================================================================== */
/* right-hand cluster holds the search bar + Instagram link on every breakpoint */
.nav-actions { display: inline-flex; align-items: center; gap: 14px; }
/* IG is now in normal flow inside .nav-actions — kill the old absolute positioning */
.topbar-ig {
  position: static !important; right: auto !important; top: auto !important;
  transform: none !important;
}

@media (min-width: 769px) {
  /* three zones so the bar always matches the 1200px content width:
     logo (left) | nav links (dead-centre) | actions (right) */
  .navbar.navbar--slim {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 16px;
  }
  .navbar.navbar--slim .navbar-logo   { grid-column: 1; justify-self: start; }
  .navbar.navbar--slim .nav-links     { grid-column: 2; justify-self: center; }
  .navbar.navbar--slim .nav-actions   { grid-column: 3; justify-self: end; }
  .navbar.navbar--slim .navbar-toggle { display: none; }
  /* on the front page the logo is hidden — the empty 1fr column keeps nav centred */

  /* the inline search bar shows here; the overlay copy is for the mobile menu only */
  .nav-actions .nav-search--bar     { display: block; }
  .nav-links   .nav-search--overlay { display: none; }
}

@media (max-width: 768px) {
  /* bar reads: logo (left) … Instagram + hamburger (right) */
  .navbar.navbar--slim .nav-actions {
    order: 5; margin-left: auto;
    display: inline-flex !important; align-items: center; gap: 4px;
  }
  /* clear separation so IG and the hamburger aren't easy to mis-tap */
  .navbar.navbar--slim .nav-actions .topbar-ig { margin-right: 4px; }
  /* the expanding search bar is a desktop affordance — hidden here; search lives in the menu */
  .navbar.navbar--slim .nav-actions .nav-search--bar { display: none !important; }
  /* IG icon back on mobile, sitting just left of the hamburger */
  .navbar.navbar--slim .nav-actions .topbar-ig {
    display: inline-flex !important; color: #cbc7c2; padding: 6px;
  }
  .navbar.navbar--slim .navbar-toggle { order: 6; margin: 0 0 0 18px !important; }

  /* full-width search field pinned to the top of the open menu overlay */
  .nav-links .nav-search--overlay { display: block; order: -1; width: 100%; margin: 12px 0 2px; }
  /* the desktop-bar search never appears inside the overlay */
  .nav-links .nav-search--bar { display: none !important; }

  /* Force the overlay search into a clean, static, full-width field.
     These beat the desktop expanding-magnifier rules (.header-search-form
     .header-search-input, 0,2,0) which are global and would otherwise leak
     here and push the placeholder + underline out of place. */
  .navbar-wrapper .nav-links .nav-search--overlay .header-search-form {
    position: relative; display: flex; align-items: center; gap: 8px;
    width: 100% !important; background: transparent !important;
    border: 0 !important; border-bottom: 1px solid rgba(235,235,235,0.22) !important;
    border-radius: 0 !important; padding: 0 0 12px !important; margin: 0 !important;
  }
  .navbar-wrapper .nav-links .nav-search--overlay .header-search-button {
    position: static !important; order: 0; z-index: auto;
    padding: 2px 0 !important; margin: 0 !important; flex: 0 0 auto;
  }
  .navbar-wrapper .nav-links .nav-search--overlay .header-search-input {
    position: static !important; transform: none !important;
    right: auto !important; top: auto !important;
    width: 100% !important; opacity: 1 !important; pointer-events: auto !important;
    order: 1; flex: 1 1 auto;
    border: 0 !important; background: transparent !important;
    color: #ebebeb !important; font-size: 16px !important;
    padding: 4px 0 !important; margin: 0 !important;
  }
}

/* ========================================================================
   22. UNIFORM CARD SKELETON — every .category-post-preview is identical
   height so cards line up across the homepage carousel, category grids
   and author/team grids. Each zone is a fixed size, so title/excerpt
   length and tag-row count can no longer shift the layout around.
======================================================================== */
/* TITLE — always reserves exactly two lines (clamped, so 3-line titles trim) */
.category-post-preview .category-post-title {
  font-size: 20px;
  line-height: 1.25;
  margin: 0.7rem 0 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;            /* 2 lines */
}

/* IMAGE — cropped to a uniform 3:2 on EVERY breakpoint. The old mobile rule set
   height:auto, so portrait vs landscape photos gave cards different heights,
   which stretched the shorter ones and dumped the extra space at the bottom. */
.category-post-preview .category-post-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin: 0;
}
.category-post-preview .category-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: none;
  margin: 0;
  display: block;
}

/* EXCERPT — always exactly three lines tall (clamped with an ellipsis) */
.category-post-preview .category-post-excerpt {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.5em;                /* 3 lines */
  min-height: 4.5em;
}

/* BYLINE — just the author, sitting ABOVE the image. Its margin below matches
   the foot's margin above, so the card breathes evenly top and bottom. */
.category-post-preview .card-byline {
  display: flex;
  margin: 0 0 14px;
}
.category-post-preview .card-byline .post-preview-tag {
  padding: 5px 11px !important;
  font-size: 10.5px !important;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
}
.category-post-preview .card-byline .author {
  display: block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* FOOT META — date · category (or just the tag) BELOW the excerpt. A single
   natural row — no 2-row reserve, so the card isn't bottom-heavy. */
.category-post-preview .post-preview-tags {
  margin: 14px 0 0;             /* zero bottom margin (a mobile rule added 0.5rem) */
  flex-flow: row wrap;
  align-items: center;
  gap: 7px 8px;
  overflow: visible;
}
.category-post-preview .post-preview-tags .post-preview-tag {
  padding: 5px 11px !important;
  font-size: 10.5px !important;
}

@media (max-width: 768px) {
  .category-post-preview .category-post-title { font-size: 18px; }
  /* keep the fixed zones on mobile too (override the old margin-bottom:auto) */
  .category-post-preview .category-post-excerpt { margin: 0; }
}

/* ========================================================================
   23. HERO (bento) — same treatment: author byline above, date·category below
======================================================================== */
.post-preview-L .card-byline,
.post-preview-S .card-byline {
  display: flex; margin: 0 0 12px; flex: 0 0 auto;
}
.post-preview-L .card-byline .post-preview-tag,
.post-preview-S .card-byline .post-preview-tag {
  max-width: 100%; white-space: nowrap; overflow: hidden;
}
.post-preview-L .card-byline .author,
.post-preview-S .card-byline .author {
  display: block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* the foot row (date · category) stays pinned to the bottom of the hero card,
   with the same divider line as the accordion/grid cards */
.post-preview-L .post-preview-tags.card-foot,
.post-preview-S .post-preview-tags-S.card-foot {
  margin-top: auto; flex-flow: row wrap; align-items: center; gap: 8px 10px;
}
