/* --- General Styles & Variables (Fresh & Clean Palette) --- */
:root {
    --primary-color: #3F979B;       /* สีเขียวอมฟ้า (Medium Teal) */
    --accent-color: #F9F54B;        /* สีเหลืองสด (Bright Yellow) */
    --dark-color: #205E61;          /* สีเขียวเข้ม (Dark Teal) */
    --secondary-color: #8BF5FA;     /* สีฟ้าสว่าง (Bright Cyan) - for highlights */

    --bg-main: #FFFFFF;             /* สีขาว (Main Background) */
    --bg-section: #F2FCFD;          /* สีฟ้าอ่อนมากๆ (Lighter version of #8BF5FA) */
    --text-color: #555555;          /* สีเทาเข้ม (For body text) */
    --light-color: #FFFFFF;         /* สีขาว (For text on dark BG) */
    --footer-text-color: #B0C9CA;   /* สีเทาอมฟ้า (For footer text) */
}

/* ===== โค้ดมาตรฐานเพื่อความเสถียรของการจัดหน้าเว็บ ===== */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}
*, *::before, *::after {
    box-sizing: inherit;
}

body { 
    margin: 0; 
    font-family: 'Prompt', sans-serif; 
    color: var(--text-color); 
    line-height: 1.7; 
    background-color: var(--bg-main);
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { 
    color: var(--dark-color); 
    font-weight: 600; 
}
h2 { 
    text-align: center; 
    font-size: 2.5rem; 
    margin-top: 0; 
    margin-bottom: 60px; 
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

section { padding: 100px 0; }

/* --- Buttons --- */
.button { display: inline-block; padding: 12px 28px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease; }
.button-primary { 
    background-color: var(--primary-color); 
    color: var(--light-color); 
    border: 2px solid var(--primary-color); 
}
.button-primary:hover { 
    background-color: #31797d;
    border-color: #31797d;
    transform: translateY(-3px); 
    box-shadow: 0 4px 15px rgba(63, 151, 155, 0.3); 
}
.button-secondary { 
    background-color: var(--accent-color); 
    color: #333;
    border: 2px solid var(--accent-color); 
}
.button-secondary:hover { 
    background-color: #E5E145;
    border-color: #E5E145;
    transform: translateY(-3px); 
    box-shadow: 0 4px 15px rgba(249, 245, 75, 0.4);
}

.button-hero-outline {
    background-color: transparent;
    color: var(--light-color);
    border: 2px solid var(--light-color);
    padding: 12px 28px;
}
.button-hero-outline:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.section-header .button-secondary {
    background-color: transparent;
    color: #333;
    border-width: 2px;
    border-style: solid;
    border-color: var(--accent-color);
}
.section-header .button-secondary:hover {
    background-color: var(--accent-color);
    color: #333;
}

/* --- Header --- */
.site-header {
    background-color: var(--bg-main);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo-wrapper { display: flex; align-items: center; gap: 15px; }
.logo-img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; }
.logo-title { font-size: 1.5rem; font-weight: 700; color: var(--dark-color); line-height: 1.2; }
.logo-phone { font-size: 0.9rem; color: var(--text-color); }

.main-nav ul { display: flex; flex-direction: row; align-items: center; list-style: none; padding: 0; margin: 0; gap: 5px; }
.main-nav li { display: block; }
.main-nav a {
    position: relative; display: block; padding: 10px 12px;
    text-decoration: none; color: var(--dark-color);
    font-weight: 600; transition: color 0.3s;
}
.main-nav a:hover { color: var(--primary-color); }
.main-nav a::after {
    content: ''; position: absolute; bottom: 0;
    left: 15px; right: 15px; height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0); transform-origin: center;
    transition: transform 0.4s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--primary-color); }
.header-actions { display: flex; align-items: center; gap: 15px; }
.hamburger-menu { display: none; }

