/*
 * MekanRadar — reklam alanları (2026-11)
 * Yeni tasarım dili (mr-place-spec / mr-home-v3-apple) ile uyumlu:
 * sistem yazı tipi, yumuşak yüzey, ince çizgi, turuncu vurgu.
 * Mobilde kart ağırlıklı, kısa metin, az boşluk.
 */

.mr-ad-rot,
.mr-ad-card {
    --mrad-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mrad-ink: #1d1d1f;
    --mrad-ink-2: #5f5f64;
    --mrad-surface: #fff;
    --mrad-hair: rgba(0, 0, 0, .08);
    --mrad-accent: #ff5a1f;
    --mrad-accent-ink: #d9440f;
    --mrad-accent-soft: rgba(255, 90, 31, .1);
    --mrad-radius: 16px;
    --mrad-ease: cubic-bezier(0.23, 1, 0.32, 1);
    font-family: var(--mrad-font);
    -webkit-font-smoothing: antialiased;
}

html[data-mr-theme="dark"] .mr-ad-rot,
html[data-mr-theme="dark"] .mr-ad-card {
    --mrad-ink: #f5f5f7;
    --mrad-ink-2: #b5b5bb;
    --mrad-surface: #1c1c1e;
    --mrad-hair: rgba(255, 255, 255, .1);
    --mrad-accent-ink: #ff8a5c;
    --mrad-accent-soft: rgba(255, 90, 31, .16);
}

/* ---------- Döngü kabı ---------- */

.mr-ad-rot {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 12px auto;
    clear: both;
}

.mr-ad-rot *,
.mr-ad-card * {
    box-sizing: border-box;
}

.mr-ad-rot--wide { max-width: 970px; }
.mr-ad-rot--square { max-width: 336px; }
.mr-ad-rot--mobile_banner,
.mr-ad-rot--mobile_rectangle { max-width: 420px; margin: 8px auto; }

.mr-ad-rot__stage {
    display: grid;
    width: 100%;
}

.mr-ad-slide {
    grid-area: 1 / 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 420ms var(--mrad-ease), visibility 0s linear 420ms;
}

.mr-ad-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 420ms var(--mrad-ease), visibility 0s;
}

.mr-ad-slide[hidden] { display: none !important; }

/* İçteki eski banner bileşeninin dış boşluklarını sıfırla */
.mr-ad-rot .mr-marketing-banner,
.mr-ad-rot .marketing-banner {
    margin: 0 auto !important;
}

.mr-ad-rot__label {
    position: absolute;
    z-index: 2;
    top: 6px;
    right: 8px;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .42);
    color: #fff;
    font: 600 9px/1.5 var(--mrad-font);
    letter-spacing: .04em;
    text-transform: uppercase;
    pointer-events: none;
}

.mr-ad-rot[data-active-kind="house"] .mr-ad-rot__label { display: none; }

.mr-ad-rot__dots {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 5px;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    pointer-events: none;
}

.mr-ad-rot__dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .22);
    transition: background-color 200ms ease, transform 200ms ease;
}

.mr-ad-rot__dots i.is-on {
    background: var(--mrad-accent);
    transform: scale(1.15);
}

.mr-ad-google {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

/* ---------- İç reklam: "İşletmeniz burada" (hareketli) ---------- */

.mr-house {
    --mrh-bg: #17100d;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--mrad-radius);
    background: var(--mrh-bg);
    color: #fff;
    text-align: left;
    text-decoration: none !important;
    box-shadow: 0 10px 28px rgba(255, 90, 31, .18), inset 0 0 0 1px rgba(255, 255, 255, .06);
    -webkit-tap-highlight-color: transparent;
    transition: transform 120ms ease-out, box-shadow 200ms var(--mrad-ease);
}

.mr-house:active { transform: scale(.985); }

@media (hover: hover) and (pointer: fine) {
    .mr-house:hover { box-shadow: 0 14px 34px rgba(255, 90, 31, .3), inset 0 0 0 1px rgba(255, 255, 255, .1); }
    .mr-house:hover .mr-house__cta i { transform: translateX(3px); }
}

/* Kayan ışık: geniş degrade katmanı yalnız transform ile kayar (compositor) */
.mr-house__glow {
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 220%;
    background:
        radial-gradient(22% 160% at 12% 50%, rgba(255, 90, 31, .95), transparent 72%),
        radial-gradient(26% 150% at 40% 40%, rgba(255, 140, 66, .75), transparent 72%),
        radial-gradient(24% 170% at 66% 60%, rgba(230, 60, 10, .85), transparent 72%),
        radial-gradient(22% 150% at 90% 45%, rgba(255, 166, 94, .6), transparent 72%),
        linear-gradient(90deg, #2a120a, #3b160b 50%, #2a120a);
    animation: mrh-drift 9s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes mrh-drift {
    from { transform: translateX(0); }
    to { transform: translateX(-28%); }
}

/* Radar işareti: iki dalga + dönen tarama */
.mr-house__mark {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ff5a1f;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 90, 31, .25);
}

.mr-house__mark svg { position: relative; z-index: 1; }

.mr-house__ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 140, 90, .9);
    animation: mrh-ping 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.mr-house__ping--late { animation-delay: 1.2s; }

@keyframes mrh-ping {
    0% { transform: scale(1); opacity: .9; }
    100% { transform: scale(2.1); opacity: 0; }
}

.mr-house__sweep {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70deg, transparent);
    animation: mrh-spin 2.6s linear infinite;
}

