/* --- Main Static Banner --- */
.pwcb-banner-container {
    background-position: center;
    background-size: cover;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.pwcb-banner-heading {
    bottom: 0;
    color: #fff;
    display: block;
    font-size: 64px;
    font-weight: 700;
    left: 0;
    line-height: 45px;
    margin-bottom: 0;
    padding: 18px 18px 0;
    position: absolute;
    text-shadow: 0 0 19px rgb(0 0 0 / 75%);
    text-transform: uppercase;
}

/* --- New Simple Banner Styles --- */
.pwcb-banner-container.pwtb-style-simple {
    background-image: none !important;
    background-color: transparent !important; /* Force transparent background */
    height: 50px !important; /* Default height */
    min-height: auto !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.pwcb-banner-container.pwtb-style-simple .pwcb-banner-heading {
    position: static;
    padding: 0;
    margin: 0;
    text-shadow: none;
    font-size: 30px !important; /* Default font size */
    line-height: 50px;
    text-transform: none; 
    color: #2471c7 !important; /* Enforce specific blue text color */
}

/* Mobile adjustments for Static/Simple Banner */
@media (max-width: 1400px) {
    .pwcb-banner-heading {
        font-size: 44px;
        line-height: 33px;
    }
}

@media (max-width: 768px) {
    .pwcb-banner-heading {
        text-align: center;
    }
}

@media (max-width: 767px) {
    .pwcb-banner-container.pwtb-style-simple {
        height: auto !important;
        padding: 10px 0 !important;
    }
    .pwcb-banner-container.pwtb-style-simple .pwcb-banner-heading {
        font-size: 24px !important;
        line-height: 1.2;
    }
}


/* --- Ad Banners Section --- */
.pwtb-banners-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 2em;
    margin-bottom: 2em;
}

.pwtb-ad-item-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

.pwtb-banner-item {
    display: flex;
    justify-content: flex-start;
    text-align: left;
    padding: 2em;
    min-height: 230px;
    flex: 1;
    width: 100%;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    transition: box-shadow 0.4s ease;
}

/* Ensure no underline on hover and add shadow effect */
.pwtb-banner-item:hover {
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Scaling Background Image Layer */
.pwtb-banner-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: inherit;
    background-color: inherit;
    background-size: cover;
    background-position: center center;
    transition: transform 0.4s ease;
    z-index: 0;
}

.pwtb-banner-item:hover::before {
    transform: scale(1.025);
}

/* Gradient Overlay Layer */
.pwtb-banner-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
    z-index: 1;
    pointer-events: none;
}

.pwtb-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pwtb-heading {
    color: #ffffff;
    font-size: 2em;
    margin: 0 0 0.25em 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    font-weight: 700;
}

.pwtb-subheading {
    color: #ffffff;
    font-size: 1.1em;
    margin: 0 0 1em 0;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.pwtb-link-text {
    display: inline-block;
    padding: 0.75em 1.5em;
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
}

.pwtb-banner-item:hover .pwtb-link-text {
    background-color: #ffffff;
    color: #333333;
}

.pwtb-sponsored-text {
    font-size: 10px !important;
    color: #000000;
    padding-top: 5px;
    font-style: italic;
    position: absolute;
    bottom: 7px;
    left: 11px;
    z-index: 1;
}

/* --- Contextual Category Navigation --- */
.pwtb-sibling-nav-container {
    position: relative;
    margin-bottom: 2em;
}

.pwtb-sibling-nav-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-x: auto;
    padding: 1.5em 1em;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pwtb-sibling-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.pwtb-sibling-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: opacity 0.3s ease;
    width: 100px;
    flex-shrink: 0;
}

.pwtb-sibling-nav-item:hover {
    opacity: 0.7;
}

.pwtb-sibling-nav-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.75em;
}

.pwtb-sibling-nav-name {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    height: calc(14px * 1.3 * 2);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwtb-scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    user-select: none;
}

.pwtb-scroll-indicator-left { left: 10px; }
.pwtb-scroll-indicator-right { right: 10px; }
.pwtb-indicator-visible { opacity: 1; }

/* --- Responsive Layouts --- */

/* Mobile: Carousel Mode for Ad Banners */
@media (max-width: 767px) {
    .pwtb-banners-wrapper {
        flex-direction: row; /* Horizontal layout */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 0; /* Remove gap to make snap cleaner */
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .pwtb-banners-wrapper::-webkit-scrollbar {
        display: none;
    }

    .pwtb-ad-item-wrapper {
        min-width: 100%; /* Force full width for carousel items */
        flex: 0 0 100%;
        scroll-snap-align: start;
        padding-right: 15px; /* Add padding inside item to create visual gap */
        box-sizing: border-box;
    }
}

/* Tablet & Desktop: Grid Mode for Ad Banners */
@media (min-width: 768px) {
    .pwtb-banners-wrapper {
        flex-direction: row;
        align-items: stretch; /* Explicitly tell flex items to stretch to the same height */
    }
}

@media (min-width: 1024px) {
    .pwtb-sibling-nav-wrapper {
        justify-content: flex-start;
    }
}