/* --- Hero Section --- */
.hero-section { position: relative; padding: 150px 0; text-align: center; color: var(--light-color); background-image: url('/images/หน้าปก.jpg'); background-size: cover; background-position: center center; background-repeat: no-repeat; background-attachment: fixed; }
.hero-section::before { 
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(to top, rgba(32, 94, 97, 0.7), rgba(63, 151, 155, 0.6));
    z-index: 1; 
}
.hero-section .container { position: relative; z-index: 2; }
.hero-text-content { max-width: 800px; margin: 0 auto; }
.hero-text-content h1 { font-size: 3.4rem; line-height: 1.2; margin-bottom: 20px; color: var(--light-color); text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.hero-text-content p { font-size: 1.3rem; margin-bottom: 40px; }

/* ===== Services Section ===== */
.services-section-revised { background-color: var(--bg-section); }
.service-grid-revised { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.service-item-revised { background-color: var(--light-color); border-radius: 10px; box-shadow: 0 5px 25px rgba(0,0,0,0.07); transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; display: flex; flex-direction: column; }
.service-item-revised:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(63, 151, 155, 0.15); }
.service-item-image { height: 200px; overflow: hidden; }
.service-item-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.service-item-revised:hover .service-item-image img { transform: scale(1.05); }
.service-item-content { padding: 25px 30px 30px; flex-grow: 1; }
.service-item-content h3 { font-size: 1.5rem; margin-top: 0; margin-bottom: 15px; color: var(--primary-color); }
.service-item-content p { margin: 0; line-height: 1.7; color: var(--text-color); }

/* --- About Section --- */
.about-section { padding: 100px 0; background-color: var(--bg-main); }
.about-container { display: flex; align-items: center; gap: 60px; }
.about-image { flex: 1; }
.about-image img { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.about-text { flex: 1; }
#about h2 {
    font-size: 2.2rem;
    white-space: nowrap; 
}

.team-slider.tns-slider, .activity-slider.tns-slider { display: flex !important; align-items: stretch !important; }

/* ===== Team & Activity Section (Shared Styles) ===== */
.team-section, .activity-section { position: relative; }
.team-section { background-color: var(--bg-section); }
.activity-section { background-color: var(--bg-main); }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.section-header h2 { margin-bottom: 0; text-align: left; padding-bottom: 0; }
.section-header h2::after { display: none; }

.team-slider-wrapper, .activity-slider-wrapper { position: relative; margin: 0 -10px; }
.team-slider .tns-item, .activity-slider .tns-item { padding: 0 10px; }

/* --- Team Card Style --- */
.team-member-slide {
    background-color: var(--light-color); border-radius: 10px; text-align: center; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; height: 100%; 
}
.team-member-slide:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(32, 94, 97, 0.1); }
.team-photo-slide img { width: 100%; height: 300px; object-fit: cover; object-position: center top; }
.team-info-slide { padding: 20px 15px 50px; flex-grow: 1; }
.team-info-slide h3 { margin: 0 0 5px 0; font-size: 1.2rem; color: var(--dark-color); }
.team-info-slide p { margin: 0; color: var(--text-color); font-size: 0.9rem; }

/* --- Activity Card Style --- */
.activity-card {
    background-color: var(--light-color); border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.06); 
    overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; height: 100%;
}
.activity-card:hover { transform: translateY(-8px); box-shadow: 0 12px 35px rgba(0,0,0,0.08); }
.activity-image { height: 180px; overflow: hidden; }
.activity-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.activity-card:hover .activity-image img { transform: scale(1.05); }
.activity-content { display: flex; align-items: flex-start; gap: 15px; padding: 20px 20px 50px; flex-grow: 1; }
.activity-icon { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background-color: var(--primary-color); }
.activity-text h3 { margin: 0 0 4px 0; font-size: 1.1rem; color: var(--dark-color); font-weight: 600; }
.activity-text p { margin: 0; font-size: 0.9rem; color: var(--text-color); }

/* --- Slider Controls & Pager --- */
.tns-outer { position: relative; padding-bottom: 50px; }
.tns-controls {
    position: absolute; top: 50%; left: 50%; 
    width: 100%; max-width: 1300px;
    transform: translate(-50%, -50%); 
    display: flex; justify-content: space-between;
    z-index: 10; pointer-events: none; padding: 0;
}
.tns-controls button { 
    pointer-events: all; 
    background-color: var(--light-color); 
    border: 1px solid #e0e0e0; 
    border-radius: 50%; 
    width: 45px; height: 45px; 
    font-size: 1.2rem; 
    color: var(--dark-color); 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    display: flex; align-items: center; justify-content: center;
}
.tns-controls button:hover { background-color: var(--primary-color); color: var(--light-color); border-color: var(--primary-color); transform: scale(1.1); }
.tns-controls button[disabled] { opacity: 0.3; cursor: not-allowed; transform: scale(1); }

