
/* Filter bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #f0e8e8;
    box-shadow: 0 2px 8px rgba(45,5,7,0.04);
}
.filter-bar label { font-size: 0.82rem; font-weight: 600; color: #2d0507; white-space: nowrap; }
.filter-bar select, .filter-bar input {
    padding: 0.5rem 0.85rem;
    border: 1px solid #e8c8c8;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    color: #1a1212;
    background: #faf8f5;
}
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: #7b1113; }

/* Year group heading */
.year-group { margin-bottom: 3rem; }
.year-heading {
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #2d0507;
    border-left: 4px solid #c4893a;
    padding-left: 1rem;
    margin-bottom: 1.25rem;
}

/* Research area pills */
.area-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}
.area-tab {
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1.5px solid #e8c8c8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #6b5c5c;
}
.area-tab:hover, .area-tab.active {
    background: #7b1113;
    border-color: #7b1113;
    color: white;
}

/* Publication card */
.pub-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    border: 1px solid #f0e8e8;
    box-shadow: 0 2px 6px rgba(45,5,7,0.04);
    transition: all 0.2s;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.pub-card:hover { box-shadow: 0 6px 20px rgba(123,17,19,0.1); transform: translateY(-2px); }
.pub-year-badge {
    background: #fdf0e0;
    color: #7b1113;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    white-space: nowrap;
    min-width: 50px;
    text-align: center;
}
.pub-body { flex: 1; }
.pub-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d0507;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}
.pub-title a { color: #7b1113; }
.pub-title a:hover { text-decoration: underline; }
.pub-authors { font-size: 0.85rem; color: #6b5c5c; margin-bottom: 0.4rem; }
.pub-journal {
    font-size: 0.82rem;
    color: #c4893a;
    font-style: italic;
    font-weight: 500;
}

/* Stat row */
.research-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.r-stat { background: white; border-radius: 10px; padding: 1.25rem; text-align: center; border: 1px solid #f0e8e8; }
.r-stat .val { font-size: 2rem; font-weight: 800; color: #7b1113; font-family: 'Outfit', sans-serif; }
.r-stat .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: #6b5c5c; margin-top: 0.25rem; }

/* Focus areas */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.focus-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #f0e8e8;
    transition: all 0.2s;
}
.focus-card:hover { border-color: #7b1113; box-shadow: 0 4px 16px rgba(123,17,19,0.08); }
.focus-card i { font-size: 1.75rem; color: #c4893a; margin-bottom: 0.75rem; }
.focus-card h4 { color: #2d0507; font-size: 1rem; margin-bottom: 0.5rem; }
.focus-card p { font-size: 0.85rem; color: #6b5c5c; margin: 0; }

.empty-state { text-align: center; padding: 4rem 2rem; color: #6b5c5c; }
.empty-state i { font-size: 3rem; color: #e8c8c8; margin-bottom: 1rem; }

.research-title {
    font-size: 1.5rem;
    color: #2d0507;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

/* Grid Layout */
.research-grid-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
    align-items: start;
}

.research-sidebar-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #f0e8e8;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(45,5,7,0.03);
    width: 100%;
    box-sizing: border-box;
}

.research-sidebar-section.stats-box {
    background: #faf8f5;
    border-color: #e8c8c8;
}

.research-sidebar-section .research-stats {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 0;
}

.research-sidebar-section .focus-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

.research-sidebar-section .focus-card {
    padding: 1rem;
    border-radius: 10px;
}

.research-sidebar-section .focus-card i {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 992px) {
    .research-grid-container {
        grid-template-columns: 100%;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .research-side-area {
        display: contents; /* Allows children to participate in the grid-container flex stack */
    }
    
    .research-title { padding-top: 0; }
    
    #blue-zone { order: 1; width: 100%; display: block; }
    .research-main-area { order: 2; width: 100%; display: block; }
    #green-zone { order: 3; width: 100%; display: block; }
    
    .research-sidebar-section {
        width: 100%;
        padding: 1.25rem;
        margin-bottom: 0; /* Let flex gap handle spacing */
    }

    .research-sidebar-section .research-stats {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: 0.75rem;
    }

    .focus-card {
        width: 100%;
        box-sizing: border-box;
    }
}
