       
       /*Filter styles*/
       .colored-image {
            background-image: url("http://127.0.0.1/assets/img/check_circle_icon.png");
            width: 56px;
            height: 56px;
            display: block;
            margin-bottom: 0.5rem;
            margin-left: auto;
            margin-right: auto;
            filter: brightness(0) saturate(100%) invert(57%) sepia(94%) saturate(549%) hue-rotate(71deg) brightness(106%) contrast(90%);     
        }
        .icon-green {
           display:block;
           margin-left: auto;
            margin-right: auto;
            margin-bottom: 0.5rem;
            width: 58px;
            height: 58px;

            background-color: limegreen; /* สีเขียวสว่าง */
            -webkit-mask-image: url('/assets/img/check_circle_icon.png');
            -webkit-mask-repeat: no-repeat;
            -webkit-mask-size: contain;
            -webkit-mask-position: center;

            mask-image: url('/assets/img/check_circle_icon.png');
            mask-repeat: no-repeat;
            mask-size: contain;
            mask-position: center;

            background-repeat: no-repeat;
            background-size: contain;
        }
       /* Stats Section */
       .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 2rem;
            margin-top: 4rem;
        }

        .stat-item {
            text-align: center;
            padding: 1rem;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
        }

        .stat-item:hover {
            transform: translateY(-10px);
        }

        .stat-number {
            font-size: 2.5rem;
            font-weight: 800;
            display: block;
            margin-bottom: 0.5rem;
        }

        .stat-label {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        /* Filter Section */
        .filter-section {
            padding: 4rem 0 2rem;
            background: var(--light);
            position: sticky;
            top: 78px;
            z-index: 100;
            box-shadow: var(--shadow-light);
        }

        [data-theme="dark"] .filter-section {
            background: #1e293b;
        }

        .filter-controls {
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
            margin-bottom: 2rem;
        }

        .filter-btn {
            background: transparent;
            border: 2px solid #e2e8f0;
            color: var(--dark);
            padding: 0.75rem 1.5rem;
            border-radius: 25px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .filter-btn.active,
        .filter-btn:hover {
            background: var(--gradient-premium);
            color: var(--light);
            border-color: transparent;
            transform: translateY(-2px);
            box-shadow: var(--shadow-light);
        }

        .search-box {
            max-width: 400px;
            margin: 0 auto;
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 1rem 1.25rem 1rem 3rem;
            border: 2px solid #e2e8f0;
            border-radius: 25px;
            font-size: 1rem;
            background: var(--light);
            transition: all 0.3s ease;
        }

        [data-theme="dark"] .search-input {
            background: #334155;
            border-color: #475569;
            color: white;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .search-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: #64748b;
            font-size: 1.1rem;
        }

        /* Portfolio Grid */
        .portfolio {
            padding: 4rem 0;
            background: linear-gradient(45deg, #f8fafc 0%, #e2e8f0 100%);
        }

        [data-theme="dark"] .portfolio {
            background: linear-gradient(45deg, #0f172a 0%, #1e293b 100%);
        }

        .section-title {
            text-align: center;
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 1rem;
            color: var(--dark);
            letter-spacing: -0.02em;
        }

        .section-subtitle {
            text-align: center;
            font-size: 1.2rem;
            color: #64748b;
            margin-bottom: 4rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 2rem;
            margin-bottom: 4rem;
        }

        .portfolio-card {
            background: white;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: var(--shadow-light);
            transition: all 0.4s ease;
            cursor: pointer;
            position: relative;
            border: 1px solid rgba(226, 232, 240, 0.5);
        }

        [data-theme="dark"] .portfolio-card {
            background: #334155;
            border-color: rgba(71, 85, 105, 0.5);
        }

        .portfolio-card:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-heavy);
        }

        .card-image {
            height: 200px;
            background: linear-gradient(45deg, #667eea, #764ba2);
            position: relative;
            overflow: hidden;
        }

        .card-image::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="1" fill="rgba(255,255,255,0.2)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
        }

        .card-category {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: rgba(255, 255, 255, 0.9);
            color: var(--primary);
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            backdrop-filter: blur(10px);
        }

        .card-content {
            padding: 2rem;
        }

        .card-title {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 0.75rem;
            color: var(--dark);
            line-height: 1.3;
        }

        .card-description {
            color: #64748b;
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }

        .card-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .tag {
            background: #f1f5f9;
            color: #475569;
            padding: 0.25rem 0.75rem;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        [data-theme="dark"] .tag {
            background: #475569;
            color: #e2e8f0;
        }

        .card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .client-logo {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--gradient-1);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 0.9rem;
        }

        .view-details {
            color: var(--primary);
            font-weight: 600;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
        }

        .view-details:hover {
            transform: translateX(5px);
        }

        /* Testimonials */
        .testimonials {
            padding: 6rem 0;
            background: white;
        }

        [data-theme="dark"] .testimonials {
            background: #1e293b;
        }

        .testimonials-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 2rem;
        }

        .testimonial-card {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            padding: 2rem;
            border-radius: 20px;
            border-left: 4px solid var(--primary);
            transition: all 0.3s ease;
            position: relative;
        }

        [data-theme="dark"] .testimonial-card {
            background: linear-gradient(135deg, #334155 0%, #475569 100%);
        }

        .testimonial-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-medium);
        }

        .testimonial-quote {
            font-size: 1.1rem;
            line-height: 1.7;
            margin-bottom: 1.5rem;
            font-style: italic;
            color: var(--dark);
        }

        .testimonial-author {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .author-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--gradient-premium);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
        }

        .author-info h4 {
            font-weight: 600;
            color: var(--dark);
        }

        .author-info p {
            color: #64748b;
            font-size: 0.9rem;
        }

        /* Gallery */
        .gallery {
            padding: 6rem 0;
            background: linear-gradient(45deg, #f8fafc 0%, #e2e8f0 100%);
        }

        [data-theme="dark"] .gallery {
            background: linear-gradient(45deg, #0f172a 0%, #1e293b 100%);
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1rem;
        }

        .gallery-item {
            aspect-ratio: 16/10;
            border-radius: 12px;
            overflow: hidden;
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
            background: var(--gradient-1);
        }

        .gallery-item:hover {
            transform: scale(1.02);
            box-shadow: var(--shadow-medium);
        }

        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.8));
            color: white;
            padding: 2rem 1rem 1rem;
            transform: translateY(100%);
            transition: all 0.3s ease;
        }

        .gallery-item:hover .gallery-overlay {
            transform: translateY(0);
        }


        /* Responsive Design */
        @media (max-width: 768px) {
            .portfolio-grid {
                grid-template-columns: 1fr;
            }

            .filter-controls {
                gap: 0.5rem;
            }

            .filter-btn {
                padding: 0.5rem 1rem;
                font-size: 0.9rem;
            }

            .cta-content h2 {
                font-size: 2rem;
            }

            .footer-grid {
                grid-template-columns: 1fr 1fr;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

        }

        @media (max-width: 480px) {
            .portfolio-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            .portfolio-card {
                margin: 0 0.5rem;
            }

            .footer-grid {
                grid-template-columns: 1fr;
            }

            .cta-buttons {
                flex-direction: column;
                align-items: center;
            }

            .testimonials-grid {
                grid-template-columns: 1fr;
            }

            .gallery-grid {
                grid-template-columns: 1fr;
            }
        }
		
		
		
/* --- Modal Styles --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    animation: fadeIn 0.3s forwards; /* Add fade-in animation */
    padding: 20px; /* Add some padding to prevent modal from touching screen edges on small devices */
    box-sizing: border-box; /* Include padding in element's total width and height */
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    width: 90%; /* Increase width for better responsiveness on medium screens */
    max-width: 768px; /* **ปรับลด:** ลด Max width ลงให้ดูไม่ใหญ่เกินไป */
    position: relative;
    animation: slideInTop 0.4s forwards; /* Add slide-in animation */
    max-height: 90vh; /* Max height of modal content */
    overflow-y: auto; /* Enable scrolling within modal content */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 25px;
    transition: 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
}

