/* ── Full-screen wrapper ──────────────────────────────── */
.page-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr 280px;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebars ─────────────────────────────────────────── */
.sidebar-left,
.sidebar-right {
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #3a3530 transparent;
}

.sidebar-left  { border-right: 1px solid #2a2520; background: #111009; }
.sidebar-right { border-left:  1px solid #2a2520; background: #0e0d0b; }

.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar { width: 3px; }
.sidebar-left::-webkit-scrollbar-thumb,
.sidebar-right::-webkit-scrollbar-thumb { background: #3a3530; border-radius: 2px; }

.sidebar-label {
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #6b6560;
    padding: 1rem 1.1rem 0.6rem;
    border-bottom: 1px solid #2a2520;
    position: sticky;
    top: 0;
    z-index: 10;
    background: inherit;
}

/* ── Sidebar card ─────────────────────────────────────── */
.side-card {
    display: block;
    text-decoration: none;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #1e1c19;
    transition: background 0.2s;
    cursor: pointer;
    animation: fadeUp 0.4s ease both;
}

.side-card:hover { background: rgba(255,255,255,0.04); }

.side-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 3px;
    margin-bottom: 0.55rem;
    display: block;
    background: #2a2520;
}

.side-badge {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #c8a96e;
    border: 1px solid #c8a96e55;
    padding: 0.1rem 0.45rem;
    border-radius: 2px;
    margin-bottom: 0.35rem;
}

.side-date {
    font-size: 0.6rem;
    color: #5a5550;
    font-weight: 500;
    margin-left: 0.4rem;
}

.side-title {
    font-family: var(--serif);
    font-size: 0.9rem;
    line-height: 1.38;
    color: #d8d4ce;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Center column ────────────────────────────────────── */
.center-main {
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: #0c0b0a;
    scrollbar-width: thin;
    scrollbar-color: #3a3530 transparent;
}

.center-main::-webkit-scrollbar { width: 3px; }
.center-main::-webkit-scrollbar-thumb { background: #3a3530; border-radius: 2px; }

/* ── Hero ─────────────────────────────────────────────── */
.hero-card {
    position: relative;
    display: block;
    text-decoration: none;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    animation: fadeUp 0.5s ease both;
}

.hero-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: #2a2520;
    transition: transform 0.5s ease;
}

.hero-card:hover .hero-img { transform: scale(1.03); }

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(10,9,8,0.96) 0%,
        rgba(10,9,8,0.55) 45%,
        transparent 75%);
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: #c8a96e;
    color: #0c0b0a;
    padding: 0.2rem 0.55rem;
    border-radius: 2px;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.hero-title {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    line-height: 1.2;
    color: #f0ede8;
    margin-bottom: 0.6rem;
}

.hero-desc {
    font-size: 0.85rem;
    color: rgba(240,237,232,0.65);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.hero-meta {
    font-size: 0.65rem;
    color: #6b6560;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ── Secondary 2×2 grid ───────────────────────────────── */
.sec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    border-top: 1px solid #1e1c19;
}

.sec-card {
    display: block;
    text-decoration: none;
    padding: 1rem 1.2rem;
    border-right: 1px solid #1e1c19;
    border-bottom: 1px solid #1e1c19;
    transition: background 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    animation: fadeUp 0.45s ease both;
}

.sec-card:nth-child(even) { border-right: none; }
.sec-card:hover { background: rgba(255,255,255,0.03); }

.sec-img {
    width: 100%;
    aspect-ratio: 16/7;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    background: #2a2520;
    flex-shrink: 0;
}

.sec-badge {
    display: inline-block;
    font-size: 0.57rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #c8a96e;
    border: 1px solid #c8a96e44;
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
}

.sec-date {
    font-size: 0.58rem;
    color: #4a4540;
    margin-left: 0.35rem;
}

.sec-title {
    font-family: var(--serif);
    font-size: 0.95rem;
    line-height: 1.35;
    color: #ccc9c3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sec-desc {
    font-size: 0.72rem;
    color: #5a5550;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Loading & error ──────────────────────────────────── */
.loading-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 26px; height: 26px;
    border: 2px solid #2a2520;
    border-top-color: #c8a96e;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.error-card {
    padding: 1rem 1.1rem;
    font-size: 0.78rem;
    color: #c8695e;
    border-left: 2px solid #c8695e;
    margin: 0.75rem;
    background: rgba(200,105,94,0.06);
    border-radius: 2px;
}

/* ── Animations ───────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeUp  {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ───────────────────────────────────────── */

/* Tablet landscape: 2 columns (no right sidebar) */
@media (max-width: 1100px) {
    .page-wrapper {
        grid-template-columns: 260px 1fr;
        grid-template-rows: 1fr;
        height: 100vh;
    }
    .sidebar-right { display: none; }
}

/* Tablet portrait: stack hero + left sidebar below */
@media (max-width: 768px) {
    html, body { overflow: auto; }

    .page-wrapper {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .center-main {
        overflow: visible;
        height: auto;
    }

    .sidebar-left {
        overflow: visible;
        height: auto;
        border-right: none;
        border-top: 1px solid #2a2520;
    }

    .sidebar-right { display: none; }

    .hero-title { font-size: 1.5rem; }

    .sec-grid {
        grid-template-columns: 1fr;
    }
    .sec-card { border-right: none; }

    .sidebar-label {
        position: static;
    }
}

/* Mobile: tighter spacing */
@media (max-width: 480px) {
    .hero-overlay { padding: 1.25rem 1rem 1rem; }
    .hero-badge   { font-size: 0.55rem; }
    .hero-title   { font-size: 1.25rem; }
    .hero-desc    { -webkit-line-clamp: 2; }

    .sec-card  { padding: 0.75rem 0.9rem; }
    .side-card { padding: 0.75rem 0.9rem; }

    .side-title { font-size: 0.85rem; }
    .sec-title  { font-size: 0.88rem; }
}