/* Main container - still uses flex for the sidebar/content split on large screens */
.filtered-archive-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Provides space between filters and results */
}

/* Modern Sidebar Styles */
.archive-filters {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Remove default dots and padding from all levels */
.archive-filters ul, 
.archive-filters ul.children {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Base style for every list item - Hides the (Number) count */
.archive-filters li {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    /* Hides text nodes (the counts) inside the li */
    font-size: 0 !important; 
    color: transparent !important;
}

/* Style for the links - Restores visibility for the labels */
.archive-filters li a {
    display: inline-block;
    padding: 10px 12px;
    color: #334155; /* Modern Slate Grey */
    text-decoration: none !important;
    transition: all 0.2s ease;
    border-radius: 6px;
    width: auto;
    /* Sets the actual label size */
    font-size: 15px !important; 
}

/* Active filter highlight */
.archive-filters a.active {
    font-weight: bold;
    color: #2563eb; /* Modern Blue */
    background-color: #e0e7ff; /* Light blue background for active */
}

/* Hover effect: Subtle background highlight */
.archive-filters li a:hover {
    background-color: #f1f5f9;
    color: #2563eb; /* Modern Blue */
}

/* --- HIERARCHY & INDENTATION --- */
/* Indent child items and add a vertical "guide line" */
.archive-filters ul.children {
    margin-left: 18px !important;
    border-left: 2px solid #e2e8f0; /* Soft vertical line to show relation */
    margin-top: 2px !important;
    margin-bottom: 5px !important;
}

/* Modern Child Indicator (The horizontal branch) */
.archive-filters ul.children li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    width: 10px;
    height: 2px;
    background-color: #e2e8f0;
}

/* Ensure nested labels stay consistent */
.archive-filters ul.children li a {
    font-size: 14px !important; 
}

/* Bold the top-level parent items only (adjusted for plugin's H3 structure) */
.archive-filters h3 + ul > li > a {
    font-weight: 600;
    color: #1e293b;
    font-size: 15px !important;
}

/* Styling for the Filters title */
.archive-filters h2 {
    margin-bottom: 10px;
    border-bottom: 1px solid #d6d6d6;
}

/* The results area is now a grid container */
.archive-results {
    width: 100%;
    display: grid;
    /* Uses the --vp-column-count variable from the shortcode, with a fallback to 1 column */
    grid-template-columns: repeat(var(--vp-column-count, 1), 1fr);
    gap: 20px; /* Space between cards */
}

/* Responsive layout for the main sidebar/content split */
@media (min-width: 768px) {
    .archive-filters {
        width: 25%;
        flex-shrink: 0; /* Prevents the sidebar from shrinking */
    }
    .archive-results {
        width: calc(75% - 30px); /* Adjust for the gap */
    }
}


/* Card styling for each post */
.vp-result-card {
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Ensures image corners are rounded if the card is */
    display: flex;
    flex-direction: column;
}

.vp-result-card .vp-card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.vp-result-card .vp-card-content {
    padding: 15px;
}

.vp-result-card .entry-title {
    margin-top: 0;
    font-size: 1.2em; /* Example size, will be inherited from theme mostly */
}
