/* =========================================================
   Scholar Accounting v2 — CMS-driven sections (photos, blog, article)
   ========================================================= */
.sec-row{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.accos-note{margin:18px 0 0;text-align:center;font-size:.95rem;color:var(--navy-800)}
.accos-note .ico{color:var(--orange-500);width:18px;height:18px;vertical-align:-3px}
.faq-item{padding:16px 20px;margin-top:12px}
.faq-item summary{cursor:pointer;font-family:var(--font-head);font-weight:600;color:var(--navy-900)}
.faq-item p{margin:10px 0 0}

/* Home: office & team */
.office-split{display:grid;grid-template-columns:1.1fr 1fr;gap:40px;align-items:center}
.office-photos{position:relative;padding-bottom:40px}
.office-photos .op-main{width:86%;aspect-ratio:16/10;object-fit:cover;border-radius:var(--radius-lg);box-shadow:var(--shadow)}
.office-photos .op-sub{position:absolute;right:0;bottom:0;width:38%;aspect-ratio:4/5;object-fit:cover;border-radius:var(--radius);border:6px solid #fff;box-shadow:var(--shadow-lg)}

/* Real photos inside existing slots */
.photo-slot img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.founder-photo{min-height:340px;aspect-ratio:3/4}
.founder-photo img{object-position:50% 20%}
.team-photo{min-height:220px;aspect-ratio:4/3}
.team-photo img{object-position:50% 30%}
.office-photo{min-height:280px}
.office-photo::before,.founder-photo::before,.team-photo::before{display:none}
.svc-photo{background:var(--navy-50)}
.svc-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.case-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.client-logo{width:44px;height:44px;object-fit:contain;flex-shrink:0}

/* About gallery */
.gallery{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:190px;gap:12px;margin-top:8px}
.gallery figure{margin:0;position:relative;border-radius:var(--radius);overflow:hidden}
.gallery figure.big{grid-column:span 2;grid-row:span 2}
.gallery img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
.gallery figure:hover img{transform:scale(1.04)}
.gallery figcaption{position:absolute;left:0;right:0;bottom:0;padding:24px 12px 10px;font-size:.85rem;color:#fff;background:linear-gradient(transparent,rgba(11,34,96,.75))}

/* Category cards */
.cat-grid{margin-top:10px}
.cat-card{display:flex;flex-direction:column;gap:4px;padding:18px;color:var(--navy-900)}
.cat-card:hover{color:var(--navy-900)}
.cat-card .ico{width:34px;height:34px;color:var(--orange-500);margin-bottom:4px}
.cat-card b{font-family:var(--font-head)}
.cat-card small{color:var(--muted)}

/* Blog list */
.chips a.chip{text-decoration:none;display:inline-flex;gap:6px;align-items:center}
.chip small{font-size:.75rem;opacity:.7}
.chip[aria-current="page"]{background:var(--orange-500);border-color:var(--orange-500);color:#fff}
.posts-grid .post-card{padding:0 0 16px;overflow:hidden}
.posts-grid .post-card > *:not(.post-cover){margin-left:18px;margin-right:18px}
.post-cover{display:block;aspect-ratio:1/1;overflow:hidden;background:var(--navy-50);margin-bottom:14px}
.post-cover img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.post-card:hover .post-cover img{transform:scale(1.04)}
.post-card h2,.post-card h3{font-size:1.12rem;line-height:1.4;margin:6px 0}
.post-card h2 a,.post-card h3 a{color:var(--navy-900)}
.post-card h2 a:hover,.post-card h3 a:hover{color:var(--orange-500)}
.post-card p{font-size:.92rem;color:var(--text)}
.feature-cover{display:block;border-radius:var(--radius);overflow:hidden;max-width:420px;justify-self:end;box-shadow:var(--shadow)}
.feature-cover img{width:100%;height:auto}
.feature-post h2{font-size:clamp(1.5rem,2.8vw,2.2rem)}
.result-note{margin:16px 0 0;color:var(--navy-800)}
.pager{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin:30px 0 0}
.pager a{min-width:42px;text-align:center;padding:.5em .9em;border-radius:10px;border:1.5px solid var(--line);background:#fff;font-family:var(--font-head);color:var(--navy-900)}
.pager a[aria-current="page"]{background:var(--orange-500);border-color:var(--orange-500);color:#fff}
.blog-hero .hero-text{min-width:0}

/* Article */
.article-head{display:grid;grid-template-columns:1fr 300px;gap:36px;align-items:center}
.article-cover{width:100%;border-radius:var(--radius-lg);box-shadow:var(--shadow)}
.article-hero h1{margin-top:12px}
.keypoints{background:var(--navy-50);border-radius:var(--radius);padding:18px 22px;margin-bottom:24px;border-left:5px solid var(--navy-700)}
.keypoints .kp-title{font-size:1.1rem;margin:0 0 8px;display:flex;gap:8px;align-items:center}
.keypoints .kp-title .ico{color:var(--orange-500)}
.keypoints ul{margin:0}
.prose .table-wrap{overflow-x:auto;margin:1em 0 1.6em}
.prose .table-wrap table{margin:0;min-width:520px}
.prose p.callout{background:var(--orange-50);border-left:5px solid var(--orange-500);padding:14px 18px;border-radius:0 12px 12px 0}
.prose a{text-decoration:underline;text-underline-offset:3px}
.prose img{max-width:100%;height:auto;border-radius:12px}
.prose h2{scroll-margin-top:100px}
.article-cta{display:grid;grid-template-columns:auto 1fr;gap:20px;align-items:center;background:linear-gradient(120deg,var(--navy-50),var(--orange-50));border-radius:var(--radius-lg);padding:22px;margin:34px 0 18px}
.article-cta img{width:96px}
.article-cta h2{margin:0 0 4px;font-size:1.3rem}
.article-cta p{margin:0 0 12px}
.share{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-family:var(--font-head);color:var(--navy-900)}
.share a,.share button{width:40px;height:40px;border-radius:50%;background:var(--navy-800);color:#fff;display:inline-grid;place-items:center;border:0;cursor:pointer}
.share button{width:auto;border-radius:99px;padding:0 14px;display:inline-flex;gap:6px;align-items:center;font-family:var(--font-head);font-size:.88rem}
.share a:hover,.share button:hover{background:var(--orange-500);color:#fff}
.share .ico{width:18px;height:18px}
.toc{padding-left:1.2em;margin:0 0 16px}
.toc li{padding:5px 0;font-size:.92rem;line-height:1.45}
.author-mini{display:flex;gap:12px;align-items:center;padding:14px 0;margin:6px 0 14px;border-top:1px dashed var(--line);border-bottom:1px dashed var(--line)}
.author-mini img{width:56px;height:56px;border-radius:50%;object-fit:cover;object-position:50% 20%}
.author-mini b{display:block;font-family:var(--font-head);color:var(--navy-900)}
.author-mini small{color:var(--muted)}
.preview-bar{background:#fff2dc;color:#7a4a00;text-align:center;padding:10px;font-family:var(--font-head)}
.sitemap-cols .card{padding:22px}
.sitemap-cols h2{font-size:1.1rem}
.sitemap-cols ul{list-style:disc;padding-left:1.2em;margin-bottom:16px}
.sitemap-cols li{padding:3px 0;font-size:.95rem}

@media (max-width:960px){
  .office-split{grid-template-columns:1fr}
  .gallery{grid-template-columns:repeat(2,1fr)}
  .article-head{grid-template-columns:1fr}
  .article-cover{max-width:360px}
  .feature-cover{justify-self:start}
}
@media (max-width:680px){
  .gallery{grid-template-columns:1fr 1fr;grid-auto-rows:140px}
  .article-cta{grid-template-columns:1fr;text-align:center}
  .article-cta img{margin:0 auto}
  .founder-photo{min-height:300px}
}

/* polish */
.gallery{grid-template-columns:repeat(3,1fr);grid-auto-rows:200px}
.blog-hero .chips{gap:8px}
.blog-hero .chip{padding:.38em 1em;font-size:.88rem}
@media (max-width:680px){.gallery{grid-template-columns:1fr 1fr}}
.article-layout>*,.article-head>*{min-width:0}
.prose{overflow-wrap:anywhere}

/* About hero photo: keep inside the container at the photo's own ratio (no bleed / crop / upscaling) */
.about-hero .hero-visual.office-visual{margin:0 0 0 auto;align-self:center;justify-self:end;width:100%;max-width:560px;height:auto;min-height:0;aspect-ratio:537/448;border-radius:var(--radius-lg);box-shadow:var(--shadow);background:none}
.about-hero .office-visual img.cover{object-position:50% 50%}
.about-hero .office-visual .wall-text{font-size:clamp(.8rem,1.1vw,1rem);padding:8px 12px;bottom:5%;right:4%}
@media (max-width:960px){.about-hero .hero-visual.office-visual{justify-self:center;margin:8px auto 24px}}

/* Footer: let the menu wrap instead of pushing the social icons off-screen (≈1000–1250px) */
.footer-nav ul{flex-wrap:wrap}
@media (min-width:1101px){.footer-grid{grid-template-columns:auto minmax(0,1fr) auto auto}}

/* Clients hero: real office photo (editable in Settings → รูปภาพ) */
.clients-hero-photo{position:relative;margin:24px 0;align-self:center;justify-self:end;width:100%;max-width:620px;aspect-ratio:16/9;border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-lg)}
.clients-hero-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.clients-hero-photo .svc-chips{position:absolute;left:14px;bottom:14px;right:14px;display:flex;flex-wrap:wrap;gap:6px}
.clients-hero-photo .svc-chips span{background:rgba(255,255,255,.9);color:var(--navy-900);font-family:var(--font-head);font-weight:600;font-size:.78rem;letter-spacing:.08em;padding:5px 11px;border-radius:99px;border-left:3px solid var(--orange-500);backdrop-filter:blur(4px)}
@media (max-width:960px){.clients-hero-photo{justify-self:center;margin:8px 0 24px}}
@media (max-width:480px){.clients-hero-photo .svc-chips span{font-size:.68rem;padding:4px 8px}}

/* Services cards: on tablet/mobile show the photo as a banner on top instead of a cut-off side column */
@media (max-width:1100px){
  .svc-detail{grid-template-columns:1fr}
  .svc-detail .svc-thumb.svc-photo{display:block;order:-1;height:170px;width:100%}
  .svc-detail .body{min-width:0}
}
/* Services hero photo: stay inside the page on tablet/mobile (no edge bleed) */
@media (max-width:960px){
  .svc-hero-visual{margin:8px 0 24px;border-radius:var(--radius-lg);min-height:0;aspect-ratio:16/10}
}
/* Contact mascot: never larger than its source image (182px) to stay sharp */
.contact-hero .mascots{width:182px;max-width:100%}

/* Hero rows: keep the container's side padding (hero-grid's padding shorthand was zeroing it) */
.container.hero-grid{padding-left:20px;padding-right:20px}
@media (max-width:680px){.container.hero-grid{padding-left:16px;padding-right:16px}}
/* Home hero mascots: no longer cut off at the right edge on tablet/mobile */
@media (max-width:1240px){.home-visual .mascot-duo{right:0}}
