.r-dtr-mf {
  --r-dtr-mf-columns: 2;
  --r-dtr-mf-gap: 12px;
  --r-dtr-mf-scale: 1.12;
  display: flex;
  flex-direction: column;
  gap: var(--r-dtr-mf-gap);
  padding: calc(var(--r-dtr-mf-top-spacer, 16px) + 10px) 0 16px;
  position: relative;
}

.r-dtr-mf__row {
  display: grid;
  grid-template-columns: repeat(var(--r-dtr-mf-columns), minmax(0, 1fr));
  gap: var(--r-dtr-mf-gap);
  transition: transform .26s ease, opacity .26s ease, filter .26s ease;
  transform-origin: center top;
  position: relative;
  z-index: 1;
}

.r-dtr-mf__row.is-dim {
  opacity: .68;
  filter: saturate(.96);
}

.r-dtr-mf__row.is-active {
  transform: scale(var(--r-dtr-mf-scale));
  z-index: 3;
}

.r-dtr-mf__row.is-active .r-dtr-mf__card,
.r-dtr-mf__row.is-active .r-dtr-mf__ad-slot,
.r-dtr-mf__row.is-active .r-dtr-mf__card--ad {
  box-shadow: 0 14px 36px rgba(10, 20, 40, 0.20);
  filter: saturate(1.05);
  opacity: 1;
}


.r-dtr-mf__card {
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(10, 20, 40, 0.08);
  transition: transform .26s ease, opacity .26s ease, box-shadow .26s ease, filter .26s ease;
  transform-origin: center top;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.r-dtr-mf__ad-slot {
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(10, 20, 40, 0.08);
  position: relative;
  z-index: 1;
  min-height: 220px;
}

.r-dtr-mf__ad-slot .r-dtr-mf__ad-wrap {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.r-dtr-mf__ad-loading {
  color: #6b7280;
  font-size: 13px;
  text-align: center;
  padding: 18px;
}

.r-dtr-mf__media {
  aspect-ratio: 16 / 10;
  background: #d9dde5;
  overflow: hidden;
}

.r-dtr-mf__image,
.r-dtr-mf__placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.r-dtr-mf__placeholder {
  background: linear-gradient(135deg, #d9dde5 0%, #eef2f6 100%);
}

.r-dtr-mf__title {
  margin: 0;
  padding: 14px 16px 18px;
  font-size: 14px;
  line-height: 1.24;
  font-weight: 800;
  color: #101828;
}

.r-dtr-mf__sentinel {
  height: 1px;
}

.r-dtr-mf__loader {
  text-align: center;
  padding: 10px 0 4px;
  color: #6b7280;
  font-size: 13px;
}

.r-dtr-mf__overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.84);
  z-index: 99999;
  overflow-y: auto;
  padding: 18px 12px 30px;
}

.r-dtr-mf__overlay-box {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 18px 20px;
  max-width: 680px;
  margin: 0 auto;
}

.r-dtr-mf__overlay-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: #eef2f7;
  color: #101828;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
}

.r-dtr-mf__overlay-title {
  margin: 12px 0 10px;
  font-size: 24px;
  line-height: 1.12;
  font-weight: 800;
  color: #101828;
}

.r-dtr-mf__overlay-excerpt {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.55;
  color: #334155;
}

.r-dtr-mf__overlay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: #0f6fec;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 768px) {
  .r-dtr-mf {
    margin: 0 auto;
  }
}


.r-dtr-mf__card--ad {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.r-dtr-mf__ad-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 12px 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 111, 236, 0.10);
  color: #0f6fec;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.r-dtr-mf__ad-wrap {
  padding: 12px;
}

.r-dtr-mf__card--ad .g,
.r-dtr-mf__card--ad .g img,
.r-dtr-mf__card--ad img {
  max-width: 100%;
  height: auto;
}

.r-dtr-mf__ad-slot,
.r-dtr-mf__card--ad {
  min-height: 260px;
}

.r-dtr-mf__ad-slot {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.r-dtr-mf__ad-loading {
  width: 100%;
  min-height: 190px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eef2f7 25%, #dfe7f1 50%, #eef2f7 75%);
  background-size: 220% 100%;
  color: transparent;
  animation: rDtrMfShimmer 1.6s linear infinite;
}

@keyframes rDtrMfShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -20% 0; }
}

