@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700;800&display=swap');

:root {
  --cs-blue: #25445a;
  --cs-blue-light: #2f6f8f;
  --cs-cream: #f3eadc;
  --cs-white: #ffffff;
  --cs-black: #111111;
  --cs-muted: #746f5f;
  --cs-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  --cs-shadow-hover: 0 22px 48px rgba(0, 0, 0, 0.14);
}

/* IBA BLOG */
body.type-posts-listing {
  font-family: "Ubuntu", Arial, sans-serif !important;
}

/* Hlavný kontajner */
body.type-posts-listing .content-wrapper-in,
body.type-posts-listing .content-inner,
body.type-posts-listing #content,
body.type-posts-listing .content {
  max-width: 1430px !important;
  width: calc(100% - 80px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Breadcrumb necháme menší */
body.type-posts-listing .breadcrumbs {
  margin-bottom: 18px !important;
}

/* Nadpis Blog */
body.type-posts-listing h1 {
  margin: 24px 0 12px !important;
  color: var(--cs-black) !important;
  font-family: "Ubuntu", Arial, sans-serif !important;
  font-size: 38px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  letter-spacing: -0.8px !important;
  text-align: center !important;
}

/* Nadpis Výpis článkov */
body.type-posts-listing h4 {
  margin: 0 0 28px !important;
  color: var(--cs-black) !important;
  font-family: "Ubuntu", Arial, sans-serif !important;
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: -0.7px !important;
  text-align: center !important;
}

/* Mriežka článkov ako v návrhu */
body.type-posts-listing .news-wrapper {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  clear: both !important;
}

/* Zrušenie Shoptet floatov */
body.type-posts-listing .news-wrapper::before,
body.type-posts-listing .news-wrapper::after {
  display: none !important;
  content: none !important;
}

/* Základná karta */
body.type-posts-listing .news-wrapper .news-item {
  grid-column: span 4 !important;
  display: flex !important;
  flex-direction: column !important;
  float: none !important;
  clear: none !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--cs-cream) !important;
  border-radius: 26px !important;
  background: var(--cs-white) !important;
  box-shadow: var(--cs-shadow) !important;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease !important;
}

/* Hover */
body.type-posts-listing .news-wrapper .news-item:hover {
  transform: translateY(-6px) !important;
  border-color: var(--cs-cream) !important;
  box-shadow: var(--cs-shadow-hover) !important;
}

/* Prvý článok veľký ako v tvojej ukážke */
body.type-posts-listing .news-wrapper .news-item:first-child {
  grid-column: span 8 !important;
  display: grid !important;
  grid-template-columns: 1fr 0.92fr !important;
  flex-direction: initial !important;
}

/* Obrázková časť */
body.type-posts-listing .news-wrapper .news-item .image {
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
  width: 100% !important;
  height: 286px !important;
  min-height: 286px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--cs-cream) !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* Obrázok prvého veľkého článku */
body.type-posts-listing .news-wrapper .news-item:first-child .image {
  height: 100% !important;
  min-height: 430px !important;
}

/* Obrázky */
body.type-posts-listing .news-wrapper .news-item .image img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transition: transform 0.5s ease !important;
}

body.type-posts-listing .news-wrapper .news-item:hover .image img {
  transform: scale(1.05) !important;
}

/* Badge na obrázku */
body.type-posts-listing .news-wrapper .news-item .image::after {
  content: "Blog";
  position: absolute !important;
  top: 18px !important;
  left: 18px !important;
  z-index: 3 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 28px !important;
  padding: 1px 10px 0 !important;
  border-radius: 999px !important;
  border: 1px solid var(--cs-cream) !important;
  background: var(--cs-cream) !important;
  color: var(--cs-blue) !important;
  font-family: "Ubuntu", Arial, sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px !important;
  font-size: 10px !important;
  line-height: normal !important;
  font-weight: 800 !important;
}

/* Textová časť */
body.type-posts-listing .news-wrapper .news-item .text {
  display: flex !important;
  flex-direction: column !important;
  min-height: 260px !important;
  padding: 24px !important;
  background: var(--cs-white) !important;
}

/* Text prvého článku */
body.type-posts-listing .news-wrapper .news-item:first-child .text {
  min-height: 430px !important;
  justify-content: center !important;
  padding: 34px !important;
}

/* Názov článku */
body.type-posts-listing .news-wrapper .news-item .title {
  order: 2 !important;
  display: block !important;
  margin: 0 0 11px !important;
  padding: 0 !important;
  color: var(--cs-blue) !important;
  font-family: "Ubuntu", Arial, sans-serif !important;
  font-size: 23px !important;
  line-height: 1.08 !important;
  font-weight: 800 !important;
  letter-spacing: -0.45px !important;
  text-decoration: none !important;
}

