/* ==========================================================================
   FEWA Core Design System - Premium Archival Web Stylesheet
   Curated warm navy, brass, and glassmorphism elements
   ========================================================================== */

/* 1. Global Reset & Variables */
:root {
    --primary-deep: #0f172a;       /* Archívum mélykék */
    --primary-slate: #1e293b;      /* Sötét pala */
    --accent-gold: #d97706;        /* Történelmi sárgaréz */
    --accent-amber: #f59e0b;       /* Borostyán */
    --bg-warm-light: #fdfdfc;      /* Meleg papírfehér */
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-glass: rgba(15, 23, 42, 0.08);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --shadow-premium: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.03);
}

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

body {
    background-color: var(--bg-warm-light);
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 2. Semantic Layout Structure */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* 3. Header & Navigation (Glassmorphism & Gold line) */
.main-header {
    background: rgba(253, 253, 252, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-deep);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.logo-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-item {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-item:hover {
    color: var(--accent-gold);
}

.external-nav {
    color: var(--text-muted);
}

/* 4. Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-deep) 0%, #1e293b 100%);
    border-radius: 24px;
    padding: 4rem 3rem;
    color: #ffffff;
    margin-bottom: 3rem;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.25);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    opacity: 0.9;
    font-weight: 300;
}

/* Keresőmező */
.search-box-container {
    max-width: 650px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    background: #ffffff;
    padding: 0.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    align-items: center;
}

.search-icon {
    font-size: 1.25rem;
    margin-left: 1rem;
    margin-right: 0.5rem;
}

.search-field {
    border: none;
    outline: none;
    flex-grow: 1;
    font-size: 1rem;
    color: var(--primary-deep);
    padding: 0.5rem;
}

.search-submit {
    background: var(--accent-gold);
    color: #ffffff;
    border: none;
    outline: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-submit:hover {
    background: #b45309;
}

/* 5. Stats Cards */
.stats-section {
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-premium);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    font-size: 2.25rem;
    background: rgba(217, 119, 6, 0.08);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-deep);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* 6. Layout Grid */
.content-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
}

/* Sidebar Filters */
.filter-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-premium);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-deep);
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 0.5rem;
}

.filter-item {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.filter-item:hover {
    color: var(--accent-gold);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    text-decoration: none;
    color: var(--text-dark);
    background: rgba(15, 23, 42, 0.04);
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background: var(--accent-gold);
    color: #ffffff;
}

/* Archives Grid */
.archives-list-section {
    min-width: 0; /* Megakadályozza a flexbox kitolódást */
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--primary-deep);
}

.archives-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.archive-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-premium);
    padding: 2rem;
    border-radius: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.archive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.12), 0 1px 5px rgba(15, 23, 42, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-title a {
    text-decoration: none;
    color: var(--primary-deep);
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: var(--accent-gold);
}

.card-excerpt {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1.5rem;
}

.card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    border-top: 1px dashed rgba(15, 23, 42, 0.08);
    padding-top: 1rem;
}

.meta-url {
    color: var(--accent-gold);
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-archive {
    background: var(--primary-deep);
    color: #ffffff;
}

.btn-view-archive:hover {
    background: var(--primary-slate);
}

/* 7. Archive Single (Replay Page) */
.archive-single-container {
    padding-top: 1.5rem;
}

.archive-header-section {
    margin-bottom: 2rem;
}

.btn-back {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.btn-back:hover {
    color: var(--accent-gold);
}

.archive-main-info {
    margin-top: 1rem;
}

.archive-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-deep);
    letter-spacing: -0.5px;
}

.archive-timestamps {
    margin-top: 0.5rem;
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Kétoszlopos Replay elrendezés */
.archive-layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

/* ReplayWeb.page Keret */
.replay-player-container {
    background: #000000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.player-wrapper {
    position: relative;
    width: 100%;
    /* 75vh magas, professzionális beágyazási méret */
    height: 78vh;
}

.fewa-replay-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.player-error-box {
    background: #ffffff;
    padding: 4rem;
    text-align: center;
    border-radius: 20px;
}

.error-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Szélső panel metaadat kártyák */
.meta-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-premium);
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.meta-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-deep);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* AI kártya egyedi elemek */
.card-ai-insights {
    border-left: 4px solid var(--accent-gold);
}

.relevance-badge-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    background: rgba(217, 119, 6, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 12px;
}

.relevance-value {
    background: var(--accent-gold);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    font-weight: 800;
}

.ai-summary-box h4,
.ai-keywords-box h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.ai-summary-box p {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1.25rem;
}

.ai-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ai-tag {
    font-size: 0.8rem;
    background: rgba(217, 119, 6, 0.08);
    color: var(--accent-gold);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Dublin Core táblázat */
.dc-table {
    width: 100%;
    border-collapse: collapse;
}

.dc-table th {
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.75rem 0;
    width: 100px;
    vertical-align: top;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.dc-table td {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.dc-link {
    text-decoration: none;
    color: var(--accent-gold);
    font-weight: 600;
}

.dc-link:hover {
    text-decoration: underline;
}

.dc-term {
    display: inline-block;
    font-size: 0.8rem;
    background: rgba(15, 23, 42, 0.04);
    color: var(--primary-deep);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.dc-empty {
    font-style: italic;
    color: var(--text-muted);
}

/* 8. Footer */
.main-footer {
    background: var(--primary-deep);
    color: rgba(255, 255, 255, 0.7);
    border-top: 4px solid var(--accent-gold);
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-operator a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.footer-operator a:hover {
    color: var(--accent-amber);
}

.footer-status {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    display: inline-block;
}

.status-online {
    color: #10b981;
    font-weight: 700;
}

/* 9. Responsive adjustments */
@media (max-width: 1024px) {
    .content-layout-grid,
    .archive-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}
