/* เว็บบริษัทบัญชี/กฎหมาย - HTML Static Version */
/* โทนสี: Primary #173B75, Accent #2563eb */

@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #173B75;
  --accent: #2563eb;
  --line-green: #06C755;
  --foreground: #1F2937;
  --muted: #6B7280;
  --border: #E5E7EB;
  --radius: 0.65rem;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Sarabun', 'Inter', sans-serif; color: var(--foreground); background: #fff; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; font-family: inherit; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.nav-logo { display: flex; align-items: center; gap: 0.75rem; color: white; }
.nav-logo img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; ring: 2px solid rgba(255,255,255,0.3); }
.nav-logo span { font-weight: 600; font-size: 1rem; }
@media (min-width: 640px) { .nav-logo span { display: inline; } }
@media (max-width: 639px) { .nav-logo span { display: none; } }

.nav-links { display: none; gap: 0.25rem; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links a { color: rgba(255,255,255,0.9); padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; }
.nav-links a:hover { color: white; background: rgba(255,255,255,0.1); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1.25rem; border-radius: 0.5rem; font-weight: 600; font-size: 0.875rem; border: none; transition: all 0.2s; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #1d4ed8; }
.btn-line { background: var(--line-green); color: white; }
.btn-line:hover { background: #05b04c; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #122a5a; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: rgba(23,59,117,0.1); }

.nav-cta { display: flex; align-items: center; gap: 0.5rem; }
.nav-cta .btn { display: none; }
@media (min-width: 640px) { .nav-cta .btn { display: inline-flex; } }

.mobile-menu-btn { display: flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; color: white; background: transparent; border: none; border-radius: 0.5rem; }
.mobile-menu-btn:hover { background: rgba(255,255,255,0.1); }
@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }

/* Mobile sheet */
.mobile-sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 85vw); background: white; z-index: 100; box-shadow: -4px 0 20px rgba(0,0,0,0.15); transform: translateX(100%); transition: transform 0.3s; padding-top: 2rem; }
.mobile-sheet.open { transform: translateX(0); }
.mobile-sheet a { display: block; padding: 0.75rem 1rem; color: var(--foreground); font-weight: 500; border-radius: 0.5rem; }
.mobile-sheet a:hover { background: rgba(37,99,235,0.1); color: var(--accent); }
.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.mobile-overlay.open { opacity: 1; pointer-events: auto; }

/* Hero */
.hero { position: relative; min-height: 420px; padding: 4rem 1rem; display: flex; align-items: center; overflow: hidden; }
@media (min-width: 768px) { .hero { min-height: 480px; padding: 6rem 1rem; } }
.hero-bg { position: absolute; inset: 0; background: var(--primary) center/cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: rgba(23,59,117,0.8); }
.hero-content { position: relative; z-index: 10; text-align: center; max-width: 56rem; margin: 0 auto; }
.hero h1 { font-size: 1.875rem; font-weight: 700; color: white; line-height: 1.25; margin-bottom: 0.75rem; }
@media (min-width: 640px) { .hero h1 { font-size: 2.25rem; } }
@media (min-width: 768px) { .hero h1 { font-size: 3rem; } }
.hero p { font-size: 1rem; color: rgba(255,255,255,0.9); margin-bottom: 2rem; }
@media (min-width: 768px) { .hero p { font-size: 1.125rem; margin-bottom: 2.5rem; } }
.hero-btns { display: flex; flex-direction: column; gap: 1rem; justify-content: center; align-items: center; }
@media (min-width: 640px) { .hero-btns { flex-direction: row; } }
.hero-btns .btn { padding: 0.75rem 1.5rem; height: 3rem; font-size: 1rem; }

/* Sections */
section { padding: 4rem 0; }
@media (min-width: 768px) { section { padding: 5rem 0; } }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 2.5rem; text-align: center; }
@media (min-width: 768px) { .section-title { font-size: 1.875rem; margin-bottom: 3rem; } }

/* Service cards */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 56rem; margin: 0 auto; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.service-card { display: block; padding: 1.5rem; border-radius: 1rem; border: 2px solid rgba(23,59,117,0.3); background: #f8fafc; text-align: left; transition: all 0.2s; }
.service-card:hover { border-color: rgba(23,59,117,0.5); }
.service-card .icon { width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; margin-left: auto; margin-right: auto; }
.service-card h3 { font-size: 1.125rem; color: var(--primary); margin-bottom: 0.5rem; text-align: center; }
.service-card p { font-size: 0.875rem; color: var(--muted); text-align: center; margin-bottom: 0.75rem; }
.service-card .link { color: var(--primary); font-weight: 500; font-size: 0.875rem; }

/* CTA bar */
.cta-bar { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem; border-radius: 1rem; background: #e2e8f0; border: 1px solid #cbd5e1; max-width: 56rem; margin: 0 auto; }
@media (min-width: 640px) { .cta-bar { flex-direction: row; align-items: center; justify-content: space-between; padding: 2rem; } }
.cta-bar h3 { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.cta-bar p { font-size: 0.875rem; color: var(--muted); }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; text-align: center; max-width: 48rem; margin: 2.5rem auto 0; }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(3, 1fr); gap: 4rem; margin-top: 3.5rem; } }
.trust-item p:first-child { font-size: 1.875rem; font-weight: 700; color: var(--primary); }
@media (min-width: 768px) { .trust-item p:first-child { font-size: 2.25rem; } }
.trust-item p:last-child { font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }

