/* ====================================================================
   TIV Category Archive — visual polish for category pages
   Scoped under body.tiv-catarc to avoid leaking onto other archives.
   ====================================================================*/

/* -- Hero / Page-Header upgrade -- */
body.tiv-catarc .page-header.page-header-simple {
    position: relative;
    padding: 3.5rem 1.25rem 2.5rem;
    margin: 0 0 2.5rem;
    background: linear-gradient(135deg, #faf6f3 0%, #f3ebe1 100%);
    border-radius: 0;
    overflow: hidden;
    text-align: center;
}

body.tiv-catarc .page-header.page-header-simple::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(45,94,62,0.06), transparent 60%),
                radial-gradient(ellipse at bottom left, rgba(229,152,117,0.08), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body.tiv-catarc .page-header.page-header-simple > * {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

body.tiv-catarc .page-header.page-header-simple h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin: 0.5rem 0 0.75rem;
    color: #2d5e3e;
    letter-spacing: -0.02em;
}

body.tiv-catarc .page-header.page-header-simple .post-count {
    display: inline-block;
    background: #2d5e3e;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 1rem;
}

body.tiv-catarc .taxonomy-description {
    font-size: 1.02rem;
    line-height: 1.65;
    color: #444;
    margin: 0.75rem auto 0;
    text-align: left;
}

body.tiv-catarc .taxonomy-description p:first-child {
    font-size: 1.12rem;
    color: #2d2d2d;
    font-weight: 500;
}

body.tiv-catarc .taxonomy-description a {
    color: #2d5e3e;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

body.tiv-catarc .taxonomy-description a:hover {
    color: #e59875;
}

/* -- Eyebrow / Breadcrumb -- */
.tiv-catarc-eyebrow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin: 1.5rem 0 0.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    font-weight: 600;
}

.tiv-catarc-eyebrow a {
    color: #888;
    text-decoration: none;
    transition: color .15s ease;
}
.tiv-catarc-eyebrow a:hover { color: #2d5e3e; }
.tiv-catarc-eyebrow .tiv-catarc-sep { color: #ccc; }
.tiv-catarc-eyebrow [aria-current="page"] { color: #2d5e3e; }

/* -- Sub-Kategorie-Pills -- */
.tiv-catarc-subnav {
    margin: 1.5rem auto 0;
    text-align: center;
}

.tiv-catarc-subnav-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.tiv-catarc-pills {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tiv-catarc-pills li { margin: 0; }

.tiv-catarc-pills a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: #fff;
    border: 1px solid #e0d4c4;
    border-radius: 999px;
    font-size: 0.88rem;
    color: #2d2d2d;
    text-decoration: none;
    transition: all .15s ease;
    white-space: nowrap;
}

.tiv-catarc-pills a:hover {
    background: #2d5e3e;
    border-color: #2d5e3e;
    color: #fff;
    transform: translateY(-1px);
}

.tiv-catarc-pill-count {
    font-size: 0.72rem;
    color: #999;
    font-weight: 600;
}

.tiv-catarc-pills a:hover .tiv-catarc-pill-count {
    color: rgba(255,255,255,0.7);
}

/* -- Post-Cards polish (existing .post-masonry / .post-standard) -- */
body.tiv-catarc .post-archive {
    margin-top: 1.5rem;
}

body.tiv-catarc .post-masonry,
body.tiv-catarc .archive-first {
    transition: transform .25s ease, box-shadow .25s ease;
}

body.tiv-catarc .post-masonry .post-inner,
body.tiv-catarc .archive-first .post-inner {
    overflow: hidden;
}

body.tiv-catarc .post-masonry .post-media,
body.tiv-catarc .archive-first .post-media {
    overflow: hidden;
    border-radius: 6px;
}

body.tiv-catarc .post-masonry .post-media img,
body.tiv-catarc .archive-first .post-media img {
    transition: transform .4s ease;
}

body.tiv-catarc .post-masonry:hover .post-media img,
body.tiv-catarc .archive-first:hover .post-media img {
    transform: scale(1.04);
}

body.tiv-catarc .post-masonry .entry-title a,
body.tiv-catarc .archive-first .entry-title a {
    transition: color .15s ease;
}

body.tiv-catarc .post-masonry:hover .entry-title a,
body.tiv-catarc .archive-first:hover .entry-title a {
    color: #2d5e3e;
}

/* -- Featured post (archive-first) — Magazin-Lead --*/
body.tiv-catarc .archive-first.archive-standard {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ece5d8;
    position: relative;
}

body.tiv-catarc .archive-first .entry-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.25;
    margin-top: 0.75rem;
}

body.tiv-catarc .archive-first::before {
    content: "★ Editor's Pick";
    position: absolute;
    top: -0.5rem;
    left: 0;
    background: #e59875;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 2;
}

/* -- Load-More Button (injected by JS) -- */
.tiv-catarc-loadmore-wrap {
    text-align: center;
    margin: 2.5rem 0 1rem;
}

.tiv-catarc-loadmore {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: #2d5e3e;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    box-shadow: 0 4px 14px rgba(45,94,62,0.18);
}

.tiv-catarc-loadmore:hover:not(:disabled) {
    background: #25503a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45,94,62,0.25);
}

.tiv-catarc-loadmore:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tiv-catarc-loadmore .tiv-catarc-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tiv-catarc-spin .6s linear infinite;
    display: none;
}

.tiv-catarc-loadmore.is-loading .tiv-catarc-spinner { display: inline-block; }

@keyframes tiv-catarc-spin { to { transform: rotate(360deg); } }

.tiv-catarc-loadmore-end {
    text-align: center;
    color: #888;
    font-size: 0.92rem;
    font-style: italic;
    margin: 2rem 0 1rem;
}

/* -- End-Block — „Was als Nächstes?" -- */
.tiv-catarc-end-block {
    max-width: 1100px;
    margin: 3.5rem auto 1.5rem;
    padding: 2.5rem 1.25rem 2rem;
    background: #faf6f3;
    border-radius: 8px;
}

.tiv-catarc-end-title {
    font-size: 1.6rem;
    color: #2d5e3e;
    text-align: center;
    margin: 0 0 0.4rem;
}

.tiv-catarc-end-sub {
    text-align: center;
    color: #666;
    margin: 0 0 2rem;
    font-size: 0.98rem;
}

.tiv-catarc-end-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tiv-catarc-end-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.1rem;
    background: #fff;
    border: 1px solid #e5d8cc;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all .15s ease;
    min-height: 120px;
}

.tiv-catarc-end-tile:hover {
    border-color: #2d5e3e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.tiv-catarc-end-tile-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    font-weight: 600;
}

.tiv-catarc-end-tile.pillar .tiv-catarc-end-tile-eyebrow { color: #e59875; }
.tiv-catarc-end-tile.parent .tiv-catarc-end-tile-eyebrow { color: #2d5e3e; }

.tiv-catarc-end-tile-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d2d2d;
    line-height: 1.3;
}

.tiv-catarc-end-tile-hint {
    font-size: 0.85rem;
    color: #888;
    margin-top: auto;
}

.tiv-catarc-end-tile.pillar {
    background: linear-gradient(135deg, #fff 0%, #fef3eb 100%);
    border-color: #e59875;
}

/* -- Mobile breakpoints -- */
@media (max-width: 768px) {
    body.tiv-catarc .page-header.page-header-simple {
        padding: 2.5rem 1rem 2rem;
    }
    .tiv-catarc-pills a {
        font-size: 0.82rem;
        padding: 0.35rem 0.75rem;
    }
    .tiv-catarc-end-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .tiv-catarc-end-grid {
        grid-template-columns: 1fr;
    }
}

/* -- Respect reduced-motion preference -- */
@media (prefers-reduced-motion: reduce) {
    body.tiv-catarc *,
    body.tiv-catarc *::before,
    body.tiv-catarc *::after {
        transition: none !important;
        animation: none !important;
    }
}
