@font-face {
    font-family: 'Phetsarath OT';
    src: url('fonts/PhetsarathOT.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Phetsarath OT', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #f0f0f0;
    -webkit-text-size-adjust: 100%;
}

.container {
    background: rgba(245, 245, 245, 0.95);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

h1 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #3a4a6d;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-bottom: 12px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, #3a4a6d, #6b7b9e);
    border-radius: 3px;
}

textarea {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #d1d9e6;
    border-radius: 12px;
    font-family: 'Phetsarath OT', sans-serif;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    resize: none;
    min-height: 140px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #333;
}

textarea:focus {
    border-color: #5a7bc3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 123, 195, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
}

button {
    background-color: #5a7bc3;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    touch-action: manipulation;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    pointer-events: none;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background-color: #6b8ad1;
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button[onclick="clearText()"] {
    background-color: #8a9bb8;
}

button[onclick="clearText()"]:hover {
    background-color: #9aabc8;
}

button[onclick="copyOutput()"] {
    background-color: #7d94b8;
}

button[onclick="copyOutput()"]:hover {
    background-color: #8da4c8;
}

.output {
    margin-top: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    font-family: 'Times New Roman', 'Phetsarath OT', serif;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    word-break: break-word;
    border: 2px solid #e0e6f0;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    min-height: 120px;
    transition: all 0.3s ease;
}

.output:hover {
    border-color: #a8b9d9;
}

#loading {
    font-size: 1rem;
    color: #5a7bc3;
    margin: 15px 0;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.direction-select {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 2px solid #d1d9e6;
    border-radius: 12px;
    font-family: 'Phetsarath OT', sans-serif;
    background: rgba(255, 255, 255, 0.95);
    margin-bottom: 15px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7bc3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #333;
}

.direction-select:focus {
    border-color: #5a7bc3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 123, 195, 0.2);
}

.direction-select option {
    background-color: white;
    color: #333;
    padding: 10px;
}

/* Social Icons Styles */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #e0e6f0;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.social-icon i {
    transition: all 0.3s ease;
}

.social-icon:hover i {
    color: white;
}

/* Facebook specific */
.social-icon.fa-facebook-f:hover {
    background: #3b5998;
}

/* WhatsApp specific */
.social-icon.fa-whatsapp:hover {
    background: #25D366;
}

footer {
    background: transparent; /* ไม่มีพื้นหลัง */
    text-align: center;
    width: 100%;
    padding: 20px 0;
    margin-top: 30px;
    position: relative;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

/* Facebook - สีฟ้า */
.social-icon.facebook {
    background-color: #1877f2; /* สี Facebook หลัก */
}

/* WhatsApp - สีเขียว */
.social-icon.whatsapp {
    background-color: #25d366; /* สี WhatsApp หลัก */
}

/* Info - สีดำ */
.social-icon.info {
    background-color: #000000; /* สีดำ */
}

/* เอฟเฟกต์เมื่อโฮเวอร์ */
.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

footer p {
    color: #ffffff; /* สีขาว */
    font-size: 0.9rem;
    margin: 10px 0 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* เพิ่มเงาเพื่อให้อ่านง่ายบนพื้นหลังต่างๆ */
}

/* สำหรับอุปกรณ์ขนาดเล็ก */
@media (max-width: 480px) {
    footer {
        padding: 15px 0;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* สำหรับอุปกรณ์ขนาดเล็ก */
@media (max-width: 480px) {
    body {
        padding: 15px;
        justify-content: flex-start;
        background: linear-gradient(135deg, #5a7bc3 0%, #3a4a6d 100%);
    }
    
    .container {
        padding: 20px;
        margin-top: 20px;
        border-radius: 14px;
    }
    
    h1 {
        font-size: 1.3rem;
        color: #4a5a7d;
    }
    
    textarea {
        font-size: 0.95rem;
        padding: 12px;
    }
    
    button {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    .output {
        font-size: 1rem;
        padding: 12px;
    }
    
   footer {
    background: transparent; /* ไม่มีพื้นหลัง */
    text-align: center;
    width: 100%;
    padding: 20px 0;
    margin-top: 30px;
    position: relative;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

/* Facebook - สีฟ้า */
.social-icon.facebook {
    background-color: #1877f2; /* สี Facebook หลัก */
}

/* WhatsApp - สีเขียว */
.social-icon.whatsapp {
    background-color: #25d366; /* สี WhatsApp หลัก */
}

/* Info - สีดำ */
.social-icon.info {
    background-color: #000000; /* สีดำ */
}

/* เอฟเฟกต์เมื่อโฮเวอร์ */
.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

footer p {
    color: #666; /* สีเทาเข้ม */
    font-size: 0.9rem;
    margin: 10px 0 0;
}
    
    .direction-select {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .social-icons {
        gap: 15px;
        margin: 10px 0;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
/* เพิ่ม CSS สำหรับลิงก์ About */
.social-icons .about-link {
    color: #000000; /* สีดำ */
    margin: 0 10px;
    font-size: 20px;
    transition: color 0.3s;
}

.social-icons .about-link:hover {
    color: #1a73e8; /* สีน้ำเงินเมื่อโฮเวอร์ */
}
.footer-links {
    margin: 10px 0;
    text-align: center;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    text-decoration: underline;
}
/* ຮູບແບບສຳລັບໜ້າ Ogg */
.content-box {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tech-info {
    background-color: #eef;
    padding: 15px;
    border-left: 4px solid #77f;
    margin-top: 20px;
}

.content-box h2 {
    color: #2a6496;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.content-box ul, .content-box ol {
    margin-left: 20px;
    line-height: 1.6;
}
/* สไตล์ฟอร์มติดต่อ */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: #3a5bd9;
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

.thank-you {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}
/* สไตล์สำหรับส่วนใหม่ */
.testimonials {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.testimonial {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.testimonial .author {
    font-style: italic;
    color: #666;
    text-align: right;
    margin-top: 10px;
}

.business-hours {
    background: #f0f4ff;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}
.social-icon.user {
    background-color: #6c757d;
}

.social-icon.user:hover {
    background-color: #5a6268;
}
