/* Deva Semantic Linker - front (promo banner + read-also) */

/* Shared debug bits (injected blocks + promo) */
.deva-debug {
  color: #c00;
  font-size: 12px;
}

.deva-debug-candidates {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed #c00;
  border-radius: 4px;
  background: #fff5f5;
  font-size: 11px;
  line-height: 1.45;
  color: #666;
}

.deva-debug-candidates__list {
  margin: 6px 0 0;
  padding-left: 1.1rem;
}

/* ---------- Offer promo ---------- */
.deva-promo {
  box-sizing: border-box;
  position: relative;
  margin: 2em 0;
  padding: 0;
  border-radius: 12px;
  background: #eff0f2;
  color: #000;
  overflow: hidden;
}

/*
 * Top-right corner: show one quarter of circle-check.svg (bottom-left quadrant of asset),
 * aligned so the arc/check intrudes from the card corner (img 2× wrapper width, clipped).
 */
.deva-promo__check-deco {
  display: block;
  position: absolute;
  z-index: 0;
  top: 0px;
  right: 0px;
  width: 320px;
  aspect-ratio: 416 / 333;
  overflow: hidden;
  pointer-events: none;
  line-height: 0;
}

.deva-promo__check-img {
  display: block;
  position: absolute;
  bottom: 0;
  left: -90px;
  width: 200%;
  height: auto;
  max-width: none;
}

.deva-promo__inner {
  position: relative;
  z-index: 1;
  padding: 2rem 2.25rem;
  text-align: left;
}

.deva-promo__title {
  margin: 0 0 10px !important;
  font-size: 32px !important;
  font-weight: 700;
  line-height: 1.28;
  color: #1a1a1a;
}

.deva-promo__text {
  font-size: 20px;
  line-height: 1.6;
  font-weight: 500;
  color: #000;
  margin-bottom: 20px;
}
.deva-promo__text strong,
.deva-promo__text b {
  font-weight: 700;
}

/* Highlight line (use <span class="new-fancy-heading">…</span> in offer copy) */
.new-fancy-heading {
  background-image: linear-gradient(#bdd6b8, #bdd6b8);
  background-repeat: no-repeat;
  background-size: 100% 0.55em;
  background-position: left bottom;
  display: inline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Offer debug - collapsible (same idea as read-also) */
.deva-promo__debug-wrap {
  margin-top: 1.25rem;
  padding: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #666;
}

.deva-promo__debug-wrap summary {
  cursor: pointer;
  color: #666;
  font-weight: 600;
}

.deva-promo__debug-wrap[open] summary {
  margin-bottom: 0.5rem;
}

.deva-promo__debug-meta {
  margin: 0 0 0.35rem;
}

.deva-promo__debug-body .deva-debug-candidates {
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .deva-promo__inner {
    padding: 1.5rem 1.2rem;
    max-width: none;
  }

  .deva-promo__check-deco {
    width: min(48vw, 168px);
  }
}

/* ---------- semCAST injected card (podcast block) ---------- */
.deva-semcast {
  box-sizing: border-box;
  margin: 3em 0;
  padding: 0;
  border-radius: 12px;
  background: #282c29;
  color: #fff;
  overflow: hidden;
}

.deva-semcast__layout {
  display: grid;
  grid-template-columns: minmax(660px, 1fr) minmax(200px, 38%);
  align-items: stretch;
}

.deva-semcast__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 1.75rem 2rem 2.25rem;
  text-align: left;
}

.deva-semcast__badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px 0 !important;
  padding: 0;
  font-size: 22px;
  font-weight: 700;
  color: #00722c;
}