.tns-nav {
    position: absolute; bottom: 0px; left: 0; right: 0;
    z-index: 2; text-align: center; margin-top: 0;      
}
.tns-nav button { 
    width: 12px; height: 12px; 
    background-color: #d8d8d8; 
    border: none; border-radius: 50%; 
    margin: 0 6px; padding: 0; 
    transition: all 0.3s ease; 
}
.tns-nav button.tns-nav-active { 
    background-color: var(--primary-color); 
    transform: scale(1.3); 
    box-shadow: 0 0 0 3px rgba(63, 151, 155, 0.2);
}

/* --- Staff Area Section --- */
.staff-section { background-color: var(--bg-section); }
.staff-section .container { max-width: 800px; text-align: center; }
.staff-section p { font-size: 1.1rem; margin-bottom: 40px; }
.staff-buttons-container { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.staff-buttons-container .button { padding: 15px 40px; font-size: 1.1rem; }

#staff-area .button-primary {
    background-color: var(--dark-color);
    border-color: var(--dark-color);
    color: var(--light-color);
}
#staff-area .button-primary:hover {
    background-color: #1A4D4F;
    border-color: #1A4D4F;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(32, 94, 97, 0.4);
}

/* --- Footer --- */
.site-footer { 
    background-color: var(--dark-color); 
    color: var(--footer-text-color); 
    padding-top: 60px; 
    font-size: 0.95rem; 
}
.footer-container { 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 40px; 
    padding-bottom: 40px; 
}

/* ปรับให้รองรับ 3 คอลัมน์สำหรับ Desktop */
.footer-views,
.footer-info, 
.footer-hours { 
    flex: 1; 
    min-width: 280px; /* กำหนดขั้นต่ำเพื่อควบคุมการจัดวาง */
}

/* จัดสไตล์สำหรับคอลัมน์ผู้เข้าชมใหม่ */
.footer-views h3, 
.footer-info h3, 
.footer-hours h3 { 
    color: var(--light-color); 
}
.footer-views p,
.footer-info p, 
.footer-hours p { 
    margin: 5px 0; 
}

.footer-bottom { text-align: center; padding: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom p { margin: 0; }

/* --- Floating Booking Button (Desktop) --- */
.floating-booking-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: #000000;
    padding: 16px 32px; 
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25em; 
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15),
                0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    animation: pulse 2s infinite cubic-bezier(0.66, 0.0, 0.34, 1.0);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}
.floating-booking-button:hover {
    background-color: #E5E145;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2),
                0 15px 30px rgba(0, 0, 0, 0.4);
}

.floating-booking-button.is-hidden {
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
}

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

