/* =========================================================
   ImageKrafters KnowHow - page-scoped styles
   Load AFTER CSS/imagekrafters.css. Do not add these rules
   to the global stylesheet. Prefix: .ik-kh-
   ========================================================= */

:root {
    /* Used across the redesigned site but missing from :root in imagekrafters.css.
       Scoped here so KnowHow pages render navy headings correctly. */
    --ik-navy: #163a64;
}

/* ----- Staging banner (preview HTML only; omit from live CFM) ----- */
.ik-kh-staging-banner {
    background: #1b1d27;
    color: #e9eef3;
    font-size: .78rem;
    letter-spacing: .04em;
    text-align: center;
    padding: 8px 16px;
}
.ik-kh-staging-banner strong { color: #fff; }

/* ----- Shared bits ----- */
.ik-kh-crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    font-size: .82rem;
    color: var(--ik-muted);
}
.ik-kh-crumb li { display: inline-flex; align-items: center; gap: 8px; }
.ik-kh-crumb li + li::before {
    content: "/";
    color: #9aa8b5;
    margin-right: 2px;
}
.ik-kh-crumb a { color: var(--ik-blue); font-weight: 700; text-decoration: none; }
.ik-kh-crumb a:hover { text-decoration: underline; }
.ik-kh-crumb [aria-current="page"] { color: var(--ik-ink); font-weight: 700; }

.ik-kh-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}
.ik-kh-actions .ik-primary-button,
.ik-kh-actions .ik-secondary-button {
    text-decoration: none;
}

/* =========================================================
   INDEX
   ========================================================= */
.ik-page-knowhow-hub .ik-knowhow-hero p { max-width: 720px; }

.ik-kh-hero-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 26px;
    max-width: 720px;
}

.ik-kh-search {
    position: relative;
}
.ik-kh-search label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.ik-kh-search input[type="search"] {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px 10px 44px;
    border: 1px solid #cfd7df;
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23657383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='5.5'/%3E%3Cpath d='M12.5 12.5L16 16'/%3E%3C/svg%3E") 14px 50% no-repeat;
    color: var(--ik-ink);
    font: 400 .95rem/1.4 Arial, Helvetica, sans-serif;
    outline: none;
}
.ik-kh-search input[type="search"]:focus {
    border-color: var(--ik-blue);
    box-shadow: 0 0 0 3px rgba(3, 85, 167, .14);
}

.ik-kh-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ik-kh-filters button {
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid var(--ik-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ik-ink);
    font: 700 .78rem/1 Arial, Helvetica, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
}
.ik-kh-filters button:hover {
    border-color: #b7dcec;
    background: var(--ik-soft);
}
.ik-kh-filters button.is-active {
    background: var(--ik-blue);
    border-color: var(--ik-blue);
    color: #fff;
}
.ik-kh-filters button:focus-visible {
    outline: 3px solid rgba(3, 85, 167, .35);
    outline-offset: 2px;
}

.ik-kh-status {
    margin: 0 0 8px;
    color: var(--ik-muted);
    font-size: .86rem;
}

/* Featured */
.ik-kh-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
    gap: 0;
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid var(--ik-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--ik-shadow);
    text-decoration: none;
    color: inherit;
}
.ik-kh-featured:hover { text-decoration: none; transform: none; }
.ik-kh-featured-media {
    min-height: 260px;
    background: #d9e3ec center/cover no-repeat;
}
.ik-kh-featured-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ik-kh-featured-copy {
    padding: clamp(22px, 3.5vw, 36px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ik-kh-featured-copy .ik-eyebrow { margin-bottom: 10px; }
.ik-kh-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--ik-blue);
    font: 700 .72rem/1.2 Verdana, Geneva, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ik-kh-featured-copy h2 {
    margin: 0 0 12px;
    color: var(--ik-navy);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.2;
}
.ik-kh-featured-copy p {
    margin: 0 0 16px;
    color: var(--ik-muted);
    line-height: 1.7;
}
.ik-kh-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 0;
    color: var(--ik-muted);
    font-size: .82rem;
}
.ik-kh-readmore {
    margin-top: 18px;
    color: var(--ik-blue);
    font-weight: 700;
}

