/*
 * Interior pages and content indexes.
 * This file extends the homepage's visual language without changing editor content.
 */
body:not(.home) { --container: 80rem; background: var(--c-bg); }
body:not(.home) .site-header { border-bottom: 1px solid var(--c-line); }
body:not(.home) .site-header__bar { padding-block: 18px; }
body:not(.home) .site-logo__img.hp-brand { width: 220px; height: 64px; max-height: none; object-fit: cover; }
body:not(.home) .site-logo { background: #fff; border-radius: 3px; padding: 4px 8px; }
body:not(.home) .nav-primary__link { font-size: 12px; letter-spacing: .015em; }
body:not(.home) .header-search-toggle { border: 1px solid var(--c-line); border-radius: 50%; }
body:not(.home) .site-main { min-height: 45vh; padding-bottom: 0; }

/* Page title band */
body:not(.home) .page-header {
  position: relative;
  overflow: hidden;
  background: #202821;
  border: 0;
  color: #fff;
}
body:not(.home) .page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 62%, rgb(221 153 51 / .08) 62%),
    radial-gradient(circle at 88% 30%, rgb(221 153 51 / .11), transparent 27rem);
}
body:not(.home) .page-header::after {
  content: "KNDI";
  position: absolute;
  right: max(var(--gutter), calc((100vw - var(--container)) / 2));
  bottom: -1.25rem;
  color: rgb(255 255 255 / .035);
  font: 700 clamp(4rem, 10vw, 8.5rem)/1 var(--font-serif);
  letter-spacing: .04em;
  pointer-events: none;
}
body:not(.home) .page-header__inner { position: relative; z-index: 1; padding-block: 28px 54px; }
body:not(.home) .breadcrumbs { margin-bottom: 30px; }
body:not(.home) .breadcrumbs a,
body:not(.home) .breadcrumbs a:visited { color: #f0d29e; }
body:not(.home) .breadcrumbs a:hover { color: #fff; }
body:not(.home) .breadcrumbs [aria-current="page"] { color: #c8d0c6; }
body:not(.home) .breadcrumbs li + li::before { border-color: #8f9a8d; }
body:not(.home) .page-header__title {
  max-width: 22ch;
  margin: 0 0 15px;
  color: #fff;
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.035em;
  text-wrap: balance;
}
body:not(.home) .page-header__lede { max-width: 58ch; color: #d4dbd2; font-size: 17px; line-height: 1.65; }
body:not(.home) .page-header .post-meta { margin-top: 22px; color: #c6cfc4; }
body:not(.home) .page-header .post-meta span { display: inline-flex; align-items: center; }
body:not(.home) .page-header .post-meta span + span::before { content: ""; width: 4px; height: 4px; margin-right: 16px; border-radius: 50%; background: #dd9933; }
body:not(.home) .page-header__media { height: clamp(230px, 30vw, 430px); aspect-ratio: auto; border-bottom: 0; object-position: center; }
body:not(.home) .page-header__media + .page-header__inner { margin-top: -112px; padding-top: 30px; background: linear-gradient(90deg, #202821 0%, rgb(32 40 33 / .94) 65%, transparent 100%); }
body:not(.home) .page-header .search-form { max-width: 42rem; margin-top: 28px; }

/* Reading canvas */
body:not(.home) article > .container:not(.layout-sidebar),
body:not(.home) section > .container:not(.page-header__inner),
body.blog .post-list,
body.archive .post-list { padding-top: 64px !important; padding-bottom: 82px; }
body:not(.home) .entry-content { width: min(100%, 52rem); color: var(--c-ink); }
body:not(.home) .entry-content > p:first-child { font-size: 1.08rem; line-height: 1.75; }
body:not(.home) .entry-content p,
body:not(.home) .entry-content li { line-height: 1.75; }
body:not(.home) .entry-content h2 {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 2px solid var(--c-amber);
  font-size: clamp(29px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -.025em;
}
body:not(.home) .entry-content h3 { margin-top: 38px; font-size: 24px; font-weight: 500; }
body:not(.home) .entry-content h4 { margin-top: 30px; color: var(--c-amber-text); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
body:not(.home) .entry-content ul,
body:not(.home) .entry-content ol { padding-left: 1.35rem; }
body:not(.home) .entry-content li { padding-left: .35rem; margin-bottom: .45rem; }
body:not(.home) .entry-content li::marker { color: var(--c-amber-text); font-weight: 700; }
body:not(.home) .entry-content blockquote { margin-block: 36px; padding: 25px 30px; background: var(--c-amber-tint); border-left: 3px solid var(--c-amber); font-size: 20px; }
body:not(.home) .entry-content a { font-weight: 600; }
body:not(.home) .entry-content img { border-radius: 4px; }
body:not(.home) .entry-content figure { margin-block: 34px; }
body:not(.home) .entry-content figcaption { padding-left: 13px; border-left: 2px solid var(--c-amber); }
body:not(.home) .entry-content .wp-block-gallery { width: min(100vw - (2 * var(--gutter)), 68rem); gap: 12px; }
body:not(.home) .entry-content .wp-block-gallery figure { margin-block: 0; }
body:not(.home) .entry-content .wp-block-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
body:not(.home) .entry-content .wp-block-file { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; margin-block: 12px; border: 1px solid var(--c-line); border-left: 3px solid var(--c-amber); border-radius: 4px; background: var(--c-surface); }
body:not(.home) .entry-content .wp-block-file > a:first-child { color: var(--c-ink); font-family: var(--font-serif); font-size: 18px; }
body:not(.home) .entry-content .wp-block-file__button { flex-shrink: 0; padding: 10px 15px; border-radius: 3px; background: #202821; color: #fff; font-family: var(--font-sans); font-size: 12px; }
body:not(.home) .entry-content table { margin-block: 28px 40px; border: 1px solid var(--c-line); font-size: 14px; }
body:not(.home) .table-wrap { margin-block: 28px 40px; border-radius: 4px; }
body:not(.home) .table-wrap table { margin-block: 0; }
body:not(.home) .table-wrap:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
body:not(.home) .entry-content th { background: #202821; color: #fff; border-color: #3c493d; }
body:not(.home) .entry-content td { border-right: 1px solid var(--c-line); }
body:not(.home) .entry-content tr:nth-child(even) td { background: var(--c-surface); }
body:not(.home) .entry-content > :is(div, section):not([class]) { max-width: var(--measure); }

/* Full-width legacy page template: give imported content a deliberate reading column. */
body.page-template-page_front-page:not(.home) article > .container { padding-top: 64px !important; padding-bottom: 82px; }
body.page-template-page_front-page:not(.home) .entry-content { margin-inline: auto; }

/* Sidebar pages */
body:not(.home) .layout-sidebar { grid-template-columns: minmax(0, 1fr) 19rem; gap: 80px; padding-block: 64px 82px; }
body:not(.home) .layout-sidebar .entry-content { width: 100%; }
body:not(.home) .sidebar { position: sticky; top: 24px; gap: 26px; }
body:not(.home) .sidebar > * { padding: 24px; border: 1px solid var(--c-line); border-radius: 4px; background: var(--c-surface); }
body:not(.home) .sidebar .widget__title { color: var(--c-amber-text); font-size: 11px; letter-spacing: .12em; }
body:not(.home) .nav-section ul { border-top-color: var(--c-line); }
body:not(.home) .nav-section a { padding-inline: 0; }
body:not(.home) .nav-section a[aria-current="page"] { padding-inline: 12px; }

/* News and archive indexes */
body:not(.home) .post-list { width: min(calc(100% - (2 * var(--gutter))), var(--container)); margin-inline: auto; border-top: 0; }
body:not(.home) .post-list__item {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 30px;
  margin-bottom: 14px;
  border: 1px solid var(--c-line);
  border-radius: 5px;
  background: var(--c-bg);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
body:not(.home) .post-list__item:hover { border-color: var(--c-amber-text); transform: translateY(-2px); box-shadow: 0 10px 28px rgb(28 26 23 / .06); }
body:not(.home) .post-list__item--media { grid-template-columns: 92px 220px minmax(0, 1fr); }
body:not(.home) .post-list__media { display: block; align-self: stretch; min-height: 145px; overflow: hidden; border-radius: 3px; }
body:not(.home) .post-list__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
body:not(.home) .post-date { padding-top: 4px; color: var(--c-ink-muted); text-transform: uppercase; letter-spacing: .05em; }
body:not(.home) .post-date__day { color: var(--c-amber-text); font-size: 36px; font-weight: 400; }
body:not(.home) .post-list__title { font-size: clamp(22px, 2vw, 28px); font-weight: 500; }
body:not(.home) .post-list__excerpt { line-height: 1.7; }
body:not(.home) .tag { color: var(--c-amber-text); border: 0; font-size: 10px; letter-spacing: .11em; }
body:not(.home) .pagination { width: min(calc(100% - (2 * var(--gutter))), var(--container)); margin: -48px auto 72px; }

/* Single notices */
body.single-post article > .container { max-width: 58rem; }
body.single-post .entry-content { width: 100%; font-size: 17px; }
body.single-post .post-nav { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 64px; padding-top: 0; border: 0; }
body.single-post .post-nav a { height: 100%; padding: 22px; border: 1px solid var(--c-line); border-radius: 4px; background: var(--c-surface); }
body.single-post .post-nav__label { color: var(--c-amber-text); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
body.single-post .post-nav__title { display: block; margin-top: 8px; font-family: var(--font-serif); font-size: 18px; line-height: 1.35; }

/* Attachment and internship hub */
.attachment-tabs { padding-block: 58px 82px; }
.attachment-tabs__list { display: inline-flex; gap: 6px; padding: 6px; margin-bottom: 42px; border: 1px solid var(--c-line); border-radius: 5px; background: var(--c-surface); }
.attachment-tabs__list button { min-width: 170px; min-height: 48px; padding: 11px 22px; border: 0; border-radius: 3px; background: transparent; color: var(--c-ink); font: 700 13px/1.4 var(--font-sans); cursor: pointer; }
.attachment-tabs__list button[aria-selected="true"] { background: #202821; color: #fff; }
.attachment-tabs__list button:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.attachment-tabs__panel[hidden] { display: none; }
.attachment-tabs__panel > .entry-content { width: min(100%, 54rem); }
.attachment-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 42px; }
.attachment-actions article { position: relative; padding: 30px; border: 1px solid var(--c-line); border-radius: 5px; background: var(--c-surface); }
.attachment-actions article > span { display: block; margin-bottom: 28px; color: var(--c-amber-text); font-size: 11px; font-weight: 700; }
.attachment-actions h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 28px; }
.attachment-actions p { color: var(--c-ink-muted); line-height: 1.7; }
.attachment-actions .button { margin-top: 12px; }
.attachment-placeholder { max-width: 52rem; padding: clamp(30px,5vw,58px); border-left: 4px solid var(--c-amber); background: var(--c-amber-tint); }
.attachment-placeholder__kicker { margin: 0 0 14px; color: var(--c-amber-text); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.attachment-placeholder h2 { max-width: 18ch; margin-bottom: 18px; font-size: clamp(31px,4vw,45px); }
.attachment-placeholder > p:not(.attachment-placeholder__kicker) { max-width: 55ch; color: var(--c-ink-muted); line-height: 1.75; }
.attachment-placeholder .button { margin-top: 14px; }

/* Search */
body.search section > .container:not(.page-header__inner) { max-width: 62rem; }
body.search .search-summary { padding-bottom: 18px; border-bottom: 1px solid var(--c-line); font-size: 16px; }
body.search .search-results { border: 0; }
body.search .search-result { padding: 28px; margin-bottom: 14px; border: 1px solid var(--c-line); border-radius: 5px; }
body.search .search-result__title { font-size: 26px; font-weight: 500; }
body.search .search-result__path { color: var(--c-amber-text); }
body.search .search-result__excerpt { color: var(--c-ink-muted); line-height: 1.7; }

/* Documents and tenders */
body.post-type-archive-kndi_document section > .container,
body.post-type-archive-kndi_tender section > .container,
body.single-kndi_document article > .container,
body.single-kndi_tender article > .container { max-width: 68rem; }
body:not(.home) .downloads { margin: 18px 0 44px; border: 0; }
body:not(.home) .downloads__item { margin-bottom: 10px; padding: 20px 22px; border: 1px solid var(--c-line); border-radius: 4px; background: var(--c-bg); }
body:not(.home) .downloads__item:hover { border-color: var(--c-amber-text); }
body:not(.home) .downloads__name { font-family: var(--font-serif); font-size: 18px; }

/* 404 */
body.error404 { background: var(--c-surface); }
body.error404 .error-404 { max-width: 56rem; padding-block: 86px 100px; }
body.error404 .error-404__code { color: var(--c-amber-text); font: 700 11px/1.4 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
body.error404 .error-404 h1 { max-width: 12ch; font-size: clamp(42px, 6vw, 68px); font-weight: 500; letter-spacing: -.035em; }
body.error404 .error-404 > p:not(.error-404__code) { max-width: 54ch; color: var(--c-ink-muted); font-size: 17px; }
body.error404 .error-404 .search-form { max-width: 38rem; margin-block: 32px 52px; }
body.error404 .link-list { max-width: 46rem; }
body.error404 .link-list a { display: flex; justify-content: space-between; align-items: center; min-height: 52px; color: var(--c-ink); font-weight: 600; }

@media (max-width: 1023px) {
  body:not(.home) .site-logo__img.hp-brand { width: 170px; height: 52px; }
  body:not(.home) .layout-sidebar { grid-template-columns: minmax(0,1fr) 17rem; gap: 38px; }
}
@media (max-width: 767px) {
  body:not(.home) .site-header__bar { gap: 8px; padding-block: 12px; }
  body:not(.home) .site-logo { padding: 0; }
  body:not(.home) .site-logo__img.hp-brand { width: 170px; height: 53px; }
  body:not(.home) .site-header__actions { gap: 6px; }
  body:not(.home) [data-search-open] { width: 44px; padding: 0; justify-content: center; gap: 0; font-size: 0; }
  body:not(.home) [data-search-open] .icon { width: 18px; height: 18px; }
  body:not(.home) .nav-toggle { padding-inline: 10px; font-size: 12px; }
  body:not(.home) .page-header__inner { padding-block: 22px 40px; }
  body:not(.home) .breadcrumbs { margin-bottom: 20px; font-size: 12px; }
  body:not(.home) .breadcrumbs li:last-child { display: none; }
  body:not(.home) .page-header__title { font-size: clamp(36px, 11vw, 48px); }
  body:not(.home) .page-header__lede { font-size: 15px; }
  body:not(.home) article > .container:not(.layout-sidebar),
  body:not(.home) section > .container:not(.page-header__inner),
  body.page-template-page_front-page:not(.home) article > .container { padding-top: 42px !important; padding-bottom: 58px; }
  body:not(.home) .layout-sidebar { display: block; padding-block: 42px 58px; }
  body:not(.home) .sidebar { position: static; margin-top: 50px; }
  body:not(.home) .entry-content h2 { margin-top: 44px; font-size: 29px; }
  body:not(.home) .entry-content h3 { font-size: 22px; }
  body:not(.home) .entry-content table { display: table; }
  body:not(.home) .post-list { padding-top: 42px !important; padding-bottom: 56px; }
  body:not(.home) .post-list__item { grid-template-columns: 1fr; gap: 12px; padding: 22px; }
  body:not(.home) .post-list__item--media { grid-template-columns: 1fr; }
  body:not(.home) .post-list__media { min-height: 0; aspect-ratio: 16 / 9; margin-block: 4px 8px; }
  body:not(.home) .entry-content .wp-block-file { align-items: flex-start; flex-direction: column; }
  body:not(.home) .post-date { display: flex; align-items: baseline; gap: 6px; }
  body:not(.home) .post-date__day { font-size: 25px; }
  body.single-post .post-nav { grid-template-columns: 1fr; }
  .attachment-tabs { padding-block: 42px 58px; }
  .attachment-tabs__list { display: flex; width: 100%; }
  .attachment-tabs__list button { min-width: 0; flex: 1; }
  .attachment-actions { grid-template-columns: 1fr; }
  body.search .search-result { padding: 22px; }
  body.error404 .error-404 { padding-block: 56px 70px; }
}
@media (max-width: 359px) {
  body:not(.home) .site-logo__img.hp-brand { width: 133px; height: 47px; }
  body:not(.home) .site-header__bar { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { body:not(.home) .post-list__item { transition: none; } body:not(.home) .post-list__item:hover { transform: none; } }
