/* Recuvalis Judikatura - Main Stylesheet */
/* Design system shared with predpisy.recuvalis.cz */

:root {
    --bg-primary: #F5F0EB;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1A1A1A;
    --text-primary: #2D2A26;
    --text-secondary: #6B6560;
    --text-muted: #999;
    --accent-gold: #C4A265;
    --accent-gold-hover: #b3913a;
    --accent-gold-light: #F5EDD8;
    --border-subtle: #E5DED5;
    --border-light: #f0ebe5;
    --link-color: #8B6914;
    --highlight-bg: #FFF8E7;
    --highlight-border: #C4A265;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-legal: 'Source Serif 4', Georgia, serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--link-color); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; color: var(--accent-gold-hover); }

/* === HEADER === */
.site-header {
    background: var(--bg-sidebar);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.logo { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.logo:hover { text-decoration: none; opacity: 0.9; }
.logo-icon { font-size: 1.6rem; }
.logo-text { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.logo-sep { color: var(--accent-gold); }
.header-search { flex: 1; max-width: 480px; }
.search-form-compact { display: flex; }
.search-input-compact {
    flex: 1; padding: 0.5rem 0.85rem; border: 1px solid #444;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: #2a2a2a; color: #fff; font-size: 0.875rem;
    font-family: var(--font-body); outline: none; transition: border-color var(--transition);
}
.search-input-compact::placeholder { color: #888; }
.search-input-compact:focus { border-color: var(--accent-gold); }
.search-btn-compact {
    padding: 0.5rem 0.85rem; background: var(--accent-gold); border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #fff; cursor: pointer; font-size: 0.875rem; transition: background var(--transition);
}
.search-btn-compact:hover { background: var(--accent-gold-hover); }
.header-nav { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.nav-link { color: #ccc; font-size: 0.875rem; transition: color var(--transition); }
.nav-link:hover { color: var(--accent-gold); text-decoration: none; }
.nav-ai {
    background: var(--accent-gold); color: #fff !important; padding: 0.4rem 1rem;
    border-radius: var(--radius-sm); font-weight: 500; font-size: 0.85rem;
}
.nav-ai:hover { background: var(--accent-gold-hover); color: #fff; text-decoration: none; }

/* === MAIN === */
.main-content { flex: 1; max-width: 1280px; margin: 0 auto; padding: 0 2rem; width: 100%; }

/* === HERO === */
.hero { text-align: center; padding: 5rem 1rem 3.5rem; }
.hero-title {
    font-family: var(--font-heading); font-size: 2.75rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 0.5rem; letter-spacing: -0.02em; line-height: 1.2;
}
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 2.5rem; font-weight: 300; }
.hero-search {
    max-width: 660px; margin: 0 auto; display: flex;
    box-shadow: var(--shadow-md); border-radius: var(--radius-lg); overflow: hidden;
}
.hero-search-input {
    flex: 1; padding: 1.1rem 1.5rem; border: 2px solid var(--border-subtle);
    border-right: none; border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    font-size: 1rem; background: #fff; outline: none; font-family: var(--font-body);
}
.hero-search-input:focus { border-color: var(--accent-gold); }
.hero-search-btn {
    padding: 1.1rem 2.25rem; background: var(--accent-gold); color: #fff; border: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0; font-size: 1rem;
    font-weight: 600; cursor: pointer; font-family: var(--font-body); white-space: nowrap;
}
.hero-search-btn:hover { background: var(--accent-gold-hover); }
.hero-count { margin-top: 1.25rem; font-size: 0.875rem; color: var(--text-secondary); }

/* === SECTIONS === */
.section { padding: 2.5rem 0; }
.section-title {
    font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600;
    margin-bottom: 1.25rem; color: var(--text-primary);
}

/* === COURT CARDS === */
.court-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.court-card {
    display: flex; align-items: center; gap: 1.25rem;
    background: var(--bg-card); border-radius: var(--radius-md);
    padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-subtle);
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none; color: inherit;
}
.court-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.court-card-icon { font-size: 2rem; opacity: 0.6; }
.court-card-name { font-weight: 600; font-size: 1.05rem; color: var(--text-primary); }
.court-card-count { font-size: 0.9rem; color: var(--accent-gold); font-weight: 500; }
.court-card-range { font-size: 0.8rem; color: var(--text-muted); }

/* === AREA TAGS === */
.area-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.area-tag {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: 2rem; font-size: 0.9rem; color: var(--text-primary);
    transition: all var(--transition); text-decoration: none;
}
.area-tag:hover { border-color: var(--accent-gold); background: var(--accent-gold-light); text-decoration: none; }
.area-tag-count { font-size: 0.75rem; color: var(--text-muted); }

/* === DECISION LIST === */
.decision-list { display: flex; flex-direction: column; gap: 0.75rem; }
.decision-item {
    display: block; background: var(--bg-card); border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-subtle);
    transition: box-shadow var(--transition); text-decoration: none; color: inherit;
}
.decision-item:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.decision-item-header { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.decision-sp-zn { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; }
.decision-date { font-size: 0.8rem; color: var(--text-muted); margin-left: auto; }
.decision-snippet { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }
.decision-snippet mark { background: var(--highlight-bg); padding: 0.1em 0.2em; border-radius: 2px; }

/* === BADGES === */
.badge {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px;
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-court { background: #1A1A2E; color: #C4A265; }
.badge-type { background: #f0ebe5; color: #6B6560; }
.badge-type-sm { background: #f0ebe5; color: #6B6560; font-size: 0.65rem; padding: 0.15rem 0.4rem; }
.badge-area { background: var(--accent-gold-light); color: #8B6914; }
.badge-area-sm { background: var(--accent-gold-light); color: #8B6914; font-size: 0.65rem; padding: 0.15rem 0.4rem; }
.badge-green { background: #E8F5E9; color: #2E7D32; }

/* === DECISION DETAIL === */
.decision-detail { padding: 1.5rem 0 3rem; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb-sep { margin: 0 0.4rem; }

.decision-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.decision-main { min-width: 0; }

.decision-header { margin-bottom: 2rem; }
.decision-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.decision-title {
    font-family: var(--font-heading); font-size: 2rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 0.3rem;
}
.decision-meta-date { font-size: 0.95rem; color: var(--text-secondary); }
.decision-ecli { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; font-family: monospace; }

/* Legal sentence box */
.legal-sentence-box {
    background: var(--highlight-bg); border-left: 4px solid var(--accent-gold);
    padding: 1.25rem 1.5rem; border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 2rem;
}
.legal-sentence-label {
    font-family: var(--font-heading); font-size: 1rem; color: var(--accent-gold);
    margin-bottom: 0.5rem; font-weight: 600;
}
.legal-sentence-text { font-family: var(--font-legal); font-size: 0.95rem; line-height: 1.7; color: var(--text-primary); }

/* Full text */
.section-label {
    font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600;
    color: var(--text-primary); margin-bottom: 1rem;
    padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-subtle);
}
.text-content { font-family: var(--font-legal); font-size: 0.92rem; line-height: 1.75; }
.chunk { margin-bottom: 0.75rem; }
.chunk p { margin-bottom: 0.4rem; }

/* Sidebar */
.decision-sidebar { position: sticky; top: 80px; }
.sidebar-card {
    background: var(--bg-card); border-radius: var(--radius-md);
    padding: 1.25rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-subtle);
    margin-bottom: 1rem;
}
.sidebar-title {
    font-family: var(--font-heading); font-size: 0.95rem; font-weight: 600;
    color: var(--text-primary); margin-bottom: 0.75rem;
    padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-light);
}
.meta-list { font-size: 0.85rem; }
.meta-list dt { color: var(--text-muted); font-weight: 500; margin-top: 0.5rem; }
.meta-list dd { color: var(--text-primary); }
.ecli-val { font-family: monospace; font-size: 0.75rem; word-break: break-all; }
.cited-list { list-style: none; font-size: 0.85rem; }
.cited-list li { padding: 0.25rem 0; border-bottom: 1px solid var(--border-light); }
.cited-list li:last-child { border-bottom: none; }
.cited-link { font-weight: 500; }
.cited-law { color: var(--link-color); }
.cited-case { color: #5B4A8A; }
.cited-more { color: var(--text-muted); font-style: italic; font-size: 0.8rem; }

/* AI CTA */
.ai-cta { margin-top: 2rem; text-align: center; }
.ai-cta-btn {
    display: inline-block; padding: 0.75rem 1.5rem;
    background: var(--accent-gold); color: #fff; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.95rem; transition: background var(--transition);
}
.ai-cta-btn:hover { background: var(--accent-gold-hover); text-decoration: none; color: #fff; }

/* === SEARCH PAGE === */
.search-page { padding: 2.5rem 0; }
.search-page-title { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 1.5rem; }
.search-form-full { margin-bottom: 1.5rem; }
.search-row { display: flex; gap: 0; margin-bottom: 0.75rem; }
.search-input-full {
    flex: 1; padding: 0.85rem 1.25rem; border: 2px solid var(--border-subtle);
    border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 1rem; font-family: var(--font-body); outline: none;
}
.search-input-full:focus { border-color: var(--accent-gold); }
.search-btn-full {
    padding: 0.85rem 2rem; background: var(--accent-gold); color: #fff; border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 1rem;
    font-weight: 600; cursor: pointer;
}
.search-btn-full:hover { background: var(--accent-gold-hover); }
.search-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.filter-select, .filter-input-year {
    padding: 0.5rem 0.75rem; border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); font-size: 0.875rem; font-family: var(--font-body);
    background: #fff; outline: none;
}
.filter-input-year { width: 80px; }
.filter-select:focus, .filter-input-year:focus { border-color: var(--accent-gold); }
.search-meta { margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--text-secondary); }

/* === COURT/AREA PAGE === */
.court-page, .area-page { padding: 2rem 0; }
.page-title { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin-bottom: 0.25rem; }
.page-subtitle { font-size: 1rem; color: var(--text-secondary); margin-bottom: 1.5rem; }

.year-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.year-tag {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.35rem 0.75rem; background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: 2rem; font-size: 0.8rem; color: var(--text-secondary);
    transition: all var(--transition); text-decoration: none;
}
.year-tag:hover { border-color: var(--accent-gold); text-decoration: none; }
.year-active { background: var(--accent-gold); color: #fff; border-color: var(--accent-gold); }
.year-active:hover { background: var(--accent-gold-hover); }
.year-count { font-size: 0.7rem; opacity: 0.7; }

/* === PAGINATION === */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }
.page-link {
    padding: 0.5rem 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--text-primary);
    transition: all var(--transition); text-decoration: none;
}
.page-link:hover { border-color: var(--accent-gold); text-decoration: none; }
.page-info { font-size: 0.85rem; color: var(--text-muted); }

/* === LOADING === */
.loading-trigger { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; }
.loader {
    width: 32px; height: 32px; border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-gold); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === ERROR PAGE === */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-code { font-family: var(--font-heading); font-size: 5rem; color: var(--accent-gold); opacity: 0.4; }
.error-message { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.error-link {
    display: inline-block; padding: 0.6rem 1.5rem; background: var(--accent-gold);
    color: #fff; border-radius: var(--radius-sm); font-weight: 500;
}
.error-link:hover { background: var(--accent-gold-hover); text-decoration: none; color: #fff; }

/* === FOOTER === */
.site-footer { background: var(--bg-sidebar); color: #999; padding: 1.5rem 0; margin-top: auto; }
.footer-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 2rem;
    display: flex; justify-content: space-between; align-items: center;
}
.footer-brand { font-size: 0.8rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: #888; font-size: 0.8rem; }
.footer-links a:hover { color: var(--accent-gold); }

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .decision-layout { grid-template-columns: 1fr; }
    .decision-sidebar { position: static; }
}
@media (max-width: 768px) {
    .header-inner { padding: 0 1rem; gap: 0.75rem; }
    .header-search { display: none; }
    .hero-title { font-size: 2rem; }
    .hero { padding: 3rem 0.5rem 2rem; }
    .main-content { padding: 0 1rem; }
    .court-cards { grid-template-columns: 1fr; }
    .search-filters { flex-direction: column; }
    .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
    .decision-title { font-size: 1.5rem; }
}
