/* ============================================================
   ADVERTISING LAYOUT
   ============================================================ */

.main-layout-flex {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    margin-top: 90px;
    /* Matches original page-wrapper top margin */
    position: relative;
    z-index: 1;
}

.ad-sidebar {
    width: 160px;
    min-width: 160px;
    /* Standard Skyscraper width */
    height: auto;
    min-height: 600px;
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    /* Clear the navbar */
    display: none;
    /* Hidden on mobile/tablet by default */
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.ad-placeholder {
    width: 100%;
    height: 600px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.ad-placeholder:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 106, 0, 0.3);
    color: rgba(255, 106, 0, 0.8);
}

body.night-theme .ad-placeholder {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(74, 144, 226, 0.1);
    color: #334;
}

body.night-theme .ad-placeholder:hover {
    border-color: rgba(74, 144, 226, 0.3);
    color: rgba(74, 144, 226, 0.8);
}

/* Override page-wrapper when inside the flex layout */
.main-layout-flex .page-wrapper {
    margin: 0 !important;
    max-width: 1100px;
    width: 100%;
    flex: 1;
    /* Allow it to shrink/grow but capped by max-width */
}

/* Show sidebars only on large screens where there's room */
/* 1100px (content) + 2*160px (ads) + 4*20px (gaps/padding) = ~1500px */
@media (min-width: 1450px) {
    .ad-sidebar {
        display: flex;
    }
}

/* Adjust top margin for mobile navbar height */
@media (max-width: 992px) {
    .main-layout-flex {
        margin-top: 130px;
    }
}