.r-dtr-mf__card--ad {
  opacity: 0;
  transition: transform .26s ease, opacity .28s ease, box-shadow .26s ease, filter .26s ease;
  transform-origin: center center;
  will-change: transform, opacity;
}

.r-dtr-mf__card--ad.is-loaded {
  opacity: 1;
}


.r-dtr-mf__overlay {
  opacity: 0;
  transition: opacity .22s ease;
}

.r-dtr-mf__overlay.is-visible {
  opacity: 1;
}

.r-dtr-mf__overlay-box {
  transform: translateY(10px) scale(.985);
  transition: transform .22s ease;
}

.r-dtr-mf__overlay.is-visible .r-dtr-mf__overlay-box {
  transform: translateY(0) scale(1);
}

.r-dtr-mf__overlay--fullscreen {
  padding: 0;
  background: rgba(5, 10, 20, 0.92);
}

.r-dtr-mf__overlay-box--fullscreen {
  min-height: 100vh;
  max-width: none;
  border-radius: 0;
  padding: 0 0 30px;
  background: #fff;
}

.r-dtr-mf__overlay-media {
  aspect-ratio: 16 / 10;
  background: #d9dde5;
  overflow: hidden;
}

.r-dtr-mf__overlay-media img,
.r-dtr-mf__overlay-media .r-dtr-mf__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.r-dtr-mf__overlay-body {
  padding: 14px 18px 0;
}

.r-dtr-mf__overlay-box--fullscreen .r-dtr-mf__overlay-close {
  position: sticky;
  top: 14px;
  left: 14px;
  z-index: 2;
  margin: 14px 0 0 14px;
}


.r-dtr-mf__card.is-pressed {
  transform: scale(calc(var(--r-dtr-mf-scale) + 0.03));
  z-index: 5;
}

.r-dtr-mf__overlay--fullscreen .r-dtr-mf__overlay-box--fullscreen {
  animation: rDtrMfFullIn .24s ease both;
}

@keyframes rDtrMfFullIn {
  from { transform: translateY(18px) scale(.98); opacity: .88; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}


.r-dtr-mf__card.is-pressed {
  transform: scale(0.98);
}

.r-dtr-mf__overlay--fullscreen {
  padding: 0;
}

.r-dtr-mf__overlay-box--fullscreen {
  min-height: 100dvh;
  max-width: none;
  border-radius: 0;
  padding: 12px 12px 20px;
}

.r-dtr-mf__overlay-media {
  overflow: hidden;
  border-radius: 18px;
  margin: 0 0 14px;
}

.r-dtr-mf__overlay-media .r-dtr-mf__image,
.r-dtr-mf__overlay-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.r-dtr-mf__overlay-body {
  padding: 4px 2px 0;
}

.r-dtr-mf__overlay.is-visible {
  opacity: 1;
}


/* v1.6.0 — telefon/tablet bez ruszania desktopu */
@media (min-width: 1181px) {
  .r-dtr-mf {
    display: none !important;
  }
}

/* Pauza reklamowa: AdSense/AdRotate jako własny rząd, nie jako zwykły kafelek */
.r-dtr-mf__row--ad {
  grid-template-columns: 1fr !important;
  transform: none !important;
}

.r-dtr-mf__row--ad.is-active {
  transform: none !important;
}

.r-dtr-mf__ad-slot--pause,
.r-dtr-mf__card--ad-pause {
  width: 100%;
  min-height: 280px;
  border-radius: 22px;
}

.r-dtr-mf__card--ad-pause {
  cursor: default;
}

.r-dtr-mf__ad-slot--pause .r-dtr-mf__ad-wrap,
.r-dtr-mf__card--ad-pause .r-dtr-mf__ad-wrap {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.r-dtr-mf__ad-wrap ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
  min-height: 250px;
}

.r-dtr-mf__ad-wrap iframe {
  max-width: 100% !important;
}

@media (min-width: 769px) and (max-width: 1180px) {
  .r-dtr-mf {
    --r-dtr-mf-gap: 14px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .r-dtr-mf__title {
    font-size: 15px;
  }
}

/* Archive/category integration fix v1.6.2 */
body.archive .site-content .content-area .site-main > .r-dtr-mf,
body.archive .site-content .content-area .site-main > .ast-row > .r-dtr-mf,
body.blog .site-content .content-area .site-main > .r-dtr-mf,
body.blog .site-content .content-area .site-main > .ast-row > .r-dtr-mf {
  width: 100% !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
  clear: both !important;
}
