/* วิธีที่ 1: Aspect Ratio Container */
        .video-container {
            position: relative;
            width: 100%;
            height: 0;
            padding-bottom: 56.25%; /* อัตราส่วน 16:9 */
            margin-bottom: 30px;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .video-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

        /* วิธีที่ 2: CSS Modern Aspect Ratio */
        .video-modern {
            width: 100%;
            aspect-ratio: 16 / 9;
            margin-bottom: 30px;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .video-modern iframe {
            width: 100%;
            height: 100%;
            border: none;
        }

        /* วิธีที่ 3: Flexible with max-width */
        .video-flexible {
            max-width: 800px;
            margin: 0 auto 30px;
            position: relative;
            width: 100%;
            height: 0;
            padding-bottom: 56.25%;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .video-flexible iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

/* เพิ่มใน CSS */
html {
    scroll-behavior: smooth;
}

/* หรือถ้าต้องการควบคุมมากขึ้น */
a[href^="#"] {
    scroll-behavior: smooth;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 1);
    display: none; /* หรือ flex เมื่อเปิด */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-content {
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
    position: relative;
}

        .modal-header {
            text-align: center;
            margin-bottom: 25px;
            border-bottom: 2px solid #f0f0f0;
            padding-bottom: 15px;
        }

        .modal-header h2 {
            color: #333;
            margin: 0;
            font-size: 28px;
        }

        .close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #666;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .close-btn:hover {
            color: #333;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-row {
            display: flex;
            gap: 15px;
        }

        .form-row .form-group {
            flex: 1;
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #333;
        }

        input[type="text"],
        input[type="email"],
        input[type="tel"],
        textarea,
        select {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
            transition: border-color 0.3s;
            box-sizing: border-box;
			color: #000000;
        }

        input:focus,
        textarea:focus,
        select:focus {
            outline: none;
            border-color: #007bff;
        }

        .checkbox-group {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 5px;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
            padding: 10px;
            border: 2px solid #ddd;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .checkbox-item:hover {
            background-color: #f8f9fa;
        }

        .checkbox-item input[type="checkbox"] {
            margin-right: 8px;
            transform: scale(1.2);
        }

        .checkbox-item input[type="checkbox"]:checked + span {
            color: #007bff;
            font-weight: bold;
        }

        .checkbox-item:has(input:checked) {
            border-color: #007bff;
            background-color: #e3f2fd;
        }

        textarea {
            resize: vertical;
            min-height: 100px;
        }

        .btn-group {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 25px;
        }

        .btn {
            padding: 12px 30px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.3s;
        }

        .btn-primary {
            background-color: #007bff;
            color: white;
        }

        .btn-primary:hover {
            background-color: #0056b3;
        }

        .btn-secondary {
            background-color: #6c757d;
            color: white;
        }

        .btn-secondary:hover {
            background-color: #545b62;
        }

        .btn:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }

        .error {
            color: #dc3545;
            font-size: 14px;
            margin-top: 5px;
            display: block;
        }

        .success {
            background-color: #d4edda;
            color: #155724;
            padding: 15px;
            border: 1px solid #c3e6cb;
            border-radius: 5px;
            margin-top: 15px;
        }

        .success h4 {
            margin: 0 0 10px 0;
        }

        /* Open Modal Button */
        .open-modal-btn {
            background-color: #28a745;
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 5px;
            font-size: 18px;
            cursor: pointer;
            margin: 20px;
        }

        .open-modal-btn:hover {
            background-color: #218838;
        }

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

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

        /* Responsive */
        @media (max-width: 768px) {
            .form-row {
                flex-direction: column;
                gap: 0;
            }

            .checkbox-group {
                grid-template-columns: 1fr;
            }

            .modal-content {
                padding: 20px;
                margin: 10px;
            }
        }

        /* Image Modal Styles */
        #imageModal .modal-container {
            background: transparent;
            max-width: 95%;
            max-height: 95%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        #imageModal .modal-content {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100%;
        }

        #imageModal img {
            max-width: 90vw;
            max-height: 90vh;
            width: auto;
            height: auto;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
            object-fit: contain;
        }

        #imageModal .close-btn {
            background: rgba(0, 0, 0, 0.7);
            color: white;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
    }
}
        /* ปุ่ม Chat แบบ Modern */
        .messenger-widget {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 999999;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .messenger-toggle {
            width: 64px;
            height: 64px;
            background: linear-gradient(135deg, #0084ff 0%, #44bdf5 100%);
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 24px rgba(0, 132, 255, 0.4);
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            position: relative;
            overflow: hidden;
        }

        .messenger-toggle:hover {
            transform: scale(1.05) translateY(-2px);
            box-shadow: 0 12px 32px rgba(0, 132, 255, 0.5);
        }

        .messenger-toggle:active {
            transform: scale(0.95);
        }

        .messenger-icon {
            width: 28px;
            height: 28px;
            fill: white;
            transition: transform 0.3s ease;
        }

        .messenger-toggle:hover .messenger-icon {
            transform: scale(1.1);
        }

        /* Badge แจ้งเตือน */
        .notification-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 20px;
            height: 20px;
            background: #ff4757;
            border: 2px solid white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: bold;
            color: white;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        /* พื้นหลังมืดเมื่อเปิด chat */
        .messenger-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.3);
            z-index: 999998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .messenger-backdrop.active {
            opacity: 1;
            visibility: visible;
        }

        /* หน้าต่าง Chat */
        .messenger-window {
            position: fixed;
            bottom: 100px;
            right: 24px;
            width: 380px;
            height: 580px;
            background: white;
            border-radius: 20px;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
            opacity: 0;
            visibility: hidden;
            transform: translateY(40px) scale(0.9);
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            overflow: hidden;
            z-index: 999999;
        }

        .messenger-window.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        /* Header ของ Chat */
        .messenger-header {
            background: linear-gradient(135deg, #0084ff 0%, #44bdf5 100%);
            padding: 20px;
            color: white;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .messenger-header h3 {
            font-size: 18px;
            font-weight: 600;
        }

        .messenger-header p {
            font-size: 14px;
            opacity: 0.9;
            margin-top: 4px;
        }

        .close-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s ease;
        }

        .close-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .close-icon {
            width: 16px;
            height: 16px;
            fill: white;
        }

        /* เนื้อหา Chat */
        .messenger-body {
            height: calc(100% - 80px);
            display: flex;
            flex-direction: column;
        }

        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
        }

        .welcome-message {
            text-align: center;
            padding: 40px 20px;
        }

        .welcome-message h4 {
            color: #333;
            font-size: 20px;
            margin-bottom: 12px;
        }

        .welcome-message p {
            color: #666;
            font-size: 14px;
            line-height: 1.5;
            margin-bottom: 24px;
        }

        .chat-options {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .chat-option {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 12px;
            padding: 16px;
            text-decoration: none;
            color: #333;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .chat-option:hover {
            background: #0084ff;
            color: white;
            transform: translateX(4px);
        }

        .option-icon {
            width: 24px;
            height: 24px;
            fill: currentColor;
        }

        /* สำหรับ Mobile */
        @media (max-width: 768px) {
            .messenger-widget {
                bottom: 20px;
                right: 20px;
            }

            .messenger-window {
                bottom: 90px;
                right: 20px;
                left: 20px;
                width: auto;
                height: 500px;
            }

            .messenger-toggle {
                width: 56px;
                height: 56px;
            }

            .messenger-icon {
                width: 24px;
                height: 24px;
            }
        }

        /* เนื้อหาตัวอย่าง */
        .demo-content {
            min-height: 100vh;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            text-align: center;
            padding: 20px;
        }

        .demo-content h1 {
            font-size: 3rem;
            margin-bottom: 20px;
        }

        .demo-content p {
            font-size: 1.2rem;
            opacity: 0.9;
        }