/* style.css - รวม CSS ส่วนกลางสำหรับ Header, Menu, Modal และโทนสีหลัก */

:root {
    --primary-green: #5db641; --primary-green-hover: #4a9333; --secondary-pink: #f34c50;
    --bg-white: #ffffff; --bg-light: #f4f7f5; --text-dark: #2a2f35; --text-muted: #7a828a;
    --shadow: 0 4px 12px rgba(0,0,0,0.05); --border-radius: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Nunito', 'Prompt', sans-serif; }
body { background-color: var(--bg-light); color: var(--text-dark); overflow-x: hidden; }

/* ================= Header ================= */
header { background-color: var(--bg-white); height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.left-menu { display: flex; align-items: center; gap: 15px; }
.hamburger { font-size: 24px; color: var(--text-dark); cursor: pointer; background: none; border: none; }
.logo { height: 35px; cursor: pointer; }
.profile-container { position: relative; }
.profile-pic { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; cursor: pointer; border: 2px solid #e5e5e5; }
.dropdown-menu { position: absolute; right: 0; top: 60px; background: var(--bg-white); box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-radius: 16px; width: 220px; display: none; flex-direction: column; border: 1px solid #f0f0f0; }
.dropdown-menu.active { display: flex; }
.dropdown-item { padding: 15px 20px; text-decoration: none; color: var(--text-dark); font-weight: 600; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.dropdown-item:hover { background-color: var(--bg-light); color: var(--primary-green); }

/* ================= Drawer Menu ================= */
.drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 998; display: none; opacity: 0; transition: opacity 0.3s; backdrop-filter: blur(2px); }
.drawer-overlay.open { display: block; opacity: 1; }
#drawer-menu { position: fixed; top: 0; left: -300px; width: 280px; height: 100%; background: #fff; z-index: 999; transition: left 0.3s ease; padding: 20px; display: flex; flex-direction: column; box-shadow: 4px 0 15px rgba(0,0,0,0.1); }
#drawer-menu.open { left: 0; }
#drawer-menu h2 { color: var(--primary-green); margin: 10px 0 20px 0; font-weight: 800;}

/* ================= Modals ================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.active { display: flex; }
.modal-content { background: var(--bg-white); border-radius: 30px; padding: 40px; width: 90%; max-width: 480px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.2); position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 20px; right: 25px; font-size: 24px; cursor: pointer; color: var(--text-muted);}
.mascot-img { width: 110px; margin-bottom: 15px; }
.input-group { text-align: left; margin-bottom: 25px; }
.input-group label { display: block; font-weight: 800; margin-bottom: 12px; font-size: 18px; color: #1a1a1a; }
.desktop-only { display: block !important; }
.mobile-only { display: none !important; }
select { width: 100%; padding: 14px 15px; border-radius: 16px; border: 2px solid #e0e5eb; font-size: 16px; outline: none; background: #fdfdfd; font-weight: 600; color: var(--text-dark);}
.pill-container { flex-wrap: wrap; gap: 8px; }
.lang-pill { padding: 10px 18px; border: 2px solid #e0e5eb; border-radius: 50px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text-dark); flex-grow: 1; text-align: center; white-space: nowrap; }
.lang-pill.active { border-color: var(--primary-green); background: #f0faed; color: var(--primary-green); }
.btn-main { background: var(--primary-green); color: white; border: none; padding: 16px 30px; font-size: 18px; font-weight: 800; border-radius: 20px; width: 100%; cursor: pointer; box-shadow: 0 6px 0 var(--primary-green-hover); margin-top: 10px; }

@media (max-width: 768px) { 
    .desktop-only { display: none !important; } 
    .mobile-only.pill-container { display: grid !important; grid-template-rows: repeat(3, auto); grid-auto-flow: column; overflow-x: auto; gap: 10px; padding: 10px 5px; } 
}

/* ================= Mascot Overlay ================= */
#home-mascot-overlay { position: fixed; bottom: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
#home-mascot-overlay * { pointer-events: auto; }
#mascot-expanded-view { display: flex; flex-direction: column; align-items: flex-end; }
.mascot-gif { width: 120px; height: auto; cursor: pointer; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15)); transition: transform 0.2s; }
.mascot-gif:hover { transform: scale(1.05); }
.speech-bubble { background: white; border: 2px solid var(--primary-green); border-radius: 18px; padding: 12px 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); max-width: 250px; margin-bottom: 12px; position: relative; text-align: left; }
.speech-bubble::after { content: ''; position: absolute; bottom: -10px; right: 30px; border-width: 10px 10px 0; border-style: solid; border-color: white transparent; display: block; width: 0; }
.speech-bubble::before { content: ''; position: absolute; bottom: -13px; right: 29px; border-width: 11px 11px 0; border-style: solid; border-color: var(--primary-green) transparent; display: block; width: 0; z-index: -1; }
.speech-text { font-size: 14px; font-weight: 600; color: var(--text-dark); line-height: 1.4; padding-right: 15px; }
.bubble-close { position: absolute; top: 5px; right: 10px; font-size: 16px; color: var(--text-muted); cursor: pointer; }
.mascot-collapsed-btn { width: 55px; height: 55px; background-color: var(--primary-green); border-radius: 50%; display: none; align-items: center; justify-content: center; color: white; font-size: 26px; box-shadow: 0 6px 12px rgba(0,0,0,0.2); cursor: pointer; border: 3px solid white; }