.code { color: #e83e8c; }
.form-group label { text-align:left; }
#mainMenu nav>ul>li>a  { font-size:18px; }
.mfp-title { font-size:20px; text-align:center; }
.programmer { float:right; padding:0 10px 10px 10px; }
#form-contact-submit { font-size:16px; padding:15px; }
#about h2,#about p { color:#FFF; }
.image-hover-zoom { cursor:pointer; }
.post-content img { object-fit: cover; }
.btn-glow {
    position: relative;
    background: linear-gradient(135deg, #28a745, #00ff88);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(40,167,69,0.4);
    overflow: hidden;
}

/* hover เด้ง */
.btn-glow:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(40,167,69,0.6);
}

/* glow pulse */
.btn-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: rgba(0,255,136,0.5);
    animation: pulseGlow 1.8s infinite;
    z-index: -1;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    70% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* กระพริบเบา ๆ */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.btn-glow {
    animation: blink 2s infinite;
}
/* --- Wrapper ของ form-floating --- */
.form-floating {
    position: relative;
    transition: all 0.3s ease;
}
.line-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    z-index: 9999;
    transition: 0.3s ease;
}

.line-float:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.line-icon {
    width: 28px;
    height: 28px;
}

/* Pulse */
.line-float::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(6,199,85,0.4);
    animation: pulse 2s infinite;
    z-index: -1;
}

/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Sarabun', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ปุ่มเปิดแชท */
.chat-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chat-icon {
    font-size: 28px;
    color: white;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* หน้าต่างแชท */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

/* Header */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-title {
    font-weight: bold;
    font-size: 16px;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.2s;
}

.chat-close:hover {
    transform: scale(1.1);
}

/* พื้นที่แสดงข้อความ */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.message.user {
    align-items: flex-end;
    margin-left: auto;
}

.message.assistant {
    align-items: flex-start;
    margin-right: auto;
}

.message-content {
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 14px;
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    padding: 0 5px;
}

/* พื้นที่พิมพ์ข้อความ */
.chat-input-area {
    border-top: 1px solid #e0e0e0;
    background: white;
    padding: 10px 15px;
}

.typing-indicator {
    font-size: 12px;
    color: #667eea;
    margin-bottom: 8px;
    padding-left: 5px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-widget {
    bottom: 80px;
    right: 20px;
}

#chatInput {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#chatInput:focus {
    border-color: #667eea;
}

.send-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.send-button:hover {
    transform: scale(1.05);
}

.send-button svg {
    color: white;
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        right: -10px;
        bottom: 70px;
    }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { opacity: 0; }
}

.line-float::after {
    content: "แชท LINE";
    position: absolute;
    left: 70px;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    transition: 0.3s;
    white-space: nowrap;
}

.line-float:hover::after {
    opacity: 1;
}

ul li, p { font-size:1.2rem !important; color:#111; }

.post-content { padding:0; }

.post-content dl,.post-content  ol,.post-content  ul { margin-left:30px !important; }

/* --- Input styling --- */
.form-floating > .form-control {
    height: 58px;
    padding: 1rem 1rem 0.25rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: none;
    transition:
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

/* --- Floating label --- */
.form-floating > label {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 400;
    padding: 1rem;
    transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    color 0.25s ease,
    font-size 0.25s ease;
}

/* --- Focus state --- */
.form-floating > .form-control:focus {
    background: #fff;
    border-color: #6366f1;
    box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.12),
    0 4px 16px rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
    outline: none;
    border-radius: 10px;
}

.form-floating > .form-control:focus ~ label {
    color: #6366f1;
}

/* --- Valid state --- */
.form-floating > .form-control.is-valid {
    border-color: #10b981;
    background: #f0fdf4;
    background-image: none; /* ซ่อน icon bootstrap default */
    padding-right: 1rem;
}

.form-floating > .form-control.is-valid:focus {
    background: #fff;
    border-color: #10b981;
    box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.12),
    0 4px 16px rgba(16, 185, 129, 0.08);
}

.form-floating > .form-control.is-valid ~ label {
    color: #10b981;
}

/* --- Invalid state --- */
.form-floating > .form-control.is-invalid {
    border-color: #f43f5e;
    background: #fff1f2;
    background-image: none;
    padding-right: 1rem;
}

.form-floating > .form-control.is-invalid:focus {
    box-shadow:
    0 0 0 4px rgba(244, 63, 94, 0.12),
    0 4px 16px rgba(244, 63, 94, 0.08);
}

.form-floating > .form-control.is-invalid ~ label {
    color: #f43f5e;
}

/* --- Hover (ยังไม่ focus) --- */
.form-floating > .form-control:not(:focus):hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

/* --- Checkmark icon สำหรับ valid --- */
.form-floating > .form-control.is-valid + label::after,
.form-floating > .form-control.is-valid ~ label::after {
    content: " ✓";
    font-size: 0.75rem;
    color: #10b981;
}

/* --- Fade-in animation เมื่อ component โหลด --- */
.form-floating {
    animation: fadeSlideUp 0.5s ease both;
}

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

/* --- Shake animation สำหรับ invalid --- */
.form-floating > .form-control.is-invalid {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* ===== END CSS ===== */

select.form-control:not([size]):not([multiple]) {
    height: 59px;
}
@media (max-width: 780px) {
    .slide-captions .text-dark.fadeInUp { display: none; }
}
@media (max-width: 768px) {
    h2.text-dark.fadeInUp {
        font-size: 1.4rem !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 480px) {
    h2.text-dark.fadeInUp {
        font-size: 1.2rem !important;
        line-height: 1.6 !important;
    }
}

.pricing-table .plan-list ul { display:block; line-height: 32px; font-size:16px; }
input:not([type=checkbox]):not([type=radio]), select { font-size:inherit; }
#header #header-wrap #logo a, #header #header-wrap #logo a span, #header .header-inner #logo a, #header .header-inner #logo a span { font-family:Poppins,sans-serif; }