/**
 * dir: assets/css/
 * file: archive-our-service.css
 * Description: Styles for the Our Service Archive page
 */

/* Container */
.service-archive-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Header */
.service-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.cpt-archive-title {
    font-size: 2.8em;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.cpt-archive-desc {
    font-size: 1.1em;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ตัวกรองหมวดหมู่ (Category Filter) */
.service-category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.service-category-filter .filter-btn {
    padding: 10px 22px;
    background-color: #f4f4f4;
    color: #555;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.95em;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.service-category-filter .filter-btn:hover,
.service-category-filter .filter-btn.active {
    background-color: #4CAF50; /* สีเขียวแบรนด์ */
    color: #fff;
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* 🌟 Grid Layout ขั้นเทพ (ออโต้ Responsive) */
.service-archive-grid {
    display: grid;
    /* เวทมนตร์: ถ้าจอกว้างก็เรียง 3-4 ใบ ถ้าจอแคบก็ยุบเหลือ 1 ใบอัตโนมัติ */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px;
    align-items: stretch; /* บังคับให้การ์ดทุกใบในแถวเดียวกันสูงเท่ากัน */
}

/* Pagination (ปุ่มเปลี่ยนหน้า) */
.service-archive-pagination {
    margin-top: 50px;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #eaeaea;
}

.service-archive-pagination .nav-links {
    display: inline-flex;
    gap: 8px;
}

.service-archive-pagination .page-numbers {
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: bold;
}

.service-archive-pagination .page-numbers:hover,
.service-archive-pagination .page-numbers.current {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


/* =========================================
   1. Breadcrumb Navigation (Nav)
   ========================================= */
.cpt-breadcrumb {
    padding: 10px 0 30px;
    font-size: 0.95em;
    color: #666;
}
.cpt-breadcrumb a {
    color: #4CAF50; /* สีแบรนด์ */
    text-decoration: none;
    font-weight: 500;
}
.cpt-breadcrumb a:hover {
    text-decoration: underline;
}
.cpt-breadcrumb .divider {
    margin: 0 8px;
    color: #ccc;
}
.cpt-breadcrumb .current-page {
    color: #222;
    font-weight: bold;
}

/* =========================================
   2. กล่องโปรโมชั่นแบบใหม่ (Split Layout: ซ้ายวิดีโอ - ขวาข้อความ)
   ========================================= */
.category-promo-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* เวทมนตร์: แบ่งครึ่ง 50/50 ซ้าย-ขวา */
    gap: 50px; /* ระยะห่างระหว่างวิดีโอกับข้อความ */
    align-items: center; /* ให้อยู่กึ่งกลางแนวตั้ง */
    background: #fdfdfd;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 40px;
    margin: 0 auto 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 100%;
}

/* หักล้าง Margin ของวิดีโอที่เขียนไว้ในไฟล์ PHP */
.promo-video-col .cpt-video-facade-group {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}

.promo-text-col {
    text-align: left; /* บังคับชิดซ้าย */
}

.promo-text-col .cpt-archive-title {
    text-align: left;
    margin-bottom: 20px;
    font-size: 2.8em; /* ชื่อหมวดหมู่ใหญ่ๆ โดดเด่น */
    color: #222;
}

.promo-text-col .cpt-archive-desc {
    max-width: 100%;
    margin: 0;
    font-size: 1.1em;
    color: #444;
    line-height: 1.8;
}

/* ตกแต่งลิสต์ (Bullet points) ให้เป็น ✅ */
.promo-text-col ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}
.promo-text-col ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
}
.promo-text-col ul li::before {
    content: "✅"; 
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.1em;
}

/* ซ่อนวิดีโอที่ลูกค้าเผลอแปะมาใน Text Editor */
.promo-text-col .wp-video { display: none !important; }

/* =========================================
   3. Responsive: บนมือถือและแท็บเล็ต ให้ยุบมาเรียงบน-ล่าง
   ========================================= */
@media (max-width: 991px) {
    .category-promo-layout {
        grid-template-columns: 1fr; /* ยุบเหลือ 1 คอลัมน์ (วิดีโออยู่บน ข้อความอยู่ล่าง) */
        gap: 30px;
        padding: 30px 20px;
    }
    .promo-text-col .cpt-archive-title {
        font-size: 2.2em;
    }
}