/* ============================================
   Ruwe History App Styles (Blog Aesthetic)
   ============================================ */

/* ===== SHARED TOKENS ===== */
:root {
    --history-red: #dc143c;
    --history-dark: #1a1a1a;
    --history-light: #f5f5f5;
    --history-border: #e0e0e0;
    --history-text: #333;
    --history-muted: #777;
    --font-heading: 'Lora', serif;
    --font-body: 'Roboto', sans-serif;
}

/* ─── Hero ─── */
.history-hero {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 60%, #700010 100%);
    color: #fff;
    padding: 3.5rem 1rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.history-hero::after {
    content: '\f66f'; /* Landmark icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    font-size: 16rem;
    opacity: 0.03;
    right: -3rem;
    bottom: -4rem;
    color: var(--history-red);
}
.history-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.history-hero p {
    font-size: 1.05rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 1rem;
}

/* ─── Filter Controls ─── */
.history-controls {
    background: #f5f5f5;
    padding: 1.2rem 0;
    border-bottom: 2px solid var(--history-border);
    position: sticky;
    top: 70px;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.history-controls-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}
.history-search-form {
    display: flex;
    flex: 1;
    min-width: 200px;
    max-width: 380px;
}
.history-search-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid #ccc;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}
.history-search-form input:focus { border-color: var(--history-red); }
.history-search-form button {
    padding: 0.6rem 1rem;
    background: var(--history-red);
    color: #fff;
    border: 2px solid var(--history-red);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background 0.3s;
}
.history-search-form button:hover { background: #b01030; }

.history-pill-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.history-pill {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid #ccc;
    color: #444;
    background: #fff;
    transition: all 0.25s;
    white-space: nowrap;
}
.history-pill:hover, .history-pill.active {
    background: var(--history-red);
    border-color: var(--history-red);
    color: #fff;
}

/* ─── Layout ─── */
.history-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0 3rem;
}
@media (min-width: 992px) {
    .history-layout { grid-template-columns: 1fr 320px; }
}

/* ─── Cards Grid ─── */
.history-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (min-width: 600px) {
    .history-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── History Card (Blog Style) ─── */
.h-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    border: 1px solid transparent;
}
.h-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.14);
    border-color: var(--history-red);
}
.h-card-img-wrapper {
    display: block;
    position: relative;
    overflow: hidden;
}
.h-card-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.h-card:hover .h-card-img { transform: scale(1.05); }
.h-card-placeholder {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, #1a1a1a, #8b0000);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.15);
}
.h-badge {
    position: absolute;
    bottom: 0.6rem;
    left: 0.6rem;
    background: var(--history-red);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.h-card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}
.h-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}
.h-card-title a {
    text-decoration: none;
    color: var(--history-text);
    transition: color 0.2s;
}
.h-card-title a:hover { color: var(--history-red); }
.h-card-excerpt {
    font-size: 0.86rem;
    color: var(--history-muted);
    line-height: 1.6;
    flex: 1;
}
.h-card-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.76rem;
    color: #888;
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid #f0f0f0;
}
.h-card-meta i { color: var(--history-red); }

/* ─── Featured Block ─── */
.h-featured {
    margin-bottom: 2.5rem;
}
.h-featured-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    transition: transform 0.3s;
}
@media (min-width: 768px) {
    .h-featured-card { grid-template-columns: 1fr 1fr; }
}
.h-featured-card:hover { transform: translateY(-3px); }
.h-featured-img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}
.h-featured-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}
.h-featured-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0.8rem 0;
    line-height: 1.35;
}
.h-featured-title a {
    text-decoration: none;
    color: var(--history-text);
}
.h-featured-title a:hover { color: var(--history-red); }

/* ─── Section Heading ─── */
.h-section-heading {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--history-text);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--history-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.h-section-heading i { color: var(--history-red); }

/* ─── Sidebar ─── */
.h-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}
.h-widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}
.h-widget-header {
    background: linear-gradient(135deg, #1a1a1a, #dc143c);
    color: #fff;
    padding: 0.8rem 1.2rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.h-widget-body { padding: 1.2rem; }
.h-cat-list { list-style: none; padding: 0; margin: 0; }
.h-cat-list li { border-bottom: 1px solid #f0f0f0; }
.h-cat-list li:last-child { border-bottom: none; }
.h-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.h-cat-list a:hover { color: var(--history-red); }

/* Timeline Links inside Sidebar */
.timeline-mini-list { list-style: none; padding:0; margin:0; }
.timeline-mini-list li { margin-bottom: 0.8rem; border-left: 2px solid var(--history-red); padding-left: 0.8rem; }
.timeline-mini-year { font-weight: 700; color: var(--history-red); font-size: 0.85rem;}
.timeline-mini-desc { font-size: 0.85rem; color: #555; }

/* ─── Empty State ─── */
.h-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #888;
}
.h-empty i { font-size: 3.5rem; color: #ddd; display: block; margin-bottom: 1rem; }
.h-empty h3 { font-family: var(--font-heading); font-size: 1.3rem; color: #555; margin-bottom: 0.5rem; }

/* Buttons & Pagination */
.h-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--history-red);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s;
}
.h-btn:hover { background: #b01030; }

.h-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.h-page-btn {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    background: #fff;
    color: #333;
    border: 2px solid var(--history-border);
    transition: all 0.25s;
}
.h-page-btn:hover { border-color: var(--history-red); color: var(--history-red); }
.h-page-btn.current {
    background: var(--history-red);
    color: #fff;
    border-color: var(--history-red);
}

/* Detail Hero */
.detail-hero {
    background: linear-gradient(135deg, rgba(0,0,0,0.85), rgba(26,26,26,0.95));
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 4rem 1rem 3rem;
    text-align: center;
}
.detail-hero h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.detail-meta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 0.75rem;
}
.detail-meta i { color: var(--history-red); margin-right: 0.3rem; }