/* --- Social Icons on Header --- */
.social-icons-container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.social-icon-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--light-color);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.social-icon-btn.line { background-color: #06C755; }
.social-icon-btn.facebook { background-color: #1877F2; font-size: 20px; }
.social-icon-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- Mobile Booking Bar (hidden on desktop) --- */
.mobile-booking-bar {
    display: none;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    section { padding: 80px 0; }
    h2 { font-size: 2.2rem; }
    #about h2 { font-size: 2rem; }
    
    .main-nav {
        position: absolute; top: 100%;
        left: 0; width: 100%;
        background-color: var(--bg-main); box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding: 10px 0; opacity: 0; visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        z-index: 99;
    }
    .main-nav.is-active { opacity: 1; visibility: visible; transform: translateY(0); }
    .main-nav ul { flex-direction: column; align-items: center; gap: 0; }
    .main-nav li { width: 100%; text-align: center; }
    .main-nav a { padding: 15px 20px; }
    .main-nav a::after { display: none; }
    .main-nav a:hover, .main-nav a.active {
        background-color: var(--bg-section);
        color: var(--primary-color);
    }
    .hamburger-menu {
        display: block; width: 30px; height: 24px; position: relative; cursor: pointer;
        background: none; border: none; padding: 0; z-index: 101;
    }
    .hamburger-menu span {
        display: block; position: absolute; height: 3px; width: 100%;
        background: var(--dark-color); border-radius: 3px; left: 0;
        transition: all 0.25s ease-in-out;
    }
    .hamburger-menu span:nth-child(1) { top: 0px; }
    .hamburger-menu span:nth-child(2) { top: 10px; }
    .hamburger-menu span:nth-child(3) { top: 20px; }
    .hamburger-menu.is-active span:nth-child(1) { top: 10px; transform: rotate(135deg); }
    .hamburger-menu.is-active span:nth-child(2) { opacity: 0; left: -30px; }
    .hamburger-menu.is-active span:nth-child(3) { top: 10px; transform: rotate(-135deg); }
}

@media (max-width: 768px) {
    body {
        /* เพิ่มพื้นที่ด้านล่างของ body ให้เท่ากับความสูงของแถบจองคิว */
        padding-bottom: 95px; 
    }

    h2 { font-size: 2rem; margin-bottom: 40px; }
    section { padding: 60px 0; }
    .logo-wrapper { gap: 10px; }
    .logo-title { font-size: 1.1rem; }
    .logo-phone { display: none; }
    .logo-img { width: 45px; height: 45px; }
    .header-actions { gap: 10px; }
    
    #about h2 { white-space: normal; }

    .hero-section { background-attachment: scroll; padding: 100px 0; }
    .hero-text-content h1 { font-size: 2.5rem; }
    .hero-text-content p { font-size: 1.1rem; }
    .hero-text-content .button-hero-outline { white-space: nowrap; }
    
    .about-container { flex-direction: column; gap: 40px; }
    .about-text { text-align: center; }

    .tns-controls { display: none; }
    .team-slider-wrapper, .activity-slider-wrapper { margin: 0; }
    
    .footer-container { 
        flex-direction: column; 
        text-align: center; 
        gap: 20px; 
    }
    /* ปรับให้คอลัมน์ footer แต่ละอันเต็มความกว้างใน mobile */
    .footer-views,
    .footer-info, 
    .footer-hours {
        min-width: 100%;
        margin-bottom: 10px; 
    }

    .social-icons-container { gap: 10px; }
    .social-icon-btn { width: 36px; height: 36px; font-size: 16px; }
    .social-icon-btn.facebook { font-size: 18px; }

/* ===== START: Mobile Booking Button Styles (Final Version) ===== */
    
    /* ซ่อนปุ่มแบบลอยสำหรับ Desktop */
    .floating-booking-button {
        display: none;
    }

    /* 1. คืนค่าพื้นหลังของแถบให้เป็นสีขาวเหมือนเดิม */
    .mobile-booking-bar {
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        background-color: var(--bg-main); /* กลับเป็นสีขาว */
        min-height: 95px;
        padding: 10px 15px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 10px rgba(0,0,0,0.1); /* คืนค่าเงาให้แถบสีขาว */
        z-index: 1000;
        box-sizing: border-box;
    }

    /* 2. คืนค่าสีปุ่มเป็นสีเหลืองสด และปรับขนาดให้เล็กลง */
    .mobile-booking-bar .button {
        width: 90%;             /* <-- จุดแก้ไข: ทำให้ปุ่มไม่กว้างจนชิดขอบ */
        max-width: 350px;       /* <-- จำกัดความกว้างสูงสุดไว้ */
        margin: 0;
        padding: 14px 20px;

        background-color: var(--accent-color); /* กลับเป็นสีเหลืองสด */
        color: #000000;                     /* สีตัวอักษรดำ */
        border: 2px solid var(--accent-color); /* ใช้ขอบสีเดียวกับพื้นหลัง */
        box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* เพิ่มเงาให้ปุ่มดูเด่นขึ้น */

        font-size: 1.1rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        position: relative;
        overflow: hidden;
        transition: all 0.2s ease-in-out;
    }

    /* เอฟเฟกต์เมื่อ hover หรือกด */
    .mobile-booking-bar .button:hover {
        background-color: #E5E145; /* สีเหลืองเข้มขึ้นเล็กน้อย */
        border-color: #E5E145;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    }
    
    /* คืนค่า Shine Effect ที่สวยงาม */
    .mobile-booking-bar .button::after {
        content: '';
        display: block; /* ทำให้แสดงผลอีกครั้ง */
        position: absolute;
        top: 0;
        left: -150%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%
        );
        transform: skewX(-25deg);
        animation: shine-effect 4s infinite linear;
    }

    @keyframes shine-effect {
        to {
            left: 150%;
        }
    }
/* ===== END: Mobile Booking Button Styles ===== */
}