/* Research & Studies Theme Styles */
:root {
    --rs-primary: #CC822E;
    --rs-primary-hover: #b47023;
    --rs-primary-bg: #fff8f0;
    --rs-border: #e9ecef;
    --rs-text-dark: #1e293b;
    --rs-text-body: #475569;
    --rs-bg-card: #ffffff;
}

.rs-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* 1. Refined, Compact Heading (Reduced from 2.0rem to 1.3rem) */
.rs-heading-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rs-border);
}

.rs-status-pill {
    background: var(--rs-primary-bg);
    color: var(--rs-primary);
    border: 1px solid rgba(204, 130, 46, 0.35);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: 999px;
}

.rs-section-heading {
    color: var(--rs-primary);
    font-size: 1.3rem; /* Compact size */
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.rs-heading-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(204, 130, 46, 0.25), transparent);
}

/* =========================================================
   VIEW 1: "cards" (Default - Left Indexed Academic Cards)
   ========================================================= */
.rs-view-cards .rs-items-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rs-view-cards .rs-study-item {
    display: flex;
    background: var(--rs-bg-card);
    border: 1px solid var(--rs-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rs-view-cards .rs-study-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(204, 130, 46, 0.08);
    border-color: rgba(204, 130, 46, 0.4);
}

.rs-view-cards .rs-item-side {
    background: #fdfcfb;
    border-right: 1px solid var(--rs-border);
    width: 64px;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 22px;
}

.rs-view-cards .rs-item-index {
    color: var(--rs-primary);
    font-size: 14px;
    font-weight: 800;
    font-family: monospace;
}

.rs-view-cards .rs-side-rail {
    flex-grow: 1;
    width: 2px;
    background: linear-gradient(to bottom, var(--rs-primary), transparent);
    margin-top: 10px;
    opacity: 0.3;
}

.rs-card-box {
    flex-grow: 1;
    padding: 22px 28px;
}

.rs-card-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.rs-type-badge {
    background: var(--rs-primary-bg);
    color: var(--rs-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.rs-status-badge {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.rs-status-ongoing {
    color: #0369a1;
    background: #e0f2fe;
}

.rs-status-completed {
    color: #15803d;
    background: #dcfce7;
}

.rs-study-title {
    color: var(--rs-text-dark);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.rs-study-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 14px;
    font-weight: 500;
}

.rs-author-icon {
    width: 14px;
    height: 14px;
    color: var(--rs-primary);
}

.rs-study-desc {
    font-size: 14.5px;
    color: var(--rs-text-body);
    line-height: 1.7;
    text-align: justify;
}

.rs-study-desc p {
    margin: 0 0 10px 0;
}

.rs-study-desc p:last-child {
    margin: 0;
}

/* =========================================================
   VIEW 2: "grid" (2-Column Grid Layout)
   ========================================================= */
.rs-view-grid .rs-items-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.rs-view-grid .rs-study-item {
    display: flex;
    flex-direction: column;
    background: var(--rs-bg-card);
    border: 1px solid var(--rs-border);
    border-top: 3px solid var(--rs-primary);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rs-view-grid .rs-study-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.rs-view-grid .rs-item-side {
    display: none;
}

/* =========================================================
   VIEW 3: "timeline" (Vertical Line & Tag Node)
   ========================================================= */
.rs-view-timeline .rs-items-wrap {
    position: relative;
    padding-left: 36px;
}

.rs-view-timeline .rs-items-wrap::before {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 25px;
    left: 11px;
    width: 2px;
    background: var(--rs-primary);
}

.rs-view-timeline .rs-study-item {
    position: relative;
    margin-bottom: 28px;
}

.rs-view-timeline .rs-item-side {
    position: absolute;
    left: -36px;
    top: 20px;
}

.rs-view-timeline .rs-item-index {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--rs-primary);
    color: #fff;
    font-size: 11px;
    line-height: 24px;
    text-align: center;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--rs-primary);
}

.rs-view-timeline .rs-side-rail {
    display: none;
}

.rs-view-timeline .rs-card-box {
    background: #fff;
    border: 1px solid var(--rs-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Empty State Notice */
.rs-empty-notice {
    background: #fdfaf6;
    border-left: 3px solid var(--rs-primary);
    padding: 14px 18px;
    color: #64748b;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 820px) {
    .rs-view-grid .rs-items-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .rs-view-cards .rs-item-side {
        width: 48px;
        min-width: 48px;
    }
    .rs-card-box {
        padding: 18px 20px;
    }
    .rs-study-title {
        font-size: 1.05rem;
    }
}
