/* ===========================================================
   PPC Service Solution - สไตล์หลักของเว็บ (หน้าแรก + หน้ารายละเอียด)
   =========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #FFCC00;
    --secondary-color: #1A1A1A;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --bg-light: #F9F9F9;

    /* alias สำหรับหน้ารายละเอียด */
    --black: #111111;
    --dark: #1a1a1a;
    --gray-dark: #333333;
    --gray: #666666;
    --gray-light: #aaaaaa;
    --bg: #f5f5f0;
    --white: #ffffff;
    --yellow: #f5c800;
    --yellow-dark: #d4a900;
    --yellow-soft: #fff8d6;
}

body {
    color: var(--text-dark);
    line-height: 1.6;
}

/* ---------------- Navigation ---------------- */
nav {
    background-color: var(--secondary-color);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo, .logo-wrap {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.logo span, .logo-wrap span { color: var(--text-light); }

.nav-links { display: flex; list-style: none; }
.nav-links li { margin-left: 25px; }
.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--primary-color); }

.menu-toggle {
    display: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
}

.back-btn {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 15px;
}
.back-btn:hover { color: var(--primary-color); }

/* ---------------- Hero (หน้าแรก) ---------------- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    padding: 0 20px;
}
.hero h1 { font-size: 48px; margin-bottom: 20px; font-weight: 700; }
.hero h1 span { color: var(--primary-color); }
.hero p { font-size: 20px; margin-bottom: 30px; max-width: 600px; }

/* ---------------- Buttons ---------------- */
.btn {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: transform 0.3s, background-color 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}
.btn:hover { transform: translateY(-3px); background-color: #E6B800; }

.btn-yellow {
    background: var(--yellow);
    color: var(--black);
    padding: 13px 32px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 6px;
    display: inline-block;
    transition: transform 0.2s, background 0.2s;
}
.btn-yellow:hover { transform: translateY(-2px); background: var(--yellow-dark); }

/* ---------------- Section base ---------------- */
section { padding: 80px 10%; }

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

/* ---------------- About ---------------- */
.about { background-color: var(--text-light); }
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-text h3 { font-size: 24px; margin-bottom: 15px; color: var(--secondary-color); }
.about-text p { margin-bottom: 20px; color: #555; }
.about-image img { width: 100%; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* ---------------- Services grid (หน้าแรก) ---------------- */
.services { background-color: var(--bg-light); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.service-card {
    background-color: var(--text-light);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.service-card:hover { transform: translateY(-10px); }
.service-icon {
    font-size: 45px;
    color: var(--primary-color);
    margin-bottom: 20px;
    background-color: #FFF9E6;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    display: inline-block;
}
.service-card h3 { margin-bottom: 15px; font-size: 20px; }
.service-card p { color: #666; font-size: 14px; margin-bottom: 20px; }
.service-card .btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    margin-top: auto;
    text-align: center;
}

/* ---------------- Contact ---------------- */
.contact { background-color: var(--text-light); }
.contact-container { display: flex; gap: 40px; align-items: stretch; }
.contact-info, .contact-form {
    flex: 1;
    padding: 40px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}
.contact-info { background-color: var(--secondary-color); color: var(--text-light); }
.contact-info h3 { font-size: 24px; margin-bottom: 25px; color: var(--primary-color); font-weight: 600; }
.contact-method { display: flex; align-items: flex-start; margin-bottom: 22px; }
.contact-method i { font-size: 20px; color: var(--primary-color); margin-right: 15px; width: 25px; margin-top: 4px; }

.social-channels { margin-top: auto; padding-top: 25px; border-top: 1px solid #333; }
.social-channels p { margin-bottom: 12px; font-size: 14px; color: #aaa; }
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2b2b2b;
    color: white;
    margin-right: 12px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.social-btn.line:hover { background-color: #06C755; }
.social-btn.facebook:hover { background-color: #1877F2; }

.line-qr-wrapper {
    margin-top: 20px;
    background-color: #262626;
    padding: 15px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid #06C755;
}
.line-qr-wrapper img { width: 85px; height: 85px; border-radius: 4px; background-color: #fff; padding: 3px; }
.line-qr-text p { font-size: 14px; color: #fff; margin-bottom: 4px; font-weight: 500; }
.line-qr-text span { font-size: 12px; color: #06C755; font-weight: 500; }

/* ปุ่มแผนที่ + แผนที่ฝัง ในกล่องข้อมูลติดต่อ */
.map-btn {
    display: inline-flex; align-items: center; gap: 8px;
    align-self: flex-start;            /* ไม่ให้ยืดเต็มความกว้างในกล่อง flex */
    background-color: var(--primary-color); color: var(--secondary-color);
    padding: 10px 18px; border-radius: 6px; font-weight: 600; font-size: 14px;
    text-decoration: none; margin: 0 0 18px 40px;
    transition: background-color .25s, transform .25s;
}
.map-btn:hover { background-color: #e6b800; transform: translateY(-2px); }
.map-btn i { font-size: 16px; }
.contact-map {
    margin: 0 0 24px 0; border-radius: 10px; overflow: hidden;
    border: 1px solid #333; box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.contact-map iframe { width: 100%; height: 190px; border: 0; display: block; }
@media (max-width: 560px) {
    .map-btn { margin-left: 0; width: 100%; justify-content: center; }
}

.contact-form { background-color: #ffffff; border: 1px solid #eef0f3; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); }
.contact-form form { display: flex; flex-direction: column; height: 100%; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 15px; color: #444; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    background-color: #fafafa;
    transition: all 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}
.form-group textarea { height: 120px; resize: none; }
.form-note { font-size: 13px; color: #777; margin-top: -5px; margin-bottom: 20px; }
.contact-form .btn { width: 100%; padding: 14px; font-size: 16px; margin-top: auto; }

.flash {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}
.flash.success { background: #e7f9ee; color: #1b7d44; border: 1px solid #b6e6c8; }
.flash.error { background: #fdecec; color: #b91c1c; border: 1px solid #f5c2c2; }

/* ---------------- Footer ---------------- */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #333;
}
.badge-container { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 10px 0 25px 0; }
.footer-copyright-box, .company-reg-box {
    display: inline-block;
    background-color: #000000;
    color: var(--text-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13.5px;
    border: 1px solid var(--primary-color);
    font-weight: 500;
    letter-spacing: 0.5px;
}
.footer-copyright-box strong { color: var(--primary-color); font-weight: 700; }
.company-reg-box span { color: var(--primary-color); font-weight: 700; margin-left: 5px; }
.footer-links { margin-top: 20px; }
.footer-links a { color: #aaa; text-decoration: none; font-size: 14px; margin: 0 10px; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary-color); }
.footer-simple { background:var(--dark); color:var(--gray-light); text-align:center; padding:30px 20px; font-size:14px; border-top:1px solid #252525; }

/* Sticky footer — ดัน footer ให้อยู่ล่างสุดเสมอแม้เนื้อหาสั้น (หน้า portfolio/quote/page) */
body.page-inner { display: flex; flex-direction: column; min-height: 100vh; }
body.page-inner > .footer-simple { margin-top: auto; }

/* ป๊อปอัปประชาสัมพันธ์ (เด้งตอนเข้าหน้าแรก) — ขนาดกลาง ไม่เล็กไม่ใหญ่ */
.promo-popup { display: none; position: fixed; inset: 0; z-index: 4000;
    background: rgba(0,0,0,0.65); padding: 24px; }
.promo-popup.open { display: flex; align-items: center; justify-content: center; }
.promo-popup-box { position: relative; max-width: 480px; width: 100%; animation: promoIn .3s ease; }
.promo-popup-box img { width: 100%; height: auto; max-height: 82vh; object-fit: contain;
    border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.45); display: block; }
.promo-popup-box a { display: block; }
.promo-popup-close { position: absolute; top: -14px; right: -14px; width: 38px; height: 38px;
    border-radius: 50%; background: #fff; border: none; font-size: 24px; line-height: 1;
    cursor: pointer; color: #333; box-shadow: 0 2px 10px rgba(0,0,0,0.35); transition: background .2s; }
.promo-popup-close:hover { background: var(--primary-color); }
@keyframes promoIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
    .promo-popup-box { max-width: 90%; }
    .promo-popup-close { top: -12px; right: -4px; }
}

/* แถบขอความยินยอมคุกกี้ (Cookie consent) */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4500;
    background: #1f1f1f; color: #eee; padding: 16px 5%;
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.35);
    transform: translateY(120%); transition: transform .4s ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-text { font-size: 14px; line-height: 1.6; flex: 1; min-width: 240px; }
.cookie-text i { color: var(--primary-color); margin-right: 4px; }
.cookie-text a { color: var(--primary-color); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn { padding: 9px 22px; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer;
    border: none; transition: background .2s, border-color .2s, color .2s; }
.cookie-btn.accept { background: var(--primary-color); color: #1a1a1a; }
.cookie-btn.accept:hover { background: #e6b800; }
.cookie-btn.decline { background: transparent; color: #ccc; border: 1px solid #555; }
.cookie-btn.decline:hover { border-color: #999; color: #fff; }
@media (max-width: 560px) {
    .cookie-banner { padding: 14px 5%; gap: 12px; }
    .cookie-actions { width: 100%; }
    .cookie-btn { flex: 1; }
}

/* CAPTCHA — ช่อง honeypot ซ่อนจากสายตามนุษย์ (บอทจะกรอก แล้วโดนปฏิเสธ) */
.hp-field { position: absolute !important; left: -9999px !important; top: -9999px !important;
    width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.captcha-group label b { color: var(--secondary-color); letter-spacing: 1px; }

/* ===========================================================
   หน้ารายละเอียด (page.php) - inner hero + layouts
   =========================================================== */
.inner-hero, .hero-banner {
    background: linear-gradient(rgba(0,0,0,0.78), rgba(0,0,0,0.78)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    padding: 150px 10% 80px 10%;
    color: var(--text-light);
    text-align: center;
    border-bottom: 4px solid var(--primary-color);
}
.inner-hero h1, .hero-banner h1 { font-size: 42px; margin-bottom: 18px; font-weight: 700; }
.inner-hero h1 span, .hero-banner h1 span { color: var(--primary-color); }
.inner-hero p, .hero-banner p { font-size: 18px; color: #ddd; max-width: 850px; margin: 0 auto; }

/* it-support layout */
.content-section { padding: 60px 10%; }
.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    margin-bottom: 60px;
    align-items: start;
}
.detail-text h2 { font-size: 28px; margin-bottom: 20px; color: var(--secondary-color); }
.detail-text p { margin-bottom: 15px; color: #555; }
.feature-box {
    background: #FFF9E6;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gallery-grid img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.pricing-section { background-color: var(--bg-light); padding: 60px 10%; text-align: center; }
.pricing-section h2 { margin-bottom: 40px; }
.table-responsive { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    min-width: 600px;
}
th, td { padding: 18px; text-align: left; border-bottom: 1px solid #eee; }
th { background-color: var(--secondary-color); color: white; }
tr:hover { background-color: #fcfcfc; }
.check-icon { color: #06C755; font-weight: bold; }

.cta-box {
    text-align: center;
    padding: 50px 10%;
    background: var(--secondary-color);
    color: white;
    margin-top: 40px;
    border-radius: 10px;
}
.cta-box h3 { font-size: 28px; margin-bottom: 15px; }
.cta-box p { margin-bottom: 25px; color: #aaa; }

/* network layout */
.main-container {
    padding: 70px 10%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: start;
}
.content-body h2 { font-size: 28px; margin-bottom: 20px; color: var(--dark); font-weight: 700; }
.content-body p { margin-bottom: 20px; color: var(--gray-dark); font-size: 16px; }
.highlight-box {
    background-color: #fffde6;
    border-left: 4px solid var(--yellow);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 30px 0;
}
.detailed-services { margin-top: 40px; }
.detail-item { display: flex; gap: 20px; margin-bottom: 30px; }
.detail-item i {
    font-size: 24px;
    color: var(--yellow-dark);
    background: #fff8d6;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}
.detail-item h3 { font-size: 18px; margin-bottom: 8px; color: var(--black); }
.detail-item p { font-size: 14px; color: var(--gray); }
.sidebar-gallery { display: flex; flex-direction: column; gap: 22px; }
.sidebar-gallery img { width: 100%; height: 235px; object-fit: cover; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.gallery-caption { font-size: 13px; color: var(--gray); text-align: center; margin-top: 10px; font-style: italic; line-height: 1.6; }

/* เลย์เอาต์เพจ: เนื้อหา + คอลัมน์รูปด้านข้าง (อัปจากหลังบ้าน) */
.page-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 36px;
    max-width: 1520px; margin: 0 auto; padding: 55px 30px; align-items: start;
}
.page-content { min-width: 0; font-size: 16px; line-height: 1.85; color: var(--gray-dark); }
.page-content h2 { font-size: 25px; font-weight: 700; margin: 26px 0 16px; color: var(--dark); }
.page-content h2:first-child { margin-top: 0; }
.page-content h3 { font-size: 20px; font-weight: 600; margin: 22px 0 12px; color: var(--dark); }
.page-content p { font-size: 16px; color: var(--gray-dark); line-height: 1.85; margin-bottom: 16px; }
.page-content ul, .page-content ol { margin: 0 0 16px 22px; color: var(--gray-dark); line-height: 1.85; }
.page-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* เนื้อหาคอลัมน์เดียว (หลังถอด sidebar เขียนมือออก) */
.single-col { padding: 60px 10%; max-width: 1040px; margin: 0 auto; }
.page-content .single-col { padding: 0; max-width: none; }   /* ถ้าใส่รูปด้านข้างใหม่ ไม่ต้องมี padding ซ้อน */

.standards-section { background-color: var(--bg); padding: 60px 10%; text-align: center; }
.standards-section h2 { font-size: 28px; margin-bottom: 40px; }
.standards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.std-card { background: var(--white); padding: 30px 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.std-card i { font-size: 35px; color: var(--yellow-dark); margin-bottom: 15px; }
.std-card h4 { font-size: 16px; margin-bottom: 10px; }
.std-card p { font-size: 13px; color: var(--gray); }

.cta-footer-box {
    text-align: center;
    padding: 60px 10%;
    background: var(--dark);
    color: var(--white);
    margin: 50px 10%;
    border-radius: 12px;
}
.cta-footer-box h3 { font-size: 26px; margin-bottom: 15px; color: var(--white); }
.cta-footer-box p { margin-bottom: 25px; color: var(--gray-light); font-size: 15px; }

/* system & hardware layout — เนื้อหาเต็มกว้าง แล้วการ์ดเรียงเป็นแถวด้านล่าง */
.main-layout {
    max-width: 1340px;
    margin: 0 auto;
    padding: 55px 30px;
    display: block;
}
.content-zone h2 { font-size: 26px; font-weight: 700; margin-bottom: 20px; color: var(--dark); }
.content-zone p { font-size: 16px; line-height: 1.85; color: var(--gray-dark); margin-bottom: 20px; }
.alert-box {
    background-color: var(--yellow-soft);
    border-left: 4px solid var(--yellow-dark);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 30px 0;
    font-size: 14.5px;
}
.sub-services { margin-top: 40px; }
.srv-item { display: flex; gap: 20px; margin-bottom: 35px; }
.srv-item-icon {
    background: var(--yellow-soft);
    color: var(--yellow-dark);
    width: 54px;
    height: 54px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.srv-item-text h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--black); }
.srv-item-text p { font-size: 13.5px; color: var(--gray); line-height: 1.6; }
.sidebar-zone { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; margin-top: 45px; }
.tech-status-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}
.tech-status-card i { font-size: 45px; color: var(--yellow-dark); margin-bottom: 15px; }
.tech-status-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.tech-status-card p { font-size: 13px; color: var(--gray); }

.standard-bar { background-color: var(--bg); padding: 50px 5vw; text-align: center; }
.standard-bar h2 { font-size: 24px; margin-bottom: 35px; }
.badge-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.badge-card { background: var(--white); padding: 25px 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.badge-card i { font-size: 28px; color: var(--yellow-dark); margin-bottom: 12px; }
.badge-card h4 { font-size: 15px; margin-bottom: 8px; }
.badge-card p { font-size: 12.5px; color: var(--gray); }

.action-banner {
    max-width: 1200px;
    margin: 50px auto;
    padding: 50px 40px;
    background: var(--dark);
    color: var(--white);
    border-radius: 12px;
    text-align: center;
}
.action-banner h3 { font-size: 26px; margin-bottom: 15px; color: var(--white); }
.action-banner p { font-size: 15px; color: var(--gray-light); margin-bottom: 25px; }

/* ---------------- Responsive ---------------- */

/* กันรูป/เนื้อหาในเพจ (body_html) ล้นจอ */
img { max-width: 100%; }
.detail-text img, .content-zone img, .content-section img { height: auto; }

/* แท็บเล็ต / มือถือแนวนอน */
@media (max-width: 900px) {
    nav { padding: 13px 5%; }
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--secondary-color);
        padding: 18px 20px;
        box-shadow: 0 8px 14px rgba(0,0,0,0.25);
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 14px 0; text-align: center; }
    .nav-cta { display: inline-block; margin-top: 4px; padding: 10px 26px; }

    section { padding: 60px 6%; }
    .section-title { font-size: 28px; margin-bottom: 35px; }

    .about-container { grid-template-columns: 1fr; gap: 30px; }
    .contact-container { flex-direction: column; }
    .contact-info, .contact-form { padding: 30px 22px; }
    .hero { height: auto; min-height: 100vh; padding: 90px 20px 60px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .line-qr-wrapper { display: flex; width: 100%; justify-content: center; }

    .detail-grid, .main-container, .main-layout, .page-layout { grid-template-columns: 1fr; gap: 40px; }
    .page-layout { padding: 45px 6%; }
    .sidebar-gallery img { height: 200px; }
    .badge-grid { grid-template-columns: 1fr; }
    .content-section { padding: 50px 6%; }
    .inner-hero, .hero-banner { padding: 120px 6% 60px; }
    .inner-hero h1, .hero-banner h1 { font-size: 30px; }
    .inner-hero p, .hero-banner p { font-size: 15px; }
    .quote-section { padding: 55px 6%; }
    .quote-grid { grid-template-columns: 1fr; }
    .portfolio { padding-left: 6%; padding-right: 6%; }
    .portfolio-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
}

/* มือถือแนวตั้ง / จอเล็ก */
@media (max-width: 560px) {
    section { padding: 46px 5%; }
    .section-title { font-size: 23px; margin-bottom: 28px; padding-bottom: 12px; }
    .section-title::after { width: 60px; height: 3px; }

    .hero h1 { font-size: 26px; }
    .hero p { font-size: 14.5px; margin-bottom: 24px; }
    .btn { padding: 11px 24px; font-size: 14px; }

    .inner-hero, .hero-banner { padding: 100px 5% 48px; }
    .inner-hero h1, .hero-banner h1 { font-size: 25px; }
    .inner-hero p, .hero-banner p { font-size: 14px; }

    .about-text h3 { font-size: 21px; }
    .service-card { padding: 32px 24px; }

    .portfolio-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .portfolio-intro { font-size: 14.5px; margin-bottom: 32px; }
    .portfolio-overlay { padding: 18px 12px 12px; }
    .portfolio-overlay h3 { font-size: 15px; }

    .quote-section { padding: 40px 4%; }
    .quote-box { padding: 26px 18px; }
    .quote-box label, .contact-form label, .form-group label { font-size: 14px; }

    .footer-links a { display: inline-block; margin: 4px 8px; }
    .site-logo { height: 38px; }
    .logo, .logo-wrap { font-size: 20px; }
}

/* ===========================================================
   โลโก้บริษัท + เมนู CTA
   =========================================================== */
.site-logo { height: 44px; width: auto; display: block; }
.nav-cta {
    background-color: var(--primary-color);
    color: var(--secondary-color) !important;
    padding: 8px 18px;
    border-radius: 5px;
    font-weight: 700 !important;
}
.nav-cta:hover { background-color: #e6b800; color: var(--secondary-color) !important; }

/* ===========================================================
   ผลงาน (Portfolio)
   =========================================================== */
.portfolio { background-color: var(--text-light); }
.portfolio-intro { text-align: center; color: #666; margin-top: -30px; margin-bottom: 45px; font-size: 16px; }
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.portfolio-item {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    aspect-ratio: 4 / 3;
    background: #ddd;
    text-decoration: none;
}
.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.portfolio-item:hover img { transform: scale(1.08); }
.portfolio-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 30px 20px 18px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    transform: translateY(8px);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; transform: translateY(0); }
.portfolio-overlay h3 { font-size: 18px; margin-bottom: 4px; color: #fff; }
.portfolio-overlay span { font-size: 13px; color: var(--primary-color); font-weight: 500; }

/* ---------------- Lightbox ---------------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.92);
    padding: 30px;
    overflow-y: auto;
}
.lightbox.open { display: flex; align-items: center; justify-content: center; }
.lightbox-content {
    background: #fff;
    border-radius: 12px;
    max-width: 920px;
    width: 100%;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
}
.lightbox-content img { width: 100%; height: 100%; max-height: 80vh; object-fit: cover; background: #111; }
.lightbox-info { padding: 32px 30px; }
.lightbox-info h3 { font-size: 24px; margin-bottom: 8px; color: var(--secondary-color); }
.lightbox-info > span { display: inline-block; font-size: 13px; color: #fff; background: var(--primary-color); padding: 3px 12px; border-radius: 20px; margin-bottom: 18px; font-weight: 600; }
.lightbox-info #lb-desc { color: #555; line-height: 1.8; font-size: 15px; }
.lightbox-close {
    position: fixed; top: 18px; right: 28px;
    color: #fff; font-size: 40px; cursor: pointer; line-height: 1; z-index: 2001;
}
.lightbox-nav {
    position: fixed; top: 50%; transform: translateY(-50%);
    color: #fff; font-size: 34px; cursor: pointer; padding: 16px; user-select: none; z-index: 2001;
}
.lightbox-nav.prev { left: 14px; }
.lightbox-nav.next { right: 14px; }
.lightbox-nav:hover, .lightbox-close:hover { color: var(--primary-color); }

/* ===========================================================
   ฟอร์มขอใบเสนอราคา (quote.php)
   =========================================================== */
.quote-section { padding: 70px 10%; background: var(--bg-light); }
.quote-box {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 14px;
    padding: 45px 45px 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quote-box .form-group { margin-bottom: 20px; }
.quote-box label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 15px; color: #444; }
.quote-box .req { color: #e23b3b; }
.quote-box input, .quote-box select, .quote-box textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    background-color: #fafafa;
    transition: all 0.3s;
}
.quote-box textarea { height: 130px; resize: vertical; }
.quote-box input:focus, .quote-box select:focus, .quote-box textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}
.quote-box .btn { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }

@media (max-width: 760px) {
    .lightbox-content { grid-template-columns: 1fr; }
    .lightbox-content img { max-height: 45vh; }
    .quote-box { padding: 30px 22px; }
    .quote-grid { grid-template-columns: 1fr; }
}

/* ===========================================================
   ขัดเกลาความสวยงาม (Aesthetic polish)
   =========================================================== */

/* เลื่อนหน้านุ่มนวลเมื่อคลิกเมนู และเว้นระยะไม่ให้แถบเมนู (fixed) บังหัวข้อ */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 78px; }

/* ปุ่มมีมิติขึ้นเล็กน้อยด้วยเงานุ่ม ๆ */
.btn { box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    transition: transform .3s, background-color .3s, box-shadow .3s; }
.btn:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.16); }

/* บนอุปกรณ์สัมผัส (ไม่มี hover) ให้โชว์ชื่อผลงานตลอด ไม่งั้นมือถือจะไม่เห็นชื่อเลย */
@media (hover: none) {
    .portfolio-overlay { opacity: 1; transform: none;
        background: linear-gradient(transparent, rgba(0,0,0,0.78)); }
}

/* การ์ดบริการ/ผลงานเด้งรับ-ส่งนุ่มขึ้น */
.service-card { transition: transform .3s, box-shadow .3s; }
.service-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,0.10); }
