/* Radio Toggle Button & Mobile Maximize */
#radio-toggle-btn {
    display: none !important; /* Hidden by default on desktop */
}

/* Mobile styles */
@media screen and (max-width: 736px) {
    #radio-toggle-btn {
        display: block !important; /* Visible on mobile as icon */
        /* Position handled inline in layout.php for simplicity, or here: */
        /* position: absolute; top: 10px; right: 10px; */
    }

    /* Ensure the box has shadow and radius when NOT maximized */
    .bg-radio {
        transition: all 0.3s ease;
        /* Inherits .box styles (shadow, radius) from main.css */
    }

    .bg-radio.maximized {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 20000 !important; /* Higher than sidebar toggle (10005) */
        background: #242943 !important; /* Theme background */
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        padding: 0 !important; /* Remove padding to use full space */
        overflow-y: auto !important;
        border-radius: 0 !important; /* Full screen, no radius */
        box-shadow: none !important;
        margin: 0 !important;
    }
    
    .bg-radio.maximized #radio-toggle-btn {
        top: 15px !important;
        right: 15px !important;
        font-size: 1.5em !important;
        color: #fff !important;
        opacity: 1 !important;
        z-index: 20001 !important; /* Ensure button is above player */
    }
    
    .bg-radio.maximized #lunaradio {
        height: 100% !important;
        width: 100% !important;
        max-height: none !important; /* Allow full height */
    }
}

/* Ensure Sidebar and Toggle Button are visible on mobile */
@media screen and (max-width: 1280px) {
    #sidebar {
        z-index: 11000 !important; /* Force sidebar above content */
    }
    #sidebar .toggle {
        z-index: 11001 !important; /* Ensure toggle is clickable */
    }
}

/* Partners Grid */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns by default */
    gap: 2em;
    margin: 3em 0;
    padding: 2em;
    background: #ffffff05;
    border-radius: 8px;
    justify-items: center;
    align-items: center;
}

.partner-item {
    display: block;
    width: 100%;
    max-width: 200px; /* Limit logo size */
    text-align: center;
}

.partner-item img {
    max-width: 100%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.partner-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

@media screen and (min-width: 981px) {
    .partners-grid {
        grid-template-columns: repeat(6, 1fr); /* 6 columns on large screens */
    }
}

@media screen and (max-width: 736px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 1em;
        padding: 1em;
    }
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.75em;
    font-size: 0.7em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.125em;
    margin-bottom: 0.5em;
    font-family: "Open Sans", sans-serif;
}

.badge.featured {
    color: #ffffff;
    background-color: #f56a6a; /* Editorial Theme Accent */
    box-shadow: 0 0 0 1px #f56a6a;
}

/* Custom Posts Grid 4 */
.posts-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2em;
    margin: 2em 0;
}

.posts-grid-4 article {
    display: flex;
    flex-direction: column;
}

.posts-grid-4 article .image {
    display: block;
    width: 100%;
    margin-bottom: 1.5em;
    border-radius: 4px;
    overflow: hidden;
}

.posts-grid-4 article .image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s ease;
}

.posts-grid-4 article .image:hover img {
    transform: scale(1.05);
}

@media screen and (max-width: 1280px) {
    .posts-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .posts-grid-4 {
        grid-template-columns: 1fr;
    }
}
