/* =============================
   Home Page
============================= */

/* -----------------------------
   Hero
------------------------------ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 720px;
    padding-top: calc(var(--header-height) + clamp(28px, 4vw, 56px));
    padding-bottom: clamp(60px, 6vw, 96px);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 220px;
    background: linear-gradient(180deg, rgba(255, 247, 242, 0) 0%, rgba(255, 247, 242, 0.85) 100%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: var(--z-content);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(32px, 5vw, 68px);
}

.hero-title {
    font-size: var(--fs-display);
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 20px;
    max-width: 18ch;
}

.hero-sub {
    max-width: 52ch;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-bottom: 34px;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.hero-point {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.hero-point svg {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Hero visual */
.hero-visual {
    position: relative;
    isolation: isolate;
    /* รูปกินเต็มแถวบน แล้ววางชิปสองอันเรียงคู่กันข้างล่าง
       (เดิมชิปเป็น absolute ลอยทับรูป ใช้ได้ตอนรูปเป็นภาพประกอบที่มีพื้นที่ว่าง
        แต่รูปโปสเตอร์มีเนื้อหาเต็มใบ ทับแล้วบังของสำคัญ) */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hero-visual-frame {
    grid-column: 1 / -1;
    position: relative;
    border-radius: var(--radius-xl);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 241, 232, 0.55) 100%);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(var(--blur-md));
    backdrop-filter: blur(var(--blur-md));
    box-shadow: var(--shadow-lg), var(--shadow-inset-glass);
    padding: clamp(14px, 2vw, 24px);
    animation: floatY 7s var(--ease-in-out) infinite;
}

.hero-visual-frame img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

.hero-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(var(--blur-md));
    backdrop-filter: blur(var(--blur-md));
    box-shadow: var(--shadow-md), var(--shadow-inset-glass);
}

.hero-chip-title {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
}

.hero-chip-meta {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual-frame {
        animation: none;
    }
}

/* ฟอร์มย่อในฮีโร่ (แทนรูปภาพเดิม) */
.hero-visual > .lead-form-card {
    grid-column: 1 / -1;
}

.lead-form-card--compact {
    padding: clamp(20px, 2.2vw, 30px);
}

.lead-form-card--compact .form-grid {
    gap: 14px;
}

.lead-form-card--compact .field label {
    font-size: var(--fs-xs);
}

.lead-form-card--compact .field input,
.lead-form-card--compact .field select {
    padding-block: 11px;
}

.lead-form-card--compact .form-actions {
    margin-top: 18px;
}

.lead-form-card--compact .form-actions .btn {
    width: 100%;
    min-width: 0;
}

.lead-form-card--compact .form-note {
    margin-top: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    line-height: 1.6;
}

.lead-form-card--compact .form-status {
    margin-top: 16px;
}

.hero-form-head {
    margin-bottom: 18px;
}

.hero-form-title {
    margin-top: 10px;
    font-size: var(--fs-h3);
    font-weight: 600;
    line-height: 1.4;
}

.hero-form-desc {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

/* -----------------------------
   Trust bar
------------------------------ */
.trust-bar {
    position: relative;
    z-index: var(--z-content);
    margin-top: calc(clamp(60px, 6vw, 96px) * -0.5);
}

.trust-bar-inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    background: var(--glass-strong);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    transition: background-color var(--dur-base) var(--ease-out);
}

.trust-item:hover {
    background: var(--primary-light);
}

.trust-item svg {
    flex: none;
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.trust-item strong {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 500;
    line-height: 1.4;
}

.trust-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* -----------------------------
   Services
------------------------------ */
.services-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(32px, 4vw, 50px);
}

.services-head .section-header {
    margin-bottom: 0;
}

/* 5 การ์ด: แถวแรก featured กว้าง 2 ช่อง + 1 ช่อง / แถวสอง 3 ช่อง */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.services-grid .service-card--featured {
    grid-column: span 2;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 24px 24px;
    border-radius: var(--radius-lg);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(var(--blur-md)) saturate(1.4);
    backdrop-filter: blur(var(--blur-md)) saturate(1.4);
    box-shadow: var(--shadow-sm), var(--shadow-inset-glass);
    transition:
        transform var(--dur-base) var(--ease-out),
        box-shadow var(--dur-base) var(--ease-out),
        border-color var(--dur-base) var(--ease-out);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), var(--shadow-inset-glass);
}

.service-card h3 {
    line-height: 1.4;
}

.service-card p {
    flex: 1;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

.service-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
    min-height: 40px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background: var(--primary-light);
    border: 1px solid rgba(255, 106, 0, 0.28);
    color: var(--primary-dark);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    margin-top: 8px;
    transition:
        background var(--dur-base) var(--ease-out),
        color var(--dur-base) var(--ease-out),
        border-color var(--dur-base) var(--ease-out),
        transform var(--dur-base) var(--ease-out),
        box-shadow var(--dur-base) var(--ease-out);
}

.service-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--dur-base) var(--ease-out);
}

.service-card:hover .service-link {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.service-card:hover .service-link svg {
    transform: translateX(4px);
    color: var(--white);
}

/* การ์ดใบแรกเป็น featured — สร้าง rhythm ไม่ให้ทุกใบหน้าตาเหมือนกัน */
.service-card--featured {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--white);
    box-shadow: 0 20px 44px rgba(255, 106, 0, 0.26);
}

.service-card--featured h3,
.service-card--featured p {
    color: var(--white);
}

