/* hub page */

:root {
    --global-palette1: #4189c9;
    --global-palette2: #3a69b1;
    --global-palette3: #091e34;
    --global-palette4: #26323e;
    --global-palette5: #485666;
    --global-palette6: #718096;
    --global-palette7: #e0e7ef;
    --global-palette8: #f4f5fa;
    --global-palette9: #ffffff;
}

.mp-hub-wrapper { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.mp-hub-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }

/* Filter Pills */
.mp-filter-group a {
    padding: 8px 16px; border: 1px solid #ddd; border-radius: 20px;
    text-decoration: none; color: #666; font-size: 14px; margin-right: 10px;
}
.mp-filter-group a.active { background: var(--global-palette1); color: white; border-color: var(--global-palette1); }

/* The Modern Grid */
.mp-hub-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.mp-hub-card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease;
    display: flex; flex-direction: row;
    position: relative;
}
.mp-hub-card:hover { transform: translateY(-5px); }

.mp-entry-link { 
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9; 
}

.mp-card-image { position: relative; width: 200px; display: block; overflow: hidden; object-fit: cover; }
.mp-card-image img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.5s ease; }
.mp-hub-card:hover img { scale: 1.05; }

.hot-badge {
    position: absolute; top: 15px; right: 15px; background: #ff4757;
    color: white; padding: 4px 10px; border-radius: 4px; font-weight: bold; font-size: 11px;
}

.mp-card-content { padding: 20px; flex-grow: 1; width: 100%; }
.mp-card-cat { color: var(--global-palette1); font-weight: bold; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.mp-card-content h3 { margin: 10px 0; font-size: 1.25rem; line-height: 1.4; }
.mp-card-content h3 a { color: #222; text-decoration: none; }

/* Hub Header Adjustments */
.mp-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* Filter Bar */
.mp-filter-bar {
    display: flex;
    align-items: center;
    background: #f9fafb;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid #eee;
    margin-bottom: 40px;
}

.mp-filter-label {
    font-weight: 700;
    font-size: 13px;
    color: #9ca3af;
    text-transform: uppercase;
    margin-right: 15px;
    white-space: nowrap;
}

.mp-tags-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE */
}
.mp-tags-container::-webkit-scrollbar { display: none; } /* Hide scrollbar Chrome/Safari */

/* Tag Pills */
.mp-tag-pill {
    white-space: nowrap;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mp-tag-pill:hover {
    border-color: var(--global-palette1);
    color: var(--global-palette1);
}

.mp-tag-pill.active {
    background: var(--global-palette1);
    color: #fff;
    border-color: var(--global-palette1);
}

.mp-tag-secondary {
    color: #6b7280;
    font-size: 13px;
    background: transparent;
    border-style: dashed;
}

/* Sort Buttons (The ones in your screenshot) */
.mp-sort-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #ddd;
    color: #444;
    margin-left: 10px;
}

.mp-sort-btn.active {
    background: var(--global-palette1);
    color: white;
    border-color: var(--global-palette1);
}

/* facet sidebar */

/* Layout Container */
.mp-hub-layout {
    display: grid;
    grid-template-columns: 240px 1fr; /* Sidebar width: 240px */
    gap: 40px;
    margin-top: 30px;
}

/* Sidebar Styling */
.mp-hub-sidebar {
    border: 1px solid var(--global-palette7); border-radius: 8px; background-color: #ffffff; padding: 20px;
    height: fit-content;

}

.mp-facet-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--global-palette7);
}

.mp-facet-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.mp-facet-group summary {
    cursor: pointer;
    padding: 6px 0;
    margin-bottom: 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mp-facet-group[open] summary {
    margin-bottom: 15px;
}
.mp-facet-group summary::-webkit-details-marker {
    display: none;
}
.mp-facet-group summary::marker {
    content: ""; /* Hide default marker in Firefox/Chromium */
}
/* Modern outline chevron pointing down by default */
.mp-facet-group summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--global-palette6);
    border-bottom: 2px solid var(--global-palette6);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-right: 4px;
}
/* Chevron pointing up when details is open */
.mp-facet-group[open] summary::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}
.mp-facet-group h4 {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--global-palette6);
    margin: 0;
}

.mp-facet-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mp-facet-link {
    text-decoration: none;
    color: var(--global-palette4);
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.mp-facet-link:hover,
.mp-facet-link.active {
    background: #f0f7ff;
    color: var(--global-palette1);
}

/* Tag Cloud Facets */
.mp-facet-tag {
    display: inline-block;
    text-decoration: none;
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 12px;
    margin: 2px;
}

.mp-facet-tag.active {
    background: var(--global-palette1);
    color: #fff;
}

/* Responsive Fix */
@media (max-width: 768px) {
    .mp-hub-layout {
        grid-template-columns: 1fr; /* Stacks sidebar on top of grid on mobile */
    }
    .mp-hub-sidebar {
        margin-bottom: 20px;
    }

    .mp-hub-card {
        flex-direction: column;
    }
    .mp-card-image {
        width: 100%;
        height: 200px;
    }
}

/*******************/
/* Sidebar Link Base */
.mp-facet-link {
    display: flex;
    justify-content: space-between; /* Pushes number to the right */
    align-items: center;
    text-decoration: none;
    color: #444;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mp-facet-link:hover {
    background-color: #f8f9fa;
    color: var(--global-palette1);
}

/* The Bubble Count */
.mp-count {
    background-color: #e1ecf4; 
    color: var(--global-palette6);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;       
    min-width: 24px;
    text-align: center;
    line-height: 1.4;
}

/* Active State Colors */
.mp-facet-link.active {
    background-color: var(--global-palette1);
    color: #ffffff !important;
}

.mp-facet-link.active .mp-count {
    background-color: rgba(255, 255, 255, 0.2); /* Semi-transparent white bubble */
    color: #ffffff;
}

/* Sidebar Tag specific style (optional) */
.mp-tag-name {
    opacity: 0.8;
}