/*
Theme Name: CatchON Hello Child
Theme URI: https://catchontvusa.us/
Template: hello-elementor
Author: CatchON TV
Description: Child theme of Hello Elementor with clean editorial frontend layout, non-sticky header/title, Shadow DOM author banner for Martin M., and zero interference with the Block Editor.
Version: 8.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: catchon-hello-child
*/

:root {
    --bg-canvas: #f4f3ef;
    --bg-surface: #ffffff;
    --bg-ink-bar: #111317;
    --bg-warm: #fbf6f0;
    --text-main: #14171f;
    --text-muted: #555e70;
    --accent: #ea4c1d;
    --accent-hover: #c93b10;
    --accent-soft: #fff0ea;
    --border-hairline: #e4e1da;
    --border-strong: #14171f;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --max-wrap: 1240px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-canvas);
    color: var(--text-main);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: clamp(0.98rem, 1vw + 0.15rem, 1.0625rem);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeSpeed;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent-hover);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 14px;
    z-index: 99999;
    background: var(--bg-ink-bar);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}
.skip-link:focus {
    top: 14px;
    color: #fff;
}

.screen-reader-text, .sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Top Announcement Strip */
.top-ticker {
    background: var(--bg-ink-bar);
    color: #f4f3ef;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-ticker__inner {
    width: min(100% - 32px, var(--max-wrap));
    margin: 0 auto;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}
.top-ticker__badge {
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 999px;
    margin-right: 8px;
}
.top-ticker__link {
    color: #ffb098;
    font-weight: 700;
    white-space: nowrap;
}
.top-ticker__link:hover {
    color: #ffffff;
}

/* Non-Sticky Header */
.ed-header {
    position: static;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border-strong);
}
.ed-header__inner {
    width: min(100% - 32px, var(--max-wrap));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.ed-brand {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ed-brand a {
    color: inherit;
    text-decoration: none;
}
.ed-brand__mark {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}
.ed-brand span.accent {
    color: var(--accent);
}
.custom-logo {
    max-height: 46px;
    width: auto;
}

.ed-nav-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
}
.ed-nav ul,
.ed-nav .primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 22px;
}
.ed-nav a {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.ed-nav a:hover,
.ed-nav .current-menu-item > a {
    color: var(--accent-hover);
    border-bottom-color: var(--accent);
}

.ed-cta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none !important;
    border: 2px solid var(--border-strong);
    box-shadow: 3px 3px 0 var(--border-strong);
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.ed-cta-pill:hover {
    background: var(--accent-hover);
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--border-strong);
}

.ed-burger {
    display: none;
    width: 42px;
    height: 42px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-main);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.ed-burger-box {
    position: relative;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.ed-burger-box::before,
.ed-burger-box::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.ed-burger-box::before { top: -6px; }
.ed-burger-box::after { top: 6px; }

/* Masthead */
.ed-masthead {
    width: min(100% - 32px, var(--max-wrap));
    margin: 28px auto 22px;
    padding: 26px clamp(20px, 3vw, 36px);
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-left: 6px solid var(--accent);
    border-radius: var(--radius-md);
}
.ed-masthead__kicker {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-hover);
    margin-bottom: 6px;
}
.ed-masthead h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text-main);
}
.ed-masthead p {
    margin: 0;
    color: var(--text-muted);
    max-width: 68ch;
}

/* Main Layout Grid */
.ed-wrap {
    width: min(100% - 32px, var(--max-wrap));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: stretch;
}
.ed-wrap--single {
    grid-template-columns: minmax(0, 1fr);
}
.ed-main {
    min-width: 0;
}

/* Archive Feed */
.ed-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.ed-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.ed-card:hover {
    transform: translateY(-3px);
    border-color: #c8c3b8;
}
.ed-card__thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8e5de;
}
.ed-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ed-card__body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.ed-card__cat {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-hover);
    margin-bottom: 8px;
}
.ed-card__cat a {
    color: inherit;
    text-decoration: none;
}
.ed-card__title {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 850;
    line-height: 1.3;
    letter-spacing: -0.015em;
}
.ed-card__title a {
    color: var(--text-main);
    text-decoration: none;
}
.ed-card__title a:hover {
    color: var(--accent-hover);
}
.ed-card__excerpt {
    font-size: 14.5px;
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.6;
    flex: 1 1 auto;
}
.ed-card__excerpt p {
    margin: 0;
}
.ed-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border-hairline);
}
.ed-card__read {
    font-weight: 800;
    color: var(--accent-hover);
    text-decoration: none;
}

/* Single Article Container (Static Non-Sticky Header/Title) */
.ed-article {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 4vw, 48px);
}
.ed-article__header {
    position: static;
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 2px solid var(--border-hairline);
}
.ed-article__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.ed-article__cats a {
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
}
.ed-article__title {
    position: static;
    margin: 0 0 14px;
    font-size: clamp(28px, 3.8vw, 42px);
    font-weight: 900;
    line-height: 1.16;
    letter-spacing: -0.025em;
    color: var(--text-main);
}
.ed-article__byline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 13.5px;
    color: var(--text-muted);
}
.ed-article__hero {
    margin: 0 0 28px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-hairline);
}
.ed-article__hero img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
}

