/*
Theme Name: Kadence Child
Template: kadence
Version: 1.0.0
Text Domain: kadence-child
*/

.ks-podborka-page {
  padding-top: 24px;
  padding-right: 40px;
  padding-bottom: 40px;
  padding-left: 40px;
}

.ks-podborka-page .content-wrap {
  max-width: none;
  width: 100%;
  padding: 0 !important;
}

.ks-podborka-page__article {
  max-width: none;
  width: 100%;
  margin: 0;
}

.ks-podborka-page__header {
  margin-bottom: 24px;
}

.ks-podborka-page__title {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 700;
}

.ks-podborka-page__excerpt,
.ks-podborka-page__content {
  max-width: 920px;
  font-size: 16px;
  line-height: 1.6;
  color: #2b2b2b;
}

.ks-podborka-page__excerpt > *:last-child,
.ks-podborka-page__content > *:last-child {
  margin-bottom: 0;
}

.ks-podborka-page__empty {
  padding: 24px 0;
  font-size: 16px;
  color: #444;
}

.ks-otkrytki-listing {
  column-count: 6;
  column-gap: 20px;
}

.ks-otkrytki-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 18px;
  background: #f5f5f5;
}

.ks-otkrytki-card__image-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.ks-otkrytki-card__image {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 0.18s ease;
  will-change: transform;
}

.ks-otkrytki-card:hover .ks-otkrytki-card__image,
.ks-otkrytki-card:focus-within .ks-otkrytki-card__image {
  transform: scale(1.035);
}

.ks-otkrytki-card__download {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  bottom: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #2b2b2b;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.ks-otkrytki-card:hover .ks-otkrytki-card__download,
.ks-otkrytki-card:focus-within .ks-otkrytki-card__download {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ks-otkrytki-card__download:hover {
  background: rgba(255, 255, 255, 0.8);
}

.ks-otkrytki-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 110px;
  box-sizing: border-box;
  z-index: 999999;
}

.ks-otkrytki-lightbox.ks-open {
  display: flex;
}

.ks-otkrytki-lightbox-inner {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
}

.ks-otkrytki-lightbox img {
  display: block;
  max-width: 95vw;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.ks-otkrytki-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  line-height: 36px;
  text-align: center;
  background: #fff;
  color: #000;
  padding: 0;
}

body.ks-otkrytki-no-scroll {
  overflow: hidden;
}

.ks-popup-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000001;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  font-size: 28px;
  line-height: 48px;
  text-align: center;
  cursor: pointer;
  display: none;
  padding: 0;
}

.ks-popup-nav.ks-open {
  display: block;
}

.ks-popup-prev {
  left: 16px;
}

.ks-popup-next {
  right: 16px;
}

.ks-popup-actions-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 1000001;
  display: none;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: calc(100vw - 24px);
  max-width: 560px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(20, 20, 20, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.ks-popup-actions-bar.ks-open {
  display: flex;
}

.ks-popup-actions-bar a,
.ks-popup-actions-bar button {
  appearance: none;
  border: 0;
  background: #fff;
  color: #000;
  padding: 10px 14px;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.ks-popup-actions-note {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 1000002;
  display: none;
  max-width: min(90vw, 420px);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  text-align: center;
  font-size: 14px;
}

.ks-popup-actions-note.ks-show {
  display: block;
}

@media (max-width: 1279px) {
  .ks-otkrytki-listing {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  .ks-podborka-page {
    padding-top: 18px;
    padding-right: 20px;
    padding-bottom: 28px;
    padding-left: 20px;
  }

  .ks-otkrytki-listing {
    column-count: 2;
    column-gap: 16px;
  }

  .ks-otkrytki-card {
    margin-bottom: 16px;
    border-radius: 14px;
  }

  .ks-otkrytki-card__download {
    top: 10px;
    right: 10px;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .ks-otkrytki-lightbox {
    padding-bottom: 90px;
  }

  .ks-otkrytki-lightbox img {
    max-height: calc(100vh - 130px);
  }

  .ks-popup-nav {
    width: 42px;
    height: 42px;
    line-height: 42px;
    font-size: 24px;
  }

  .ks-popup-prev {
    left: 8px;
  }

  .ks-popup-next {
    right: 8px;
  }

  .ks-popup-actions-bar {
    bottom: 10px;
    gap: 8px;
    padding: 8px;
  }

  .ks-popup-actions-bar a,
  .ks-popup-actions-bar button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    font-size: 14px;
  }

  .ks-popup-actions-note {
    bottom: 74px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .ks-podborka-page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ks-podborka-page__title {
    margin-bottom: 12px;
  }

  .ks-otkrytki-listing {
    column-count: 2;
    column-gap: 12px;
  }

  .ks-otkrytki-card {
    margin-bottom: 14px;
  }
}

.ks-search-page {
  padding: 24px 40px 40px;
}

.ks-search-page .content-wrap {
  max-width: none;
  width: 100%;
  padding: 0 !important;
}

.ks-search-page__header {
  margin-bottom: 20px;
}

.ks-search-page__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  font-weight: 700;
}

.ks-search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  gap: 20px;
}

.ks-search-card {
  padding: 22px;
  border-radius: 16px;
  background: #f4f4f6;
}

.ks-search-card__title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
}

.ks-search-card__title a {
  color: inherit;
  text-decoration: none;
}

.ks-search-card__title a:hover {
  text-decoration: underline;
}


.ks-search-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2430;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.ks-search-card__link:hover {
  background: #fff;
}

.ks-search-empty {
  font-size: 16px;
  color: #2f3441;
}

@media (max-width: 900px) {
  .ks-search-page {
    padding: 20px;
  }

  .ks-search-results {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ks-search-card {
    padding: 18px;
    border-radius: 14px;
  }

  .ks-search-card__title {
    font-size: 20px;
  }
}

@media (max-width: 560px) {
  .ks-search-page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ks-search-card {
    padding: 16px;
  }

  .ks-search-card__title {
    font-size: 18px;
  }

  .ks-search-card__excerpt {
    font-size: 13px;
  }
}

.ks-search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  gap: 20px;
}

.ks-search-card {
  overflow: hidden;
  border-radius: 16px;
  background: #f4f4f6;
}

.ks-search-card__image-link {
  display: block;
  text-decoration: none;
}

.ks-search-card__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.ks-search-card__body {
  padding: 18px;
}

.ks-search-card__title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
}

