/* ===== ตัวแปรสีหลัก — ตรงกับโลโก้และนามบัตร ===== */
:root {
    --blue-dark: #00337C;
    --blue-primary: #0055C9;
    --blue-light: #0077E6;
    --white: #ffffff;
    --light: #f3f6f8;
    --gray: #8097c6;
    --border: #E5E7EB;
    --success: #00A363;
    --shadow: rgba(0, 51, 124, 0.15);
    --danger: #DC2626;
}

/* ===== รีเซ็ต & พื้นฐาน ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Sans Thai", "Segoe UI", Roboto, Arial, sans-serif;
}
html { scroll-behavior: smooth; }
body { line-height: 1.6; color: #1F2937; background: var(--white); }
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--blue-primary); }
.container { width: 92%; max-width: 1200px; margin: 0 auto; }

/* ===== ปุ่มมาตรฐาน ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-primary));
    color: var(--white);
    box-shadow: 0 4px 15px var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--shadow); color: var(--white); }
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { background: rgba(255,255,255,0.2); border-color: var(--white); color: var(--white); }

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 12px 0;
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-img { height: 55px; width: auto; }
.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-link {
    color: #374151;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--blue-primary); }
.menu-toggle { display: none; font-size: 1.8rem; background: none; border: none; cursor: pointer; }

/* ===== Hero + วิดีโอ ===== */
.hero {
    position: relative;
    padding: 160px 0 180px;
    color: var(--white);
    overflow: hidden;
}
.hero-video-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-video-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,51,124,0.90), rgba(0,85,201,0.85));
    z-index: 1;
}
.hero-wrapper { position: relative; z-index: 2; display: flex; align-items: center; gap: 4rem; flex-wrap: wrap; }
.hero-content { flex: 1; min-width: 360px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.2); padding: 8px 18px; border-radius: 50px;
    font-size: 0.95rem; margin-bottom: 1.5rem;
}
.hero h1 { font-size: 3rem; line-height: 1.2; margin-bottom: 1.2rem; }
.hero-subtitle { font-size: 1.05rem; margin-bottom: 2rem; opacity: 0.95; line-height: 1.8; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-trust { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.trust-item { text-align: center; }
.trust-num { display: block; font-size: 2.2rem; font-weight: 800; }
.trust-text { font-size: 0.9rem; opacity: 0.85; }

/* การ์ดวิดีโอทางขวา */
.hero-visual { flex: 1; min-width: 320px; display: flex; justify-content: center; }
.hero-video-card {
    position: relative;
    width: 100%; max-width: 360px;
    border-radius: 24px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.2);
}
.card-video { width: 100%; height: auto; display: block; }
.play-video-btn {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,0.9); color: var(--blue-dark);
    font-size: 2rem; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
.play-video-btn:hover { transform: translate(-50%, -50%) scale(1.1); background: white; }

/* ป๊อปอัพวิดีโอ */
.video-modal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92); z-index: 9999;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.video-modal.show { display: flex; }
.modal-close {
    position: absolute; top: 20px; right: 30px;
    font-size: 2.5rem; color: white; background: none; border: none;
    cursor: pointer; line-height: 1;
}
#modalVideo { max-width: 90%; max-height: 80%; border-radius: 12px; }

/* ===== ส่วนหัวทุกส่วน ===== */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { font-size: 2.2rem; color: var(--blue-dark); margin-bottom: 0.5rem; }
.section-header p { color: var(--gray); font-size: 1.1rem; }