/* YouTube */
.youtube-section { background: #f8fafc; }
.youtube-card { display: block; border-radius: 1rem; overflow: hidden; border: 1px solid var(--border); background: white; }
.youtube-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.youtube-thumb { position: relative; aspect-ratio: 16/9; background: #e5e7eb; }
.youtube-thumb img { width: 100%; height: 100%; object-fit: cover; }
.youtube-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.2); }
.youtube-play div { width: 5rem; height: 5rem; border-radius: 50%; background: #FF0000; display: flex; align-items: center; justify-content: center; }

/* Contact phones grid */
.contact-phones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
@media (min-width: 1024px) { .contact-phones { grid-template-columns: repeat(4, 1fr); } }
.phone-card { background: white; border-radius: 1rem; border: 1px solid rgba(23,59,117,0.2); padding: 1.25rem; text-align: center; }
.phone-card .icon { width: 3rem; height: 3rem; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.75rem; }
.phone-card .num { font-size: 1.125rem; font-weight: 700; color: var(--primary); margin-bottom: 0.75rem; }
.phone-card .btn { width: 100%; font-size: 0.875rem; padding: 0.5rem; border-radius: 9999px; border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.phone-card .btn:hover { background: rgba(23,59,117,0.1); }

/* Contact section */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-item { display: flex; gap: 0.75rem; }
.contact-item .icon { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; background: rgba(23,59,117,0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item .icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.contact-item p { font-size: 0.875rem; margin: 0; }
.contact-item a { color: var(--primary); }
.contact-item a:hover { text-decoration: underline; }
.map-wrap { border-radius: 0.75rem; border: 1px solid var(--border); overflow: hidden; min-height: 280px; }
.map-wrap iframe { width: 100%; height: 260px; border: 0; }
@media (min-width: 768px) { .map-wrap iframe { height: 300px; } }
.map-link { display: block; text-align: center; padding: 0.5rem; font-size: 0.875rem; color: var(--primary); background: #f9fafb; }
.map-link:hover { text-decoration: underline; }

/* Footer */
footer { background: var(--primary); color: white; padding: 2.5rem 0; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
footer a { color: rgba(255,255,255,0.8); }
footer a:hover { color: white; }
footer .footer-links { display: flex; flex-wrap: wrap; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.2); font-size: 0.875rem; }
footer .copyright { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.2); font-size: 0.875rem; color: rgba(255,255,255,0.8); }

/* LINE QR Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { background: white; border-radius: 0.5rem; max-width: 24rem; width: 100%; padding: 1.5rem; text-align: center; }
.modal h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.modal p { font-size: 0.875rem; color: var(--muted); margin-bottom: 1rem; }
.modal img { width: 12rem; height: 12rem; margin: 0 auto 1rem; display: block; padding: 1rem; background: white; border-radius: 0.75rem; border: 1px solid var(--border); }

/* FAQ Accordion */
.faq-item { border: 1px solid var(--border); border-radius: 0.75rem; margin-bottom: 0.75rem; background: white; overflow: hidden; }
.faq-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1rem 1rem; text-align: left; font-weight: 500; background: none; border: none; cursor: pointer; font-size: 1rem; }
.faq-trigger:hover { color: var(--primary); }
.faq-trigger::after { content: '+'; font-size: 1.25rem; }
.faq-item.open .faq-trigger::after { content: '−'; }
.faq-content { padding: 0 1rem 1rem; font-size: 0.875rem; color: var(--muted); display: none; }
.faq-item.open .faq-content { display: block; }

/* Knowledge + FAQ two columns */
.knowledge-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .knowledge-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.article-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .article-cards { grid-template-columns: repeat(3, 1fr); } }
.article-card { display: block; padding: 1rem; border-radius: 0.75rem; border: 1px solid var(--border); background: white; }
.article-card:hover { border-color: rgba(23,59,117,0.3); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.article-card .tag { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 0.375rem; background: #f3f4f6; color: var(--muted); font-size: 0.75rem; margin-bottom: 0.5rem; }
.article-card h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
