* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--theme-color-bg, #fff);
    color: var(--theme-color-text, #1f2937);
    font-family: var(--theme-font-body, sans-serif);
    line-height: 1.75;
}

h1, h2, h3 { font-family: var(--theme-font-heading, sans-serif); font-weight: 700; color: var(--theme-color-primary); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header ---------- */
.site-header {
    background: var(--theme-color-bg, #fff);
    border-bottom: 1px solid var(--theme-color-accent-soft, #eaf5fb);
    position: sticky; top: 0; z-index: 10;
}
.header-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.5rem;
}

.brand { display: flex; align-items: center; gap: .6rem; }
.brand-logo { height: 32px; width: auto; display: block; }

/* mark วงโค้งไล่สีเลียนแบบตัว "A" ในโลโก้ — ใช้แทนโลโก้จริงได้จนกว่าจะมีไฟล์ภาพ */
.brand-mark {
    display: inline-block; width: 30px; height: 30px; border-radius: 50%;
    background: conic-gradient(from 210deg, var(--theme-color-primary, #1b3a6b), var(--theme-color-accent, #3fa9da) 70%, var(--theme-color-primary, #1b3a6b));
    position: relative; flex-shrink: 0;
}
.brand-mark::after {
    content: ''; position: absolute; inset: 7px; background: var(--theme-color-bg, #fff); border-radius: 50%;
}

.brand-text {
    font-family: var(--theme-font-heading);
    font-weight: 800; font-size: 1.15rem; color: var(--theme-color-primary);
    letter-spacing: .02em; line-height: 1.1; display: flex; flex-direction: column;
}
.brand-sub {
    font-family: var(--theme-font-body);
    font-weight: 500; font-size: .55rem; letter-spacing: .18em;
    color: var(--theme-color-accent); text-transform: uppercase;
}

nav { display: flex; align-items: center; gap: 1.75rem; }
nav a {
    color: var(--theme-color-text); text-decoration: none; font-weight: 500; font-size: .95rem;
}
nav a:hover { color: var(--theme-color-primary); }
.nav-cta {
    background: var(--theme-color-primary); color: #fff !important;
    padding: .55rem 1.3rem; border-radius: var(--theme-radius, 12px);
}
.nav-cta:hover { background: var(--theme-color-accent); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--theme-color-accent-soft, #eaf5fb) 0%, var(--theme-color-bg, #fff) 60%);
    padding: 5rem 0 4.5rem;
}
.hero .eyebrow {
    text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; font-weight: 600;
    color: var(--theme-color-accent); margin-bottom: 1rem;
}
.hero h1 { font-size: 2.6rem; line-height: 1.25; margin-bottom: 1.2rem; }
.hero .lead { font-size: 1.05rem; max-width: 620px; opacity: .85; margin-bottom: 1.8rem; }

.btn {
    display: inline-block; padding: .8rem 2rem; border-radius: var(--theme-radius, 12px);
    text-decoration: none; font-weight: 600; transition: all .2s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--theme-color-primary), var(--theme-color-accent));
    color: #fff; box-shadow: 0 8px 20px -8px var(--theme-color-primary);
}
.btn-primary:hover { transform: translateY(-2px); }

/* ---------- Services ---------- */
.services { padding: 4.5rem 0; }
.service-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.75rem;
}
.card {
    border: 1px solid var(--theme-color-accent-soft, #eaf5fb);
    border-radius: var(--theme-radius, 12px);
    padding: 1.8rem;
    transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 12px 30px -12px rgba(0,0,0,.12); transform: translateY(-3px); }
.card-icon {
    width: 42px; height: 42px; border-radius: 10px; margin-bottom: 1rem;
    background: conic-gradient(from 210deg, var(--theme-color-primary), var(--theme-color-accent) 70%, var(--theme-color-primary));
}
.card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.card p { font-size: .9rem; opacity: .8; margin: 0; }

/* ---------- Generic content page (About/Services ฯลฯ) ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--theme-color-accent-soft, #eaf5fb) 0%, var(--theme-color-bg, #fff) 60%);
    padding: 4rem 1.5rem 3rem;
}
.page-hero .eyebrow {
    max-width: 1080px; margin: 0 auto; display: block;
    text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; font-weight: 600;
    color: var(--theme-color-accent); margin-bottom: 1rem;
}
.page-hero h1 { max-width: 1080px; margin: 0 auto .8rem; font-size: 2.2rem; line-height: 1.3; }
.page-hero .lead { max-width: 620px; margin: 0 auto; font-size: 1.05rem; opacity: .85; }

.page-body { max-width: 780px; margin: 0 auto; padding: 3rem 1.5rem; }
.page-body h2 { font-size: 1.4rem; margin: 2rem 0 .8rem; }
.page-body h2:first-child { margin-top: 0; }
.page-body p { margin-bottom: 1rem; }

/* ---------- Contact ---------- */
.contact-layout {
    max-width: 1080px; margin: 0 auto; padding: 3.5rem 1.5rem;
    display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 3rem;
}
.contact-info h3 { font-size: 1rem; margin-bottom: .3rem; }
.contact-info p { font-size: .92rem; opacity: .85; margin-bottom: 1.5rem; }
.contact-form label { display: block; margin: 1rem 0 .3rem; font-size: .9rem; font-weight: 500; }
.contact-form label:first-child { margin-top: 0; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: .6rem .8rem; border: 1px solid var(--theme-color-accent-soft, #d1d5db);
    border-radius: var(--theme-radius, 12px); font-family: inherit; font-size: .95rem;
}
.contact-form button { margin-top: 1.4rem; }
.alert-success { padding: .7rem 1rem; background: #ecfdf5; border: 1px solid #10b981; border-radius: 8px; margin-bottom: 1.5rem; }
.alert-error { padding: .7rem 1rem; background: #fef2f2; border: 1px solid #ef4444; border-radius: 8px; color: #b91c1c; margin-bottom: 1.5rem; }

/* ---------- Section Builder: Hero Slider ---------- */
.hero-slider { position: relative; }
.hero-slides { position: relative; height: 480px; }
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
}
.hero-slide-overlay {
    height: 100%; display: flex; align-items: center;
    background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
}
.hero-slide-overlay .container { color: #fff; }
.hero-slide-overlay h1 { color: #fff; font-size: 2.4rem; line-height: 1.3; margin-bottom: .8rem; }
.hero-slide-overlay .eyebrow { color: var(--theme-color-accent); }
.hero-slide-overlay .lead { max-width: 560px; opacity: .95; margin-bottom: 1.5rem; }
.hero-slider-dots {
    position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
    display: flex; gap: .5rem;
}
.hero-slider-dots button {
    width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0;
}
.hero-slider-dots button.active { background: #fff; }
.hero-slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.15); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%;
    font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.hero-slider-arrow.prev { left: 1rem; }
.hero-slider-arrow.next { right: 1rem; }
.hero-slider-arrow:hover { background: rgba(255,255,255,.3); }

/* ---------- Section Builder: List Content ---------- */
.list-content { padding: 4rem 0; }
.list-content h2 { text-align: center; margin-bottom: 2rem; }
.list-content-items { max-width: 780px; margin: 0 auto; }
.list-content-items.cols-2, .list-content-items.cols-3 {
    max-width: 1080px; display: grid; gap: 1.5rem;
}
.list-content-items.cols-2 { grid-template-columns: repeat(2, 1fr); }
.list-content-items.cols-3 { grid-template-columns: repeat(3, 1fr); }
.list-content-item { padding: 1.25rem 0; border-bottom: 1px solid var(--theme-color-accent-soft, #eaf5fb); }
.list-content-items.cols-2 .list-content-item, .list-content-items.cols-3 .list-content-item { border-bottom: 0; }
.list-content-item:last-child { border-bottom: 0; }
.list-content-item h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.list-content-item p { opacity: .8; font-size: .95rem; }

/* ---------- Section Builder: Thumbnail Grid ---------- */
.thumbnail-grid-section { padding: 4rem 0; }
.thumbnail-grid-section h2 { text-align: center; margin-bottom: 2rem; }
.thumbnail-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;
}
.thumbnail-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.thumbnail-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.thumbnail-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.thumb {
    display: block; text-decoration: none; color: inherit;
    border-radius: var(--theme-radius, 12px); overflow: hidden;
    border: 1px solid var(--theme-color-accent-soft, #eaf5fb);
}
.thumb img { width: 100%; height: 160px; object-fit: cover; display: block; }
.thumb .thumb-caption { padding: .9rem 1rem; }
.thumb .thumb-caption h4 { font-size: .95rem; margin-bottom: .2rem; }
.thumb .thumb-caption p { font-size: .85rem; opacity: .75; margin: 0; }

/* ---------- Section Builder: Video Player ---------- */
.video-player-section { padding: 4rem 0; }
.video-player-section h2 { text-align: center; margin-bottom: 2rem; }
.video-player-frame {
    position: relative; max-width: 900px; margin: 0 auto; aspect-ratio: 16/9;
    border-radius: var(--theme-radius, 12px); overflow: hidden; background: #000;
}
.video-player-frame iframe, .video-player-frame video { width: 100%; height: 100%; border: 0; display: block; }
.video-caption { text-align: center; font-size: .85rem; opacity: .65; margin-top: .8rem; }

/* ---------- Section Builder: Testimonials ---------- */
.testimonials-section { padding: 4rem 0; background: var(--theme-color-accent-soft, #eaf5fb); }
.testimonials-section h2 { text-align: center; margin-bottom: 2rem; }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.testimonial-card {
    background: var(--theme-color-bg, #fff); border-radius: var(--theme-radius, 12px); padding: 1.5rem;
}
.testimonial-quote { font-size: .95rem; opacity: .85; margin-bottom: 1rem; font-style: italic; }
.testimonial-person { display: flex; align-items: center; gap: .75rem; }
.testimonial-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.testimonial-role { font-size: .85rem; opacity: .65; }

/* ---------- Section Builder: Pricing Table ---------- */
.pricing-section { padding: 4rem 0; }
.pricing-section h2 { text-align: center; margin-bottom: 2rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; align-items: start; }
.pricing-card {
    border: 1px solid var(--theme-color-accent-soft, #eaf5fb); border-radius: var(--theme-radius, 12px);
    padding: 2rem 1.5rem; text-align: center;
}
.pricing-card.highlighted {
    border-color: var(--theme-color-primary); box-shadow: 0 12px 30px -12px rgba(0,0,0,.15); transform: translateY(-6px);
}
.pricing-card h3 { margin-bottom: .5rem; }
.pricing-price { font-size: 2rem; font-weight: 800; color: var(--theme-color-primary); margin-bottom: 1.25rem; }
.pricing-period { font-size: .9rem; font-weight: 400; opacity: .6; }
.pricing-features { list-style: none; margin: 0 0 1.5rem; padding: 0; text-align: left; }
.pricing-features li { padding: .4rem 0; font-size: .9rem; border-bottom: 1px solid var(--theme-color-accent-soft, #eaf5fb); }
.pricing-features li:last-child { border-bottom: 0; }

/* ---------- Section Builder: FAQ Accordion ---------- */
.faq-section { padding: 4rem 0; }
.faq-section h2 { text-align: center; margin-bottom: 2rem; }
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--theme-color-accent-soft, #eaf5fb); border-radius: var(--theme-radius, 12px);
    padding: 1rem 1.25rem; margin-bottom: .75rem;
}
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin-top: .75rem; opacity: .8; font-size: .95rem; }

/* ---------- Section Builder: Team ---------- */
.team-section { padding: 4rem 0; }
.team-section h2 { text-align: center; margin-bottom: 2rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; text-align: center; }
.team-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; display: block; }
.team-role { font-size: .85rem; color: var(--theme-color-accent); margin-bottom: .5rem; }
.team-bio { font-size: .88rem; opacity: .75; }

/* ---------- Section Builder: Stats ---------- */
.stats-section { padding: 3.5rem 0; background: var(--theme-color-primary); }
.stats-section h2 { text-align: center; margin-bottom: 2rem; color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; text-align: center; }
.stat-number { font-size: 2.2rem; font-weight: 800; color: #fff; }
.stat-label { font-size: .9rem; color: rgba(255,255,255,.8); margin-top: .3rem; }

/* ---------- Section Builder: CTA ---------- */
.cta-section {
    padding: 3.5rem 0; text-align: center;
    background: linear-gradient(135deg, var(--theme-color-primary), var(--theme-color-accent));
}
.cta-section h2 { color: #fff; margin-bottom: .6rem; }
.cta-section p { color: rgba(255,255,255,.9); margin-bottom: 1.5rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-section .btn-primary { background: #fff; color: var(--theme-color-primary); box-shadow: none; }

@media (max-width: 640px) {
    .hero-slides { height: 380px; }
    .hero-slide-overlay h1 { font-size: 1.7rem; }
    .list-content-items.cols-2, .list-content-items.cols-3,
    .thumbnail-grid.cols-2, .thumbnail-grid.cols-3, .thumbnail-grid.cols-4 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .contact-layout { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 2rem; padding: 2rem 0; text-align: center;
    font-size: .82rem; opacity: .65; border-top: 1px solid var(--theme-color-accent-soft, #eaf5fb);
}
