*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#eef8ff;color:#0d315c;font-family:Tahoma,"Noto Sans Thai",Arial,sans-serif;font-size:14px}.site{max-width:1220px;margin:10px auto;background:white;border-radius:16px 16px 0 0;box-shadow:0 10px 45px #164d7a17;overflow:hidden}.topbar{height:94px;display:flex;align-items:center;justify-content:space-between;padding:15px 30px;background:#fff}.brand{display:flex;align-items:center;gap:16px}.brand img{width:110px;height:65px;object-fit:contain}.logo-fallback{background:#04518d;color:white;padding:13px 8px;font-weight:900;font-size:23px;border-radius:5px}.logo-fallback span{display:block;font-size:10px;letter-spacing:2px}.brand h1{margin:0;color:#004781;font-size:25px}.brand p{color:#79869a;margin:5px 0 0}.phone{text-align:right;color:#007bd8}.phone b{font-size:18px}.phone small{display:block;color:#79869a;margin-top:5px}.hero{position:relative;background:#07519b}.hero img{width:100%;display:block;aspect-ratio:1219/322;object-fit:cover}.hero-cta{position:absolute;left:3%;bottom:6%;width:26%;height:20%}.nav{display:flex;align-items:center;gap:0;background:#102c4b;min-height:49px;padding:0 10px}.nav>a{color:#fff;text-decoration:none;padding:16px 18px;font-weight:bold;white-space:nowrap}.nav>a:hover,.nav>a.active{background:linear-gradient(#079bff,#0068c8);border-radius:7px}.nav-search{margin-left:auto;display:flex;min-width:195px}.nav-search input{border:0;background:#f7fbff;border-radius:25px 0 0 25px;padding:10px 15px;width:100%;min-width:0}.nav-search button{background:#008bff;border:0;border-radius:0 25px 25px 0;color:white;font-size:24px;padding:0 15px;cursor:pointer}.layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:30px;padding:26px 30px 35px}main{min-width:0}.section-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #d9efff;margin:0 0 14px;padding:0 0 12px;gap:10px}.section-heading h2{font-size:23px;margin:0;color:#063c72}.section-heading a{color:#0089f5;text-decoration:none;font-size:12px}.promo-demo{position:relative;margin:12px 0 25px}.promo-demo img{width:100%;border-radius:12px;display:block;box-shadow:0 4px 12px #c5dce9}.demo-tag{position:absolute;right:8px;bottom:8px;background:#002c59d9;color:white;font-size:10px;padding:5px 8px;border-radius:6px}.promo-item,.work{padding:18px 0;border-bottom:1px solid #e2edf7}.promo-item h3,.work h3{margin:0 0 10px;color:#084577}.promo-item>img{width:100%;border-radius:12px}.demo-projects{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.demo-card{border:1px solid #e4eff8;border-radius:12px;overflow:hidden;box-shadow:0 2px 9px #cddcea55}.demo-card img{width:100%;height:110px;object-fit:cover;display:block}.demo-card b{display:block;padding:10px;font-size:12px}.demo-note,.muted{font-size:12px;color:#7e8da1}.sidebar{border:1px solid #dcebf8;background:#f5fbff;border-radius:13px;padding:19px}.sidebar h3{font-size:15px;margin:14px 0 12px;border-bottom:1px solid #bfe4ff;padding-bottom:11px}.sidebar h3:first-child{margin-top:0}.sidebar input{width:100%;padding:13px;border:1px solid #c5dff0;border-radius:7px;outline-color:#008bff}.categories{display:flex;flex-wrap:wrap;gap:7px}.categories span,.pill{background:#e0f1ff;color:#16547d;border-radius:25px;padding:7px 10px;font-size:11px}.sidebar a{display:flex;justify-content:space-between;text-decoration:none;border-bottom:1px solid #d7e8f5;padding:10px 3px;color:#1c5687}.sidebar a:hover{color:#0093ff}.sidebar a span{font-size:20px}.work-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.rich{color:#273f56;line-height:1.8}.photos{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:12px}.photo{position:relative;border:0;background:#eef7ff;padding:0;cursor:pointer;overflow:hidden;border-radius:8px;aspect-ratio:1.6}.photo img{width:100%;height:100%;object-fit:cover}.more{position:absolute;inset:0;display:grid;place-items:center;color:white;font-size:36px;background:#001d3a99}.all-images{border:0;background:transparent;color:#008bff;padding:12px 0;cursor:pointer}.services{margin-top:25px}.service-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.service-grid>div{background:#eef8ff;border-radius:10px;padding:15px}.service-grid strong{color:#0077c8}.service-grid p{font-size:12px;line-height:1.7}footer{background:#102f51;color:white;padding:25px 30px}footer h3{margin:0}footer p{white-space:pre-line}footer small{color:#c5d5e6}.lightbox[hidden]{display:none}.lightbox{position:fixed;inset:0;background:#000e;z-index:100;display:flex;align-items:center;justify-content:center}.lightbox img{max-width:88vw;max-height:86vh;object-fit:contain}.lightbox button{position:absolute;border:0;background:#fff2;color:white;cursor:pointer;font-size:38px}.lightbox .close{top:18px;right:24px}.lightbox .prev{left:18px}.lightbox .next{right:18px}.lightbox #count{position:absolute;bottom:18px;color:white}@media(max-width:850px){.layout{grid-template-columns:1fr}.nav{overflow-x:auto}.nav-search{display:none}.topbar{height:auto;padding:15px}.phone small{display:none}.phone b{font-size:12px}.brand h1{font-size:20px}.brand img{width:75px}.site{margin:0;border-radius:0}.layout{padding:20px}.demo-projects{grid-template-columns:repeat(2,1fr)}.service-grid{grid-template-columns:1fr}}@media(max-width:480px){.topbar{align-items:flex-start}.phone{max-width:110px}.nav>a{padding:13px 12px}.section-heading h2{font-size:18px}.demo-card img{height:105px}}
/* V5 configurable portfolio grid */
.works-grid{display:grid;grid-template-columns:repeat(var(--works-cols,4),minmax(0,1fr));gap:13px}.work-card{min-width:0;border:1px solid #e1ecf6;border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 3px 10px #0b497312}.work-card[hidden]{display:none!important}.work-cover{aspect-ratio:4/3;background:#eaf5ff}.work-cover-button{border:0;padding:0;background:none;display:block;width:100%;height:100%;position:relative;cursor:pointer}.work-cover img{width:100%;height:100%;object-fit:cover;display:block}.cover-count{position:absolute;bottom:6px;right:6px;background:#07395bd9;color:#fff;border-radius:6px;font-size:11px;padding:3px 7px}.work-no-image{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:32px;color:#81a8c5}.work-no-image small{font-size:11px}.work-card-body{padding:10px}.work-card-body h3{font-size:13px;margin:0 0 8px;line-height:1.5;overflow-wrap:anywhere}.work-card-body .pill{display:inline-block}.work-details{margin-top:10px;font-size:12px}.work-details summary{cursor:pointer;color:#0079d4}.work-details .rich{overflow-wrap:anywhere}.works-more-wrap{text-align:center;margin:22px 0}.works-more-btn{border:0;background:#0787df;color:white;padding:12px 25px;border-radius:9px;font-weight:bold;cursor:pointer}.works-more-btn:hover{background:#006db8}@media(max-width:850px){.works-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:440px){.works-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.work-card-body{padding:8px}}

/* V6 mobile header and navigation; desktop theme unchanged */
.mobile-brand-name,.mobile-menu-toggle,.mobile-contact{display:none}
@media(max-width:850px){
 .topbar{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:10px;align-items:center;height:auto;padding:12px 16px 0}
 .topbar .brand{min-width:0;gap:10px}
 .topbar .brand img{width:76px;height:48px;object-fit:contain;flex-shrink:0}
 .brand-text{min-width:0}.desktop-brand-name{display:none}.mobile-brand-name{display:block;color:#064b85;font-size:19px;font-weight:800;line-height:1.2;white-space:nowrap}
 .brand-text p{font-size:11px;line-height:1.3;margin:3px 0 0;white-space:nowrap;color:#64748b}
 .topbar .phone{display:none}
 .mobile-menu-toggle{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;border:1px solid #d5e9f9;border-radius:9px;background:#eaf4ff;height:42px;width:44px;cursor:pointer}
 .mobile-menu-toggle span{display:block;width:21px;height:2px;border-radius:2px;background:#006eb6}
 .mobile-contact{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #eef3f8;padding:10px 0;font-size:12px;color:#64748b}
 .mobile-contact a{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;background:#007bcb;color:white;border-radius:30px;padding:9px 13px;font-size:12px;font-weight:700;white-space:nowrap}
 .nav{display:none;overflow:visible;flex-direction:column;align-items:stretch;gap:3px;padding:8px 12px 12px;min-height:0}
 .nav.mobile-open{display:flex}.nav>a{padding:12px 14px;border-radius:8px;white-space:normal}
 .nav-search{display:flex;margin:7px 0 0;width:100%;min-width:0}.nav-search input{font-size:16px}
 .hero img{aspect-ratio:1219/322;min-height:105px;object-fit:cover}
}
@media(min-width:851px){.nav{display:flex!important}}
@media(max-width:370px){.topbar{padding-left:10px;padding-right:10px}.topbar .brand img{width:63px}.mobile-brand-name{font-size:17px}.mobile-contact{font-size:11px}.mobile-contact a{padding:8px 10px}}

/* V7.4: uniform project cards, full-width project detail */
.works-grid{align-items:stretch}.work-card{display:flex;flex-direction:column;min-width:0;height:100%}.work-card-body{display:flex;flex-direction:column;flex:1;gap:8px}.work-card-body h3{margin:0;line-height:1.45;overflow-wrap:break-word;word-break:normal}.work-card-body .pill{align-self:flex-start}.work-detail-link{display:block;margin-top:auto;padding:9px 8px;text-align:center;border-radius:8px;background:#e9f5ff;color:#0565a6;font-size:12px;font-weight:700;text-decoration:none}.work-detail-link:hover{background:#cfeaff}.layout-detail{display:block}.layout-detail main{width:100%;max-width:none}.layout-detail aside{display:none}.portfolio-detail{background:#fff;border:1px solid #dcebf8;border-radius:14px;padding:clamp(16px,3vw,32px);max-width:1050px;margin:0 auto}.portfolio-detail h2{font-size:clamp(22px,3vw,32px);color:#075184;line-height:1.4;overflow-wrap:break-word}.portfolio-detail h3{font-size:20px;color:#075184;border-bottom:1px solid #d8eaf7;padding-bottom:12px}.detail-back{display:inline-block;color:#0678c7;font-weight:700;text-decoration:none;margin:6px 0 16px}.detail-gallery{margin:22px 0}.detail-main-photo,.detail-thumbnails button{border:0;padding:0;background:none;cursor:pointer;overflow:hidden;border-radius:10px}.detail-main-photo{display:block;width:100%;max-height:480px;background:#edf6ff}.detail-main-photo img{display:block;width:100%;max-height:480px;object-fit:contain}.detail-thumbnails{display:grid;grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:10px;margin-top:12px}.detail-thumbnails button{aspect-ratio:4/3;background:#edf6ff}.detail-thumbnails img{width:100%;height:100%;object-fit:cover}.detail-description{font-size:16px;line-height:1.9;overflow-wrap:break-word;word-break:normal;max-width:100%}.detail-description p,.detail-description li{white-space:normal;overflow-wrap:break-word}.detail-description ul,.detail-description ol{padding-left:1.6em}.detail-description img{max-width:100%;height:auto}@media(max-width:600px){.portfolio-detail{padding:15px}.detail-thumbnails{grid-template-columns:repeat(3,minmax(0,1fr))}.detail-description{font-size:15px}}

/* V7.5: consistent photo frames without image distortion */
.work-cover{width:100%;aspect-ratio:4/3;overflow:hidden;flex-shrink:0}
.work-cover-button{width:100%;height:100%;display:block;overflow:hidden}
.work-cover img,.detail-thumbnails img,.photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.detail-main-photo{width:100%;height:auto;max-height:none;aspect-ratio:16/10;overflow:hidden;background:#edf6ff}
.detail-main-photo img{width:100%;height:100%;max-height:none;object-fit:contain;object-position:center}
.detail-thumbnails button{aspect-ratio:4/3;overflow:hidden}
.demo-card img{aspect-ratio:4/3;height:auto;object-fit:cover}
@media(max-width:600px){.detail-main-photo{aspect-ratio:4/3}}

/* V7.6 clickable portfolio categories */
.categories .kd-category-filter{border:0;background:#e4f3ff;color:#075d9e;border-radius:18px;padding:5px 11px;margin:3px;cursor:pointer;font:inherit;font-size:12px}.categories .kd-category-filter.active,.categories .kd-category-filter:hover{background:#087fc9;color:#fff}.kd-work-category{border:0;cursor:pointer;font-family:inherit}.kd-work-category:hover{background:#b6e4ff}.work-card[hidden]{display:none!important}