/* Card grid */
.ik-kh-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.ik-kh-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ik-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(34, 48, 61, .06);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ik-kh-card:hover {
    transform: translateY(-3px);
    border-color: #b7dcec;
    box-shadow: 0 12px 26px rgba(34, 48, 61, .1);
    text-decoration: none;
}
.ik-kh-card.is-hidden { display: none; }
.ik-kh-card-media {
    height: 150px;
    background: linear-gradient(135deg, #e8eef4, #d3e6f2);
    overflow: hidden;
}
.ik-kh-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ik-kh-card-media.is-placeholder {
    display: flex;
    align-items: flex-end;
    padding: 14px;
    background:
        radial-gradient(circle at 80% 20%, rgba(32, 169, 212, .22), transparent 46%),
        linear-gradient(135deg, #163a64, #0355a7);
    color: #fff;
    font: 700 .72rem/1 Verdana, Geneva, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ik-kh-card-body { padding: 16px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.ik-kh-card-body .ik-eyebrow { margin-bottom: 8px; }
.ik-kh-card h3 {
    margin: 0 0 8px;
    color: var(--ik-navy);
    font-size: 1.02rem;
    line-height: 1.35;
}
.ik-kh-card p {
    margin: 0 0 12px;
    color: var(--ik-muted);
    font-size: .9rem;
    line-height: 1.6;
    flex: 1;
}
.ik-kh-empty {
    display: none;
    grid-column: 1 / -1;
    padding: 32px 20px;
    border: 1px dashed var(--ik-line);
    border-radius: 14px;
    background: #fff;
    text-align: center;
    color: var(--ik-muted);
}
.ik-kh-empty.is-visible { display: block; }

/* Index sidebar quote card emphasis */
.ik-kh-quote-card {
    background: linear-gradient(180deg, #f5fbff, #fff);
    border-color: #cce8f6;
}
.ik-kh-quote-card .ik-primary-button {
    margin-top: 8px;
    width: 100%;
    text-decoration: none;
}

/* =========================================================
   ARTICLE
   ========================================================= */
.ik-kh-article-hero {
    margin: -4px 0 22px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--ik-soft);
}
.ik-kh-article-hero img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    margin: 0 !important;
}
.ik-kh-article-hero figcaption {
    padding: 8px 4px 0;
    color: var(--ik-muted);
    font-size: .8rem;
}

.ik-page-knowhow-article .ik-article-content > h1 {
    margin: 0 0 10px;
}

.ik-kh-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ik-line);
    color: var(--ik-muted);
    font-size: .86rem;
}

/* TOC */
.ik-kh-toc {
    margin: 0 0 28px;
    padding: 16px 18px 18px;
    border: 1px solid var(--ik-line);
    border-radius: 12px;
    background: var(--ik-soft);
}
.ik-kh-toc h2 {
    margin: 0 0 10px;
    color: var(--ik-navy);
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.ik-kh-toc ol {
    margin: 0;
    padding-left: 20px;
    color: var(--ik-ink);
}
.ik-kh-toc li { margin: 6px 0; line-height: 1.45; }
.ik-kh-toc a { font-weight: 700; text-decoration: none; }
.ik-kh-toc a:hover { text-decoration: underline; }

/* Callouts */
.ik-kh-callout {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    margin: 22px 0;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--ik-line);
    background: var(--ik-soft);
}
.ik-kh-callout-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ik-blue);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}
.ik-kh-callout h3,
.ik-kh-callout strong.ik-kh-callout-label {
    display: block;
    margin: 0 0 6px;
    color: var(--ik-navy);
    font-size: .92rem;
}
.ik-kh-callout p,
.ik-kh-callout li {
    margin: 0 0 8px;
    color: #526170;
}
.ik-kh-callout p:last-child { margin-bottom: 0; }
.ik-kh-callout.is-tip {
    background: #f3faf5;
    border-color: #c8e6d1;
}
.ik-kh-callout.is-tip .ik-kh-callout-icon { background: var(--ik-green); }
.ik-kh-callout.is-note {
    background: #f5fbff;
    border-color: #cce8f6;
}
.ik-kh-callout.is-warning {
    background: #fff8f0;
    border-color: #f0d3ad;
}
.ik-kh-callout.is-warning .ik-kh-callout-icon { background: #c56a17; }

.ik-kh-steps { margin: 0 0 24px; padding: 0; list-style: none; counter-reset: ikkh; }
.ik-kh-steps > li {
    position: relative;
    margin: 0 0 22px;
    padding: 0 0 0 56px;
    counter-increment: ikkh;
}
.ik-kh-steps > li::before {
    content: counter(ikkh);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ik-blue);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    line-height: 36px;
    text-align: center;
}
.ik-kh-steps h2 { margin-top: 0; }

