*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue-eu: #003399;
    --blue-eu-light: #1a4db3;
    --blue-eu-dark: #001f66;
    --gold-eu: #FFCC00;
    --white: #ffffff;
    --gray-100: #f5f6f8;
    --gray-200: #e8eaee;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --accent: #003399;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--gray-100);
    color: var(--gray-700);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── HEADER ── */
header {
    background: var(--blue-eu);
    padding: 0 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--white);
}

.logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--white);
    border: 2px solid var(--gold-eu);
    flex-shrink: 0;
}

.logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
}

.back-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.15s;
}

.back-link:hover { color: var(--white); }

/* ── HERO ── */
.page-hero {
    background: linear-gradient(135deg, var(--blue-eu-dark), var(--blue-eu));
    color: var(--white);
    padding: 3.5rem 2rem 3rem;
    text-align: center;
}

.wg-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-eu);
    margin-bottom: 0.5rem;
}

.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.page-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── MAIN ── */
.papers-main {
    flex: 1;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ── FILTERS ── */
.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    color: var(--gray-500);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-btn:hover {
    border-color: var(--blue-eu);
    color: var(--blue-eu);
}

.filter-btn.active {
    background: var(--blue-eu);
    border-color: var(--blue-eu);
    color: var(--white);
}

/* ── PAPER CARDS ── */
.papers-list {
    display: grid;
    gap: 1.2rem;
}

.paper-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem 1.8rem;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.paper-card:hover {
    box-shadow: 0 6px 24px rgba(0,51,153,0.09);
    transform: translateY(-2px);
}

.paper-card[data-type="position"] { border-left: 4px solid var(--blue-eu); }
.paper-card[data-type="article"]  { border-left: 4px solid var(--gold-eu); }
.paper-card[data-type="brief"]    { border-left: 4px solid #7c3aed; }

.paper-meta {
    flex: 1;
    min-width: 0;
}

.paper-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.paper-badge.position { background: rgba(0,51,153,0.1);  color: var(--blue-eu); }
.paper-badge.article  { background: rgba(255,204,0,0.25); color: #7a5c00; }
.paper-badge.brief    { background: rgba(124,58,237,0.1); color: #5b21b6; }

.paper-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.paper-info {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: 0.6rem;
}

.paper-desc {
    font-size: 0.88rem;
    color: var(--gray-600, #4b5563);
    line-height: 1.6;
}

.paper-download {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--blue-eu);
    color: var(--white);
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    align-self: center;
    white-space: nowrap;
}

.paper-download:hover { background: var(--blue-eu-light); }

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--white);
    border: 2px dashed var(--gray-200);
    border-radius: 16px;
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

.empty-state h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.93rem;
    color: var(--gray-500);
    max-width: 420px;
    margin: 0 auto 1.8rem;
    line-height: 1.65;
}

.empty-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline-sm {
    display: inline-block;
    border: 1.5px solid var(--blue-eu);
    color: var(--blue-eu);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.btn-outline-sm:hover {
    background: var(--blue-eu);
    color: var(--white);
}

/* ── FOOTER ── */
footer {
    background: var(--blue-eu-dark);
    color: rgba(255,255,255,0.5);
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.15s;
}

footer a:hover { color: var(--white); }

/* ── HIDDEN (filter) ── */
.paper-card.hidden { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .paper-card { flex-direction: column; }
    .paper-download { align-self: flex-start; }
    .header-inner { gap: 0.5rem; }
    .brand-name { display: none; }
}
