/* Template: pro — สไตล์มืออาชีพ น้ำเงิน-ขาว */
:root {
  --primary: #0b5aa5;
  --primary-dark: #08447d;
  --accent: #ff8a00;
  --line-green: #06c755;
  --ink: #1c2733;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f1f6fb;
  --border: #e2e8f0;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Prompt', 'Noto Sans Thai', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  padding-bottom: 70px; /* เผื่อ mobile bar */
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .95rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #2e9fdc);
  color: #fff; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; }
.brand-text small { color: var(--muted); font-size: .75rem; }
.main-nav { display: flex; gap: .25rem; margin-left: auto; }
.main-nav a {
  padding: .45rem .8rem; border-radius: 8px; color: var(--ink); font-size: .95rem;
}
.main-nav a:hover { background: var(--bg-alt); }
.main-nav a.active { background: var(--bg-alt); color: var(--primary); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; font-size: 1.2rem; padding: .3rem .6rem; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1.2rem; border-radius: var(--btn-radius, 999px); font-weight: 600; font-size: 1rem;
  transition: transform .15s ease, box-shadow .15s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.1rem; }
.btn-call { background: var(--accent); color: #fff; }
.btn-line { background: var(--line-green); color: #fff; }
.header-call { margin-left: .5rem; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--primary-dark) 0%, var(--primary) 55%, #2e9fdc 100%);
  color: #fff; padding: 3.5rem 0;
}
.hero.hero-photo {
  background-image: linear-gradient(150deg, rgba(8,68,125,.88), rgba(46,159,220,.72)), var(--hero-img);
  background-size: cover;
  background-position: center;
}
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); line-height: 1.35; }
.hero-sub { margin-top: .8rem; font-size: 1.1rem; opacity: .95; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.center-cta { justify-content: center; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1.5rem; font-size: .95rem; }

/* ---------- sections ---------- */
.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 1.8rem; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; color: var(--ink); display: flex; flex-direction: column; gap: .4rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(11,90,165,.12); border-color: var(--primary); }

/* ---------- ภาพประกอบ ----------
   ทุกภาพใช้ object-fit: cover + สัดส่วนตายตัว หน้าเว็บจึงไม่กระตุกตอนภาพโหลดเสร็จ
   (กันค่า CLS ที่ Google ใช้วัดคุณภาพหน้าเว็บ) */
.card-photo { padding: 0; overflow: hidden; }
.card-photo > *:not(.card-img) { margin-left: 1.4rem; margin-right: 1.4rem; }
.card-photo > .card-icon { margin-top: 1rem; }
.card-photo > *:last-child { margin-bottom: 1.4rem; }
.card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

.article-item-photo { padding: 0; overflow: hidden; }
.article-item-photo > *:not(.article-thumb) { margin-left: 1.4rem; margin-right: 1.4rem; }
.article-item-photo > h2 { margin-top: 1.1rem; }
.article-item-photo > *:last-child { margin-bottom: 1.4rem; }
.article-thumb { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }

.article-cover, .about-photo, .service-hero {
  width: 100%; height: auto; border-radius: var(--radius); display: block;
}
.article-cover { aspect-ratio: 1200 / 630; object-fit: cover; margin-bottom: 1.4rem; }
.about-photo   { aspect-ratio: 1200 / 630; object-fit: cover; max-width: 900px; margin: 0 auto; }
.service-hero  { aspect-ratio: 4 / 3; object-fit: cover; max-width: 640px; margin: 0 auto; }
.card-icon { font-size: 2rem; }
.card h3 { font-size: 1.15rem; }
.card p { font-size: .92rem; color: var(--muted); flex: 1; }
.card-price { color: var(--primary); font-weight: 700; font-size: 1.05rem; }
.card-warranty { font-size: .85rem; color: var(--muted); }

