/* =============================================================================
   MEDIA CENTER HUB (media.html) - Enterprise Media Center
   ============================================================================= */

#med-page {
    background: var(--white);
}

.med-intro {
    padding: 40px 0 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.med-discovery-sec {
    padding: 40px 0 64px;
}

/* ========================= FILTER BAR LAYOUT ========================= */
#med-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    transition: all 0.25s ease;
    z-index: 100;
}

#med-filter-bar.eds-filter-bar--sticky {
    position: sticky;
    top: 0;
}

/* Search Left */
#med-search {
    flex: 1 1 340px;
    max-width: 440px;
    min-width: 220px;
    margin-right: auto;
}

#med-search .eds-search-input {
    height: 40px;
    padding: 8px 36px 8px 38px;
    font-size: 0.86rem;
    border-radius: 9999px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

#med-search .eds-search-input:focus {
    background-color: #ffffff;
    border-color: var(--primary-red, #e41f26);
    box-shadow: 0 0 0 3px rgba(228, 31, 38, 0.1);
}

#med-search .eds-search-icon {
    font-size: 0.85rem;
    left: 14px;
}

/* Filter Pills Group on Right */
.med-filters-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Small, refined filter selects */
.med-filters-right .eds-filter-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 7px 32px 7px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23475569' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: #334155;
    cursor: pointer;
    height: 38px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.med-filters-right .eds-filter-select:hover {
    border-color: var(--primary-red, #e41f26);
    color: var(--primary-red, #e41f26);
    background-color: #fffaf9;
}

.med-filters-right .eds-filter-select:focus {
    outline: none;
    border-color: var(--primary-red, #e41f26);
    box-shadow: 0 0 0 2px rgba(228, 31, 38, 0.12);
}

/* Clear All Button: Hidden by default, rendered only when filters are active */
.med-filters-right .eds-filter-clear {
    display: none;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    height: 38px;
    border-radius: 9999px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: var(--primary-red, #e41f26);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#med-filter-bar.eds-filter-bar--has-active .eds-filter-clear,
.eds-filter-bar--has-active .med-filters-right .eds-filter-clear {
    display: inline-flex;
}

.med-filters-right .eds-filter-clear:hover {
    background: var(--primary-red, #e41f26);
    border-color: var(--primary-red, #e41f26);
    color: #ffffff;
}

/* ========================= BRAND ASSETS ========================= */
.med-assets-sec {
    padding: 0 0 64px;
}

.med-assets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ========================= RESPONSIVE BREAKPOINTS ========================= */
@media screen and (max-width: 1024px) {
    .med-assets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 991px) {
    #med-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 12px;
    }

    #med-search {
        flex: 0 0 auto !important;
        max-width: 100%;
        width: 100%;
    }

    #med-search .eds-search-input {
        height: 38px;
        font-size: 0.82rem;
    }

    .med-filters-right {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 8px;
        width: 100%;
        padding-bottom: 2px;
    }

    .med-filters-right::-webkit-scrollbar {
        display: none;
    }

    .med-filters-right .eds-filter-select {
        flex: 0 0 auto;
        scroll-snap-align: start;
        height: 34px;
        font-size: 0.78rem;
        padding: 6px 28px 6px 12px;
        background-position: right 10px center;
    }

    #med-filter-bar.eds-filter-bar--has-active .eds-filter-clear,
    .eds-filter-bar--has-active .med-filters-right .eds-filter-clear {
        display: inline-flex;
        flex: 0 0 auto;
        scroll-snap-align: start;
        height: 34px;
        font-size: 0.78rem;
        padding: 6px 12px;
    }
}

@media screen and (max-width: 768px) {
    .med-intro {
        padding: 32px 0 20px;
        text-align: left;
    }

    .med-discovery-sec {
        padding: 28px 0 40px;
    }

    .med-assets-sec {
        padding: 0 0 40px;
    }

    .med-assets-grid {
        grid-template-columns: 1fr;
    }
}
