/* ==========================================================
   IMKBY Egkyklioi - Cinematic Library Edition
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=GFS+Neohellenic:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

.imkby-egk-app {
    --burgundy: #6b1f3a;
    --burgundy-dk: #4a1428;
    --burgundy-deep: #2d0d1a;
    --gold: #c9a961;
    --gold-light: #e6c989;
    --gold-bright: #f5d99a;
    --cream: #faf7f0;
    --cream-warm: #f5ebd6;
    --dark: #2d2416;
    --dark-soft: #4a3f29;

    font-family: 'GFS Neohellenic', 'Inter', system-ui, sans-serif;
    color: var(--dark);
    background: linear-gradient(180deg, #faf7f0 0%, #f5ebd6 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.imkby-egk-app * { box-sizing: border-box; }

/* =========================================================
   HERO SECTION
   ========================================================= */
.egk-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--gold-light);
    background: linear-gradient(135deg, var(--burgundy-deep) 0%, var(--burgundy) 50%, var(--burgundy-dk) 100%);
    padding: 80px 20px;
}

.egk-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.egk-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(201, 169, 97, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(201, 169, 97, 0.1) 0%, transparent 50%);
}

.egk-hero-orbs .orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.3) 0%, transparent 70%);
    filter: blur(40px);
    animation: float 20s infinite ease-in-out;
}
.orb-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; bottom: -50px; right: 10%; animation-delay: -7s; }
.orb-3 { width: 200px; height: 200px; top: 40%; right: -50px; animation-delay: -14s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 40px) scale(0.95); }
}

.egk-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.egk-hero-ornament {
    color: var(--gold);
    margin: 0 auto 24px;
    width: 200px;
    opacity: 0.7;
}

.egk-hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.1;
    margin: 0 0 20px;
    color: var(--gold-bright);
    letter-spacing: 0.5px;
}
.egk-hero-title .word {
    display: inline-block;
    margin: 0 8px;
    opacity: 0;
    transform: translateY(30px);
    animation: reveal-up 0.8s cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: var(--d, 0s);
}

@keyframes reveal-up {
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: reveal-up 0.8s cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: var(--d, 0s);
}

.egk-hero-subtitle {
    font-size: clamp(15px, 2vw, 19px);
    color: rgba(230, 201, 137, 0.8);
    margin: 0 0 40px;
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
}

.egk-hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.egk-hero-stats .stat {
    text-align: center;
    padding: 16px 24px;
    background: rgba(201, 169, 97, 0.08);
    border: 1px solid rgba(201, 169, 97, 0.25);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.egk-hero-stats .stat:hover {
    background: rgba(201, 169, 97, 0.15);
    transform: translateY(-2px);
    border-color: var(--gold);
}
.stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--gold-bright);
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label {
    font-size: 12px;
    color: rgba(230, 201, 137, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.egk-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--gold);
    color: var(--burgundy-deep);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.4);
}
.egk-hero-cta:hover {
    background: var(--gold-bright);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 169, 97, 0.6);
}
.egk-hero-cta svg {
    animation: bounce-down 2s infinite;
}
@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* =========================================================
   SEARCH SECTION
   ========================================================= */
.egk-search-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}

.egk-search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: white;
    padding: 14px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(107, 31, 58, 0.08);
    align-items: stretch;
    position: relative;
    z-index: 10;
}

.search-input-wrapper {
    position: relative;
    flex: 1 1 280px;
    min-width: 200px;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--burgundy);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid #e5dcc4;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--cream);
}
.search-input:focus {
    outline: none;
    border-color: var(--burgundy);
    background: white;
    box-shadow: 0 0 0 4px rgba(107, 31, 58, 0.08);
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #e5dcc4;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--cream);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
}
.filter-select:focus, .filter-select:hover {
    border-color: var(--burgundy);
    background: white;
}

.search-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-dk));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(107, 31, 58, 0.25);
}
.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(107, 31, 58, 0.4);
}

.clear-link {
    align-self: center;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    padding: 0 12px;
    transition: color 0.2s;
}
.clear-link:hover { color: var(--burgundy); }

.search-result-info {
    margin-top: 14px;
    padding: 12px 18px;
    background: var(--cream-warm);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    font-size: 14px;
    color: var(--dark-soft);
}
.search-result-info strong { color: var(--burgundy); font-size: 18px; }
.search-result-info em { color: var(--burgundy); font-style: normal; font-weight: 700; }

/* =========================================================
   SECTION TITLES
   ========================================================= */
.section-title {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    color: var(--burgundy);
    margin: 60px 0 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.title-deco {
    color: var(--gold);
    font-size: 18px;
    opacity: 0.7;
}

/* =========================================================
   TIMELINE
   ========================================================= */
.egk-timeline-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.egk-timeline {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: flex-end;
    padding: 40px 30px 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.05);
    overflow-x: auto;
    min-height: 260px;
}

