/* ==========================================
   Wallpaper Waves 2.0 — Central Ad Layout
   Cinematic Hybrid styling
   ========================================== */

/* Shared shortcode slot and staging placeholder */
.ww2-ad-slot {
    width: 100%;
    box-sizing: border-box;
}

.ww2-ad-placeholder {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    border: 1px dashed rgba(54, 197, 255, 0.25);
    border-radius: 10px;
    background: rgba(20, 24, 32, 0.65);
    box-sizing: border-box;
}

.ww2-ad-placeholder span {
    color: #91A6BD;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
}

/* Shared solid outer border — all manual ad containers */
.ww2-home-ad-top,
.ww2-wallpaper-grid > .ww2-grid-ad,
.ww2-archive-ad-top,
.ww2-global-bottom-ad,
body.single-post .ww2-single-ad-top,
body.single-post .ww2-single-ad-sidebar,
body.single-post .ww2-single-ad-content {
    min-width: 0;
    padding: 6px;
    border: 1px solid var(--ww2-border-subtle, #28313D);
    border-radius: 15px;
    background: #11151C;
    box-sizing: border-box;
}

/* ==========================================
   Homepage top: Latest / Popular / Featured / Random
   ========================================== */
/* ==========================================
   Homepage top — Responsive AdSense
   Desktop: Up to 970x90
   Mobile: 300x250
   ========================================== */

/* ==========================================
   Homepage top — Responsive AdSense
   ========================================== */

.ww2-home-ad-top {
    position: relative;
    display: block;
    width: 100%;
    min-height: 108px;
    margin: 12px 0 16px;
    padding: 8px;
    box-sizing: border-box;
}

.ww2-home-ad-top .ww2-ad-slot {
    position: relative;
    display: block;
    width: 100%;
    max-width: 970px;
    min-width: 0;
    min-height: 90px;
    margin: 0 auto;
    padding: 0;
}

.ww2-home-ad-top ins.adsbygoogle {
    display: block;
    width: 100%;
    height: 90px;
    margin: 0;
}

.ww2-home-ad-top .ww2-ad-placeholder {
    display: flex;
    min-height: 90px;
    padding: 10px;
}

/* Mobile — 300x250 */
@media (max-width: 767px) {

    .ww2-home-ad-top {
        min-height: 264px;
        padding: 6px;
        margin: 14px 0;
    }

    .ww2-home-ad-top .ww2-ad-slot {
        width: 300px;
        max-width: 100%;
        min-height: 250px;
    }

    .ww2-home-ad-top ins.adsbygoogle {
        width: 100%;
        height: 250px;
    }

    .ww2-home-ad-top .ww2-ad-placeholder {
        min-height: 250px;
        padding: 10px;
    }
}

/* ==========================================
   Universal wallpaper grid — desktop / tablet
   ========================================== */
.ww2-wallpaper-grid > .ww2-grid-ad {
    grid-column: 1 / -1;
    width: 100%;
    margin: 8px 0;
}

.ww2-wallpaper-grid > .ww2-grid-ad .ww2-ad-placeholder {
    min-height: 160px;
}

/* Older bottom-banner class, if used by a template */
.ww2-home-ad-bottom {
    width: 100%;
    margin: 24px 0;
}

/* ==========================================
   Archive top — Responsive AdSense
   Desktop: 970x90
   Mobile: 300x250
   ========================================== */

.ww2-archive-ad-top {
    position: relative;
    display: block;
    width: 100%;
    min-height: 108px;
    margin: 16px 0 20px;
    padding: 8px;
    box-sizing: border-box;
}

.ww2-archive-ad-top .ww2-ad-slot {
    position: relative;
    display: block;
    width: 100%;
    max-width: 970px;
    min-width: 0;
    min-height: 90px;
    margin: 0 auto;
    padding: 0;
}

.ww2-archive-ad-top ins.adsbygoogle {
    display: block;
    width: 100%;
    height: 90px;
    margin: 0;
}

.ww2-archive-ad-top .ww2-ad-placeholder {
    display: flex;
    min-height: 90px;
    padding: 10px;
}

/* Mobile — 300x250 */

@media (max-width: 767px) {

    .ww2-archive-ad-top {
        min-height: 264px;
        padding: 6px;
        margin: 14px 0;
    }

    .ww2-archive-ad-top .ww2-ad-slot {
        width: 300px;
        max-width: 100%;
        min-height: 250px;
    }

    .ww2-archive-ad-top ins.adsbygoogle {
        width: 100%;
        height: 250px;
        margin: 0;
    }

    .ww2-archive-ad-top .ww2-ad-placeholder {
        min-height: 250px;
        padding: 10px;
    }
}

/* ==========================================
   Single wallpaper page — AdSense layout
   ========================================== */

/* Shared single-page advertisement containers */

body.single-post .ww2-single-ad-top,
body.single-post .ww2-single-ad-sidebar,
body.single-post .ww2-single-ad-content {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    padding: 6px;
    box-sizing: border-box;
}

/* Shared inner advertisement wrapper */

body.single-post .ww2-single-ad-top .ww2-ad-slot,
body.single-post .ww2-single-ad-sidebar .ww2-ad-slot,
body.single-post .ww2-single-ad-content .ww2-ad-slot {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0 auto;
    padding: 0;
}

/* Shared live AdSense element */

body.single-post .ww2-ad-live ins.adsbygoogle {
    display: block;
    width: 100%;
    margin: 0;
}

/* ==========================================
   Top ad — 728x90
   ========================================== */

body.single-post .ww2-single-ad-top {
    min-height: 104px;
    margin: 0 0 12px;
}

body.single-post .ww2-single-ad-top .ww2-ad-slot {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
}

body.single-post .ww2-single-ad-top ins.adsbygoogle {
    height: 90px;
}

/* ==========================================
   Right column — preserve download panel
   ========================================== */

body.single-post .ww2-single-right-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    align-self: start;
}