.modal-body {
    padding-top: 20px;
}

/* --- Heading Styles (ตามมาตรฐานที่คุณให้มา) --- */
#modal-title { /* ใช้เป็น <h2> ตาม HTML */
    font-size: 28px; /* 24-32px, เลือก 28px */
    font-weight: 600; /* 600-700, เลือก 600 */
    margin-bottom: 15px;
    color: #333;
}

/* หากคุณมีหัวข้ออื่นๆ ใน Modal สามารถเพิ่มได้ตามตาราง เช่น <h3>, <h4> */
/*
.modal-body h3 {
    font-size: 20px;
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #444;
}
*/

.modal-body p { /* สำหรับข้อความเนื้อหาทั่วไป */
    font-size: 16px; /* สำหรับข้อความเนื้อหาทั่วไป (ปกติ 16px เป็นค่าที่ดี) */
    line-height: 1.6;
    margin-bottom: 15px;
    color: #555;
    font-weight: 400; /* น้ำหนักตัวอักษรปกติ */
}

#modal-tags {
    margin-top: 15px; /* เพิ่มระยะห่างด้านบน */
    margin-bottom: 15px; /* เพิ่มระยะห่างด้านล่าง */
}

#modal-tags .tag {
    display: inline-block;
    background-color: #e0e0e0;
    color: #555;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em; /* ยังคงเป็น 0.9em (ประมาณ 14.4px) ซึ่งอยู่ในช่วง 14-16px */
    margin-right: 8px;
    margin-bottom: 8px;
    font-weight: 500; /* ปรับน้ำหนักตัวอักษรให้ดูเด่นขึ้นเล็กน้อย */
}

