/**
 * EasyAllServ — Stylesheet หลัก
 * ============================================================================
 * โครงสร้างไฟล์แบ่งเป็นหมวดตาม Component เพื่อให้ค้นหาและแก้ไขง่าย
 * ใช้ Mobile-first: ค่าพื้นฐานทำงานบนมือถือ แล้วขยายด้วย Media Query
 */

/* --------------------------------------------------------------------------
   1) Design Tokens: สี ระยะ ขอบมน และเงาที่ใช้ซ้ำทั้งเว็บไซต์
   แก้สีแบรนด์ได้จากตัวแปรกลุ่มนี้เพียงจุดเดียว
   -------------------------------------------------------------------------- */
:root {
    --brand-950: #064e3b;
    --brand-900: #065f46;
    --brand-800: #087f5b;
    --brand-700: #079669;
    --brand-600: #08a775;
    --brand-100: #dff8ef;
    --brand-50: #f0fcf8;
    --aqua: #23b9c6;
    --yellow: #ffc20a;
    --yellow-hover: #eeb400;
    --ink: #123047;
    --muted: #607080;
    --surface: #ffffff;
    --soft: #f5fbf9;
    --line: #dfe9e6;
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 32px;
    --shadow-sm: 0 8px 24px rgba(14, 62, 50, .08);
    --shadow-md: 0 18px 45px rgba(14, 62, 50, .13);
    --transition: 180ms ease;
}

/* --------------------------------------------------------------------------
   2) Base: รูปแบบพื้นฐานของหน้า ตัวอักษร ลิงก์ และ Accessibility
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
    color: var(--ink);
    background: var(--surface);
    font-family: "Prompt", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    overflow-x: hidden;
}

body, button, input, select, textarea { -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-800); text-decoration: none; }
a:hover { color: var(--brand-950); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; line-height: 1.25; }

/* แสดงกรอบ Focus ชัดเจนเพื่อให้ผู้ใช้ Keyboard ทราบว่ากำลังเลือกจุดใด */
:focus-visible { outline: 3px solid rgba(35, 185, 198, .55); outline-offset: 3px; }