/* ---------- หน้าแรก: บล็อกเนื้อหายาว (home_sections) ---------- */
.home-sections { display: grid; gap: 2.4rem; }
.home-block-full { max-width: 760px; margin: 0 auto; }
.home-block-text h2 { font-size: clamp(1.2rem, 2.6vw, 1.5rem); margin-bottom: .6rem; }
.home-block-text .home-block-body p { margin-bottom: .9rem; }
.home-block-text .home-block-body p:last-child { margin-bottom: 0; }
.home-block-text .home-block-body ul { margin: 0 0 .9rem 1.4rem; }
.home-block-text .home-block-body h2 { margin: 1.2rem 0 .6rem; font-size: 1.15rem; }
.home-block-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block;
}
.home-block-photo { display: grid; gap: 1.2rem; align-items: center; }
.home-block-photo .home-block-media,
.home-block-photo .home-block-text { min-width: 0; } /* กันภาพที่มี width/height attribute ดันกริดล้นขอบจอมือถือ */
@media (min-width: 700px) {
  .home-block-photo { grid-template-columns: 1fr 1fr; gap: 2.4rem; }
  .home-block-right .home-block-media { order: 2; }
  .home-block-right .home-block-text { order: 1; }
}

/* why us */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.why-item {
  background: #fff; border-radius: var(--radius); padding: 1.3rem 1rem; text-align: center;
  border: 1px solid var(--border);
}
.why-num { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.why-item p { color: var(--muted); font-size: .92rem; margin-top: .2rem; }

.intro-block { max-width: 780px; text-align: center; }
.intro-block p { font-size: 1.05rem; color: var(--muted); }

.check-list { list-style: none; max-width: 640px; margin: 0 auto; }
.check-list li { padding: .35rem 0 .35rem 1.8rem; position: relative; }
.check-list li::before { content: '✅'; position: absolute; left: 0; }
.check-list.small { font-size: .95rem; max-width: none; }

/* area tags */
.area-tags { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.tag {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px;
  padding: .35rem .9rem; font-size: .92rem;
}

/* cta band */
.cta-band {
  background: linear-gradient(150deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 3rem 0; margin-top: 1rem;
}
.cta-band h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: .5rem; }
.cta-band p { opacity: .95; margin-bottom: 1rem; }

/* ---------- page head ---------- */
.page-head {
  background: var(--bg-alt); padding: 2.5rem 0; border-bottom: 1px solid var(--border);
}
.page-head h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.4; }
.page-head p { color: var(--muted); margin-top: .4rem; }

/* ---------- services page ---------- */
.service-block { padding: 2rem 0; border-bottom: 1px solid var(--border); }
.service-block:last-of-type { border-bottom: none; }
.service-head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.service-icon { font-size: 2.2rem; }
.service-head h2 { font-size: 1.35rem; }
.service-head > div:nth-child(2) { flex: 1; min-width: 220px; }
.service-head p { color: var(--muted); font-size: .95rem; }
.service-price {
  background: var(--bg-alt); color: var(--primary); font-weight: 700;
  border-radius: 999px; padding: .5rem 1.1rem; align-self: center;
}
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; min-width: 420px; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
th { background: var(--primary); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: var(--bg-alt); }
td:last-child { font-weight: 600; color: var(--primary); white-space: nowrap; }
.service-warranty { margin-top: .6rem; font-size: .95rem; color: var(--muted); }
.note-box {
  background: #fff8ec; border: 1px solid #ffd591; border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-top: 2rem; font-size: .97rem;
}

/* ---------- works ---------- */
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.work-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.work-thumb {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: linear-gradient(150deg, #eaf3fb, #d7e9f7);
}
.work-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.work-info { padding: .8rem 1rem; display: flex; flex-direction: column; }
.work-info span { color: var(--muted); font-size: .9rem; }

/* ---------- articles ---------- */
.article-list { display: grid; gap: 1rem; max-width: 760px; margin: 0 auto; }
.article-item {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem;
  color: var(--ink); background: #fff; transition: box-shadow .15s ease, border-color .15s ease;
}
.article-item:hover { box-shadow: 0 8px 20px rgba(11,90,165,.1); border-color: var(--primary); }
.article-item h2 { font-size: 1.2rem; color: var(--primary); }
.article-item p { margin-top: .35rem; font-size: .96rem; }
.read-more { display: inline-block; margin-top: .5rem; font-weight: 600; color: var(--accent); }
.article-body { max-width: 760px; }
.article-body h2 { margin: 1.6rem 0 .6rem; font-size: 1.25rem; }
.article-body p { margin-bottom: 1rem; }
.article-body ul { margin: 0 0 1rem 1.4rem; }
.article-body li { margin-bottom: .4rem; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; margin-bottom: 2.5rem;
}
.contact-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem;
  text-align: center; color: var(--ink); background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(11,90,165,.12); }
.contact-ico {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto .8rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: #fff;
}
.contact-ico.call { background: var(--accent); }
.contact-ico.line { background: var(--line-green); }
.contact-ico.fb { background: #1877f2; }
.contact-big { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-top: .2rem; }
.center-tags { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 2rem; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; padding: 2.5rem 1rem;
}
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: .6rem; }
.site-footer a { color: #93c5fd; }
.footer-link { display: block; padding: .15rem 0; }
.copyright { border-top: 1px solid #334155; padding: 1rem; text-align: center; font-size: .85rem; }

/* ---------- mobile bar ---------- */
.mobile-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}
.mb-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .9rem 0; font-weight: 600; font-size: 1rem; color: #fff;
}
.mb-ico { font-size: 1.15rem; }
.mb-call { background: var(--accent); }
.mb-line { background: var(--line-green); }
.mb-contact { background: var(--primary); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: .5rem 1rem 1rem;
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-call { display: none; }
  .brand { margin-right: auto; }
}
@media (min-width: 861px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
}

/* ---------- หน้าเจาะบริการ: ขั้นตอนการทำงาน ---------- */
.page-head-price { color: var(--accent); font-weight: 700; font-size: 1.15rem; margin-top: .4rem; }
.steps { display: grid; gap: 1rem; max-width: 760px; margin: 0 auto; }
.step-item { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; }
.step-num {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-item h3 { font-size: 1.02rem; margin-bottom: .2rem; }
.step-item p { color: var(--muted); font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: .7rem; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1.1rem; }
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-right: 1.8rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '＋'; position: absolute; right: 0; color: var(--primary); font-weight: 700; }
.faq-item[open] summary::after { content: '－'; }
.faq-answer { color: var(--muted); padding-top: .6rem; line-height: 1.7; }

/* ---------- รีวิวลูกค้า ---------- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.review-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.review-stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 2px; }
.review-stars .dim { color: var(--border); }
.review-text { flex: 1; line-height: 1.7; }
.review-who { border-top: 1px solid var(--border); padding-top: .6rem; display: flex; flex-direction: column; }
.review-who span { color: var(--muted); font-size: .88rem; }

/* ---------- โปรโมชั่น ---------- */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.promo-card { position: relative; background: #fff; border: 2px solid var(--accent); border-radius: 14px; padding: 1.4rem 1.2rem 1.2rem; text-align: center; }
.promo-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; padding: .2rem .8rem; border-radius: 999px; white-space: nowrap; }
.promo-card h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.promo-price { color: var(--primary); font-size: 1.6rem; font-weight: 800; margin-bottom: .4rem; }
.promo-until { color: var(--muted); font-size: .88rem; margin: .6rem 0; }

/* ---------- พื้นที่ให้บริการ ---------- */
.area-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.area-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem; }
.area-pin { font-size: 1.5rem; }
.area-card h2 { font-size: 1.02rem; margin: .3rem 0; }
.area-card p { color: var(--muted); font-size: .93rem; }

/* เมนูยาวขึ้นเมื่อลูกค้าซื้อหลายหน้า — ให้ตัดบรรทัดแทนล้นจอ */
.main-nav { flex-wrap: wrap; }
@media (min-width: 861px) {
  .main-nav a { padding: .45rem .6rem; font-size: .9rem; }
}