.service-card--featured p {
    color: rgba(255, 255, 255, 0.9);
}

.service-card--featured .icon-box {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.service-card--featured .service-link {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: var(--white);
    box-shadow: none;
}

.service-card--featured:hover .service-link {
    background: var(--white);
    border-color: var(--white);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.service-card--featured:hover .service-link svg {
    color: var(--primary-dark);
}

/* -----------------------------
   How it works
------------------------------ */
.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.steps::before {
    content: "";
    position: absolute;
    top: 27px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 18px);
}

.step {
    position: relative;
    z-index: var(--z-content);
    text-align: center;
}

.step-num {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 500;
    box-shadow: 0 10px 24px rgba(255, 106, 0, 0.28), 0 0 0 8px var(--background);
}

.step h3 {
    margin-bottom: 8px;
    font-size: 1.08rem;
}

.step p {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    max-width: 30ch;
    margin-inline: auto;
}

/* -----------------------------
   Why SiamFinn
------------------------------ */
.why-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    /* center ไม่ใช่ stretch — รูปเป็นโปสเตอร์ ต้องเห็นเต็มใบ ห้ามยืดให้สูงเท่าคอลัมน์ข้อความ */
    align-items: center;
    gap: clamp(34px, 5vw, 72px);
}

.why-visual {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 238, 227, 0.6) 100%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg), var(--shadow-inset-glass);
}

.why-visual img {
    width: 100%;
    /* height:auto + ไม่ crop เพราะรูปมีข้อความอยู่ในภาพ ตัดขอบแล้วอ่านไม่ครบ */
    height: auto;
    border-radius: inherit;
}

.why-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.why-item {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: var(--glass-strong);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.why-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.why-item-num {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--primary-light);
    border: 1px solid var(--border);
    color: var(--primary-dark);
    font-size: 0.88rem;
    font-weight: 500;
}

.why-item strong {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
}

.why-item p {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    margin: 0;
}

/* -----------------------------
   About
------------------------------ */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(34px, 5vw, 70px);
}

.about-title {
    max-width: 22ch;
    margin-bottom: 18px;
}

.about-text {
    color: var(--text-secondary);
}

.about-text + .about-text {
    margin-top: 14px;
}

.about-scroller {
    margin-top: 30px;
}

.about-highlights {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.about-highlights::-webkit-scrollbar {
    display: none;
}

.about-scroller-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.about-highlight {
    flex: 0 0 calc((100% - 14px) / 2);
    scroll-snap-align: start;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.about-highlight strong {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-dark);
    font-weight: 500;
}

.about-highlight span {
    color: var(--text-secondary);
    font-size: var(--fs-xs);
    line-height: 1.6;
}

.about-visual {
    position: relative;
    padding: clamp(16px, 2vw, 26px);
    border-radius: var(--radius-xl);
    background: linear-gradient(150deg, rgba(255, 241, 232, 0.7) 0%, rgba(255, 255, 255, 0.75) 100%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg), var(--shadow-inset-glass);
}

.about-visual img {
    width: 100%;
    border-radius: var(--radius-lg);
}

/* -----------------------------
   Reviews slider
------------------------------ */
.slider {
    position: relative;
}

.slider-viewport {
    overflow: hidden;
    padding: 10px 4px 20px;
    margin-inline: -4px;
}

.slider-track {
    display: flex;
    gap: 20px;
    transition: transform var(--dur-slow) var(--ease-out);
    will-change: transform;
}

.slider-track.is-dragging {
    transition: none;
    cursor: grabbing;
}

/* .review-card / .stars อยู่ใน components.css เพราะใช้ร่วมกับหน้า /reviews/ */
.slider-track > .review-card {
    flex: 0 0 auto;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 12px;
}

.slider-arrow {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-strong);
    color: var(--primary-dark);
    box-shadow: var(--shadow-xs);
    transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.slider-arrow:hover:not(:disabled) {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
}

.slider-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.slider-arrow svg {
    width: 20px;
    height: 20px;
}

.slider-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: var(--radius-pill);
    background: var(--border-strong);
    transition: width var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}

.slider-dot.is-active {
    width: 26px;
    background: var(--gradient-primary);
}

/* พื้นที่กดบนมือถือให้ครบ 44px โดยไม่ทำให้จุดใหญ่ */
.slider-dot::before {
    content: "";
    position: absolute;
    inset: -16px -6px;
}

.slider-dot {
    position: relative;
}

/* -----------------------------
   เรารับพิจารณาธุรกิจแบบไหน
------------------------------ */
.qualify-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2.5vw, 28px);
    align-items: start;
}

.qualify-card {
    padding: clamp(24px, 3vw, 34px);
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.qualify-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 1.1rem;
}

/* จุดกลมนำหน้าหัวข้อ ใช้แทนไอคอนเพื่อไม่ให้ชนกับติ๊ก/กากบาทในรายการ */
.qualify-card h3::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.qualify-card--yes h3::before { background: var(--primary); }
.qualify-card--no  h3::before { background: var(--text-muted); }

.qualify-list {
    display: grid;
    gap: 14px;
}

.qualify-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

.qualify-list svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 3px;
}

.qualify-card--yes .qualify-list svg { color: var(--primary); }
.qualify-card--no  .qualify-list svg { color: var(--text-muted); }

.qualify-list strong {
    color: var(--text);
    font-weight: 500;
}

.qualify-note {
    margin-top: clamp(20px, 2.5vw, 28px);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--fs-xs);
}

.qualify-note a {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}
