/* zalando-sans-semiexpanded-regular - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans SemiExpanded';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/zalando-sans-semiexpanded-v2-latin_latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* zalando-sans-semiexpanded-500 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans SemiExpanded';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/zalando-sans-semiexpanded-v2-latin_latin-ext-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* zalando-sans-semiexpanded-600 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans SemiExpanded';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/zalando-sans-semiexpanded-v2-latin_latin-ext-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* zalando-sans-semiexpanded-700 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans SemiExpanded';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/zalando-sans-semiexpanded-v2-latin_latin-ext-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* zalando-sans-semiexpanded-800 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans SemiExpanded';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/zalando-sans-semiexpanded-v2-latin_latin-ext-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}




/* zalando-sans-regular - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/zalando-sans-v2-latin_latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* zalando-sans-500 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/zalando-sans-v2-latin_latin-ext-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* zalando-sans-600 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/zalando-sans-v2-latin_latin-ext-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* zalando-sans-700 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/zalando-sans-v2-latin_latin-ext-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* zalando-sans-800 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Zalando Sans';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/zalando-sans-v2-latin_latin-ext-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
  --spacing-sm: 5px;
  --spacing-md: 10px;
  --spacing-lg: 15px;
  --spacing-xl: 20px;
  
  --rounded-sm: 5px;
  --rounded-md: 10px;
  
  --image-rounded-sm: var(--rounded-sm);
  --image-rounded-md: var(--rounded-md);
  
  --transition-fast: 0.1s;
  --transition-default: 0.25s;
  
  --content-width: 1100px;
  
  --image-hover-opacity: 0.85;
  
  --color-primary: hsla(141, 64%, 42%, 1.00);
  --color-primary-transparent: hsla(141, 64%, 42%, 0.5);
  --color-link: hsla(141, 64%, 42%, 1.00);
  --color-link-hover: hsla(141, 64%, 55%, 1.00);
  
  --color-background: #000;
  --color-background-transparent: #000c;
  --color-border: #222;
  --color-text: #ddd;
  --color-text-inverted: #000;
  --color-text-inverted-hover: #ddd;
  --color-text-secondary: #bbb;
  --color-text-secondary-hover: #9f9f9f;
  --color-text-hover: #777;
  --color-text-barely-visible: #999;
}

/* RESETY I INNE ########################################## */

ul, p, h1, h2, h3 {
    margin: 0;
    padding: 0;
}

li {
    list-style: none;
}

.splide__slide img {
  width: 100%;
  height: auto;
}

body.admin-bar {
    .header-menu-mobile,
    header {
        top: 32px !important;
    }
}
@media screen and (max-width: 782px) {
    body.admin-bar {
        .header-menu-mobile,
        header {
            top: 46px !important;
        }
    }
}

@media screen and (max-width: 600px) {
    body.admin-bar {
        header {
            top: 0px !important;
            position: sticky !important;
        }
    }
}

/* GLOBAL ################################################# */

html {
  scroll-behavior: smooth;
}

body {
    font-family: 'Zalando Sans', Arial, 'Trebuchet MS', Helvetica, sans-serif;
    letter-spacing: 0.25px;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    font-size: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
    
    &:hover {
        color: var(--color-primary);
    }
}

img {
    overflow: hidden;
    border-radius: var(--image-rounded-md);
    background-color: var(--color-background);
}

h1, h2, h3, h4 {
    letter-spacing: 0.5px;
}

hr {
    border-color: var(--color-border) !important;
    border-style: solid !important;
    border-bottom: 0 !important;
    margin-block: var(--spacing-lg);
}
/* LAYOUT ################################################## */

header,
main,
footer {
    display: flex;
    justify-content: center;
    
    .language-links {
        max-width: 800px;
        display: flex;
        gap: var(--spacing-lg);
        flex-wrap: wrap;
        margin-bottom: var(--spacing-lg);
    }
}

.content-wrapper {
    max-width: var(--content-width);
    width: 100%;
}