.egk-timeline-year {
    flex: 1 1 70px;
    min-width: 70px;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    padding-top: 30px;
    height: 200px;
    justify-content: flex-end;
}
.year-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--gold) 0%, var(--burgundy) 100%);
    height: var(--h, 50%);
    min-height: 40px;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.2);
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
}
.bar-count {
    color: white;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.year-label {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--burgundy);
    text-align: center;
}
.year-count {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--burgundy);
    color: white;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s;
    white-space: nowrap;
}
.egk-timeline-year:hover .year-bar {
    transform: scaleY(1.05);
    transform-origin: bottom;
    box-shadow: 0 0 20px rgba(201, 169, 97, 0.5);
}
.egk-timeline-year:hover .year-count {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.egk-timeline-year:hover .year-label {
    color: var(--burgundy-dk);
}

/* Single-year layout: center it nicely */
.egk-timeline.single-year .egk-timeline-year {
    flex: 0 0 200px;
}
.egk-timeline.single-year .year-bar {
    background: linear-gradient(180deg, var(--gold-bright), var(--gold), var(--burgundy));
}

/* =========================================================
   FEATURED MINI CARDS
   ========================================================= */
.egk-featured {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.featured-block { margin-bottom: 40px; }

.featured-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.mini-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    text-decoration: none;
    color: var(--dark);
    border: 1px solid #f0e7d8;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.mini-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(201, 169, 97, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}
.mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(107, 31, 58, 0.15);
    border-color: var(--gold);
}
.mini-card:hover::before { opacity: 1; }

.mini-card-num {
    display: inline-block;
    background: var(--gold);
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}
.mini-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    line-height: 1.3;
    color: var(--burgundy);
    margin-bottom: 10px;
    font-weight: 600;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 42px;
}
.mini-card-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #888;
}

/* =========================================================
   MAIN GRID
   ========================================================= */
.egk-main-grid-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.egk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.egk-card {
    position: relative;
    background: white;
    border-radius: 14px;
    padding: 24px;
    text-decoration: none;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0e7d8;
    transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.3s, border-color 0.3s;
    overflow: hidden;
    transform-style: preserve-3d;
    opacity: 0;
    animation: card-in 0.6s cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: var(--d, 0s);
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(201, 169, 97, 0.15) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.egk-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(107, 31, 58, 0.18);
    border-color: var(--gold);
}
.egk-card:hover .card-glow {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}
.card-number {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: var(--burgundy-deep);
    padding: 6px 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}
.card-type-badge {
    font-size: 10px;
    font-weight: 700;
    color: #b91c1c;
    background: #fef2f2;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.egk-card.type-doc .card-type-badge,
.egk-card.type-docx .card-type-badge {
    color: #2563eb;
    background: #eff6ff;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    line-height: 1.3;
    color: var(--burgundy);
    margin: 0 0 12px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}
.card-body {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
    flex: 1;
    margin: 0 0 16px;
    position: relative;
    z-index: 2;
}

.card-footer {
    padding-top: 14px;
    border-top: 1px solid #f0e7d8;
    position: relative;
    z-index: 2;
}
.card-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #888;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.card-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--burgundy);
    font-weight: 700;
    font-size: 13px;
    transition: gap 0.2s;
}
.egk-card:hover .card-action {
    gap: 12px;
}

/* =========================================================
   EMPTY STATE & PAGINATION
   ========================================================= */
.egk-empty {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 14px;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.egk-empty h3 { color: var(--burgundy); margin: 0 0 8px; font-family: 'Cormorant Garamond', serif; font-size: 24px; }
.egk-empty p { color: #888; margin-bottom: 20px; }
.empty-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--burgundy);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
}

.egk-pagination {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding: 24px;
    flex-wrap: wrap;
}
.page-btn {
    padding: 12px 20px;
    background: white;
    color: var(--burgundy);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #e5dcc4;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}
.page-btn:hover:not(.disabled) {
    background: var(--burgundy);
    color: white;
    border-color: var(--burgundy);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(107, 31, 58, 0.2);
}
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn.is-active {
    background: var(--burgundy);
    color: #fff;
    border-color: var(--burgundy);
    pointer-events: none;
}
.page-info {
    color: #888;
    font-size: 14px;
    padding: 0 14px;
}
.page-info strong { color: var(--burgundy); font-weight: 700; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .egk-hero { min-height: 50vh; padding: 60px 16px; }
    .egk-hero-title { font-size: 36px; }
    .egk-hero-stats { gap: 16px; }
    .stat-value { font-size: 28px; }
    .egk-grid { grid-template-columns: 1fr; }
    .egk-search-form { flex-direction: column; }
    .search-input-wrapper, .filter-select, .search-btn { width: 100%; }
    .section-title { font-size: 24px; flex-wrap: wrap; }
    .egk-timeline { padding: 20px 10px; }
    .egk-timeline-year { flex: 1 0 40px; max-width: 60px; }
    .year-label { font-size: 11px; }
    .egk-pagination { flex-direction: column; gap: 10px; }
}
