/*
 Theme Name:   KonNetwork Child
 Description:  Child theme for Blocksy with KonNetwork customizations
 Template:     blocksy
 Version:      1.0.6
 Author:       Kon
*/

/* ==========================================================================
   KON NETWORK CUSTOM STYLES – Cleaned, minimal !important
   ========================================================================== */

:root {
    --kn-sidebar-accent: #6f7cff;
    --kn-purple-accent: #6200ff;
    --kn-gold: gold;
    --kn-border-subtle: #ffffff14;
    --kn-bg-transparent: #00000047;
    --kn-shadow-dark: #00000059;
}

.wp-lightbox-overlay .scrim {
    background-color: #2b1c3ae6;
}

/* HEADER & NAVIGATION */
[data-header] .ct-header-inner,
.ct-header {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* SINGLE POST & ENTRY CONTENT */
.entry-content p {
    margin-bottom: 1rem;
}

.entry-content ol li,
.entry-content ul li {
    margin-bottom: .75rem;
}

.wp-block-table-of-contents li,
.wp-block-table-of-contents li li {
    margin-bottom: 0;
    padding-bottom: 0;
}

.ct-header-meta .ct-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.single-post .ct-post-meta li.custom-read-time {
    display: inline-flex;
    align-items: center;
    margin-left: 1em;
    vertical-align: middle;
}

.single-post .ct-post-meta li.custom-read-time::before {
    content: "·";
    margin-right: 1em;
    opacity: .5;
}

.entry-content h2 {
    padding-bottom: .5rem;
    border-bottom: .2rem solid var(--theme-palette-color-1);
}

.entry-content .lede {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    opacity: .95;
}

.entry-content li a,
.entry-content p a {
    text-decoration: underline;
    font-weight: 400;
}

.entry-content a[href^="http"]:not([href*="thekonnetwork.com"]) {
    font-weight: 700;
}

.ct-share-box {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--kn-border-subtle);
}

.ct-share-box .ct-module-title,
.entry-tags .ct-module-title {
    position: absolute;
    left: -9999px;
}

/* PILL-STYLE TAGS – consolidated */
:is(
    .tkn-platform-terms a,
    .tkn-review-archive__values a,
    .entry-tags-items a[rel="tag"]
) {
    display: inline-flex;
    align-items: center;
    padding: .42rem .75rem;
    min-height: 2rem;
    border-radius: 7px;
    background-color: #000;
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

:is(
    .tkn-platform-terms a:hover,
    .tkn-review-archive__values a:hover,
    .entry-tags-items a[rel="tag"]:hover
) {
    background-color: var(--kn-purple-accent);
    color: #fff;
    text-decoration: none;
}

.entry-tags-items a[rel="tag"] > span,
.tkn-platform-terms a::after,
.tkn-review-archive__values a::after {
    display: none;
}

.tkn-platforms-meta,
.entry-tags-items,
.tkn-review-archive {
    border-top: 1px solid var(--kn-border-subtle);
}

.tkn-platforms-meta {
    margin-top: 1.25rem;
    padding-top: .75rem;
    font-size: .875rem;
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    align-items: center;
}

.tkn-platforms-label,
.tkn-review-archive__label {
    font-weight: 600;
    color: #fff;
    font-size: .875rem;
}

.tkn-review-archive {
    margin-top: 2rem;
    padding-top: 1rem;
    font-size: .875rem;
}

.tkn-review-archive__row {
    margin: .25rem 0;
}

.entry-tags {
    margin-top: 0;
    padding-top: 0;
}

.entry-tags-items {
    margin-top: .35rem;
    padding-top: .45rem;
    display: inline-flex;
    flex-wrap: wrap;
    gap: .625rem;
    align-items: center;
    font-size: 0;
}

/* SIDEBAR & WIDGETS */
.ct-sidebar .widget-title {
    font-size: .875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 12px;
    padding-left: 10px;
    border-left: 4px solid var(--kn-sidebar-accent);
    text-align: left;
}

.ct-sidebar .ct-dynamic-posts article,
.ct-sidebar .ct-posts-shortcode article {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--kn-border-subtle);
    gap: 0;
}

.ct-sidebar article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ct-sidebar img {
    height: 32px;
    width: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    border-radius: 0;
}

.ct-sidebar .entry-title {
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.125rem;
    margin: 0;
    text-align: left;
}

.ct-sidebar .entry-excerpt,
.ct-sidebar .entry-meta {
    display: none;
}

.ct-sidebar a:hover {
    text-decoration: none;
    color: var(--kn-gold);
}

/* CARDS & ARCHIVES (BROWSE & LATEST) */
.tkn-browse-card,
.tkn-latest-posts-card {
    border-radius: 10px;
    overflow: hidden;
    background: var(--kn-bg-transparent);
    box-shadow: 0 10px 24px var(--kn-shadow-dark);
    position: relative;
    border: 1px solid #ffffff0f;
}