.ik-kh-figure {
    margin: 22px 0;
}
.ik-kh-figure img {
    border-radius: 10px;
    border: 1px solid var(--ik-line);
}
.ik-kh-figure figcaption {
    margin-top: 8px;
    color: var(--ik-muted);
    font-size: .82rem;
    text-align: center;
}

.ik-kh-size-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: .92rem;
}
.ik-kh-size-table th,
.ik-kh-size-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ik-line);
    text-align: left;
    color: #526170;
}
.ik-kh-size-table th {
    background: var(--ik-soft);
    color: var(--ik-navy);
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Mid / end quote band */
.ik-kh-cta-band {
    margin: 32px 0 8px;
    padding: 22px 22px 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, #163a64, #0355a7);
    color: #fff;
}
.ik-kh-cta-band h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.25rem;
}
.ik-kh-cta-band p {
    margin: 0 0 16px;
    color: rgba(255,255,255,.88);
}
.ik-kh-cta-band .ik-primary-button {
    background: #fff !important;
    color: var(--ik-blue) !important;
    box-shadow: none;
    text-decoration: none;
}
.ik-kh-cta-band .ik-secondary-button {
    border-color: rgba(255,255,255,.7);
    color: #fff;
    text-decoration: none;
}
.ik-kh-cta-band .ik-secondary-button:hover { background: rgba(255,255,255,.1); }

.ik-kh-related {
    margin: 32px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--ik-line);
}
.ik-kh-related h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}
.ik-kh-related-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ik-kh-related-list a {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--ik-line);
    border-radius: 10px;
    background: var(--ik-soft);
    text-decoration: none;
    color: var(--ik-navy);
    font-weight: 700;
}
.ik-kh-related-list a:hover {
    border-color: #b7dcec;
    text-decoration: none;
}
.ik-kh-related-list span {
    display: block;
    margin-bottom: 4px;
    color: var(--ik-blue);
    font: 700 .68rem/1.2 Verdana, Geneva, sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    .ik-kh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ik-kh-featured { grid-template-columns: 1fr; }
    .ik-kh-featured-media { min-height: 200px; max-height: 240px; }
}
@media (max-width: 650px) {
    .ik-kh-grid { grid-template-columns: 1fr; }
    .ik-kh-actions,
    .ik-kh-cta-band .ik-kh-actions { flex-direction: column; }
    .ik-kh-actions .ik-primary-button,
    .ik-kh-actions .ik-secondary-button { width: 100%; }
    .ik-kh-callout { grid-template-columns: 1fr; }
}

/* Video embeds and template lists inside migrated articles */
.ik-kh-video {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 22px auto;
    aspect-ratio: 16 / 9;
    background: #0b1722;
    border-radius: 10px;
    overflow: hidden;
}
.ik-kh-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.ik-kh-article .ik-template-library ul,
.ik-resource-content .ik-template-library ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 18px;
    margin: 0 0 22px;
    padding-left: 20px;
}
@media (max-width: 650px) {
    .ik-kh-article .ik-template-library ul,
    .ik-resource-content .ik-template-library ul {
        grid-template-columns: 1fr;
    }
}
.ik-ship-policy {
    background: #eef7f0;
    border: 1px solid #cfe6d4;
    border-left: 5px solid #2e8b57;
    border-radius: 8px;
    padding: 18px 20px;
    margin: 0 0 26px;
}
.ik-ship-policy h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    line-height: 1.25;
}
