@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Prompt', sans-serif; }
body { background-color: #f8fafc; color: #1e293b; line-height: 1.7; scroll-behavior: smooth; }

/* Navbar */
header { background: #fff; padding: 15px 5%; box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; }
header h1 { font-size: 1.8rem; color: #0f172a; font-weight: 700; }
header h1 span { color: #2563eb; }
nav a { margin-left: 25px; text-decoration: none; color: #64748b; font-weight: 500; transition: 0.3s; }
nav a:hover, nav a.active { color: #2563eb; }

/* Contact Bar (Top) */
.top-contact-bar { background: #0f172a; color: white; padding: 10px 5%; display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 300; }
.top-contact-bar a { color: #60a5fa; text-decoration: none; margin-left: 15px; font-weight: 500; }

/* Floating Action Button (NEW) */
.floating-contact { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 1000; }
.float-btn { padding: 12px 20px; border-radius: 50px; color: white; text-decoration: none; font-weight: 600; box-shadow: 0 8px 15px rgba(0,0,0,0.2); transition: 0.3s; text-align: center; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.phone-btn { background: #0f172a; border: 2px solid white; }
.line-btn { background: #00b900; border: 2px solid white; }
.float-btn:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 12px 20px rgba(0,0,0,0.3); color: white; }

/* Hero Section */
.hero { display: flex; align-items: center; justify-content: center; text-align: center; padding: 120px 20px; background: linear-gradient(rgba(15,23,42,0.85), rgba(15,23,42,0.7)), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&q=80') center/cover fixed; color: white; }
.hero-content { max-width: 900px; }
.hero h2 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 700; text-shadow: 0 4px 10px rgba(0,0,0,0.5); line-height: 1.2; }
.hero p { font-size: 1.3rem; color: #e2e8f0; margin-bottom: 30px; font-weight: 300; }
.btn { background: #2563eb; color: white; padding: 15px 40px; text-decoration: none; border-radius: 50px; font-weight: 600; font-size: 1.1rem; display: inline-block; transition: all 0.3s ease; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(37,99,235,0.3); }
.history-btn { background-color: #FFFAFA; color: #0000CD; margin: 15px 0; border-radius: 20px; padding: 6px 40px; font-weight: 500; display: inline-block; transition: all 0.3 ease; cursor: pointer; }
.history-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(37,99,253,0.5); }
.btn:hover { background: #1d4ed8; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(37,99,235,0.5); }

/* Animation (NEW) */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 1s ease-out forwards; }

/* Layouts */
.section { padding: 90px 5%; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2.5rem; color: #0f172a; margin-bottom: 15px; font-weight: 700; }
.section-subtitle { text-align: center; color: #64748b; margin-bottom: 50px; font-size: 1.1rem; }

/* Glass Aluminum Focus */
.glass-focus { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-bottom: 40px; }
.glass-focus img { width: 100%; border-radius: 15px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); transition: 0.3s; }
.glass-focus img:hover { transform: scale(1.02); }
.glass-features { list-style: none; margin-top: 20px; }
.glass-features li { padding: 15px; background: #fff; margin-bottom: 15px; border-radius: 8px; border-left: 4px solid #2563eb; box-shadow: 0 4px 6px rgba(0,0,0,0.02); font-weight: 500; transition: 0.3s; }
.glass-features li:hover { transform: translateX(10px); background: #f8fafc; }

/* Other Services Grid */
.grid-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: white; padding: 40px 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); transition: all 0.4s ease; border-top: 4px solid transparent; position: relative; overflow: hidden; }
.card::after { content: '→'; position: absolute; bottom: 20px; right: 30px; opacity: 0; font-size: 1.5rem; color: #2563eb; transition: 0.4s; transform: translateX(-20px); }
.card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-top-color: #2563eb; }
.card:hover::after { opacity: 1; transform: translateX(0); }
.card h3 { color: #0f172a; font-size: 1.4rem; margin-bottom: 15px; }

/* Step Process Grid (NEW) */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.step-card { background: white; padding: 30px 20px; border-radius: 15px; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.05); position: relative; margin-top: 20px; }
.step-number { width: 50px; height: 50px; background: #2563eb; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; position: absolute; top: -25px; left: 50%; transform: translateX(-50%); border: 5px solid #e0f2fe; }
.step-card h3 { margin-top: 15px; margin-bottom: 10px; color: #0f172a; font-size: 1.2rem; }
.step-card p { font-size: 0.95rem; color: #64748b; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.gallery img { width: 100%; height: 280px; object-fit: cover; border-radius: 12px; transition: 0.4s; cursor: pointer; }
.gallery img:hover { transform: scale(1.03); box-shadow: 0 15px 30px rgba(0,0,0,0.15); filter: brightness(1.1); }

/* Lightbox (NEW) */
.lightbox { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(15,23,42,0.95); justify-content: center; align-items: center; flex-direction: column; }
.lightbox-content { max-width: 90%; max-height: 80vh; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); animation: fadeInUp 0.3s ease; }
.close-lightbox { position: absolute; top: 20px; right: 40px; color: white; font-size: 40px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.close-lightbox:hover { color: #cbd5e1; transform: scale(1.1); }

/* Premium Reviews */
.reviews-section { background: #0f172a; color: white; padding: 100px 5%; text-align: center; }
.reviews-section .section-title { color: white; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.review-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 40px; border-radius: 15px; position: relative; text-align: left; transition: 0.3s; }
.review-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }
.review-card::before { content: '“'; font-size: 5rem; position: absolute; top: -10px; left: 20px; color: #2563eb; opacity: 0.5; font-family: serif; }
.review-card p { font-size: 1.15rem; font-style: italic; color: #e2e8f0; margin-bottom: 20px; position: relative; z-index: 2; line-height: 1.8; }
.review-card h4 { color: #fff; font-size: 1.2rem; display: flex; align-items: center; }
.review-card h4::before { content: '⭐'; margin-right: 10px; }

/* FAQ Container (NEW) */
.faq-container { display: flex; flex-direction: column; gap: 15px; }
.faq-item { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px 20px; cursor: pointer; transition: 0.3s; }
.faq-item:hover { border-color: #94a3b8; }
.faq-item summary { font-size: 1.1rem; font-weight: 600; color: #0f172a; outline: none; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: #2563eb; font-size: 1.5rem; transition: 0.3s; }
.faq-item[open] summary::after { content: '-'; }
.faq-item p { margin-top: 15px; padding-top: 15px; border-top: 1px dashed #e2e8f0; color: #64748b; font-size: 1rem; line-height: 1.6; }

/* Contact Form & Footer */
.form-container { background: white; padding: 50px; border-radius: 15px; box-shadow: 0 15px 40px rgba(0,0,0,0.06); }
.form-group { margin-bottom: 20px; }
.form-group input, .form-group textarea { width: 100%; padding: 15px; border: 1px solid #cbd5e0; border-radius: 8px; font-size: 1rem; outline: none; background: #f8fafc; transition: 0.3s; }
.form-group input:focus, .form-group textarea:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

footer { text-align: center; padding: 30px; background: #020617; color: #64748b; }

/* Admin Table */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: white; }
.admin-table th, .admin-table td { padding: 15px; border: 1px solid #e2e8f0; text-align: left; }
.admin-table th { background: #0f172a; color: white; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.stat-box { background: white; padding: 30px; border-radius: 10px; border-left: 5px solid #2563eb; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.stat-box h2 { font-size: 2.5rem; color: #0f172a; }
/* =========================================
   UI Upgrades (Toast, BackToTop, Filter)
========================================= */

/* Toast Notification (แจ้งเตือน Pop-up) */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #10b981;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
}
.toast.show { visibility: visible; opacity: 1; bottom: 50px; }

.back-to-top {
    display: none;
    position: fixed;
    bottom: 160px; /* 🚀 ขยับขึ้นไปข้างบนให้พ้นความสูงของปุ่มไลน์ */
    right: 25px;
    z-index: 999; /* 🚀 ปรับเพิ่มเป็น 1005 (เดิม 999) เพื่อให้อยู่ข้างหน้ากล่องติดต่อที่มีค่า 1000 */
    border: none;
    outline: none;
    background-color: #0f172a;
    color: white;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: 0.3s;
}
.back-to-top:hover { background-color: #2563eb; transform: translateY(-3px); }
/* Portfolio Filter Buttons */
.portfolio-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}
.filter-btn {
    padding: 8px 20px;
    border: 1px solid #cbd5e0;
    background: white;
    color: #64748b;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: 0.3s;
    font-weight: 500;
}
.filter-btn:hover, .filter-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37,99,235,0.2);
}

/* ป้ายลูกค้ายืนยันแล้ว (Verified Badge) */
.verified-badge {
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 10px;
    font-family: sans-serif;
    border: 1px solid rgba(16, 185, 129, 0.4);
    display: inline-block;
}

/* --- ปรับแต่งสำหรับมือถือ (Mobile Responsive) --- */
@media (max-width: 768px) {
    .hero { padding: 80px 20px !important; }
    .hero h2 { font-size: 2rem !important; }
    .glass-focus, .stat-grid, #contact > div { grid-template-columns: 1fr !important; gap: 30px !important; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-table { font-size: 14px; min-width: 600px; }
    .form-container { padding: 30px !important; }
    .gallery { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
    .review-grid { grid-template-columns: 1fr !important; }
    .floating-contact { bottom: 15px; right: 15px; }
    .float-btn { padding: 10px 15px; font-size: 0.85rem; }
	.text-top { display:flex; flex-wrap: nowrap; padding: 0.9rem; }	
	
	.back-to-top {
        bottom: 25px !important;   /* ปรับระดับความสูงจากขอบล่างให้พอดีนิ้วกด */
        left: 20px !important;     /* 🚀 ย้ายมาฝั่งซ้าย เพื่อไม่ให้ชนกับกลุ่มปุ่มไลน์/โทรศัพท์ที่อยู่ฝั่งขวา */
        right: auto !important;    /* ล้างค่าฝั่งขวาเดิมออก */
        z-index: 999 !important;  /* มั่นใจได้ว่าอยู่หน้าสุด ไม่โดนพื้นหลังบัง*/
        opacity: 0.5;
    }
}

