/* Kines main site — design-consistency fixes (16 Nov 2026 audit): blog listing hero + article heroes match the other page heroes. */
:root{--kx-hero-bg:linear-gradient(180deg,#0a3f9cd9,#0b3a8fe0 55%,#0a2f72f0),url('/villa.jpg') center/cover no-repeat}
html,body{overflow-x:clip}

/* ---------- Blog listing hero: full width, flush to the header, same as other heroes ---------- */
html body:not(:has(#app)) main#main-content.kd-hub>section.kd-hub-heading:first-child{width:100vw!important;max-width:none!important;margin:0 0 0 calc(50% - 50vw)!important;border-radius:0!important;min-height:440px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:72px 24px!important;box-sizing:border-box;background:var(--kx-hero-bg)!important}
html body:not(:has(#app)) main#main-content.kd-hub>section.kd-hub-heading:first-child .kd-eyebrow{letter-spacing:1px!important;font-size:15px!important;font-weight:500;margin-bottom:14px}
html body:not(:has(#app)) main#main-content.kd-hub>section.kd-hub-heading:first-child h1{font-size:clamp(40px,5.2vw,72px)!important;line-height:1.18!important;margin:0 auto 16px!important;text-shadow:0 4px 24px #00122e40}
html body:not(:has(#app)) main#main-content.kd-hub>section.kd-hub-heading:first-child h1 span{color:#5ea0ff!important}
html body:not(:has(#app)) main#main-content.kd-hub>section.kd-hub-heading:first-child>p:not(.kd-eyebrow){font-size:clamp(16px,1.6vw,21px)!important;color:#e8f0ff!important;max-width:820px}
html main.kd-hub .kv-filters{margin-top:40px!important}

/* ---------- Article hero: blue band like every other page ---------- */
html main.kd-article>nav:first-child{position:relative;z-index:2;width:100vw;max-width:none;margin:0 0 0 calc(50% - 50vw)!important;padding:22px max(24px,calc(50vw - 461px)) 0!important;box-sizing:border-box;background:#0a3f9c;color:#dbe9ff}
html main.kd-article>nav:first-child a,html main.kd-article>nav:first-child span{color:#dbe9ff!important}
html main.kd-article>nav:first-child a:hover{color:#fff!important}
html main.kd-article>.kd-article-hero{width:100vw;max-width:none!important;margin:0 0 0 calc(50% - 50vw)!important;padding:36px max(24px,calc(50vw - 461px)) 150px!important;box-sizing:border-box;background:linear-gradient(180deg,#0a3f9c 0%,#0b3a8f 55%,#0a2f72 100%)!important;color:#fff;text-align:center}
html main.kd-article>.kd-article-hero h1{color:#fff!important;font-size:clamp(32px,3.6vw,52px)!important;line-height:1.25!important;font-weight:700!important;text-shadow:0 4px 24px #00122e40}
html main.kd-article>.kd-article-hero :is(p,time,.publication-date,.lead){color:#e8f0ff!important}
html main.kd-article>.kd-article-hero .kv-tags a{background:#ffffff1f!important;color:#fff!important;border:1px solid #ffffff59!important}
html main.kd-article>.kd-article-hero .kv-tags a:hover{background:#fff!important;color:#006cff!important}
html main.kd-article>.kd-cover{position:relative;z-index:2;margin-top:-120px!important}
html main.kd-article>.kd-cover figcaption{color:#5a6f8a}
@media(max-width:760px){
 html body:not(:has(#app)) main#main-content.kd-hub>section.kd-hub-heading:first-child{min-height:380px;padding:56px 20px!important}
 html body:not(:has(#app)) main#main-content.kd-hub>section.kd-hub-heading:first-child h1{font-size:38px!important}
 html main.kd-article>nav:first-child{padding:16px 20px 0!important}
 html main.kd-article>.kd-article-hero{padding:26px 20px 90px!important}
 html main.kd-article>.kd-article-hero h1{font-size:30px!important}
 html main.kd-article>.kd-cover{margin-top:-70px!important}
}
/* main clips its overflow on small screens, which cut the full-bleed bands back to the content column; html/body already clip */
html body:not(:has(#app)) main#main-content:is(.kd-hub,.kd-article){overflow-x:visible!important}
html body:not(:has(#app)) main#main-content.kd-hub:has(>section.kd-hub-heading:first-child),html body:not(:has(#app)) main#main-content.kd-article{margin-top:0!important}

/* ---------- layout-critic round (16 Nov 2026) ---------- */
/* blog: dark library + closing CTA run full width; container stays for cards */
html body:not(:has(#app)) main#main-content.kd-hub>section:is(.kd-library,.kd-cta){width:100vw!important;max-width:none!important;margin-left:calc(50% - 50vw)!important;margin-right:0!important;border-radius:0!important;padding-left:max(24px,calc(50vw - 615px))!important;padding-right:max(24px,calc(50vw - 615px))!important;box-sizing:border-box}
html body:not(:has(#app)) main#main-content.kd-hub>.kv-library-status{padding-left:5px;margin-top:6px}
/* footer font matches the rest of the site */
html body:not(:has(#app)) footer{font-family:Kanit,Arial,sans-serif!important}
/* article: summary link pill readable on blue */
html main.kd-article .kd-summary .kv-citation a{background:transparent!important;color:#fff!important;border:1px solid #ffffffb3!important;border-radius:999px;padding:6px 16px;display:inline-block;text-decoration:none}
html main.kd-article .kd-summary .kv-citation a:hover{background:#fff!important;color:#006cff!important}
/* article: sources card spaced and padded like the card above */
html main.kd-article .kv-ref{margin-top:24px!important;padding:18px 22px!important;border-radius:24px}
/* article: wide tables scroll sideways with an edge shadow as the cue */
@media(max-width:760px){
 html main.kd-article .kb-body table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;background:linear-gradient(90deg,#fff 30%,#fff0) left/40px 100% no-repeat local,linear-gradient(270deg,#fff 30%,#fff0) right/40px 100% no-repeat local,radial-gradient(farthest-side at 0 50%,#0023412e,#0000) left/14px 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,#0023412e,#0000) right/14px 100% no-repeat scroll}
}
/* headings: no single-word last lines */
html body:not(:has(#app)) main :is(h1,h2,h3){text-wrap:balance}
/* header platform pills: room after the label */
.kines-header a:is([href^="/academy"],[href="/"],[href="/en/"]){padding-right:22px}
html main.kd-article .kd-summary p.kv-citation{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin-top:16px}
html body:not(:has(#app)) main#main-content.kd-hub>section.kd-cta{border:0!important;margin-top:0!important;margin-bottom:0!important}
html body:not(:has(#app)) main#main-content.kd-hub>section.kd-library{margin-bottom:0!important}
html body:not(:has(#app)) main#main-content.kd-hub:has(>section.kd-cta:last-child){padding-bottom:0!important;margin-bottom:0!important}
.kines-header .k-platforms a{flex-shrink:0!important;white-space:nowrap}
@media(max-width:760px){
 html main.kd-article .kb-body table{position:relative}
 html main.kd-article .kb-body table::before{content:"เลื่อนดูตาราง →";position:sticky;left:0;display:block;width:max-content;font-size:12px;font-weight:500;color:#006cff;padding:0 0 6px 2px;background:#fff}
 html[lang=en] main.kd-article .kb-body table::before{content:"Scroll the table →"}
}
.kines-header .k-platforms a{width:auto!important;min-width:max-content!important;box-sizing:border-box}
@media(max-width:760px){html main.kd-article .kb-body table::before{padding:8px 12px 6px 14px!important}}

.kines-header .k-subnav a[data-kines-ai-nav]{color:#0069cf;font-weight:600}
/* blog grid: the last visible card stretches so the final row has no hole (counts only visible cards, so filters keep working) */
@media(min-width:900px){
 html main.kd-hub .kd-grid>.kd-card:nth-last-child(1 of :not([hidden])):nth-child(3n+2 of :not([hidden])){grid-column:span 2}
 html main.kd-hub .kd-grid>.kd-card:nth-last-child(1 of :not([hidden])):nth-child(3n+1 of :not([hidden])){grid-column:1/-1}
 html main.kd-hub .kd-grid>.kd-card:nth-last-child(1 of :not([hidden])):is(:nth-child(3n+2 of :not([hidden])),:nth-child(3n+1 of :not([hidden]))){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}
 html main.kd-hub .kd-grid>.kd-card:nth-last-child(1 of :not([hidden])):is(:nth-child(3n+2 of :not([hidden])),:nth-child(3n+1 of :not([hidden])))>.kd-card-image{height:100%;aspect-ratio:auto!important}
 html main.kd-hub .kd-grid>.kd-card:nth-last-child(1 of :not([hidden])):is(:nth-child(3n+2 of :not([hidden])),:nth-child(3n+1 of :not([hidden])))>.kd-card-image img{height:100%;object-fit:cover}
 html main.kd-hub .kd-grid>.kd-card:nth-last-child(1 of :not([hidden])):is(:nth-child(3n+2 of :not([hidden])),:nth-child(3n+1 of :not([hidden])))>:not(.kd-card-image){align-self:center;padding:28px 36px!important}
}
@media(max-width:760px){html img[src*="kines-smart-lobby"]{width:100%;height:100%;object-fit:cover;object-position:62% center}}

/* ---------- one footer: the PACH legal block becomes the footer's bottom row ---------- */
html body:not(:has(#app)) footer.bg-primary-900{padding-bottom:0!important}
html body:not(:has(#app)) footer.bg-primary-900 p.text-white\/50{display:none!important}
html body:not(:has(#app)) #pach-company-details{background:#002341!important;color:#ffffffb3!important;border-top:0!important;padding:0 16px 28px!important;font-size:13px!important;line-height:1.65!important}
html body:not(:has(#app)) #pach-company-details>div{max-width:1152px!important;border-top:1px solid #ffffff1a;padding-top:24px;gap:20px!important;align-items:flex-start!important}
html body:not(:has(#app)) #pach-company-details img{filter:brightness(0) invert(1);opacity:.85;width:88px!important}
html body:not(:has(#app)) #pach-company-details p:first-child{color:#fff!important;font-size:15px!important}
html body:not(:has(#app)) #pach-company-details a{color:#fff!important}
html body:not(:has(#app)) #pach-company-details>div::after{content:"© 2026 Kines Hospitality. All rights reserved.";flex-basis:100%;text-align:center;font-size:12px;color:#ffffff80;padding-top:14px}
@media(min-width:640px){html body:not(:has(#app)) #pach-company-details{padding:0 24px 28px!important}}
@media(min-width:1024px){html body:not(:has(#app)) #pach-company-details{padding:0 32px 28px!important}}

/* ---------- folder tabs: bar fades from blue at the bottom to white at the top; hover grows from the bottom edge ---------- */
@media(min-width:1001px){
 .kines-header .k-panel{background:linear-gradient(0deg,#a9cdff 0%,#d6e8ff 38%,#f3f8ff 72%,#fff 100%)!important}
 .kines-header .k-subnav>a{transition:height .22s ease,background-color .22s ease,color .22s ease,box-shadow .22s ease!important}
 .kines-header .k-subnav>a:not([aria-current=page]):hover{transform:none!important;height:52px!important}
 .kines-header .k-subnav>a[aria-current=page]:hover{transform:none!important}
}
/* footer legal row: readable on navy, Thai copyright on Thai pages */
html body:not(:has(#app)) #pach-company-details{color:#d6e2f0!important;font-size:14px!important;padding-bottom:40px!important}
html[lang=th] body:not(:has(#app)) #pach-company-details>div::after{content:"© 2026 Kines Hospitality สงวนลิขสิทธิ์"}