#modal-client-logo {
    margin-top: 20px; /* เพิ่มระยะห่างด้านบน */
    margin-bottom: 20px; /* เพิ่มระยะห่างด้านล่าง */
    text-align: center; /* จัดให้โลโก้อยู่ตรงกลาง (ถ้าไม่ได้ใช้ flexbox หรือ grid) */
}

#modal-client-logo img {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
    /* margin-top และ margin-bottom ถูกย้ายไปที่ #modal-client-logo แล้ว */
}

#modal-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* เพิ่มระยะห่างระหว่างรูปภาพ */
    margin-top: 20px;
}

#modal-images img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Animations (unchanged) */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInTop {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
    #modal-title { /* ปรับขนาด h2 สำหรับ mobile */
        font-size: 24px; 
    }
    .modal-body p { /* ปรับขนาด p สำหรับ mobile */
        font-size: 15px; 
    }
}

@media (max-width: 480px) { /* สำหรับมือถือที่เล็กมากๆ */
    .modal-content {
        padding: 15px;
        margin: 10px auto;
    }
    #modal-title {
        font-size: 22px;
    }
    .modal-body p {
        font-size: 14px;
    }
    #modal-tags .tag {
        font-size: 0.8em; /* เล็กขึ้นเล็กน้อย */
        padding: 4px 8px;
    }
}

/* --- Common Card Image Styles --- */
.portfolio-card .card-image {
    position: relative; /* สำคัญมาก: กำหนดให้เป็น context สำหรับ absolute positioning ของ child elements */
    height: 200px; /* กำหนดความสูงที่แน่นอนของการ์ดอิมเมจ (ปรับได้ตามต้องการ) */
    overflow: hidden; /* ซ่อนส่วนเกินของรูปภาพหรือเนื้อหา */
    display: flex; /* ใช้ flexbox เพื่อช่วยในการจัดองค์ประกอบเมื่อไม่มีรูปภาพ */
    align-items: center; /* จัดให้อยู่กึ่งกลางในแนวตั้ง (เมื่อไม่มีรูปภาพ) */
    justify-content: center; /* จัดให้อยู่กึ่งกลางในแนวนอน (เมื่อไม่มีรูปภาพ) */
    background-size: cover; /* เพื่อให้ background_style (ถ้าเป็นรูปภาพ) เต็มพื้นที่ */
    background-position: center; /* จัดกึ่งกลาง background image */
}

/* Styles for the client logo image inside card-image */
.portfolio-card .card-image .card-client-logo-img {
    position: absolute; /* วางตำแหน่งแบบสัมบูรณ์เทียบกับ .card-image */
    top: 0;
    left: 0;
    width: 100%; /* ทำให้รูปภาพเต็มความกว้างของ .card-image */
    height: 100%; /* ทำให้รูปภาพเต็มความสูงของ .card-image */
    object-fit: cover; /* **สำคัญ:** ทำให้รูปภาพ Fill เต็มพื้นที่โดยอาจมีการ crop บางส่วน */
    /* ถ้าคุณต้องการให้รูปแสดงเต็มตัวเสมอแม้มีขอบว่าง ให้ใช้ object-fit: contain; แทน */
    /* background-color: transparent; */ /* ไม่จำเป็นถ้า object-fit: cover; */
    z-index: 1; /* วางรูปภาพไว้ใต้ category */
    /* ลบ padding ออกจากที่นี่ */
}

/* Styles for the category text, always visible on top */
.portfolio-card .card-image .card-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 2; /* **สำคัญ:** วาง category ไว้บนรูปภาพโลโก้ */
}

