/* CSS สำหรับหน้าติดต่อ (contact.css) */

/* Hero Banner Styles */
.contact-hero {
    position: relative;
    width: 100%;
    height: 300px;
    background-image: url('assets/icon/wallpaper.png');
    background-size: cover;
    background-position: center;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.contact-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    width: 80%;
}

.contact-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.contact-hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Contact Section Styles */
.contact-section {
    margin-bottom: 4rem;
}

.contact-container {
    display: flex;
    gap: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.contact-info {
    width: 40%;
    padding: 2rem;
    background-color: #FF8C00;
    color: white;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.contact-info h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: white;
}

.info-item {
    display: flex;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.info-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-content p {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

/* Social Media */
.social-media {
    margin-top: 2rem;
}

.social-media h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: white;
    color: #FF8C00;
    transform: translateY(-3px);
}

/* Contact Form Styles */
.contact-form-container {
    width: 60%;
    padding: 2rem;
}

.contact-form-container h2 {
    font-size: 2rem;
    color: #8B4513;
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.contact-form-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #FF8C00;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #FF8C00;
    outline: none;
}

.submit-btn {
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background-color: #8B4513;
    transform: translateY(-3px);
}

/* Map Section Styles */
.map-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.2rem;
    color: #8B4513;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.directions {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.directions h3 {
    font-size: 1.5rem;
    color: #8B4513;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.direction-items {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.direction-item {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: flex-start;
}

.direction-icon {
    margin-right: 1rem;
    width: 50px;
    height: 50px;
    background-color: #FF8C00;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.direction-content h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.direction-content p {
    line-height: 1.6;
    color: #555;
}

/* Customer Service Section */
.customer-service {
    margin-bottom: 4rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: #FF8C00;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.service-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 4rem;
}

.faq-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f9f9f9;
}

.faq-question h3 {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.faq-toggle {
    width: 24px;
    height: 24px;
    background-color: #FF8C00;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    padding: 0 1.5rem 1.5rem;
    max-height: 300px;
}

.faq-answer p {
    line-height: 1.6;
    color: #555;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }

    .contact-info, 
    .contact-form-container {
        width: 100%;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .contact-hero-content h1 {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 576px) {
    .direction-items {
        flex-direction: column;
    }

    .direction-item {
        min-width: 100%;
    }

    .contact-hero-content h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* เพิ่มสไตล์สำหรับลิงก์ที่กำลังเปิดอยู่ในเมนู */
nav ul li a.active {
    color: #8B4513;
}

nav ul li a.active::after {
    width: 100%;
}
/* แก้ไขส่วนที่เกี่ยวกับการเดินทางในไฟล์ contact.css */

/* ปรับปรุงการแสดงผลส่วนการเดินทาง */
.directions {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.directions h3 {
    font-size: 1.5rem;
    color: #8B4513;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.direction-items {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap; /* เพิ่มการรองรับการขึ้นบรรทัดใหม่ */
}

.direction-item {
    flex: 1 1 calc(50% - 2rem); /* ปรับความกว้างให้มีขนาดประมาณครึ่งของพื้นที่ */
    min-width: 280px; /* ลดขนาดขั้นต่ำเพื่อรองรับหน้าจอขนาดเล็ก */
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem; /* เพิ่มระยะห่างด้านล่าง */
}

.direction-icon {
    flex-shrink: 0; /* ป้องกันไอคอนจากการถูกบีบ */
    margin-right: 1rem;
    width: 50px;
    height: 50px;
    background-color: #FF8C00;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.direction-content {
    flex: 1; /* ให้เนื้อหาขยายเต็มพื้นที่ที่เหลือ */
}

.direction-content h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.direction-content p {
    line-height: 1.6;
    color: #555;
    word-wrap: break-word; /* ป้องกันข้อความล้นออกนอกกรอบ */
}

/* ปรับปรุงสำหรับหน้าจอขนาดเล็ก */
@media screen and (max-width: 768px) {
    .direction-items {
        flex-direction: column;
    }
    
    .direction-item {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

@media screen and (max-width: 576px) {
    .directions {
        padding: 1.5rem;
    }
    
    .direction-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}