@keyframes mrh-spin { to { transform: rotate(360deg); } }

.mr-house__copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mr-house__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.018em;
    color: #fff;
}

/* Dönen kısa mesajlar (3 sn'de bir) */
.mr-house__ticker {
    display: grid;
    height: 1.4em;
    overflow: hidden;
    font-size: 13.5px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .78);
}

.mr-house__ticker > span {
    grid-area: 1 / 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    animation: mrh-tick calc(var(--mrh-n, 3) * 3s) infinite;
    animation-delay: calc((var(--mrh-i, 0) - var(--mrh-n, 3)) * 3s);
}

@keyframes mrh-tick {
    0% { opacity: 0; transform: translateY(70%); }
    4% { opacity: 1; transform: none; }
    29% { opacity: 1; transform: none; }
    33% { opacity: 0; transform: translateY(-70%); }
    100% { opacity: 0; transform: translateY(-70%); }
}

/* Düğme: beyaz hap, üzerinden ışık geçer */
.mr-house__cta {
    position: relative;
    overflow: hidden;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: #fff;
    color: #17100d;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.mr-house__cta::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 90, 31, .28), transparent);
    transform: translateX(-120%) skewX(-18deg);
    animation: mrh-shine 3.2s ease-in-out infinite;
}

@keyframes mrh-shine {
    0%, 55% { transform: translateX(-120%) skewX(-18deg); }
    85%, 100% { transform: translateX(320%) skewX(-18deg); }
}

.mr-house__cta i {
    font-style: normal;
    display: inline-block;
    transition: transform 160ms var(--mrad-ease);
    animation: mrh-nudge 1.6s ease-in-out infinite;
}

@keyframes mrh-nudge {
    0%, 60%, 100% { transform: translateX(0); }
    30% { transform: translateX(3px); }
}

/* Ekranda değilken hareketi durdur (pil / işlemci) */
[data-mr-ad-rot]:not(.is-inview) .mr-house *,
[data-mr-ad-rot]:not(.is-inview) .mr-house::after,
[data-mr-ad-rot]:not(.is-inview) .mr-house__cta::after,
[data-mr-ad-rot]:not(.is-inview) .mr-ad-card__house * {
    animation-play-state: paused;
}

/* Masaüstü yatay */
.mr-house--wide { min-height: 88px; }
@media (min-width: 1024px) {
    .mr-house--wide { min-height: 96px; padding: 18px 26px; gap: 20px; }
    .mr-house--wide .mr-house__title { font-size: 21px; }
    .mr-house--wide .mr-house__ticker { font-size: 14.5px; }
    .mr-house--wide .mr-house__cta { height: 44px; padding: 0 22px; font-size: 15px; }
}

/* Sidebar kare: dikey kart */
.mr-house--square {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: 220px;
    padding: 20px;
}

.mr-house--square .mr-house__title { font-size: 19px; }
.mr-house--square .mr-house__ticker > span { white-space: normal; }
.mr-house--square .mr-house__ticker { height: 2.8em; }
.mr-house--square .mr-house__cta { margin-top: auto; }

/* Mobil yatay: tek satır, kısa */
.mr-house--mobile_banner {
    gap: 12px;
    min-height: 68px;
    padding: 10px 12px;
    border-radius: 14px;
}

