/*
Theme Name: Knoco_International_Theme
Theme URI: https://knoco.com/
Description: Child theme for Knoco International V3. Preserves the V3 homepage while standardizing full-width interior pages/posts and per-content hero controls in the WordPress Customizer.
Author: Knoco International
Version: 1.0.0
Template: knoco-international-v3.3
Text Domain: knoco-international-theme
*/

:root {
  --ki-purple: #7851a9;
  --ki-purple-dark: #3f285c;
  --ki-purple-light: #b89ae0;
  --ki-ink: #15264a;
  --ki-body: #3f4652;
  --ki-gold: #f3c64e;
  --ki-white: #ffffff;
  --ki-hero-overlay-start: rgba(17, 22, 36, .74);
  --ki-hero-overlay-mid: rgba(47, 42, 72, .66);
  --ki-hero-overlay-end: rgba(120, 81, 169, .58);
  --ki-content-max: 1440px;
  --ki-gutter: 64px;
}

/* Keep the homepage exactly under parent-theme control. */
body:not(.home) .site-content,
body:not(.home) #content,
body:not(.home) .content-area,
body:not(.home) .site-main,
body:not(.home) article.page,
body:not(.home) article.post,
body:not(.home) .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Suppress legacy parent-theme page title bands on interior content. */
body:not(.home) .page-header,
body:not(.home) .entry-header,
body:not(.home) .page-title,
body:not(.home) .page-title-wrap,
body:not(.home) .page-header-wrap,
body:not(.home) .page-title-section,
body:not(.home) .page-title-area,
body:not(.home) .page-title-bar,
body:not(.home) .page-heading,
body:not(.home) .breadcrumb-area,
body:not(.home) .breadcrumbs {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* Neutralize page-level hero hacks from earlier V3 page builds when the theme hero is active. */
body.ki-theme-hero-active .knoco-premier,
body.ki-theme-hero-active .ki-ind,
body.ki-theme-hero-active .ki-mil,
body.ki-theme-hero-active .kmcpm {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  transform: none !important;
  left: auto !important;
  width: 100% !important;
  margin-left: 0 !important;
}
body.ki-theme-hero-active .knoco-premier > .kp-hero,
body.ki-theme-hero-active .ki-ind > .hero,
body.ki-theme-hero-active .ki-mil > .hero,
body.ki-theme-hero-active .kmcpm > .hero {
  display: none !important;
}

.ki-theme-hero {
  position: relative;
  width: 100%;
  min-height: clamp(420px, 42vw, 620px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--ki-white);
  background-color: #17121f;
  background-image:
    linear-gradient(115deg, var(--ki-hero-overlay-start), var(--ki-hero-overlay-mid) 58%, var(--ki-hero-overlay-end)),
    var(--ki-hero-image, none);
  background-size: cover;
  background-position: var(--ki-hero-position, center center);
  background-repeat: no-repeat;
}
.ki-theme-hero__inner {
  width: min(var(--ki-content-max), calc(100% - var(--ki-gutter)));
  margin: 0 auto;
  padding: 88px 0;
  position: relative;
  z-index: 2;
}
.ki-theme-hero__eyebrow {
  margin: 0 0 14px;
  color: var(--ki-gold) !important;
  font: 800 .8rem/1.2 Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ki-theme-hero h1 {
  max-width: 1180px;
  margin: 0 0 22px;
  color: #fff !important;
  font: 700 clamp(3rem, 6vw, 5.6rem)/.98 Georgia, "Times New Roman", serif;
  text-wrap: balance;
}
.ki-theme-hero__summary {
  max-width: 940px;
  margin: 0;
  color: #f6f2fa !important;
  font: 500 clamp(1.08rem, 1.7vw, 1.45rem)/1.6 Inter, "Segoe UI", Arial, sans-serif;
}

.ki-theme-content {
  width: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
}
.ki-theme-content > .entry-content,
.ki-theme-content__inner {
  width: min(var(--ki-content-max), calc(100% - var(--ki-gutter)));
  max-width: var(--ki-content-max);
  margin: 0 auto !important;
  padding: 64px 0 !important;
}

/* Full-bleed blocks continue to work from within readable inner content. */
.ki-theme-content .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}
.ki-theme-content .alignwide {
  width: min(1600px, calc(100vw - 40px));
  max-width: none;
  margin-left: 50% !important;
  transform: translateX(-50%);
}

/* Default typography for legacy/basic content. */
.ki-theme-content p,
.ki-theme-content li {
  color: var(--ki-body);
  line-height: 1.75;
}
.ki-theme-content h1,
.ki-theme-content h2,
.ki-theme-content h3,
.ki-theme-content h4 {
  color: var(--ki-ink);
}

/* Remove theme-generated footer whitespace. */
body:not(.home) .site-main,
body:not(.home) main,
body:not(.home) .site-content,
body:not(.home) .content-area,
body:not(.home) .entry-content,
body:not(.home) article {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body:not(.home) footer,
body:not(.home) .site-footer {
  margin-top: 0 !important;
}

@media (max-width: 900px) {
  :root { --ki-gutter: 40px; }
  .ki-theme-hero__inner { padding: 68px 0; }
}
@media (max-width: 640px) {
  :root { --ki-gutter: 28px; }
  .ki-theme-hero { min-height: 390px; }
  .ki-theme-hero__inner { padding: 58px 0; }
  .ki-theme-content > .entry-content,
  .ki-theme-content__inner { padding: 44px 0 !important; }
}