.tkn-browse-card::before,
.tkn-latest-posts-card::before {
    display: block;
    padding: 8px 12px;
    background: #5320e8;
    color: #fff;
    font-size: .8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.tkn-latest-posts-card::before { content: "Latest Posts"; }
.tkn-browse-card::before    { content: "Browse Content"; }

.tkn-browse-card :is(.widget-title, .ct-widget-title, .ct-block-title),
.tkn-latest-posts-card :is(.widget-title, .ct-widget-title, .ct-block-title, .tkn-latest-title) {
    display: none;
}

.tkn-latest-posts-card .tkn-latest-feed :is(li, article, .ct-post, .wp-block-latest-posts__post) {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 0;
}

.tkn-latest-posts-card .tkn-latest-feed :is(li, article, .ct-post, .wp-block-latest-posts__post):not(:last-child) {
    border-bottom: 1px solid var(--kn-border-subtle);
}

.tkn-latest-posts-card .tkn-latest-feed :is(.ct-post__media, figure, .wp-block-latest-posts__featured-image) {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    margin: 0;
}

.tkn-latest-posts-card img {
    width: 64px;
    height: 64px;
    max-width: none;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    display: block;
}

.tkn-latest-posts-card .tkn-latest-feed :is(.entry-title, .ct-post-title, .wp-block-latest-posts__post-title, h3, h4, h5, h6) {
    margin: 0;
    padding: 0;
    background: transparent;
}

.tkn-browse-card a,
.tkn-latest-posts-card .tkn-latest-feed a {
    color: #fff;
    text-decoration: none;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.125rem;
}

.tkn-latest-posts-card .tkn-latest-feed :is(.entry-meta, .entry-excerpt, time, .wp-block-latest-posts__post-date) {
    display: none;
}

.tkn-browse-card :is(ul, ol) {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
}

.tkn-browse-card li {
    margin: 0;
    padding: 8px 0;
}

.tkn-browse-card li:not(:last-child) {
    border-bottom: 1px solid var(--kn-border-subtle);
}

.tkn-browse-card a:hover,
.tkn-latest-posts-card .tkn-latest-feed a:hover {
    text-decoration: none;
    color: var(--kn-gold);
}

/* EQUAL HEIGHT CARDS & TITLE ALIGNMENT */
.entries article .entry-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    margin-bottom: 15px;
}

.entries article .entry-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.ct-search-results {
    box-shadow: none;
}

/* FRONT PAGE TITLE STYLES */
.wp-block-post-template .wp-block-post-title a,
.wp-block-cover .wp-block-post-title a {
    text-decoration: none;
    font-weight: 700;
}

/* QUERY LOOP TAXONOMY BADGES */
.wp-block-post-terms a {
    display: inline-block;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 0;
    background-color: #333333;
    color: #ffffff;
    transition: all 0.2s ease;
    margin-bottom: 0;
    line-height: 1;
}

.wp-block-post-terms a:hover {
    filter: brightness(1.2);
    color: #ffffff;
    text-decoration: none;
}

/* Category colors */
.wp-block-post-terms a[href*="/news/"]    { background-color: #d32f2f; color: #ffffff; }
.wp-block-post-terms a[href*="/guides/"]  { background-color: #1976d2; color: #ffffff; }
.wp-block-post-terms a[href*="/reviews/"] { background-color: #5e17eb; color: #ffffff; }
.wp-block-post-terms a[href*="/features/"]{ background-color: #e65100; color: #ffffff; }
.wp-block-post-terms a[href*="/videos/"]  { background-color: #00897b; color: #ffffff; }

/* THE CHRONICLE: HIGH-DENSITY SPACING */
.wp-block-post-template .wp-block-column .wp-block-group {
    gap: 0;
    margin-top: 0;
}

.wp-block-post-template .wp-block-column .wp-block-post-terms {
    margin-bottom: 2px;
}

.wp-block-post-template .wp-block-column .wp-block-post-title {
    margin-top: 0;
    margin-bottom: 2px;
    line-height: 1.15em;
    font-size: 1rem;
}

.wp-block-post-template .wp-block-column .wp-block-post-date {
    margin-top: 0;
    margin-bottom: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #cccccc;
}

.wp-block-post-template .wp-block-column .wp-block-post-excerpt {
    margin-top: 0;
    line-height: 1.4em;
    font-size: 0.85rem;
}

/* QUERY LOOP "CONTINUE ARTICLE" BUTTON */
.wp-block-post-excerpt__more-link {
    display: inline-block;
    border: 1px solid #ffffff;
    padding: 8px 16px;
    margin-top: 15px;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 0;
    background-color: transparent;
    color: #ffffff;
    transition: all 0.2s ease;
}

.wp-block-post-excerpt__more-link:hover {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* COVER & GROUP CARDS: EXACT CORNER PINNING */
.wp-block-cover,
.wp-block-post-template .has-background {
    position: relative;
    overflow: hidden;
}

.wp-block-cover .wp-block-cover__inner-container,
.wp-block-post-template .has-background > .wp-block-group {
    position: static;
}

.wp-block-cover .wp-block-post-terms,
.wp-block-post-template .has-background .wp-block-post-terms {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    z-index: 20;
    width: auto;
}

.wp-block-cover .wp-block-post-terms a,
.wp-block-post-template .has-background .wp-block-post-terms a {
    margin: 0;
}

.wp-block-cover .wp-block-post-title,
.wp-block-post-template .has-background .wp-block-post-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.3em;
}

.wp-block-cover .wp-block-cover__inner-container {
    gap: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

/* MOBILE LIST VIEW FIX */
@media (max-width: 768px) {
    .wp-block-post-template .wp-block-columns {
        flex-wrap: nowrap;
        display: flex;
        gap: 12px;
    }

    .wp-block-post-template .wp-block-column:first-child {
        width: 110px;
        flex: 0 0 110px;
    }

    .wp-block-post-template .wp-block-column:last-child {
        flex-grow: 1;
    }

    .wp-block-post-template .wp-block-post-excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* INLINE CODE FIX */
:not(pre) > code {
    background-color: #0a0a0a;
    color: #ffd700;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--kn-border-subtle);
    font-size: 0.9em;
    font-family: monospace, Consolas, "Courier New";
}

/* FORMKIT ALIGNMENT */
.formkit-form .formkit-input,
.formkit-form .formkit-submit {
    height: 45px;
    min-height: 45px;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    vertical-align: middle;
    line-height: normal;
}

.formkit-form {
    margin-top: 40px;
}