.mr-house--mobile_banner .mr-house__mark { width: 34px; height: 34px; }
.mr-house--mobile_banner .mr-house__mark svg { width: 18px; height: 18px; }
.mr-house--mobile_banner .mr-house__title {
    font-size: 13.5px;
    letter-spacing: -0.012em;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mr-house--mobile_banner .mr-house__ticker { display: none; }
.mr-house--mobile_banner .mr-house__cta { height: 32px; padding: 0 11px; font-size: 12.5px; gap: 4px; }
.mr-house--mobile_banner { gap: 10px; }

/* Mobil içerik içi: kompakt kart, düğme tam genişlik */
.mr-house--mobile_rectangle {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas: "mark copy" "cta cta";
    gap: 12px 12px;
    padding: 14px;
    border-radius: 18px;
}

.mr-house--mobile_rectangle .mr-house__mark { grid-area: mark; width: 44px; height: 44px; }
.mr-house--mobile_rectangle .mr-house__copy { grid-area: copy; align-self: center; }
.mr-house--mobile_rectangle .mr-house__title { font-size: 15.5px; }
.mr-house--mobile_rectangle .mr-house__ticker { font-size: 12.5px; }
.mr-house--mobile_rectangle .mr-house__cta { grid-area: cta; height: 40px; }

/* Masaüstü yatay alan dar ekranda görünürse */
@media (max-width: 640px) {
    .mr-house--wide { gap: 12px; min-height: 68px; padding: 10px 12px; }
    .mr-house--wide .mr-house__mark { width: 38px; height: 38px; }
    .mr-house--wide .mr-house__title { font-size: 14px; }
    .mr-house--wide .mr-house__ticker { display: none; }
    .mr-house--wide .mr-house__cta { height: 32px; padding: 0 12px; font-size: 12.5px; }
    .mr-ad-rot { margin: 8px auto; }
}

@media (prefers-reduced-motion: reduce) {
    .mr-house *,
    .mr-house__cta::after { animation: none !important; }
    .mr-house__ping { display: none; }
    .mr-house__ticker > span { opacity: 0; }
    .mr-house__ticker > span:first-child { opacity: 1; }
}

/* Ana sayfa / sayfa sarmalayıcıları zaten boşluk veriyor: çift boşluk olmasın */
.mr3-sponsored .mr-ad-rot,
.mrpd-ad-slot .mr-ad-rot,
.mrpd-marketing-slot .mr-ad-rot { margin-top: 0; margin-bottom: 0; }

/* Ana sayfa: reklam, panellerle aynı genişlikte; ortada dar "kopuk" durmasın */
.mr3-sponsored,
.mr3-sponsored .mrpd-ad-slot--shape-rotator { width: 100%; max-width: none; }
.mr3-sponsored .mrpd-ad-frame > .mr-ad-rot,
.mr3-sponsored .mr-ad-rot--wide { width: 100%; max-width: none; flex: 1 1 100%; }

/* Ana sayfa: son öğe reklamsa footer'a kadar üst üste binen boşlukları topla */
.mr3-main > .mr3-sponsored:last-child { margin-bottom: 0; }
.mr3-main:has(> .mr3-sponsored:last-child [data-mr-ad-rot]) { padding-bottom: 22px; }
.mr3:has(> .mr3-main > .mr3-sponsored:last-child [data-mr-ad-rot]) { padding-bottom: 0; }

/* Mobil alt menü (dock) boşluğunu body veriyor; burada ek boşluk gerekmez. */

/* ---------- Şerit içi sponsorlu kart ---------- */

.mr-ad-card {
    position: relative;
    scroll-snap-align: start;
}

.mr-ad-card .mr-ad-rot__stage,
.mr-ad-card .mr-ad-slide,
.mr-ad-card .mr-ad-card__link {
    height: 100%;
}

.mr-ad-card .mr-ad-slide { align-items: stretch; }

.mr-ad-card__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: inherit;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.mr-ad-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.75;
    overflow: hidden;
    background: linear-gradient(135deg, #ff7a45, #ff5a1f 55%, #e6450d);
}

.mr-ad-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.mr-ad-card__house {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .95);
}

.mr-ad-card__house::before,
.mr-ad-card__house::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .75);
    animation: mrh-ping 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.mr-ad-card__house::after { animation-delay: 1.2s; }
.mr-ad-card--hcard .mr-ad-card__house::before,
.mr-ad-card--hcard .mr-ad-card__house::after { margin-top: -40px; }

.mr-ad-card__media:has(.mr-ad-card__house) {
    background: linear-gradient(135deg, #17100d 0%, #b33a10 45%, #ff5a1f 75%, #ff8a3d 100%);
}

[data-mr-ad-rot]:not(.is-inview) .mr-ad-card__house::before,
[data-mr-ad-rot]:not(.is-inview) .mr-ad-card__house::after { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
    .mr-ad-card__house::before,
    .mr-ad-card__house::after { display: none; }
}

.mr-ad-card__chip {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font: 600 9px/1.4 var(--mrad-font);
    letter-spacing: .03em;
}

.mr-ad-card__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 9px 11px;
    min-width: 0;
}

.mr-ad-card__info strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #132844;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mr-ad-card__info small {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--mrad-accent-ink);
}

html[data-mr-theme="dark"] .mr-ad-card--mr3 .mr-ad-card__info strong { color: #f5f5f7; }

.mr-ad-card .mr-ad-slide--house .mr-ad-card__info strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
}

/* Şehir / ilçe / kategori yatay görsel kartı: tamamı görsel, yazı alt kenarda */
.mr-ad-card--hcard .mr-ad-card__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    height: 100%;
}

.mr-ad-card--hcard .mr-ad-card__info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
}

.mr-ad-card--hcard .mr-ad-card__info strong { color: #fff; font-size: 15px; font-weight: 700; white-space: normal; }
.mr-ad-card--hcard .mr-ad-card__info small { color: #ffd2bf; font-size: 12px; }
.mr-ad-card--hcard .mr-ad-card__chip { top: 10px; left: 10px; font-size: 10px; }
.mr-ad-card--hcard .mr-ad-card__house { padding-bottom: 36px; }
.mr-ad-card--hcard .mr-ad-card__house svg { width: 36px; height: 36px; }

@media (prefers-reduced-motion: reduce) {
    .mr-ad-slide,
    .mr-ad-slide.is-active { transition: none; }
}
