/* ============================
   Příběhy domů – Custom CSS
   Dark / muted historical theme
   ============================ */

:root {
    --color-bg: #111318;
    --color-surface: #1a1d24;
    --color-surface-2: #21252e;
    --color-border: #2e3340;
    --color-text: #c8cdd8;
    --color-text-muted: #8a91a0;
    --color-accent: #c9963a;  /* warm amber – historical feel */
    --color-accent-dark: #9e7220;

    /* Era colors */
    --era-komunismus: #8b2020;
    --era-nacismus: #3d3d3d;
    --era-republika: #1a4a6e;
    --era-soucasnost: #1a5c35;
    --era-default: #4a3a6e;
}

/* Base */
html, body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.text-light-muted {
    color: var(--color-text) !important;
}

/* ============================
   Navbar
   ============================ */
.navbar-brand {
    letter-spacing: -0.5px;
}

/* ============================
   Hero section
   ============================ */
.hero-section {
    background: linear-gradient(135deg, #0d1117 0%, #1a1d24 40%, #1f1510 100%);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,0.01) 40px,
        rgba(255,255,255,0.01) 41px
    );
    pointer-events: none;
}

/* ============================
   Tag bar
   ============================ */
.tag-bar {
    background: var(--color-surface);
}

.tag-btn:hover {
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
    color: #111 !important;
}

/* ============================
   Building cards
   ============================ */
.building-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--color-surface) !important;
}

.building-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border-color: var(--color-accent) !important;
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.building-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.building-card:hover .building-cover {
    transform: scale(1.04);
}

.building-cover-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1a1d24, #21252e) !important;
}

/* Detail page cover placeholder */
.building-detail-placeholder {
    height: 280px;
    background: linear-gradient(135deg, #1a1d24, #21252e);
}

/* Carousel image */
.building-carousel-img {
    height: 320px;
    object-fit: cover;
    background: #1a1d24;
}

/* Thumbnail strip */
.building-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.building-thumb:hover {
    opacity: 1;
}

/* ============================
   Era tags / badges
   ============================ */
.era-tag {
    font-size: 0.72rem;
    padding: 0.3em 0.6em;
    border-radius: 4px;
    font-weight: 500;
    transition: opacity 0.15s;
}

.era-tag:hover {
    opacity: 0.85;
}

/* Communist era */
.era-komunismus,
.era-stb,
.era-popravy {
    background-color: rgba(139, 32, 32, 0.25) !important;
    color: #e07070 !important;
    border: 1px solid rgba(139, 32, 32, 0.5);
}

/* Nazi era */
.era-nacismus,
.era-gestapo,
.era-muceni {
    background-color: rgba(61, 61, 61, 0.4) !important;
    color: #bbb !important;
    border: 1px solid rgba(100, 100, 100, 0.5);
}

/* Political prison / resistance */
.era-politicka-veznice,
.era-odpor,
.era-gulach,
.era-uranove-doly {
    background-color: rgba(100, 40, 10, 0.3) !important;
    color: #e09060 !important;
    border: 1px solid rgba(150, 60, 10, 0.5);
}

/* Nationalization / church */
.era-znarodneni,
.era-cirkev,
.era-klaster,
.era-rodina-havlu,
.era-havel,
.era-nomenklatura,
.era-vladni-vila {
    background-color: rgba(30, 60, 100, 0.3) !important;
    color: #80aae0 !important;
    border: 1px solid rgba(40, 80, 140, 0.5);
}

/* Architecture / socialism */
.era-architektura,
.era-socialismus,
.era-socialisticky-realismus {
    background-color: rgba(30, 80, 50, 0.3) !important;
    color: #70c090 !important;
    border: 1px solid rgba(30, 100, 50, 0.5);
}

/* ============================
   Timeline
   ============================ */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-accent), var(--color-border));
    opacity: 0.6;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -1.25rem;
    top: 1.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 2px solid var(--color-bg);
    box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-content {
    transition: border-color 0.2s;
}

.timeline-content:hover {
    border-color: var(--color-accent) !important;
}

/* Era badge colors in timeline */
.era-badge-komunismus,
.era-badge-komunistická-éra {
    background-color: rgba(139, 32, 32, 0.8) !important;
    color: #f0c0c0;
}

.era-badge-nacismus {
    background-color: rgba(61, 61, 61, 0.8) !important;
    color: #ccc;
}

.era-badge-1-republika,
.era-badge-1-republika-přechod {
    background-color: rgba(26, 74, 110, 0.8) !important;
    color: #a0c4e8;
}

.era-badge-současnost {
    background-color: rgba(26, 92, 53, 0.8) !important;
    color: #90d4a8;
}

/* ============================
   Building detail meta items
   ============================ */
.building-meta-item {
    background-color: var(--color-surface-2) !important;
    border: 1px solid var(--color-border);
}

/* ============================
   Map placeholder
   ============================ */
.map-placeholder {
    min-height: 200px;
}

.map-full-placeholder {
    min-height: 380px;
    background: linear-gradient(135deg, #111318, #1a1d24);
}

/* ============================
   Add entry section
   ============================ */
.add-entry-section {
    background-color: var(--color-surface-2) !important;
}

/* ============================
   Cards general
   ============================ */
.card {
    border-color: var(--color-border) !important;
}

.card-header {
    border-bottom-color: var(--color-border) !important;
    background-color: rgba(255,255,255,0.03) !important;
}

/* ============================
   Forms
   ============================ */
.form-control, .form-select {
    background-color: var(--color-surface) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(201, 150, 58, 0.2) !important;
    background-color: var(--color-surface) !important;
    color: var(--color-text) !important;
}

.form-control::placeholder {
    color: var(--color-text-muted) !important;
}

/* ============================
   Buttons
   ============================ */
.btn-warning {
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent-dark) !important;
    color: #111 !important;
    font-weight: 600;
}

.btn-warning:hover {
    background-color: #d4a44a !important;
}

.btn-outline-warning {
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
}

.btn-outline-warning:hover {
    background-color: var(--color-accent) !important;
    color: #111 !important;
}

/* ============================
   Scrollbar (webkit)
   ============================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* ============================
   Responsive tweaks
   ============================ */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .timeline {
        padding-left: 1rem;
    }
}