/* HEADER ################################################## */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    margin-inline: var(--spacing-md );
    
    transition: background-color var(--transition-default), border-color var(--transition-default);
    border-bottom: 1px solid transparent;
    
    &.no-transition,
    &.no-transition.away {
        transition: none !important;
    }
    
    &.away {
        background-color: var(--color-background-transparent);
        backdrop-filter: blur(20px);
        border-color: var(--color-border);
        
        &:before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom,var(--color-background), #0000 60%);
            z-index: -1;
        }
    }
    
    .header-logo {
        a {
            display: flex;
            
            img {
                border-radius: 0 !important;
                max-width: 250px;
                background-color: transparent;
            }
        }
        
        .header-logo-image {
            max-width: 250px;
        }
        
        .header-logo-image--small {
            display: none;
        }
        
        @media (max-width: 600px) {
            .header-logo-image {
                display: none;
            }
            
            .header-logo-image--small {
                max-width: 69px;
                display: initial;
            }
        }
    }
}

.header-content {
    min-height: 50px;
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

.header-search-toggle {
    all: unset;
    cursor: pointer;
    transition: color var(--transition-fast);
    
    &:hover {
        color: var(--color-text-secondary);
    }
}
.header-logo {
    display: flex;
    align-items: center;
    
    img {
        max-height: 50px;
    }
}

.header-menu {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    
    img {
      border-radius: 0 !important;
    }
    
    ul {
        list-style: none;
        display: flex;
        gap: var(--spacing-lg);
        height: 100%;
        padding: 0 var(--spacing-lg);
        
        li {
            position: relative;
            
            &.current-menu-item {
                &:before {
                    content: '';
                    position: absolute;
                    bottom: -5px;
                    height: 5px;
                    width: 100%;
                    background-color: var(--color-border);
                    border-top-left-radius: var(--rounded-sm);
                    border-top-right-radius: var(--rounded-sm);
                }
            }
        }
        
        li a {
            padding: 0 var(--spacing-md);
            letter-spacing: 0.5px;
            font-weight: 600;
            height: 100%;
            font-size: 0.75rem;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            
            &:hover {
                color: var(--color-text-secondary-hover);
            }
        }
    }
    
    .menu-main-menu-container {
        height: 100%;
    }
}

.header-icon {
    all: unset;
    display: flex;
    padding: var(--spacing-md);
    color: var(--color-text-secondary) !important;
    transition: color var(--transition-fast);
    
    svg {
        color: var(--color-text-secondary);
        transition: color var(--transition-fast);
    }
    
    &:hover {
        color: var(--color-text-hover) !important;
        cursor: pointer !important;
        
        svg {
            color: var(--color-text-hover) !important;
            cursor: pointer !important;
        }
    }
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-inline: var(--spacing-md);
  margin-top: 90px;
}

body.home main, .single-post main {
    position: relative;
  margin-top: 0 !important;
}

.header-menu-mobile {
    display: none;
    
    ul {
        li {
            &::before {
                content: none !important;
            }
        }
    }
    
    .logo-image {
        max-width: 150px;
    }
}

.header-mobile-icons {
    display: none;
}

.header-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    z-index: 998;
    transition: opacity var(--transition-default) ease;
    
    &.active {
        opacity: 1;
        pointer-events: auto;
    }
}

@keyframes slide-in {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0%);
    }
}