.deva-semcast__mic-img {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.deva-semcast__title {
  margin: 0 0 10px 0 !important;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.post-content-deva .deva-semcast__title a {
  color: #fff !important;
  text-decoration: none;
  border-bottom: none !important;
}
.deva-semcast__title a:hover,
.deva-semcast__title a:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.deva-semcast__desc {
  margin: 0 0 13px 0 !important;
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  line-height: 1.55;
  font-weight: 400;
  color: #fff;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-content-deva .deva-semcast__desc a {
  color: #fff !important;
  border-bottom: none !important;
}

.deva-semcast__cta {
  margin-top: 4px !important;
}

.deva-semcast__media {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #282c29;
  overflow: hidden;
}

.deva-semcast__media-link {
  display: block;
  line-height: 0;
}

@media (min-width: 701px) {
  .deva-semcast__media-link {
    position: absolute;
    inset: 0;
  }
}

@media (max-width: 700px) {
  .deva-semcast__media-link {
    height: 100%;
  }
}

.deva-semcast__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.deva-semcast__img--placeholder {
  object-fit: contain;
  padding: 1.25rem;
  opacity: 0.9;
}

/* Portrait promo shot - framing inside wide crop */
.deva-semcast__img--mic {
  object-position: center;
}

.deva-semcast__debug-wrap {
  margin-top: 1.25rem;
  padding: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #a8a8a8;
}

.deva-semcast__debug-wrap summary {
  cursor: pointer;
  color: #a8a8a8;
  font-weight: 600;
}

.deva-semcast__debug-wrap[open] summary {
  margin-bottom: 0.5rem;
}

.deva-semcast__debug-meta {
  margin: 0 0 0.35rem;
}

.deva-semcast__debug-body .deva-debug-candidates {
  margin-top: 0.75rem;
}

@media (max-width: 700px) {
  .deva-semcast__layout {
    grid-template-columns: 1fr;
  }

  .deva-semcast__media {
    order: -1;
    height: clamp(11rem, 42vw, 220px);
  }

  .deva-semcast__content {
    padding: 1.5rem 1.25rem 1.75rem;
  }
}

/* ---------- Read also section ---------- */
.deva-read-also {
  box-sizing: border-box;
  margin: 3rem 0 2rem;
  padding: 0;
}

.deva-read-also__title-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.deva-read-also__accent {
  flex-shrink: 0;
  width: 4px;
  min-height: 100%;
  background: #00722c;
}

.deva-read-also__heading {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
}
.post-content-deva h2.deva-read-also__heading {
  margin-bottom: 0 !important;
}

.deva-read-also__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deva-read-also__grid > li {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.deva-read-also__debug-wrap {
  margin-top: 1.25rem;
  padding: 0.5rem 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #666;
}

.deva-read-also__debug-wrap summary {
  cursor: pointer;
  color: #666;
  font-weight: 600;
}

.deva-read-also__debug-wrap[open] summary {
  margin-bottom: 0.5rem;
}

.deva-read-also__debug-list {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

@media (max-width: 782px) {
  .deva-read-also__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Baza wiedzy section ---------- */
.deva-baza-wiedzy {
  box-sizing: border-box;
  margin: 3rem 0 2rem;
  padding: 0;
}

.deva-baza-wiedzy__title-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.deva-baza-wiedzy__accent {
  flex-shrink: 0;
  width: 4px;
  min-height: 100%;
  background: #00722c;
}

.deva-baza-wiedzy__heading {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.post-content-deva h2.deva-baza-wiedzy__heading {
  margin-bottom: 0 !important;
}

.deva-baza-wiedzy__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 24px);
  align-items: stretch;
}

.deva-baza-wiedzy__filar {
  min-width: 0;
}

.deva-baza-wiedzy__filar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  color: #fff;
}

.deva-baza-wiedzy__filar-card--theme {
  background: transparent;
  color: inherit;
}

.deva-baza-wiedzy__filar-card--theme .blog-redesign-post-card {
  position: relative;
  height: 100%;
  margin: 0;
}

.deva-baza-wiedzy__filar-media {
  display: block;
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  text-decoration: none;
}

.deva-baza-wiedzy__filar-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 35%,
    rgba(0, 0, 0, 0.78) 100%
  );
  pointer-events: none;
}

.deva-baza-wiedzy__filar-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.deva-baza-wiedzy__badge {
  position: absolute;
  z-index: 10;
  top: 1rem;
  left: 1rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: #00722c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.deva-baza-wiedzy__filar-body {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.25rem 1.5rem 1.5rem;
}

.deva-baza-wiedzy__filar-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
}

.deva-baza-wiedzy__filar-title a {
  color: #fff;
  text-decoration: none;
}

.deva-baza-wiedzy__filar-title a:hover {
  text-decoration: underline;
}

.deva-baza-wiedzy__filar-title a::after {
  content: '';
  position: absolute;
  top: -9999px;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

.deva-baza-wiedzy__filar-excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.deva-baza-wiedzy__related {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deva-baza-wiedzy__related > li {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.deva-baza-wiedzy__related-card {
  position: relative;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.deva-baza-wiedzy__related-card--theme {
  padding: 0;
  background: transparent;
  /* karta motywu unosi się na hover - wrapper nie może jej przycinać */
  overflow: visible;
}

.deva-baza-wiedzy__related-card--theme .blog-redesign-post-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.deva-baza-wiedzy__related-card--theme .blog-redesign-post-card-thumb-wrap {
  flex: 1 0 160px;
  width: 160px;
  max-width: 160px;
  align-self: stretch;
}

.deva-baza-wiedzy__related-card--theme .blog-redesign-post-card-thumb,
.deva-baza-wiedzy__related-card--theme .blog-redesign-post-card-thumb--empty {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 0;
}

h3.blog-redesign-post-card-title.blog-redesign-post-card-title--category-lead
  a {
  font-size: 28px;
  line-height: 32px;
  letter-spacing: -1.4px;
  font-weight: 700;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.deva-baza-wiedzy__related-card--theme .blog-redesign-post-card-img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.deva-baza-wiedzy__related-card--theme .blog-redesign-post-card-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 16px 18px;
}

.deva-baza-wiedzy__related-thumb {
  flex-shrink: 0;
  display: block;
  width: 88px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
}

.deva-baza-wiedzy__related-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deva-baza-wiedzy__related-body {
  flex: 1 1 auto;
  min-width: 0;
}

.deva-baza-wiedzy__related-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.deva-baza-wiedzy__related-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.deva-baza-wiedzy__related-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.deva-baza-wiedzy__related-title a:hover {
  text-decoration: underline;
}

.deva-baza-wiedzy__related-meta {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #6b6b6b;
}

.deva-baza-wiedzy__debug-wrap {
  margin-top: 1.25rem;
  padding: 0.5rem 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #666;
}

.deva-baza-wiedzy__debug-wrap summary {
  cursor: pointer;
  font-weight: 600;
}

.deva-baza-wiedzy__debug-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  list-style: disc;
}

@media (max-width: 900px) {
  .deva-baza-wiedzy__grid {
    grid-template-columns: 1fr;
  }
}
