/* ===========================================================================
   Tales — the catalogue pages under /zgaprebi/ (tools/generate_pages.py).
   Loaded after base.css and pages.css, and built from their tokens.
   =========================================================================== */

.tale-crumbs {
    margin: 0 0 16px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.tale-crumbs a {
    color: var(--primary-text);
    font-weight: 700;
    text-decoration: none;
}

.tale-crumbs a:hover {
    text-decoration: underline;
}

.tale-prose,
.tale-article {
    padding: clamp(20px, 4vw, 36px);
}

.tale-prose p,
.tale-text p {
    margin: 0 0 14px;
    color: var(--text-main);
    line-height: 1.8;
}

.tale-prose p:last-child {
    margin-bottom: 0;
}

.tale-section {
    margin-top: 36px;
}

.tale-section h2,
.tale-article h2 {
    margin: 0 0 16px;
    color: var(--text-main);
    font-size: 1.35rem;
}

.tale-section h2 a {
    color: inherit;
    text-decoration: none;
}

.tale-section h2 a:hover {
    color: var(--primary-text);
}

.tale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tale-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card-bg);
    color: var(--text-main);
    text-decoration: none;
    transition: transform 0.15s ease;
}

.tale-card:hover {
    transform: translateY(-2px);
}

.tale-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--surface-2);
}

.tale-card-title {
    padding: 10px 12px 2px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tale-card-meta {
    padding: 0 12px 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.tale-top {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: clamp(16px, 4vw, 32px);
    align-items: start;
    margin-bottom: 28px;
}

.tale-cover {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 20px;
}

.tale-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.tale-desc {
    margin: 0 0 18px;
    color: var(--text-main);
    line-height: 1.75;
}

.tale-text {
    font-family: 'Noto Serif Georgian', serif;
    font-size: 1.05rem;
}

.tale-more {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-weight: 700;
}

.tale-play {
    text-decoration: none;
}

@media (max-width: 640px) {
    .tale-top {
        grid-template-columns: minmax(0, 1fr);
    }

    .tale-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tale-card {
        transition: none;
    }
}
