/* ── หน้าติดต่อเรา (contact) — เซสชัน 27 เรียบ คลีน ต่างจากเว็บเดิมโดยตั้งใจ ──────────────────
   ภาษาเดียวกับ /timetable และหน้าข่าวสาร (blog.css): พื้นขาว · เส้นขอบ #e5e7eb · ไม่มีเงา
   ตัวหนังสือ #111827 / #6b7280 · ส้ม #ff6701 เฉพาะปุ่มส่ง ป้าย "แนะนำ" ของแถว LINE และจุด hover/focus
   ≥992px ซ้าย ช่องทางติดต่อ + ข้อมูลบริษัท + ช่วยเหลือด่วน · ขวา ฟอร์ม | ≤991px เรียงต่อใต้กัน
   เขียว LINE #06c755 (สีแบรนด์ของ LINE) ใช้เฉพาะลิงก์ชวนใต้ฟอร์ม — เจ้าของอยากให้ลูกค้าติดต่อทาง LINE เป็นหลัก */
.page-contact {
    background-color: #fff;

    .section-contact {
        padding: 48px 0 80px;

        .contact-row {
            row-gap: 48px;
        }

        /* ── หัวของแต่ละบล็อก (ใช้ทั้งคอลัมน์ซ้ายและฟอร์ม) ── */
        .section-header {
            margin-bottom: 20px;

            h2 {
                margin: 0 0 6px;
                font-size: 22px;
                font-weight: normal;
                color: #111827;
            }

            .section-desc {
                display: block;
                font-size: 15px;
                line-height: 1.6;
                color: #6b7280;
            }
        }

        /* ── คอลัมน์ซ้าย ── */
        .contact-info {
            display: flex;
            flex-direction: column;
            gap: 40px;
            padding-right: 24px;

            /* ช่องทางติดต่อ — รายการคั่นเส้นบาง ไม่มีกรอบ */
            .card-list {
                display: flex;
                flex-direction: column;
                border-top: 1px solid #e5e7eb;

                .card-item {
                    display: flex;
                    align-items: center;
                    gap: 16px;
                    padding: 16px 0;
                    border-bottom: 1px solid #e5e7eb;
                    color: #111827;

                    .card-icon {
                        display: flex;
                        flex: 0 0 44px;
                        align-items: center;
                        justify-content: center;
                        height: 44px;
                        border-radius: 10px;
                        background-color: #fff3ec;

                        img {
                            display: block;
                            width: 22px;
                            height: 22px;
                        }
                    }

                    .card-content {
                        display: flex;
                        flex: 1;
                        flex-direction: column;
                        min-width: 0;

                        .card-label {
                            font-size: 13px;
                            color: #6b7280;
                        }

                        /* อีเมลยาวตัดขึ้นบรรทัดใหม่ ไม่ซ่อนท้าย — ผู้ใช้ต้องอ่านได้ครบ */
                        .card-value {
                            font-size: 17px;
                            overflow-wrap: anywhere;
                            transition: color .2s;
                        }

                        /* เวลาให้บริการของเบอร์โทร (note ใน contact.json) */
                        .card-note {
                            font-size: 13px;
                            color: #6b7280;
                        }
                    }

                    /* ป้ายแนะนำ (แถว LINE) — ชิดขวาก่อนลูกศร · โทนส้มของเว็บ (เจ้าของสั่งเซสชัน 31) */
                    .card-recommend {
                        display: inline-flex;
                        flex: 0 0 auto;
                        align-items: center;
                        gap: 5px;
                        padding: 4px 10px;
                        border-radius: 20px;
                        font-size: 13px;
                        color: #ff6701;
                        background-color: #fff3ec;

                        i {
                            font-size: 13px;
                        }
                    }

                    .bi-arrow-up-right {
                        font-size: 15px;
                        color: #d1d5db;
                        transition: color .2s;
                    }

                    &:hover {
                        .card-value,
                        .bi-arrow-up-right {
                            color: #ff6701;
                        }
                    }
                }
            }

            /* ข้อมูลบริษัท — ไอคอนแบบเดียวกับช่องทางติดต่อ */
            .company-item {
                display: flex;
                align-items: flex-start;
                gap: 16px;
                padding: 16px 0;
                border-top: 1px solid #e5e7eb;
                border-bottom: 1px solid #e5e7eb;

                .card-icon {
                    display: flex;
                    flex: 0 0 44px;
                    align-items: center;
                    justify-content: center;
                    height: 44px;
                    border-radius: 10px;
                    font-size: 20px;
                    color: #ff6701;
                    background-color: #fff3ec;
                }

                .company-content {
                    display: flex;
                    flex: 1;
                    flex-direction: column;
                    gap: 4px;
                    min-width: 0;

                    .company-name {
                        font-size: 17px;
                        color: #111827;
                    }

                    .company-address {
                        font-size: 15px;
                        line-height: 1.6;
                        color: #374151;
                    }

                    .company-reg {
                        font-size: 13px;
                        color: #6b7280;
                    }

                    .company-map {
                        display: inline-flex;
                        align-items: center;
                        align-self: flex-start;
                        gap: 6px;
                        margin-top: 6px;
                        font-size: 15px;
                        color: #ff6701;

                        &:hover {
                            text-decoration: underline;
                        }
                    }
                }
            }

            /* ช่วยเหลือด่วน — ลิงก์ตัวหนังสือ 2 คอลัมน์ */
            .help-list {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 4px 24px;
                padding: 0;
                margin: 0;
                list-style: none;

                .help-item {
                    display: flex;
                    align-items: center;
                    gap: 10px;
                    padding: 8px 0;
                    font-size: 15px;
                    color: #374151;
                    transition: color .2s;

                    i {
                        font-size: 17px;
                        color: #9ca3af;
                        transition: color .2s;
                    }

                    &:hover {
                        color: #ff6701;

                        i {
                            color: #ff6701;
                        }
                    }
                }
            }
        }

        /* ── ฟอร์ม — กรอบขอบบาง ── */
        .contact-form {
            padding: 36px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;

            .form-grid {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 20px;

                .form-field {
                    grid-column: 1 / -1;

                    &.field-half {
                        grid-column: auto;
                    }

                    label {
                        margin-bottom: 8px;
                        font-size: 15px;
                        color: #374151;

                        .required-mark {
                            color: #ff6701;
                        }
                    }

                    .form-control {
                        min-height: 46px;
                        padding: 10px 14px;
                        border: 1px solid #d1d5db;
                        border-radius: 8px;
                        font-size: 15px;
                        color: #111827;
                        background-color: #fff;
                        transition: border-color .2s, box-shadow .2s;

                        &::placeholder {
                            color: #9ca3af;
                        }

                        &:focus {
                            border-color: #ff6701;
                            box-shadow: 0 0 0 3px rgba(255, 103, 1, .12);
                        }
                    }

                    textarea.form-control {
                        resize: vertical;
                    }
                }
            }

            .form-action {
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                gap: 14px 24px;
                margin-top: 24px;

                .line-hint {
                    display: inline-flex;
                    align-items: center;
                    gap: 8px;
                    font-size: 15px;
                    color: #048a3c;

                    i {
                        font-size: 18px;
                        color: #06c755;
                    }

                    &:hover {
                        text-decoration: underline;
                    }
                }

                .btn-send {
                    min-width: 180px;
                    padding: 12px 32px;
                    border: 0;
                    border-radius: 8px;
                    font-size: 16px;
                    color: #fff;
                    background-color: #ff6701;
                    cursor: pointer;
                    transition: background-color .2s;

                    &:hover {
                        background-color: #d95700;
                    }

                    &:focus-visible {
                        outline: 3px solid rgba(255, 103, 1, .35);
                        outline-offset: 2px;
                    }
                }
            }
        }

        /* ช่องดักบอท (honeypot) — ซ่อนออกนอกจอ ไม่ใช้ display:none เพื่อให้บอทยังกรอกได้ */
        .company-box {
            position: absolute;
            top: -9999px;
            left: -9999px;
            z-index: -10;
        }

        @media (max-width: 1199px) {
            .contact-info {
                padding-right: 0;
            }

            .contact-form {
                padding: 28px;
            }
        }

        @media (max-width: 991px) {
            & {
                padding: 40px 0 64px;
            }

            .contact-row {
                row-gap: 40px;
            }
        }

        @media (max-width: 767px) {
            & {
                padding: 32px 0 56px;
            }

            .contact-form {
                padding: 24px 20px;

                .form-grid .form-field.field-half {
                    grid-column: 1 / -1;
                }

                .form-action {
                    justify-content: center;

                    .btn-send {
                        width: 100%;
                    }
                }
            }
        }

        @media (max-width: 575px) {
            & {
                padding: 24px 0 48px;
            }

            .contact-row {
                row-gap: 32px;
            }

            .section-header h2 {
                font-size: 20px;
            }

            .contact-info {
                gap: 32px;

                .card-list .card-item .card-content .card-value {
                    font-size: 16px;
                }

                .help-list {
                    column-gap: 16px;

                    .help-item {
                        font-size: 14px;
                    }
                }
            }

            .contact-form {
                padding: 20px 16px;

                .form-grid {
                    gap: 16px;
                }
            }
        }
    }
}
