/* ============================================
   ПОЛНАЯ БЛОКИРОВКА РЕКЛАМЫ
   ============================================ */

/* Блокировка Google AdSense */
ins.adsbygoogle,
.adsbygoogle,
.ad-container,
.ad-slot,
.google-ad,
.google-ads,
.ad-banner,
.ad-wrapper,
.advertisement,
.advertising {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
}

/* Блокировка iframe рекламы */
iframe[src*="doubleclick"],
iframe[src*="googlesyndication"],
iframe[src*="googleadservices"],
iframe[src*="advertising"],
iframe[src*="/ads/"],
iframe[src*="ad."],
iframe[id*="google_ads"],
iframe[id*="aswift"] {
    display: none !important;
    visibility: hidden !important;
}

/* Блокировка популярных рекламных сетей */
div[id*="ad_"],
div[class*="ad_"],
div[id*="_ad"],
div[class*="_ad"],
div[id*="banner"],
div[class*="banner"],
div[id*="sponsor"],
div[class*="sponsor"],
div[data-ad],
div[data-ads],
.sponsored,
.sponsorship,
[class*="adsense"],
[id*="adsense"] {
    display: none !important;
    visibility: hidden !important;
}

/* Блокировка видео рекламы */
.video-ads,
.video-ad,
.preroll-ads,
.midroll-ads,
video-advertisement {
    display: none !important;
}

/* Блокировка всплывающих окон с рекламой */
.popup-ad,
.pop-up-ad,
.overlay-ad,
.modal-ad {
    display: none !important;
}

/* Блокировка нативной рекламы */
[data-ad-slot],
[data-ad-client],
[data-ad-format],
article[data-ad],
section[data-ad] {
    display: none !important;
}

/* Блокировка рекламных ссылок */
a[href*="/ad/"],
a[href*="/ads/"],
a[href*="doubleclick"],
a[href*="googleadservices"],
a[class*="ad-link"] {
    display: none !important;
    pointer-events: none !important;
}

/* Блокировка трекеров и аналитики (опционально) */
/* Раскомментируйте, если хотите полностью отключить аналитику */
/*
script[src*="google-analytics"],
script[src*="googletagmanager"],
script[src*="analytics"],
script[src*="tracking"] {
    display: none !important;
}
*/

/* Защита от динамически загружаемой рекламы */
.async-ad,
.lazy-ad,
[data-lazy-ad] {
    display: none !important;
}

/* Блокировка рекламных элементов по атрибутам */
[aria-label*="advertisment" i],
[aria-label*="advertisement" i],
[aria-label*="sponsor" i],
[title*="advertisment" i],
[title*="advertisement" i],
[alt*="advertisment" i],
[alt*="advertisement" i] {
    display: none !important;
    visibility: hidden !important;
}

/* Блокировка рекламных изображений */
img[src*="/ads/"],
img[src*="/ad/"],
img[alt*="ad" i],
img[title*="ad" i] {
    display: none !important;
}

/* Специфичные блокировки для популярных сетей */
/* Yandex Direct */
.yandex-ad,
#yandex_rtb,
[id^="yandex_rtb_"],
.yandex-direct {
    display: none !important;
}

/* Facebook Ads */
[data-testid*="sponsor" i],
span:has-text("Sponsored"),
span:has-text("Реклама") {
    display: none !important;
}

/* Блокировка баннеров по размерам (стандартные размеры IAB) */
[style*="width: 728px"][style*="height: 90px"],
[style*="width: 300px"][style*="height: 250px"],
[style*="width: 160px"][style*="height: 600px"],
[style*="width: 320px"][style*="height: 50px"],
[style*="width: 320px"][style*="height: 100px"],
[style*="width: 970px"][style*="height: 90px"],
[style*="width: 300px"][style*="height: 600px"] {
    display: none !important;
}

/* Удаление пустого пространства после блокировки */
.ad-container:empty,
.ad-slot:empty,
.advertisement:empty {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Превентивная блокировка */
[class*="ad-" i]:not([class*="admin" i]):not([class*="add" i]):not([class*="addr" i]),
[id*="ad-" i]:not([id*="admin" i]):not([id*="add" i]) {
    display: none !important;
}

/* Глобальная защита от рекламы */
body {
    /* Отключаем возможность внедрения рекламных скриптов */
    --ad-block: enabled;
}

/* Сообщение о блокировке рекламы (если требуется) */
.ad-block-notice {
    display: none !important;
}

/* ============================================
   ДОПОЛНИТЕЛЬНАЯ ЗАЩИТА
   ============================================ */

/* Блокировка попапов */
[role="dialog"][aria-label*="ad" i],
[role="alertdialog"][aria-label*="ad" i] {
    display: none !important;
}

/* Блокировка оверлеев с рекламой */
.overlay[class*="ad"],
.backdrop[class*="ad"] {
    display: none !important;
}

/* Восстановление прокрутки если реклама блокировала её */
body.ad-modal-open {
    overflow: auto !important;
}

/* ============================================
   ВАЖНО: Эти стили НЕ затрагивают контент сайта
   ============================================ */