/* ===== บริการ ===== */
.services { padding: 90px 0; background: var(--light); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.8rem;
}
.service-card {
    background: white; padding: 2rem; border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.service-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.service-card h3 { font-size: 1.25rem; color: var(--blue-dark); margin-bottom: 0.8rem; }
.service-card p { color: var(--gray); line-height: 1.7; }

/* ===== เกี่ยวกับเรา ===== */
.about { padding: 90px 0; }
.about-wrapper { max-width: 850px; margin: 0 auto; }
.about h2 { font-size: 2rem; color: var(--blue-dark); margin-bottom: 1.5rem; }
.about p { font-size: 1.05rem; color: var(--gray); margin-bottom: 1.5rem; line-height: 1.8; }
.about-list { display: grid; gap: 0.9rem; }
.about-list li { font-size: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }

/* ===== ติดต่อ / ฟอร์มแจ้งซ่อม ===== */
.contact-section { padding: 90px 0; background: var(--light); }
.contact-wrapper { display: flex; gap: 3rem; flex-wrap: wrap; }
.contact-form-card {
    flex: 1; min-width: 380px;
    background: white; padding: 2.5rem; border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.form-title { font-size: 1.8rem; color: var(--blue-dark); margin-bottom: 2rem; text-align: center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block; margin-bottom: 0.5rem; font-weight: 600; color: #374151;
}
.required { color: var(--danger); }
.optional { color: var(--gray); font-weight: 400; font-size: 0.9em; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 16px; border: 2px solid var(--border);
    border-radius: 10px; font-size: 1rem; transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--blue-primary);
}

/* ===== อัปโหลดรูป ===== */
.file-upload-area {
    border: 2px dashed var(--border); border-radius: 12px; padding: 2rem;
    text-align: center; cursor: pointer; transition: all 0.3s ease; background: var(--light);
    position: relative;
}
.file-upload-area:hover, .file-upload-area.dragover {
    border-color: var(--blue-primary); background: #E8F0FC;
}
.file-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.file-upload-label p { color: var(--gray); line-height: 1.6; }
.file-upload-label small { color: #9CA3AF; font-size: 0.85rem; }
.file-preview { margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }
.file-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); }

/* ปุ่มส่งฟอร์ม */
.btn-submit {
    width: 100%; padding: 16px;
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-primary));
    color: white; border: none; border-radius: 12px;
    font-size: 1.1rem; font-weight: 700; cursor: pointer;
    transition: all 0.3s ease;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--shadow); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ข้อมูลติดต่อ ด้านขวา */
.contact-info-card {
    flex: 0 0 380px;
    background: white; padding: 2.5rem; border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.contact-info-card h3 { font-size: 1.5rem; color: var(--blue-dark); margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--border); }
.info-item { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.info-icon { font-size: 1.5rem; margin-top: 2px; flex-shrink: 0; }
.info-item strong { display: block; color: #1F2937; margin-bottom: 0.25rem; font-size: 0.95rem; }
.info-item p { color: var(--gray); line-height: 1.6; font-size: 0.95rem; }

/* ===== Footer ===== */
.footer { background: #0F172A; color: white; padding: 60px 0 20px; }
.footer-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 3rem; margin-bottom: 2.5rem; }
.footer-logo img { height: 55px; margin-bottom: 1rem; }
.footer-logo h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.footer-logo p { color: #94A3B8; font-size: 0.95rem; }
.footer-links h4, .footer-contact h4 { font-size: 1.1rem; margin-bottom: 1.2rem; color: #E2E8F0; }
.footer-links ul { display: grid; gap: 0.8rem; }
.footer-links a { color: #94A3B8; transition: color 0.2s; }
.footer-links a:hover { color: var(--blue-primary); }
.footer-contact p { color: #94A3B8; margin-bottom: 0.8rem; font-size: 0.95rem; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid #1E293B; color: #64748B; font-size: 0.9rem; line-height: 1.7; }

/* ===== มือถือ ===== */
@media (max-width: 920px) {
    .nav-menu { position: fixed; top: 70px; right: -100%; flex-direction: column; background: white; width: 280px; height: 100vh; padding: 2rem; box-shadow: -4px 0 20px rgba(0,0,0,0.1); transition: right 0.3s; }
    .nav-menu.active { right: 0; }
    .menu-toggle { display: block; }
    .hero h1 { font-size: 2rem; }
    .form-row { grid-template-columns: 1fr; }
    .hero-buttons { justify-content: center; }
    .hero-trust { justify-content: center; }
    .contact-form-card, .contact-info-card { padding: 1.5rem; min-width: 100%; }
    .play-video-btn { width: 64px; height: 64px; font-size: 1.5rem; }
    .services-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .hero { padding: 130px 0 120px; }
    .hero h1 { font-size: 1.6rem; }
    .section-header h2 { font-size: 1.6rem; }
    .container { width: 95%; }
    .logo-img { height: 45px; }
}