.ks-search-card__title a {
  color: inherit;
  text-decoration: none;
}

.ks-search-card__title a:hover {
  text-decoration: underline;
}

.ks-search-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2430;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.ks-search-card__link:hover {
  background: #fff;
}

.ks-header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 210px;
  max-width: 100%;
}

.ks-header-search__input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 14px;
  border: 1px solid #d7d7dd;
  border-radius: 4px;
  background: #f7f7f9;
  color: #1f2430;
  font-size: 14px;
  line-height: 1;
  outline: none;
  box-shadow: none;
}

.ks-header-search__button,
.ks-header-search__button:hover,
.ks-header-search__button:focus,
.ks-header-search__button:active {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #a8acb6;
  cursor: pointer;
  transform: translateY(-50%);
}

.ks-header-search__button svg {
  display: block;
  width: 16px;
  height: 16px;
}

.ks-header-search__input::-webkit-search-decoration,
.ks-header-search__input::-webkit-search-cancel-button,
.ks-header-search__input::-webkit-search-results-button,
.ks-header-search__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.ks-header-search__input::-ms-clear,
.ks-header-search__input::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.ks-podborka-page{
  padding-top: 8px;
}

.ks-podborka-page__header{
  margin-bottom: 18px;
}

.ks-podborka-page__title{
  margin: 0 0 14px;
  text-align: center;
  font-family: "Lora", serif;
  font-weight: 500;
  font-size: clamp(34px, 4vw, 51px);
  line-height: 1.02;
  color: #4d4849;
}

.ks-podborka-page__hero-subtitle{
  max-width: 820px;
  margin: 0 auto 18px;
  text-align: center;
  font-family: "Inter Tight", sans-serif;
  font-weight: 400;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 0.93;
  color: #707070;
}

.ks-podborka-page__hero-benefits{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-podborka-page__hero-benefit{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.28px solid #e6e6e6;
  border-radius: 34px;
  box-shadow: 0 3.85px 7.96px -2.57px rgba(0, 0, 0, 0.12);
  font-family: "Inter Tight", sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 1.5vw, 20.55px);
  line-height: 0.93;
  color: #707070;
  white-space: nowrap;
}

.ks-podborka-page__hero-benefit-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.ks-podborka-page__hero-benefit-icon img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 1024px){
  .ks-podborka-page{
    padding-top: 14px;
  }

  .ks-podborka-page__header{
    margin-bottom: 20px;
  }

  .ks-podborka-page__hero-subtitle{
    max-width: 680px;
    margin-bottom: 16px;
    line-height: 1.15;
  }

  .ks-podborka-page__hero-benefits{
    gap: 10px 12px;
  }

  .ks-podborka-page__hero-benefit{
    min-height: 42px;
    padding: 10px 14px;
    font-size: 16px;
  }

  .ks-podborka-page__hero-benefit-icon{
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }
}

@media (max-width: 767px){
  .ks-podborka-page{
    padding-top: 12px;
  }

  .ks-podborka-page__title{
    margin-bottom: 12px;
  }

  .ks-podborka-page__hero-subtitle{
    max-width: 100%;
    margin-bottom: 14px;
    font-size: 16px;
    line-height: 1.2;
  }

  .ks-podborka-page__hero-benefits{
    justify-content: flex-start;
  }

  .ks-podborka-page__hero-benefit{
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }
}



/* HERO SUBTITLE HARD OVERRIDE */
.site-main.ks-podborka-page .ks-podborka-page__header.ks-podborka-page__hero{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-top: 40px !important;
  margin-bottom: 24px !important;
  padding-top: 0 !important;
}

.site-main.ks-podborka-page .ks-podborka-page__hero-subtitle{
  display: inline-block !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 auto 22px !important;
  text-align: center !important;
  font-family: "Inter Tight", sans-serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-size: 25px !important;
  line-height: 0.9308 !important;
  color: #707070 !important;
  white-space: nowrap !important;
}

@media (max-width: 1279px){
  .site-main.ks-podborka-page .ks-podborka-page__hero-subtitle{
    width: auto !important;
    max-width: 680px !important;
    font-size: clamp(18px, 2.4vw, 23px) !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }
}

@media (max-width: 767px){
  .site-main.ks-podborka-page .ks-podborka-page__header.ks-podborka-page__hero{
    margin-top: 18px !important;
    margin-bottom: 18px !important;
  }

  .site-main.ks-podborka-page .ks-podborka-page__hero-subtitle{
    width: auto !important;
    max-width: 100% !important;
    margin-bottom: 16px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }
}

.site-main.ks-podborka-page .ks-podborka-page__hero-subtitle{
  margin-bottom: 0 !important;
}

.site-main.ks-podborka-page .ks-podborka-page__hero-benefits{
  margin-top: 22px !important;
}