body.type-posts-listing .news-wrapper .news-item:first-child .title {
  font-size: 34px !important;
  letter-spacing: -0.9px !important;
}

/* Dátum */
body.type-posts-listing .news-wrapper .news-item .date {
  order: 1 !important;
  display: block !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  color: var(--cs-blue-light) !important;
  font-family: "Ubuntu", Arial, sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

/* Popis */
body.type-posts-listing .news-wrapper .news-item .description {
  order: 3 !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  color: var(--cs-muted) !important;
  font-family: "Ubuntu", Arial, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
}

body.type-posts-listing .news-wrapper .news-item .description p {
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Vizuálne tlačidlo */
body.type-posts-listing .news-wrapper .news-item .text::after {
  content: "Čítať článok";
  order: 4 !important;
  display: inline-flex !important;
  width: fit-content !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  margin-top: auto !important;
  padding: 1px 15px 0 !important;
  border-radius: 999px !important;
  border: 1px solid var(--cs-blue-light) !important;
  background: transparent !important;
  color: var(--cs-blue-light) !important;
  font-family: "Ubuntu", Arial, sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px !important;
  font-size: 10px !important;
  line-height: normal !important;
  font-weight: 800 !important;
  transition: 0.25s ease !important;
  pointer-events: none !important;
}

body.type-posts-listing .news-wrapper .news-item:hover .text::after {
  background: var(--cs-blue-light) !important;
  color: var(--cs-white) !important;
  transform: translateY(-2px) !important;
}

/* Stránkovanie */
body.type-posts-listing .pagination-wrapper,
body.type-posts-listing .pagination,
body.type-posts-listing .paginator {
  display: flex !important;
  justify-content: center !important;
  margin-top: 34px !important;
}

/* Tablet */
@media (max-width: 991px) {
  body.type-posts-listing .content-wrapper-in,
  body.type-posts-listing .content-inner,
  body.type-posts-listing #content,
  body.type-posts-listing .content {
    width: calc(100% - 32px) !important;
    max-width: 760px !important;
  }

  body.type-posts-listing h1 {
    font-size: 32px !important;
  }

  body.type-posts-listing h4 {
    font-size: 30px !important;
    margin-bottom: 22px !important;
  }

  body.type-posts-listing .news-wrapper {
    gap: 16px !important;
  }

  body.type-posts-listing .news-wrapper .news-item,
  body.type-posts-listing .news-wrapper .news-item:first-child {
    grid-column: span 6 !important;
  }

  body.type-posts-listing .news-wrapper .news-item:first-child {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
  }

  body.type-posts-listing .news-wrapper .news-item:first-child .image {
    height: 330px !important;
    min-height: 330px !important;
  }

  body.type-posts-listing .news-wrapper .news-item:first-child .text {
    min-height: auto !important;
    justify-content: flex-start !important;
    padding: 26px !important;
  }

  body.type-posts-listing .news-wrapper .news-item:first-child .title {
    font-size: 28px !important;
  }
}

/* Mobil */
@media (max-width: 620px) {
  body.type-posts-listing .content-wrapper-in,
  body.type-posts-listing .content-inner,
  body.type-posts-listing #content,
  body.type-posts-listing .content {
    width: calc(100% - 24px) !important;
  }

  body.type-posts-listing .news-wrapper .news-item,
  body.type-posts-listing .news-wrapper .news-item:first-child {
    grid-column: span 12 !important;
  }
}

@media (max-width: 520px) {
  body.type-posts-listing h1 {
    font-size: 30px !important;
  }

  body.type-posts-listing h4 {
    font-size: 27px !important;
  }

  body.type-posts-listing .news-wrapper {
    gap: 14px !important;
  }

  body.type-posts-listing .news-wrapper .news-item,
  body.type-posts-listing .news-wrapper .news-item:first-child,
  body.type-posts-listing .news-wrapper .news-item .image {
    border-radius: 20px !important;
  }

  body.type-posts-listing .news-wrapper .news-item .image,
  body.type-posts-listing .news-wrapper .news-item:first-child .image {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3 !important;
    border-radius: 20px 20px 0 0 !important;
  }

  body.type-posts-listing .news-wrapper .news-item .text,
  body.type-posts-listing .news-wrapper .news-item:first-child .text {
    min-height: auto !important;
    padding: 18px !important;
  }

  body.type-posts-listing .news-wrapper .news-item .title,
  body.type-posts-listing .news-wrapper .news-item:first-child .title {
    font-size: 22px !important;
    letter-spacing: -0.45px !important;
  }

  body.type-posts-listing .news-wrapper .news-item .description {
    font-size: 12px !important;
    line-height: 1.42 !important;
  }

  body.type-posts-listing .news-wrapper .news-item .text::after {
    margin-top: 18px !important;
  }
}

@media (max-width: 370px) {
  body.type-posts-listing .news-wrapper .news-item .title,
  body.type-posts-listing .news-wrapper .news-item:first-child .title {
    font-size: 20px !important;
  }

  body.type-posts-listing .news-wrapper .news-item .description {
    font-size: 11px !important;
  }
}
/* Oprava textu tlacidla - unicode zapis, aby sa nerozbili znaky */
body.type-posts-listing .news-wrapper .news-item .text::after {
  content: "\010C\00EDta\0165\0020\010Dl\00E1nok" !important;
}

/* Zmena nadpisu Blog na Crazystep novinky */
body.type-posts-listing h1 {
  font-size: 0 !important;
  line-height: 1 !important;
}

body.type-posts-listing h1::after {
  content: "Crazystep novinky";
  display: block;
  color: var(--cs-black) !important;
  font-family: "Ubuntu", Arial, sans-serif !important;
  font-size: 38px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  letter-spacing: -0.8px !important;
  text-align: center !important;
}

/* Viac priestoru pre text v nahlade clanku */
body.type-posts-listing .news-wrapper .news-item .text {
  min-height: 310px !important;
}

body.type-posts-listing .news-wrapper .news-item:first-child .text {
  min-height: 430px !important;
}

/* Popis clanku - nech sa nezalamuje iba na prve slovo a nech nie je orezany */
body.type-posts-listing .news-wrapper .news-item .description {
  display: block !important;
  width: 100% !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: initial !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

body.type-posts-listing .news-wrapper .news-item .description p {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
}

/* Mobilna velkost noveho nadpisu */
@media (max-width: 991px) {
  body.type-posts-listing h1::after {
    font-size: 32px !important;
  }
}

@media (max-width: 520px) {
  body.type-posts-listing h1::after {
    font-size: 30px !important;
  }

  body.type-posts-listing .news-wrapper .news-item .text {
    min-height: auto !important;
  }
}
/* Dlhsi text v nahlade clanku */
body.type-posts-listing .news-wrapper .news-item .description {
  display: block !important;
  width: 100% !important;
  max-height: none !important;
  height: auto !important;
  min-height: 64px !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: initial !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

/* Viac priestoru v karte */
body.type-posts-listing .news-wrapper .news-item .text {
  min-height: 330px !important;
}

/* Na mobile nech karty zbytocne nenatahujeme */
@media (max-width: 620px) {
  body.type-posts-listing .news-wrapper .news-item .text {
    min-height: auto !important;
  }
}
/* Mensia vyska kariet, ked Shoptet posiela kratky perex */
body.type-posts-listing .news-wrapper .news-item .text {
  min-height: 235px !important;
}

body.type-posts-listing .news-wrapper .news-item:first-child .text {
  min-height: 430px !important;
}

/* Popis nech je pekne citatelny, ak Shoptet neskor posle dlhsi perex */
body.type-posts-listing .news-wrapper .news-item .description {
  min-height: 42px !important;
  white-space: normal !important;
  overflow: visible !important;
  max-height: none !important;
}
/* FIX: prvy velky blogovy box */
body.type-posts-listing .news-wrapper .news-item:first-child {
  grid-column: span 8 !important;
  display: grid !important;
  grid-template-columns: 1fr 0.92fr !important;
  align-items: stretch !important;
}

body.type-posts-listing .news-wrapper .news-item:first-child .image {
  height: 100% !important;
  min-height: 430px !important;
}

body.type-posts-listing .news-wrapper .news-item:first-child .image img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.type-posts-listing .news-wrapper .news-item:first-child .text {
  min-height: 430px !important;
  justify-content: center !important;
  padding: 34px !important;
}

body.type-posts-listing .news-wrapper .news-item:first-child .title {
  font-size: 34px !important;
  line-height: 1.08 !important;
  letter-spacing: -0.9px !important;
}

/* Tablet - prvy box uz nebude siroky */
@media (max-width: 991px) {
  body.type-posts-listing .news-wrapper .news-item:first-child {
    grid-column: span 6 !important;
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
  }

  body.type-posts-listing .news-wrapper .news-item:first-child .image {
    height: 330px !important;
    min-height: 330px !important;
  }

  body.type-posts-listing .news-wrapper .news-item:first-child .text {
    min-height: auto !important;
    justify-content: flex-start !important;
    padding: 26px !important;
  }

  body.type-posts-listing .news-wrapper .news-item:first-child .title {
    font-size: 28px !important;
  }
}

/* Mobil */
@media (max-width: 620px) {
  body.type-posts-listing .news-wrapper .news-item:first-child {
    grid-column: span 12 !important;
  }
}