body.single-post .ww2-single-right-column
.ww2-single-download-panel {
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================
   Sidebar ad — 300x250
   ========================================== */

body.single-post .ww2-single-ad-sidebar {
    min-height: 264px;
}

body.single-post .ww2-single-ad-sidebar .ww2-ad-slot {
    width: 300px;
    max-width: 100%;
    min-height: 250px;
}

body.single-post .ww2-single-ad-sidebar ins.adsbygoogle {
    height: 250px;
}

/* ==========================================
   Content ad — 728x90
   ========================================== */

body.single-post .ww2-single-ad-content {
    min-height: 104px;
    margin-top: 18px;
}

body.single-post .ww2-single-ad-content .ww2-ad-slot {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
}

body.single-post .ww2-single-ad-content ins.adsbygoogle {
    height: 90px;
}

/* Preview placeholders */

body.single-post .ww2-single-ad-top .ww2-ad-placeholder,
body.single-post .ww2-single-ad-content .ww2-ad-placeholder {
    display: flex;
    min-height: 90px;
    padding: 10px;
}

body.single-post .ww2-single-ad-sidebar .ww2-ad-placeholder {
    display: flex;
    min-height: 250px;
    padding: 10px;
}

/* ==========================================
   Mobile grid ads — every 6 wallpapers at <=700px
   ========================================== */
.ww2-wallpaper-grid > .ww2-mobile-grid-ad {
    display: none;
}

/* ==========================================
   Global bottom banner — Responsive AdSense
   Desktop: 970x90
   Mobile: 300x250
   ========================================== */

.ww2-global-bottom-ad {
    position: relative;
    display: block;
    width: min(1400px, calc(100% - 40px));
    max-width: 1400px;
    min-height: 108px;
    margin: 40px auto 30px;
    padding: 8px;
    box-sizing: border-box;
}

.ww2-global-bottom-ad .ww2-ad-slot {
    position: relative;
    display: block;
    width: 100%;
    max-width: 970px;
    min-width: 0;
    min-height: 90px;
    margin: 0 auto;
    padding: 0;
}

.ww2-global-bottom-ad ins.adsbygoogle {
    display: block;
    width: 100%;
    height: 90px;
    margin: 0;
}

.ww2-global-bottom-ad .ww2-ad-placeholder {
    display: flex;
    min-height: 90px;
    padding: 10px;
}

/* Mobile — 300x250 */
@media (max-width: 767px) {

    .ww2-global-bottom-ad {
        width: calc(100% - 32px);
        min-height: 264px;
        margin: 24px auto 20px;
        padding: 6px;
        border-radius: 12px;
    }

    .ww2-global-bottom-ad .ww2-ad-slot {
        width: 300px;
        max-width: 100%;
        min-height: 250px;
    }

    .ww2-global-bottom-ad ins.adsbygoogle {
        width: 100%;
        height: 250px;
        margin: 0;
    }

    .ww2-global-bottom-ad .ww2-ad-placeholder {
        min-height: 250px;
        padding: 10px;
    }
}

/* ==========================================
   Responsive behavior
   ========================================== */

/* Preserve single-post responsive layout */

@media (max-width: 1050px) {

    body.single-post .ww2-single-ad-top {
        margin: 0;
    }

    body.single-post .ww2-single-ad-sidebar {
        display: none;
    }

    body.single-post .ww2-single-right-column {
        display: contents;
    }

    body.single-post .ww2-single-ad-content {
        display: block;
        order: 4;
        margin-top: 0;
    }
}

/* Mobile advertisements — 300x250 */

@media (max-width: 767px) {

 body.single-post .ww2-single-ad-top {
    min-height: 114px;
}

body.single-post .ww2-single-ad-top .ww2-ad-slot {
    width: 320px;
    max-width: 100%;
    min-height: 100px;
}

body.single-post .ww2-single-ad-top ins.adsbygoogle {
    width: 100%;
    height: 100px;
    margin: 0;
}

body.single-post .ww2-single-ad-top .ww2-ad-placeholder {
    min-height: 100px;
    padding: 10px;
}
}

@media (max-width: 700px) {
    /* Hide desktop grid ad; show dedicated mobile placements */
    .ww2-wallpaper-grid > .ww2-grid-ad {
        display: none;
    }

    /* Mobile grid advertisement — 300x250 */

.ww2-wallpaper-grid > .ww2-mobile-grid-ad {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 8px 0;
    padding: 6px;
    border: 1px solid var(--ww2-border-subtle, #28313D);
    border-radius: 15px;
    background: #11151C;
    box-sizing: border-box;
}

.ww2-mobile-grid-ad .ww2-ad-slot {
    width: 300px;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
}

.ww2-mobile-grid-ad ins.adsbygoogle {
    display: block;
    width: 100%;
    height: 250px;
}

.ww2-mobile-grid-ad .ww2-ad-placeholder {
    min-height: 250px;
    padding: 10px;
    border-radius: 12px;
}

.ww2-mobile-grid-ad .ww2-ad-placeholder span {
    font-size: 10px;
    letter-spacing: 1.1px;
}

}

/* ==========================================
   WW2 — Live AdSense Layout
   ========================================== */

/* Two desktop AdSense units, side by side */
.ww2-grid-ad-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

/* Each AdSense unit fills its grid column */
.ww2-grid-ad-pair > .ww2-ad-slot {
    width: 100%;
    min-width: 0;
}

/* Shared live ad wrapper */
.ww2-ad-live {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.ww2-ad-live ins.adsbygoogle {
    display: block;
    width: 100%;
    margin: 0;
}

/* Stack desktop grid ads when space is limited */
@media (min-width: 701px) and (max-width: 850px) {
    .ww2-grid-ad-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}