/* Article Body Typography */
.ed-prose {
    color: var(--text-main);
    font-size: clamp(1rem, 1.05vw + 0.1rem, 1.08rem);
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.ed-prose > :first-child { margin-top: 0; }
.ed-prose h2, .ed-prose h3, .ed-prose h4 {
    margin: 1.65em 0 0.6em;
    font-weight: 850;
    line-height: 1.28;
    letter-spacing: -0.02em;
    color: var(--text-main);
}
.ed-prose h2 {
    font-size: clamp(22px, 2.5vw, 29px);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-soft);
}
.ed-prose h3 {
    font-size: clamp(18px, 2vw, 22px);
}
.ed-prose p {
    margin: 0 0 1.25em;
}
.ed-prose ul, .ed-prose ol {
    margin: 0 0 1.35em;
    padding-left: 1.4em;
}
.ed-prose li {
    margin-bottom: 0.4em;
}
.ed-prose blockquote {
    margin: 1.6em 0;
    padding: 16px 22px;
    background: var(--bg-warm);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ed-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.94em;
}
.ed-prose th, .ed-prose td {
    padding: 10px 12px;
    border: 1px solid var(--border-hairline);
    text-align: left;
}
.ed-prose th {
    background: var(--bg-warm);
    font-weight: 800;
}
.ed-prose pre {
    background: var(--bg-ink-bar);
    color: #f4f3ef;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

/* Shadow DOM Author Banner Host */
#catchon-author-banner-host {
    display: block;
    width: 100%;
    margin-top: 36px;
}

/* Sidebar Rail (Sticky along article height) */
.ed-rail {
    position: sticky;
    top: 24px;
    align-self: start;
    display: grid;
    gap: 20px;
    z-index: 20;
}
.ed-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 22px;
}
.ed-panel--plan {
    background: var(--bg-ink-bar);
    color: #ffffff;
    border-color: var(--bg-ink-bar);
}
.ed-panel__tag {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.ed-panel--plan h2 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 850;
    line-height: 1.25;
    color: #fff;
}
.ed-panel__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 12px;
}
.ed-panel__price strong {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #ffb098;
}
.ed-panel__price span {
    font-size: 13px;
    color: #cbd5e1;
}
.ed-panel__desc {
    font-size: 13.5px;
    color: #cbd5e1;
    margin: 0 0 18px;
    line-height: 1.55;
}
.ed-panel__btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    background: var(--accent);
    color: #fff !important;
    font-weight: 800;
    font-size: 14px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    margin-bottom: 10px;
}
.ed-panel__btn-main:hover {
    background: var(--accent-hover);
}
.ed-panel__btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
}
.ed-panel__btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ed-mobile-offer {
    display: none;
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 10px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hairline);
    background: #fff;
    color: var(--text-main);
    font-weight: 700;
}
.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Empty State & Search */
.ed-empty {
    background: #fff;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 36px 24px;
    text-align: center;
}
.search-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin: 18px auto 0;
}
.search-form label { flex: 1; }
.search-field {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
}
.search-submit {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

/* Footer */
.ed-footer {
    margin-top: 64px;
    background: var(--bg-ink-bar);
    color: #9ca3af;
    padding: 36px 0;
    font-size: 13.5px;
    border-top: 4px solid var(--accent);
}
.ed-footer__inner {
    width: min(100% - 32px, var(--max-wrap));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.ed-footer p { margin: 0; }
.ed-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}
.ed-footer a {
    color: #e5e7eb;
    text-decoration: none;
}
.ed-footer a:hover {
    color: #ffb098;
}

@media (max-width: 1024px) {
    .ed-wrap {
        grid-template-columns: minmax(0, 1fr);
    }
    .ed-rail {
        display: none;
    }
    body.single-post .ed-mobile-offer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 20px auto 0;
        width: min(100% - 32px, var(--max-wrap));
        background: var(--bg-ink-bar);
        color: #fff;
        padding: 12px 16px;
        border-radius: var(--radius-md);
        border: 2px solid var(--accent);
    }
}

@media (max-width: 820px) {
    .ed-burger {
        display: inline-flex;
    }
    .ed-nav {
        display: none;
        position: static;
        width: 100%;
        background: #fff;
        border-top: 1px solid var(--border-hairline);
        padding: 12px 0;
    }
    .ed-nav.is-open {
        display: block;
    }
    .ed-nav ul,
    .ed-nav .primary-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .ed-nav a {
        display: block;
        padding: 10px 4px;
    }
    .ed-feed {
        grid-template-columns: minmax(0, 1fr);
    }
    .top-ticker__inner {
        font-size: 11.5px;
    }
}

@media (max-width: 480px) {
    .ed-cta-pill {
        padding: 0 12px;
        font-size: 12px;
        min-height: 38px;
    }
    .ed-article {
        padding: 20px 15px;
        border-radius: var(--radius-md);
    }
}
