/* assets/css/ads.css */

/* === БАЗОВЫЙ КОНТЕЙНЕР (ANTI-CLS) === */
.ad-universal-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #F8FAFC; 
    border-radius: 12px; /* Чуть скруглим углы */
    width: 100%;
    overflow: hidden;
    position: relative;
    transition: height 0.3s ease;
}

/* Метка "Реклама" - добавляет прозрачности и доверия */
.ad-universal-wrapper::before {
    content: "Реклама";
    position: absolute;
    top: 0;
    right: 0;
    background: #E2E8F0;
    color: #94A3B8;
    font-size: 10px;
    padding: 2px 6px;
    border-bottom-left-radius: 8px;
    z-index: 5;
    pointer-events: none;
}

/* === ИСПРАВЛЕНИЕ: ГЛАВНАЯ СТРАНИЦА === */
/* Блок после Bento Grid */
.ad-after-grid-wrapper {
    margin-top: 64px;    /* Большой отступ сверху, чтобы не прилипало к карточке Service */
    margin-bottom: 48px; /* Отступ снизу до категорий */
    min-height: 250px;
    border: 1px solid #E2E8F0; /* Легкая рамка, чтобы отделить визуально */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Легкая тень */
}

/* === ВЕРХНИЕ БЛОКИ === */
.ad-mobile-top-wrapper {
    min-height: 50px;
    margin-bottom: 24px;
    background-color: transparent;
    display: flex;
    justify-content: center;
}

.ad-desktop-top-wrapper {
    min-height: 90px;
    margin-bottom: 32px;
    background-color: transparent;
    display: flex;
    justify-content: center;
}

/* === ВНУТРИ КОНТЕНТА === */
.ad-content-wrapper {
    margin: 48px 0; /* Увеличил отступы внутри статей */
    min-height: 250px;
}

/* === ВНУТРИ ФОРМЫ (Старые калькуляторы) === */
.ad-inside-form-wrapper {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed #E2E8F0; /* Отделяем пунктиром от полей ввода */
    min-height: 150px;
    width: 100%;
    text-align: center;
}

/* === САЙДБАР (Sticky) === */
.ad-sidebar-wrapper {
    margin-top: 40px;
    min-height: 400px; 
}

@media (min-width: 992px) {
    .ad-sidebar-wrapper {
        position: -webkit-sticky;
        position: sticky;
        top: 24px;
        z-index: 90;
    }
}

@media (max-width: 991px) {
    .ad-sidebar-wrapper {
        display: none;
    }
    
    /* На мобильном отступы чуть меньше */
    .ad-after-grid-wrapper {
        margin-top: 48px;
    }
}