@keyframes slide-out {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.header-menu-mobile {
    z-index: 999;
    min-width: 200px;
    padding: var(--spacing-lg);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    background-color: var(--color-background);
    display: none; /* domyślnie ukryte */
    transform: translateX(-100%); /* start poza widokiem */

    &.open {
        display: block;
        animation: slide-in var(--transition-default) forwards;
    }
    &.closing {
        animation: slide-out var(--transition-default) forwards;
    }

    & > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    ul {
        margin-top: 40px;
        padding: 0;
        flex-direction: column;

        a {
            display: block;
        }
    }

    .header-mobile-close {
        all: unset;
        display: flex;
        right: var(--spacing-md);
    }
}

main {
}

/* FOOTER ################################################## */

footer {
  margin-block: var(--spacing-lg);
  margin-inline: var(--spacing-md)  ;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  
  img {
      padding-block: var(--spacing-lg);
      max-width: 250px;
      width: 100%;
  }
  
  a {
    text-decoration: underline;
  }
}

@media screen and (max-width: 1000px) {
    .header-menu-desktop { 
        display: none;
    }
    
    .header-mobile-icons {
        display: flex;
    }
}

/* INDEX LAYOUT ###################################### */

.index-wrapper {
    position: relative;
    display: flex;
    gap: var(--spacing-xl);
    
    .index-content {
        min-width: 0;
        flex: 4;
    }
    
    .index-sidebar {
        flex: 1;
    }
    
    @media (max-width: 1280px) {
        flex-direction: column;
        
        .list-small {
            display: grid;
            gap: var(--spacing-lg);
            grid-template-columns: repeat(4, 1fr);
            
            .list-small-item {
                padding: 0 !important;
                border-bottom: none !important;
            }
        }
    }
    
    @media (max-width: 1024px) {
        .list-small {
            grid-template-columns: repeat(3, 1fr);
        }
    }
    
    @media (max-width: 768px) {
        .list-small {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 480px) {
        .list-small {
            grid-template-columns: repeat(1, 1fr);
        }
    }
}

/* LIST SMALL ################################### */

.list-small {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 120px;
    
    .list-small-item {
        &:not(:last-child) {
            padding-bottom: var(--spacing-md);
            border-bottom: 1px dotted var(--color-border);
        }
        
        &:not(:first-child) {
            padding-top: var(--spacing-md);
        }
        
        a {
            display: flex;
            align-items: center;
            gap: var(--spacing-md);
            
            &:hover {
              color: inherit;
              
                img {
                  opacity: var(--image-hover-opacity);
                }
            }
        }
        
        .list-small-thumbnail {
            height: 50px;
            flex: 1;
            
            img {
                height: 100%;
                width: 100%;
                object-fit: cover;
                border-radius: var(--rounded-sm);
                transition: opacity var(--transition-fast);
            }
        }
    }
}

.list-small-title {
    display: block;
    flex: 2;
    font-size: 0.75rem;
    letter-spacing: 0.25px;
    line-height: 1rem;
    font-weight: 600;
}
        
/* SLIDER ################################## */


.slider {
  .splide__pagination {
    position: initial !important;
    bottom: 0px !important;
  }
  .splide__pagination__page.is-active {
    background: #666 !important;
    transform: scale(1) !important;
  }
  
  .slider-link {
    position: absolute;
    inset: 0;
    opacity: 0;
  }
}

.slider.small {
  min-height: 100px;
  
  .splide__slide__container {
      display: flex;
      gap: var(--spacing-md);
      position: relative;
      
      &:hover {
        img {
            opacity: var(--image-hover-opacity);
        }
      }
  }
  
  img {
      transition: opacity var(--transition-fast);
      height: 65px;
      width: 100%;
      object-fit: cover;
      margin-bottom: var(--spacing-md);
      border-radius: var(--image-rounded-sm);
  }
  
  .slider-link {
    z-index: 1;
  }
  
  .slider-thumbnail {
      min-width: 100px;
  }
  
  .category-tag {
      font-size: 0.675rem;
      letter-spacing: 0.5px;
      position: relative;
      z-index: 1;
  }

      
  .slider-title {
      line-height: 1rem;
  }
}

 h1, h2, h3, h4, .section-header, .menu-item, .pagination {
      font-family: 'Zalando Sans SemiExpanded' !important;
    
  }
  
  .slider-title {
      margin-top: var(--spacing-sm);
      font-size: 0.75rem;
      letter-spacing: 0.25px;
  }

.slider.big {
  margin-bottom: var(--spacing-xl);
	
  .splide__pagination {
    margin-top: var(--spacing-lg);  
  }
  
  .splide__pagination__page {
    background-color: #444;
    
    &.is-active {
      background-color: #777 !important;
    }
  }
  

  .splide__slide {
    border-radius: var(--rounded-md);
    overflow: hidden;
    padding: var(--spacing-xl);
    
    &:hover {
      .slider-thumbnail img {
        opacity: var(--image-hover-opacity);
      }
    }
  }
  
  .splide__slide__container {
      display: flex;
      gap: var(--spacing-lg);
  }
  
  .slider-link {
    z-index: 1;
  }
  
  .slider-info {
    flex: 1;
  }
  
  .slider-thumbnail {
    flex: 1;
    
    img {
      object-fit: cover;
      transition: opacity var(--transition-fast);
    }
  }
  
  .slider-thumbnail-background {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    z-index: -1;
    
    img {
      filter: blur(20px);
      scale: 1.2;
    }
  }
  
  .slider-title {
      margin-top: var(--spacing-sm);
      font-size: 2rem;
      letter-spacing: 0.25px;
  }
  
  .slider-excerpt {
    margin-top: var(--spacing-lg);
    line-height: 1.5rem;
  }
  
   @media (max-width: 850px) {
    .splide__slide__container {
      flex-direction: column;
    }
  }
}

.slider.fullwidth {
  --slider-fw-height: 700px;
  position: relative;
  height: var(--slider-fw-height);
  overflow: hidden;
  
  @media (max-width: 600px) {
    --slider-fw-height: 600px;
  }
  
  .splide__slide {
    height: var(--slider-fw-height);
    position: relative;
  }
  
  .slider-gradient {
    &:before, &:after {
      content: '';
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
    }
    
    &:before {
      background: linear-gradient(#000, #0000 20%, #000);
      
      @media (max-width: 600px) {
        height: 70%;
      }
      
    }
    
    &:after {
      background: linear-gradient(to left, #000, #0000, #000);
    }
  
  }
  
  .splide__slide__container {
    height: var(--slider-fw-height);
  }
  
  .slider-link {
    z-index: 2;
  }
  
  .slider-thumbnail {
    height: 100%;
    
    @media (max-width: 600px) {
        height: 70%;
    }
    
    overflow: hidden;
    img {
        height: 100%;
        object-fit: cover;
    }
  }
  
  .slider-info {
    max-width: calc(100vw - var(--spacing-xl));
    width: var(--content-width);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 15%;
    z-index: 1;
    margin: auto;
    
    .category-tag {
      font-size: 1rem;
      
      @media (max-width: 600px) {
        font-size: 0.75rem;
      }
    }
    
    .slider-title {
      font-size: 3rem;
      margin-bottom: var(--spacing-lg);
      
      @media (max-width: 600px) {
        font-size: 1.5rem;
      }
    }
    
    .slider-excerpt {
        line-height: 1.5rem;
    }
  }
}

.overlay-gradient {
    &:before {
        content: '';
        pointer-events: none;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 85%;
        background: linear-gradient(#0000, #000);
        transition: opacity var(--transition-fast);
    }
}

/* GRID ################################## */
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xl);
  margin: 0 auto;

  .post {
    position: relative;
    display: flex;
    flex-direction: column;
    
    &:not(.post-featured) {
        img {
        transition: opacity var(--transition-fast);
    }
    
        &:hover {
            img {
                opacity: var(--image-hover-opacity);
            }
        }
    }

    &.post-featured {
        grid-column: span 2;
        
        &:hover {
            .overlay-gradient::before {
                opacity: var(--image-hover-opacity);
            }
        }
        
        @media (max-width: 480px) {
            grid-column: span 1;
            
            .post-excerpt {
                display: none;
            }
            
            .overlay-gradient::before {
                display: none;
            }
        }
        
        @media (min-width: 481px) {
            .post-link {
                z-index: 2;
            }
 
            
        
            
            .post-info {
                position: absolute;
                z-index: 1;
                bottom: 0;
                color: var(--color-text);
                padding: var(--spacing-lg);
                
                .category-tag {
                    color: var(--color-text);
                    position: relative;
                }
                
                .post-title {
                    font-size: 1.5rem;
                    letter-spacing: 0.75px;
                    line-height: 1.75rem;
                }
                
                .post-excerpt {
                    margin-top: var(--spacing-sm);
                    line-height: 1.25rem;
                    font-size: 0.85rem;
                }
            }
            
            .post-thumbnail {
                position: relative;
                overflow: hidden;
                
                img {
                    height: 264px;
                }
            }
        }
    }
    
    .post-link {
        position: absolute;
        inset: 0;
        opacity: 0;
        z-index: 1;
    }

    .post-thumbnail {
      background-color: var(--color-background);
      border-radius: var(--rounded-md);
      overflow: hidden;
      -webkit-mask-image: radial-gradient(circle, white 100%, black 100%);
      
      img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        display: block;
      }
    }

    .post-info {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      margin-top: var(--spacing-md);

      .post-category {
        position: relative;
        z-index: 1;
        pointer-events: none;
        margin-bottom: var(--spacing-sm);
        
        a {
            pointer-events: all;
        }
      }
      
      .post-title {
        margin-top: var(--spacing-sm);
        line-height: 1.3rem;
        font-size: 1rem;
      }
    }
  }

  @media (max-width: 1024px) {
    grid-template-columns: repeat(3, 1fr);
  }

  @media (max-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (max-width: 480px) {
    grid-template-columns: 1fr;
  }
}

/* WSZYSTKO INNE ################################## */
.category-tag {
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    
    a {
        &:hover {
            color: var(--color-text-secondary-hover);
        }
    }
}

.section-header {
    margin-top: 0; 
    margin-bottom: 0; 
    top: 0;
    
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 1rem;
    padding: var(--spacing-sm) var(--spacing-md);
    
    &:after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, var(--color-primary), #0000);
        z-index: -1;
        opacity: 0.7;
        border-radius: var(--rounded-md); 
    }
}

.section-header-hr {
  margin-top: 0;
  opacity: 0;
}

/* SEARCH ######################################## */

.search-overlay {
  display: none;
  opacity: 0;
  transition: opacity var(--transition-default) ease;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: flex-start;
  z-index: 1500;
  pointer-events: none;
}

.search-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.search-overlay.closing {
  opacity: 0;
  pointer-events: none;
}

.search-overlay-content {
  display: flex;
  background-color: var(--color-background);
  padding: var(--spacing-md);
  border-radius: 999px;
  max-width: 400px;
  position: relative;
  top: 90px;
  margin-inline: var(--spacing-lg);
  max-width: 100vw;
  overflow: hidden;
}

.search-overlay-content form {
  display: flex;
  gap: 0.5rem;
}

.search-overlay-content input[type="search"] {
  width: 100%;
  font-size: 1.25rem;
  padding: var(--spacing-md) var(--spacing-lg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.search-overlay-content button[type="submit"] {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary, #000);
}

.search-overlay-close {
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary, #000);
  cursor: pointer;
}

/* SEARCH RESULTS ############################################################################# */

.archive-page-title {
    margin-block: var(--spacing-xl);
    span {
        color: var(--color-text-secondary);
    }
}

.post-list-archive {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    
    .post {
        position: relative;
        display: flex;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg);
        background: linear-gradient(to right, #0000 30%, #000);
        
        &:hover {
            .post-thumbnail img {
             opacity: var(--image-hover-opacity);
            }
        }
    }
    
    .post-link {
        position: absolute;
        inset: 0;
        opacity: 0;
    }
    
    .post-thumbnail {
      height: 169px;
        
        img {
            width: 300px;
            height: 100%;
            object-fit: cover;
            transition: opacity var(--transition-fast);
            pointer-events: none;
        }
        
    }
    
    .post-thumbnail-background {
      position: absolute;
      inset: 0;
      overflow: hidden;
      border-radius: var(--rounded-md);
      z-index: -1;
      opacity: 0.3;
      
      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        scale: 1.2;
        filter: blur(20px);
      }
    }
    
    .post-excerpt {
        line-height: 1.5rem;
    }
    
    .post-category {
      margin-bottom: var(--spacing-sm);
    }
    
    .post-title {
        margin-bottom: var(--spacing-md);
    }
    
    @media (max-width: 750px) {
        gap: 50px;
        
        .post {
            flex-direction: column;
            gap: var(--spacing-md);
        
            .post-thumbnail img {
                width: 100%;
            }
        }
    }
}

/* SINGLE POST ################################### */

.post-content, .privacy-policy {
    h1, h2, h3, h4, h5 {
      scroll-margin-block: 100px;
      margin-top: calc(2 * var(--spacing-lg));
      margin-bottom: var(--spacing-lg);
  }
  
  line-height: 1.5rem;
  
  h2 {
    line-height: 1.75rem;
  }
}

body.wp-singular .post-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;
    
    &:before, &:after {
        content: '';
        position: absolute;
        inset: 0;
    }
    
    &:before {
        background: linear-gradient(to right, #000, #0000, #000);
    }
    
    &:after {
        background: linear-gradient(#000, #0000 20%, #000);
    }
    
    img {
        aspect-ratio: 16/9;
        object-fit: cover;
        width: 100%;
        height: 700px;
    }
}

.single-post-container {
    display: flex;
    gap: var(--spacing-xl);
    
    .main-content {
        flex: 4;
        
        .post {
            position: relative;
            
            & > * {
                margin-bottom: var(--spacing-lg);
            }
            
            .post-meta {
                padding-top: 120px;
                
                &.has-thumbnail {
                    padding-top: 450px;
                    
                    @media (max-width: 600px) {
                        padding-top: 350px;
                    }
                }
                
                 margin-bottom: var(--spacing-md);
                
                .post-date, .post-category {
                    position: relative;
                    padding-left: var(--spacing-md);
                    margin-left: 2px;
                    
                    &:before {
                        content: "";
                        position: absolute;
                        left: 0px;
                        top: 50%;
                        width: 3px;
                        height: 3px;
                        background-color: var(--color-text-secondary);
                        transform: translateY(-50%);
                        border-radius: 50px;
                    }
                
                }
            }
            
            .post-title {
                margin-bottom: 25px;
                font-size: 3rem;
                
                @media (max-width: 600px) {
                    font-size: 2rem;
                }
            }
            
            .post-content {
                h1:first-of-type {
                    display: none;
                }
                a {
                    color: var(--color-link);
                    transition: color var(--transition-fast);
                    
                    &:hover {
                        color: var(--color-link-hover);
                    }
                }
            }
        }
    }
    
    .single-sidebar {
        flex: 1;
        margin-bottom: var(--spacing-lg);
        
        .sidebar-posts {
            @media (max-width: 1024px) {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: var(--spacing-md);
                
                .sidebar-post-item {
                    border-bottom: none !important;
                }
                
                .sidebar-post-item--big {
                    padding-top: 0;
                    
                    .overlay-gradient::before {
                        display: none;
                    }
                }
            }
            
            @media (max-width: 800px) {
                grid-template-columns: repeat(2, 1fr);
            }
            
            @media (max-width: 500px) {
                grid-template-columns: repeat(1, 1fr);
            }
        }
        
        .sidebar-post-item {
            position: relative;
            
            &:not(.sidebar-post-item--big) {
              &:hover {
                .sidebar-post-thumbnail img {
                  opacity: var(--image-hover-opacity);
                }
              }
            }
            
            a {
                display: flex;
                align-items: center;
                gap: var(--spacing-lg);
                
                &:hover {
                    color: inherit;
                }
                
                .sidebar-post-thumbnail {
                    flex: 1;
                    
                    img {
                        height: 50px;
                        width: 100%;
                        object-fit: cover;
                        border-radius: var(--rounded-sm);
                        transition: opacity var(--transition-fast);;
                    }
                }
                
                .sidebar-post-title {
                    flex: 2;
                    line-height: 1rem;
                }
            }
            
              &.sidebar-post-item--big {
                    @media (min-width: 1024px) {
                        &:hover {
                        .overlay-gradient::before {
                          opacity: var(--image-hover-opacity);
                        }
                    }
                    
                    .sidebar-post-thumbnail {
                        position: relative;
                        border-radius: var(--rounded-md);
                        overflow: hidden;
                        margin-bottom: var(--spacing-sm);
                        
                        
                        
                        img {
                            height: 155px;
                        }
                    }
                    
                    .sidebar-post-title {
                        position: absolute;
                        bottom: 0;
                        padding: var(--spacing-xl) var(--spacing-lg);
                        color: var(--color-text-inverted);
                        font-size: 1rem;
                        transition: color var(--transition-fast);
                        line-height: 1.25rem;
                        letter-spacing: 0.75px;
                    }
                    
                    .category-tag {
                        display: inline-block;
                        color: var(--color-text-inverted-hover);
                        margin-bottom: var(--spacing-sm);
                    }
                    }
                }
        }
        
        h3 {
            margin-bottom: var(--spacing-lg);
        }
        
        ul {
            display: flex;
            flex-direction: column;
        }
        
        li {
            padding-top: var(--spacing-md);
            
            &:not(:last-child) {
                border-bottom: 1px dotted var(--color-border);
                padding-bottom: var(--spacing-sm);
            }
            
            &:first-child {
              padding-top: 0;
            }
            
        }
        
    }
    
    .related-posts-section {
        margin-top: var(--spacing-xl);
        margin-bottom: var(--spacing-lg);
        
        h2 {
            margin-bottom: var(--spacing-lg);
        }
    }
    
    hr {
        margin-top: var(--spacing-xl);
    }
    .related-posts {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
        
        .related-post {
            &:hover {
                a {
                    color: var(--color-text) !important;
                }
                
                .related-post-thumbnail img {
                    opacity: var(--image-hover-opacity);
                }
            }
        }
        
        .related-post-thumbnail {
            width: 100%;
            aspect-ratio: 16 / 9;
            overflow: hidden;
            margin-bottom: var(--spacing-lg);
        }

        .related-post-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            aspect-ratio: 16 / 9;
            transition: opacity var(--transition-fast);
        }
        
        .related-post-title {
            display: block;
            margin-bottom: var(--spacing-lg);
            font-weight: 600;
            letter-spacing: 0.5px;
            line-height: 1.4rem;
        }
        
        .related-post-excerpt {
          line-height: 1.25rem;
        }
    }
    
    @media (max-width: 1024px) {
        flex-direction: column;
    }
    
    @media (max-width: 800px) {
        .related-posts {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 500px) {
        .related-posts {
            grid-template-columns: repeat(1, 1fr);
        }
    }
}

/* SPIS TREŚCI ############################################# */

.toc-container {
  margin-top: var(--spacing-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--rounded-sm);
  
}
.toc-checkbox { display: none; }
.toc-toggle-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  
  &:hover {
    .toc-icon {
      color: var(--color-text-hover);
    }
  }
}

.toc-icon {
  transition: color var(--transition-fast);
}

.toc-list {
  interpolate-size: allow-keywords;
  height: 0;
  overflow: hidden;
  transition: height var(--transition-default);
  border-top: none;
  padding-inline: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  
}
.toc-checkbox:checked ~ .toc-list {
    height: auto;
}
.toc-list ul { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin: 6px 0; }
.toc-list li.toc-level-3 { margin-left: 20px; font-size: 0.9em; }
.toc-list li a { color: #0073aa; text-decoration: none; }

/* PAGINATION PAGINACJA ############################################# */

.pagination {
    margin-top: 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    text-transform: uppercase;
    
    @media (max-width: 450px) {
      .page-numbers.prev, .page-numbers.next {
        display: none !important;
      }
    }
    
    .nav-links {
      display: flex;
      flex-wrap: wrap;
      gap: var(--spacing-sm);
        
        .page-numbers:not(.dots) {
            box-sizing: border-box;
            display: inline-grid;
            place-content: center;
            min-height: 30px;
            min-width: 30px;
            border: 1px solid var(--color-border);
            padding-inline: var(--spacing-md);
            border-radius: var(--rounded-sm);
            font-weight: 600;
            font-size: 12px;
            transition: background-color var(--transition-fast);
            
            &:hover {
                color: inherit;
                background-color: var(--color-primary-transparent);
            }
            
            &.current {
                border: none;
                background-color: var(--color-primary);
                color: var(--color-text-inverted);
            }
        }
        
    }
    
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-xl));
    
    .post {
        position: relative;
        display: flex;
        gap: var(--spacing-lg);
        
        .post-link {
            position: absolute;
            inset: 0;
            opacity: 0;
        }
        
        .post-category {
            margin-top: var(--spacing-xl);
            margin-bottom: var(--spacing-md);
        }
        
        .post-title {
            max-width: 500px;
            font-size: 1rem;
        }
        
        .post-thumbnail {
            img {
                aspect-ratio: 16/9;
                height: 150px;
                object-fit: cover;
            }
        }
    
    }
    
    @media (max-width: 750px) {
        gap: 50px;
        
        .post {
            flex-direction: column;
            gap: var(--spacing-md);
        
            .post-thumbnail img {
                width: 100%;
            }
        }
    }
}