.skip-link {
    position: fixed; top: -80px; left: 1rem; z-index: 9999;
    padding: .75rem 1rem; border-radius: 0 0 12px 12px;
    color: #fff; background: var(--brand-950); transition: top var(--transition);
}
.skip-link:focus { top: 0; color: #fff; }

.section-space { padding: 4.5rem 0; }
.section-soft { background: var(--soft); }
.section-heading { max-width: 700px; margin: 0 auto 2.5rem; text-align: center; }
.section-heading h2 { font-size: clamp(1.8rem, 4vw, 2.65rem); }
.section-heading p { color: var(--muted); }
.eyebrow { color: var(--brand-700); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.text-brand { color: var(--brand-800) !important; }
.text-muted-custom { color: var(--muted); }
.rounded-brand { border-radius: var(--radius-md); }
.shadow-brand { box-shadow: var(--shadow-md); }

/* --------------------------------------------------------------------------
   3) Buttons: ปุ่มหลัก ปุ่มรอง และสถานะ Hover
   -------------------------------------------------------------------------- */
.btn { border-radius: 13px; font-weight: 600; padding: .72rem 1.15rem; transition: all var(--transition); }
.btn-brand { color: #fff; background: var(--brand-800); border-color: var(--brand-800); }
.btn-brand:hover, .btn-brand:focus { color: #fff; background: var(--brand-950); border-color: var(--brand-950); transform: translateY(-1px); }
.btn-outline-brand { color: var(--brand-800); background: #fff; border-color: var(--brand-800); }
.btn-outline-brand:hover { color: #fff; background: var(--brand-800); }
.btn-warning { color: #173042; background: var(--yellow); border-color: var(--yellow); font-weight: 700; }
.btn-warning:hover { color: #173042; background: var(--yellow-hover); border-color: var(--yellow-hover); }
.btn-lg { padding: .9rem 1.5rem; }

/* --------------------------------------------------------------------------
   4) Header และ Navigation: ติดด้านบนและ Responsive ด้วย Bootstrap Collapse
   -------------------------------------------------------------------------- */
.site-header { z-index: 1030; border-bottom: 1px solid rgba(6, 95, 70, .08); box-shadow: 0 2px 14px rgba(8, 58, 46, .05); }
.site-header .navbar { min-height: 76px; }
.brand-logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-size: 1.38rem; font-weight: 700; letter-spacing: -.03em; }
.brand-logo:hover { color: var(--ink); }
.brand-logo > span:last-child > span { color: var(--brand-700); }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; color: #fff; background: linear-gradient(135deg, var(--brand-700), var(--aqua)); border-radius: 12px; font-size: 1.65rem; line-height: 1; }
.navbar-nav { gap: .1rem; }
.navbar .nav-link { position: relative; color: var(--ink); font-size: .92rem; font-weight: 500; padding: .65rem .8rem !important; }
.navbar .nav-link::after { content: ""; position: absolute; right: .8rem; bottom: .25rem; left: .8rem; height: 2px; background: var(--brand-700); transform: scaleX(0); transition: transform var(--transition); }
.navbar .nav-link:hover::after, .navbar .nav-link.active::after { transform: scaleX(1); }
.navbar .nav-link.active { color: var(--brand-800); }
.flash-wrap { position: fixed; top: 88px; right: 0; left: 0; z-index: 1025; }

/* --------------------------------------------------------------------------
   5) Hero หน้าแรก: ภาพเด่นเต็มพื้นที่พร้อม Overlay ช่วยให้อ่านข้อความง่าย
   -------------------------------------------------------------------------- */
.home-hero {
    position: relative; min-height: min(760px, calc(100vh - 76px));
    display: flex; align-items: center; overflow: hidden;
    background: #eaf9f4 url("../images/hero.webp") center/cover no-repeat;
}
.home-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.93) 34%, rgba(255,255,255,.35) 62%, rgba(255,255,255,.04) 100%); }
.home-hero .container { position: relative; z-index: 1; }
.hero-copy { max-width: 650px; padding: 5rem 0; }
.hero-kicker { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; color: var(--brand-900); background: rgba(223,248,239,.9); border: 1px solid rgba(8,127,91,.14); border-radius: 999px; font-size: .9rem; font-weight: 600; }
.hero-title { margin: 1.2rem 0; font-size: clamp(2.6rem, 7vw, 5.2rem); color: var(--brand-800); letter-spacing: -.04em; }
.hero-lead { max-width: 560px; color: #354f5c; font-size: clamp(1.05rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 2rem; color: #3c5f55; font-size: .9rem; }
.hero-trust span::before { content: "✓"; margin-right: .35rem; color: var(--brand-700); font-weight: 800; }

/* Hero รองของหน้าภายใน ใช้โครงสร้างเดียวกันเพื่อให้แบรนด์สม่ำเสมอ */
.page-hero { position: relative; padding: 5rem 0; background: linear-gradient(135deg, var(--brand-50), #edf9fb); overflow: hidden; }
.page-hero::after { content: ""; position: absolute; width: 340px; height: 340px; right: -90px; bottom: -170px; border-radius: 50%; background: rgba(35,185,198,.12); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.3rem); color: var(--brand-800); letter-spacing: -.04em; }
.page-hero p { max-width: 680px; color: var(--muted); font-size: 1.12rem; }

/* --------------------------------------------------------------------------
   6) Cards และ Service Grid: การ์ดบริการหลัก 4 ประเภท
   -------------------------------------------------------------------------- */
.service-card { height: 100%; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 1rem; color: #fff; background: linear-gradient(135deg, var(--brand-700), var(--aqua)); border-radius: 18px; font-size: 1.65rem; }
.service-card h3 { font-size: 1.24rem; }
.service-card p { color: var(--muted); }
.service-price { color: var(--brand-800); font-size: 1.55rem; font-weight: 700; }
.service-list { margin: 1rem 0 1.3rem; padding: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.service-list li { margin-bottom: .35rem; }
.service-list li::before { content: "✓"; margin-right: .45rem; color: var(--brand-700); font-weight: 800; }

.feature-card { height: 100%; padding: 1.5rem; text-align: center; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--line); }
.feature-card .feature-number { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: .85rem; color: #fff; background: var(--brand-800); border-radius: 50%; font-weight: 700; }

/* --------------------------------------------------------------------------
   7) Image และ Split Sections: รูปภาพควบคู่ข้อความในหน้า About/Portfolio
   -------------------------------------------------------------------------- */
.media-frame { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.media-frame img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.team-visual { background: url("../images/team.webp") center/cover no-repeat; min-height: 500px; }
.portfolio-visual { background: url("../images/portfolio.webp") center/cover no-repeat; min-height: 430px; }
.stat-card { padding: 1.3rem; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.stat-card strong { display: block; color: var(--brand-800); font-size: 2.2rem; line-height: 1.2; }
.stat-card span { color: var(--muted); font-size: .9rem; }

/* Portfolio: ภาพจำลอง Before/After โดยใช้ภาพเดียวกับ Overlay แตกต่างกัน */
.project-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.project-image { position: relative; height: 250px; background: url("../images/portfolio.webp") center/cover no-repeat; }
.project-image.before { filter: saturate(.45) brightness(.75); }
.project-badge { position: absolute; top: 1rem; left: 1rem; padding: .35rem .7rem; color: #fff; background: rgba(6,78,59,.86); border-radius: 999px; font-size: .78rem; }
.project-body { padding: 1.2rem; }

/* --------------------------------------------------------------------------
   8) Review: คะแนนและการ์ดความคิดเห็นลูกค้า
   -------------------------------------------------------------------------- */
.rating-summary { padding: 2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.rating-score { color: var(--brand-800); font-size: 4rem; font-weight: 700; line-height: 1; }
.stars { color: #ffb700; letter-spacing: .12em; }
.review-card { height: 100%; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.review-avatar { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; background: linear-gradient(135deg, var(--brand-700), var(--aqua)); border-radius: 50%; font-weight: 700; }
.review-card blockquote { color: #405762; }

/* --------------------------------------------------------------------------
   9) Forms: Quote, Contact และ Review
   -------------------------------------------------------------------------- */
.form-shell { padding: clamp(1.2rem, 4vw, 2.2rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.form-label { color: var(--ink); font-weight: 600; }
.form-control, .form-select { min-height: 50px; border-color: #d6e1de; border-radius: 12px; }
textarea.form-control { min-height: 130px; }
.form-control:focus, .form-select:focus { border-color: var(--brand-700); box-shadow: 0 0 0 .25rem rgba(8,167,117,.13); }
.required::after { content: " *"; color: #dc3545; }
.form-help { color: var(--muted); font-size: .82rem; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }

.service-choice input { position: absolute; opacity: 0; pointer-events: none; }
.service-choice label { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 120px; padding: .9rem; text-align: center; cursor: pointer; background: #fff; border: 2px solid var(--line); border-radius: 16px; transition: all var(--transition); }
.service-choice label span:first-child { font-size: 1.8rem; }
.service-choice input:checked + label { color: var(--brand-900); border-color: var(--brand-700); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(8,167,117,.10); }
.service-choice input:focus-visible + label { outline: 3px solid rgba(35,185,198,.55); }
.upload-zone { padding: 1.3rem; text-align: center; background: var(--soft); border: 2px dashed #a8cfc3; border-radius: 16px; }
.form-benefit { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.form-benefit:last-child { border-bottom: 0; }
.form-benefit-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; color: var(--brand-800); background: var(--brand-100); border-radius: 50%; }

/* --------------------------------------------------------------------------
   10) Contact และ Map: ช่องทางติดต่อและแผนที่แบบไม่พึ่ง API ภายนอก
   -------------------------------------------------------------------------- */
.contact-card { height: 100%; padding: 1.35rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.contact-card strong { display: block; color: var(--brand-800); font-size: 1.35rem; }
.map-panel { position: relative; min-height: 390px; overflow: hidden; background-color: #edf6f4; background-image: linear-gradient(30deg, rgba(35,185,198,.12) 12%, transparent 12.5%, transparent 87%, rgba(35,185,198,.12) 87.5%), linear-gradient(150deg, rgba(8,127,91,.10) 12%, transparent 12.5%, transparent 87%, rgba(8,127,91,.10) 87.5%), linear-gradient(30deg, rgba(35,185,198,.09) 12%, transparent 12.5%, transparent 87%, rgba(35,185,198,.09) 87.5%); background-size: 80px 140px; border-radius: var(--radius-lg); }
.map-pin { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 70px; height: 70px; transform: translate(-50%, -50%) rotate(45deg); color: #fff; background: var(--brand-800); border-radius: 50% 50% 50% 8px; box-shadow: var(--shadow-md); }
.map-pin span { transform: rotate(-45deg); font-size: 1.8rem; }
.map-label { position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%); padding: .55rem 1rem; white-space: nowrap; background: #fff; border-radius: 999px; box-shadow: var(--shadow-sm); font-weight: 600; }

/* --------------------------------------------------------------------------
   11) Footer และ CTA
   -------------------------------------------------------------------------- */
.footer-cta { padding: 2.5rem 0; color: #fff; background: linear-gradient(110deg, var(--brand-900), #039487); }
.footer-cta h2 { color: #fff; }
.footer-cta-inner { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 1.2rem; }
.site-footer { color: #fff; background: var(--brand-950); }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.brand-logo-light { color: #fff; }
.brand-logo-light:hover { color: #fff; }
.footer-title { color: #fff; font-size: 1rem; }
.footer-links { margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.footer-links li { margin-bottom: .45rem; }
.footer-divider { border-color: rgba(255,255,255,.16); }

/* Mobile Action Bar จะแสดงเฉพาะจอเล็กและวางชิดขอบล่าง */
.mobile-action-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1040; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 -7px 24px rgba(4,49,37,.18); }
.mobile-action-bar a { padding: .9rem .5rem; text-align: center; font-weight: 700; }
.mobile-action-call { color: #fff; background: var(--brand-900); }
.mobile-action-call:hover { color: #fff; }
.mobile-action-quote { color: #173042; background: var(--yellow); }

/* --------------------------------------------------------------------------
   12) Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .section-space { padding: 6rem 0; }
    .footer-cta-inner { flex-direction: row; align-items: center; }
}

@media (max-width: 991.98px) {
    body { padding-bottom: 56px; }
    .site-header .navbar { min-height: 68px; }
    .navbar-collapse { padding: 1rem 0 1.2rem; }
    .navbar .nav-link::after { display: none; }
    .navbar .nav-link.active { padding-left: 1rem !important; background: var(--brand-50); border-radius: 10px; }
    .nav-actions { flex-direction: column; margin-top: .8rem; }
    .home-hero { min-height: 700px; align-items: flex-start; background-position: 62% center; }
    .home-hero::before { background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.88) 58%, rgba(255,255,255,.18) 100%); }
    .hero-copy { max-width: 570px; }
}

@media (max-width: 575.98px) {
    .brand-logo { font-size: 1.2rem; }
    .brand-mark { width: 36px; height: 36px; }
    .home-hero { min-height: 680px; background-position: 70% center; }
    .home-hero::before { background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.9) 55%, rgba(255,255,255,.35) 100%); }
    .hero-copy { padding: 3.5rem 0; }
    .hero-title { font-size: 2.7rem; }
    .hero-actions .btn { width: 100%; }
    .page-hero { padding: 3.6rem 0; }
    .section-space { padding: 3.6rem 0; }
    .service-card, .review-card, .contact-card { padding: 1.2rem; }
    .team-visual, .portfolio-visual { min-height: 330px; }
}

/* เคารพการตั้งค่าลดการเคลื่อนไหวของผู้ใช้ เพื่อ Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

