/* ========================================================================
      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: "Karla", 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: "Karla", 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: "Karla", 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;
}
/* ========================================================================
      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: "Karla", 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;
  }
}

/* ========================================================================
      MOBILE NAVBAR (≤768PX)
======================================================================== */

@media (max-width: 768px) {
  .navbar {
    justify-content: flex-start; 
    padding: 0 10px;
    flex-wrap: wrap;
  }

  .szuflada-logo {
    margin-right: 1rem;
    flex: 0;                 
    display: flex;
    justify-content: flex-start; 
  }

  .navbar-toggle {
    display: block; 
    margin-left: auto;
    margin-right: 1%;
  }

  .nav-links {
    max-height: 0;    
    overflow: hidden; 
    opacity: 0;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    width: 100%;
    padding: 0; 
    background-color: var(--szuflada-black);
    transition: max-height 0.3s ease, opacity 0.3s ease; 
  }

  .nav-links.active {
    max-height: 1000px;
    overflow: visible; 
    opacity: 1;
    padding: 1rem 0;
  }

  .navEl {
    justify-content: flex-start;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    min-height: 44px; 
  }

  .ver-div-nav {
    display: none;
  }

  .navEl.dropdown-toggle::after {
    content: '' !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border: solid var(--szuflada-white) !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
    margin-left: auto !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
  }

  .navItem.dropdown.active .navEl.dropdown-toggle::after {
    transform: rotate(-135deg) !important;
  }
}

/* ========================================================================
      2. footer styles
======================================================================== */

.site-footer {
  background-color: #212021;
  color: #cfcfcf;
  padding: 3rem 1rem 1rem;
  font-family: 'Karla', 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: "Karla", sans-serif;
}

.category-tags-filter {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: "Karla", 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: "Karla", 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: "Karla", 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: "Karla", 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: "Karla", 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: "Karla", 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: "Karla", 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: "Karla", 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: "Karla", 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: "Karla", 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: 'Karla', 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: "Karla", 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;
  }

  .navbar {
    flex-wrap: wrap;
    position: relative;
    min-height: 50px;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar > .navItem,
  .navbar > a:not(.navbar-toggle),
  .navbar > .ver-div-nav {
    display: none;
    width: 100%;
    text-align: left;
    margin: 0;
  }

  .navbar.active > .navItem,
  .navbar.active > a:not(.navbar-toggle) {
    display: block;
    gap: 0;
    padding: 0;
  }
  
  .navbar.active > .szuflada-logo {
    padding: 10px;
  }

  .ver-div-nav {
    display: none;
    width: 0;
    height: 0;
    border: none;
    padding: 0;
  }

  .navEl {
    padding-left: 10px;
  }
}

@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: "Karla", 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: "Karla", 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: "Karla", 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: "Karla", 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 → 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 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    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: "Karla", 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;
  }
}
