.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;
}


/* v1.6.9 — Mobile Slots API */
.r-dtr-mf__row--slot {
  grid-template-columns: 1fr !important;
  transform: none !important;
}

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

.r-dtr-mf__slot {
  width: 100%;
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(10, 20, 40, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.r-dtr-mf__slot-title {
  padding: 12px 14px 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
  color: #101828;
  letter-spacing: .02em;
}

.r-dtr-mf__slot-content {
  padding: 10px 12px 12px;
}

.r-dtr-mf__slot-content .rdtr-local-nav-wrap {
  margin: 0;
}

.r-dtr-mf__slot-content .rdtr-local-nav-title {
  display: none;
}

.r-dtr-mf__slot-content .rdtr-local-nav {
  padding-bottom: 2px;
}

.r-dtr-mf__slot-content .rdtr-local-nav-item {
  font-size: 13px;
  padding: 9px 13px;
}

.r-dtr-mf__slot--strip,
.r-dtr-mf__slot--full,
.r-dtr-mf__slot--double {
  min-height: 0;
}

.r-dtr-mf__slot--sticky {
  position: sticky;
  top: 10px;
  z-index: 8;
}

.r-dtr-mf__slot--floating {
  position: sticky;
  bottom: 12px;
  z-index: 9;
  box-shadow: 0 14px 36px rgba(10, 20, 40, 0.20);
}


/* R-DTR Mobile Slots API v1.6.10 — korekta renderu slotów */
.rdtr-mf-slot,
.rdtr-mobile-slot,
.rdtr-mf-mobile-slot {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.rdtr-mf-slot[data-layout="full"],
.rdtr-mobile-slot[data-layout="full"],
.rdtr-mf-mobile-slot[data-layout="full"],
.rdtr-mf-slot-full,
.rdtr-mobile-slot-full {
    grid-column: 1 / -1;
    width: 100%;
}

.rdtr-mf-slot[data-layout="double"],
.rdtr-mobile-slot[data-layout="double"],
.rdtr-mf-mobile-slot[data-layout="double"],
.rdtr-mf-slot-double,
.rdtr-mobile-slot-double {
    grid-column: span 2;
}

.rdtr-mf-slot .rdtr-local-nav-wrap,
.rdtr-mobile-slot .rdtr-local-nav-wrap,
.rdtr-mf-mobile-slot .rdtr-local-nav-wrap,
.rdtr-mf-slot-local-nav .rdtr-local-nav-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 18px 16px;
    box-sizing: border-box;
    border-radius: 24px;
    background: #fff;
    color: #101827;
    overflow: hidden;
}

.rdtr-mf-slot .rdtr-local-nav-title,
.rdtr-mobile-slot .rdtr-local-nav-title,
.rdtr-mf-mobile-slot .rdtr-local-nav-title,
.rdtr-mf-slot-local-nav .rdtr-local-nav-title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 900;
    color: #101827;
    opacity: 1;
}

.rdtr-mf-slot .rdtr-local-nav,
.rdtr-mobile-slot .rdtr-local-nav,
.rdtr-mf-mobile-slot .rdtr-local-nav,
.rdtr-mf-slot-local-nav .rdtr-local-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow: visible;
    padding: 0;
    max-width: 100%;
}

.rdtr-mf-slot .rdtr-local-nav-item,
.rdtr-mobile-slot .rdtr-local-nav-item,
.rdtr-mf-mobile-slot .rdtr-local-nav-item,
.rdtr-mf-slot-local-nav .rdtr-local-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.1;
    background: #050505;
    color: #fff;
    border-radius: 999px;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 850;
    text-decoration: none;
}

@media (max-width: 768px) {
    .rdtr-mf-slot[data-layout="double"],
    .rdtr-mobile-slot[data-layout="double"],
    .rdtr-mf-mobile-slot[data-layout="double"],
    .rdtr-mf-slot-double,
    .rdtr-mobile-slot-double {
        grid-column: 1 / -1;
    }

    .rdtr-mf-slot .rdtr-local-nav-wrap,
    .rdtr-mobile-slot .rdtr-local-nav-wrap,
    .rdtr-mf-mobile-slot .rdtr-local-nav-wrap,
    .rdtr-mf-slot-local-nav .rdtr-local-nav-wrap {
        border-radius: 22px;
        padding: 16px 14px;
    }

    .rdtr-mf-slot .rdtr-local-nav-title,
    .rdtr-mobile-slot .rdtr-local-nav-title,
    .rdtr-mf-mobile-slot .rdtr-local-nav-title,
    .rdtr-mf-slot-local-nav .rdtr-local-nav-title {
        font-size: 20px;
    }

    .rdtr-mf-slot .rdtr-local-nav,
    .rdtr-mobile-slot .rdtr-local-nav,
    .rdtr-mf-mobile-slot .rdtr-local-nav,
    .rdtr-mf-slot-local-nav .rdtr-local-nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    .rdtr-mf-slot .rdtr-local-nav-item,
    .rdtr-mobile-slot .rdtr-local-nav-item,
    .rdtr-mf-mobile-slot .rdtr-local-nav-item,
    .rdtr-mf-slot-local-nav .rdtr-local-nav-item {
        font-size: 14px;
        padding: 10px 14px;
        min-height: 40px;
    }
}


/* R-DTR Mobile Feed v1.6.11 — twarde zawijanie slotu Lokalnych Stref */
.r-dtr-mf[data-feed="mobile"] .r-dtr-mf__slot--id-local-nav {
  grid-column: 1 / -1 !important;
}

.r-dtr-mf[data-feed="mobile"] .r-dtr-mf__slot--id-local-nav .r-dtr-mf__slot-content {
  overflow: visible !important;
  max-width: 100% !important;
}

.r-dtr-mf[data-feed="mobile"] .r-dtr-mf__slot--id-local-nav .rdtr-local-nav-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.r-dtr-mf[data-feed="mobile"] .r-dtr-mf__slot--id-local-nav .rdtr-local-nav-title {
  display: none !important;
}

.r-dtr-mf[data-feed="mobile"] .r-dtr-mf__slot--id-local-nav .rdtr-local-nav {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
}

.r-dtr-mf[data-feed="mobile"] .r-dtr-mf__slot--id-local-nav .rdtr-local-nav-item {
  flex: 0 1 auto !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  line-height: 1.12 !important;
  text-align: center !important;
  font-size: 14px !important;
  padding: 10px 14px !important;
}
