/*
 * AdSense placements.
 *
 * The containers reserve their height up front so that a late-loading ad can
 * never push the content around (CLS). The heights match the responsive
 * display unit format that AdSense serves on a 1366px viewport; on narrow
 * screens the unit collapses to its own size and the reserve shrinks.
 */
.ad-slot {
    display: block;
    width: 100%;
    margin: 1.5rem auto;
    max-width: 970px;
    text-align: center;
    /* No overflow:hidden and no fixed height on purpose: Google cannot
       optimise an ad unit that sits in a container with restricted
       dimensions (fixed height / overflow hidden) - see Google AdSense
       help "Ad size optimization setting". The ad defines the final height,
       the container only reserves a minimum so there is no layout shift. */
}

.ad-slot--article {
    min-height: 280px;
}

.ad-slot--feed {
    min-height: 250px;
    margin: 2rem auto;
}

.ad-slot--footer {
    min-height: 250px;
    margin-top: 2rem;
    margin-bottom: 0;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--bc) / 0.08);
}

/* Keep the ad inside the reading column of an article. */
.article-main-content .ad-slot {
    max-width: 100%;
}

/* Mobile: the responsive unit shrinks; lower the reserve so the gap stays
   reasonable on phones. */
@media (max-width: 768px) {
    .ad-slot,
    .ad-slot--article,
    .ad-slot--feed,
    .ad-slot--footer {
        min-height: 100px;
        margin: 1rem auto;
    }
}

/* The auto ads script injects its own hidden placeholder - make sure ours
   is never collapsed by a global rule. */
.ad-slot ins.adsbygoogle {
    display: block !important;
    width: 100%;
}

/* Ad / cookie notice - sits in the flow above the footer (no overlay, no
   accidental clicks, no layout shift). */
.ad-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 970px;
    margin: 1rem auto 0;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--bc) / 0.12);
    border-radius: 0.9rem;
    background: hsl(var(--bc) / 0.04);
    font-size: 0.75rem;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .ad-notice {
        margin: 0.75rem 0.75rem 0;
        padding: 0.65rem 0.75rem;
        font-size: 0.7rem;
    }
}

/* Clear label on every paid placement (AdSense policy). */
.ad-slot__label {
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 0.35rem;
}

/* ------------------------------------------------------------------
   House ads (our own inventory - RentBee and other advertisers)
   ------------------------------------------------------------------ */
.house-ad {
    display: block;
    position: relative;
    text-align: left;
    text-decoration: none;
    color: inherit;
    background: hsl(var(--bc) / 0.035);
    border: 1px solid hsl(var(--bc) / 0.12);
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.house-ad:hover {
    border-color: hsl(var(--p) / 0.45);
    transform: translateY(-1px);
}

.house-ad__badge {
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.42;
    margin-bottom: 0.4rem;
}

.house-ad__title {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.25rem;
}

.house-ad__body {
    display: block;
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.75;
}

.house-ad__cta {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: hsl(var(--p));
}

.house-ad__cta::after {
    content: " \2192";
}

.house-ad--image {
    padding: 0.6rem;
}

.house-ad--image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.6rem;
}

.house-ad--image .house-ad__badge {
    margin: 0.35rem 0.35rem 0;
}

.house-ad--image .house-ad__title {
    margin: 0.35rem 0.35rem 0.6rem;
    font-size: 0.85rem;
}
