/* ─── Shared Design System — Tutor Connect ─── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{--pink:#DE5C8E;--pink-dark:#c44a7a;--pink-light:#f8e4ed;--pink-glow:rgba(222,92,142,0.15);--bg:#ffffff;--text:#1a1a2e;--text-light:#555;--text-muted:#888;--card-bg:#fff;--card-shadow:0 4px 24px rgba(0,0,0,0.06);--radius:16px;--nav-h:64px}
html{scroll-behavior:smooth}
body{font-family:'Sarabun',sans-serif;color:var(--text);background:var(--bg);line-height:1.7;-webkit-font-smoothing:antialiased}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
ul,ol{list-style:none}

/* ─── Reveal Animation ─── */
.reveal{opacity:0;transform:translateY(30px);transition:opacity .7s ease,transform .7s ease;will-change:opacity,transform}
.reveal.visible{opacity:1;transform:translateY(0)}
@keyframes fadeDown{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}

/* ─── Navbar ─── */
.nav{position:fixed;top:0;left:0;right:0;z-index:100;height:var(--nav-h);display:flex;align-items:center;justify-content:space-between;padding:0 24px;background:rgba(255,255,255,0.85);backdrop-filter:blur(12px);border-bottom:1px solid rgba(0,0,0,0.06);transition:box-shadow .3s}
.nav.scrolled{box-shadow:0 2px 20px rgba(0,0,0,0.08)}
.nav-logo{font-size:1.25rem;font-weight:800;color:var(--pink);display:flex;align-items:center;gap:8px}
.nav-logo img{height:28px;width:28px;object-fit:contain}
.nav-actions{display:flex;align-items:center;gap:12px}
.nav-cta{background:var(--pink);color:#fff;padding:10px 22px;border-radius:50px;font-weight:600;font-size:.9rem;transition:background .2s,transform .15s;border:none;cursor:pointer}
.nav-cta:hover{background:var(--pink-dark);transform:scale(1.03)}

/* ─── Section Common ─── */
section{padding:80px 24px}
.section-title{text-align:center;font-size:1.75rem;font-weight:800;margin-bottom:12px}
.section-sub{text-align:center;color:var(--text-light);margin-bottom:48px;font-size:1rem}
.container{max-width:1000px;margin:0 auto}

/* ─── Buttons ─── */
.btn-primary{display:inline-flex;align-items:center;gap:8px;background:var(--pink);color:#fff;padding:16px 36px;border-radius:50px;font-size:1.05rem;font-weight:700;transition:background .2s,transform .15s;box-shadow:0 4px 20px rgba(222,92,142,0.3)}
.btn-primary:hover{background:var(--pink-dark);transform:translateY(-2px)}
.btn-line{display:inline-flex;align-items:center;gap:8px;background:#06C755;color:#fff;padding:16px 36px;border-radius:50px;font-size:1.05rem;font-weight:700;transition:background .2s,transform .15s}
.btn-line:hover{background:#05a648;transform:translateY(-2px)}

/* ─── FAQs ─── */
.faq-list{max-width:700px;margin:0 auto}
.faq-item{border-bottom:1px solid #eee}
.faq-q{width:100%;background:none;border:none;padding:20px 0;text-align:left;font-family:inherit;font-size:1rem;font-weight:600;color:var(--text);cursor:pointer;display:flex;justify-content:space-between;align-items:center}
.faq-q::after{content:'+';font-size:1.4rem;color:var(--pink);transition:transform .3s}
.faq-item.open .faq-q::after{transform:rotate(45deg)}
.faq-a{max-height:0;overflow:hidden;transition:max-height .35s ease,padding .35s;font-size:.95rem;color:var(--text-light)}
.faq-item.open .faq-a{max-height:200px;padding-bottom:20px}

/* ─── Final CTA ─── */
.final-cta{text-align:center;background:linear-gradient(170deg,var(--pink-light) 0%,#fff 100%);padding:80px 24px}
.final-cta h2{font-size:1.8rem;font-weight:800;margin-bottom:12px}
.final-cta p{color:var(--text-light);margin-bottom:32px}
.final-btns{display:flex;gap:16px;justify-content:center;flex-wrap:wrap}

/* ─── Footer ─── */
footer{text-align:center;padding:32px 24px;border-top:1px solid #eee;font-size:.85rem;color:var(--text-muted)}
footer a{color:var(--pink);font-weight:600}

/* ─── PDPA Note ─── */
.pdpa-note,.pdpa-note-cta{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:16px;font-size:.82rem;color:var(--text-muted)}
.pdpa-note{animation:fadeDown .8s .75s ease both}

/* ─── Sticky LINE ─── */
.sticky-line{position:fixed;bottom:24px;right:24px;z-index:999;background:#06C755;color:#fff;padding:12px 20px;border-radius:50px;font-weight:700;display:flex;align-items:center;gap:8px;box-shadow:0 4px 20px rgba(6,199,85,0.4);transition:transform .2s,background .2s;font-size:.95rem}
.sticky-line:hover{background:#05a648;transform:scale(1.05) translateY(-2px)}

/* ─── Sticky CTA Bar (Mobile) ─── */
.sticky-cta-bar{display:none;position:fixed;bottom:0;left:0;right:0;z-index:1000;background:rgba(255,255,255,0.96);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid rgba(222,92,142,0.12);padding:10px 16px;padding-bottom:max(10px,env(safe-area-inset-bottom));box-shadow:0 -4px 24px rgba(0,0,0,0.08);transform:translateY(100%);transition:transform .35s cubic-bezier(.4,0,.2,1)}
.sticky-cta-bar.visible{transform:translateY(0)}
.sticky-cta-bar-inner{display:flex;align-items:center;gap:12px;max-width:480px;margin:0 auto}
.sticky-cta-bar-text{flex:1;min-width:0}
.sticky-cta-bar-text strong{display:block;font-size:.88rem;font-weight:700;color:var(--text);line-height:1.3}
.sticky-cta-bar-text span{font-size:.72rem;color:var(--text-muted)}
.sticky-cta-btn{flex-shrink:0;background:var(--pink);color:#fff;padding:11px 22px;border-radius:50px;font-family:inherit;font-size:.88rem;font-weight:700;border:none;cursor:pointer;white-space:nowrap;transition:background .2s,transform .15s;box-shadow:0 3px 14px rgba(222,92,142,0.3)}
.sticky-cta-btn:hover{background:var(--pink-dark);transform:scale(1.03)}

/* ─── Trust Badges ─── */
.trust-badges{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;max-width:900px;margin:0 auto}
.trust-badge-card{text-align:center;padding:28px 16px;background:var(--card-bg);border-radius:var(--radius);box-shadow:var(--card-shadow);border:1px solid rgba(222,92,142,0.08);transition:transform .25s,box-shadow .25s}
.trust-badge-card:hover{transform:translateY(-4px);box-shadow:0 8px 30px rgba(222,92,142,0.12)}
.trust-badge-icon{width:56px;height:56px;margin:0 auto 14px;background:var(--pink-light);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.6rem}
.trust-badge-card h3{font-size:.95rem;font-weight:700;margin-bottom:4px;color:var(--text)}
.trust-badge-card p{font-size:.82rem;color:var(--text-muted)}

/* ─── Mobile ─── */
@media(max-width:768px){
  section{padding:60px 20px}
  .trust-badges{grid-template-columns:repeat(2,1fr)}
  .sticky-cta-bar{display:block}
  .sticky-line{transition:bottom .35s cubic-bezier(.4,0,.2,1),transform .2s,background .2s}
  .sticky-line.shifted-up{bottom:80px}
  .nav-cta{padding:6px 14px;font-size:0.8rem}
  .nav-logo{font-size:1.1rem}
  .nav-actions{gap:8px}
}
@media(max-width:480px){
  .sticky-line span{display:none}
  .sticky-line{padding:12px;border-radius:50%;bottom:20px;right:20px}
  .sticky-line.shifted-up{bottom:76px}
}

/* ─── Exit-Intent Popup — Desktop Only ─── */
.exit-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.exit-popup-overlay.show {
  display: flex;
  opacity: 1;
}

.exit-popup-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.exit-popup-overlay.show .exit-popup-card {
  transform: scale(1) translateY(0);
}

.exit-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f5f5f5;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.exit-popup-close:hover {
  background: #eee;
  color: var(--text);
}

.exit-popup-emoji {
  font-size: 2.8rem;
  margin-bottom: 16px;
  line-height: 1;
}

.exit-popup-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.exit-popup-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.6;
}

.exit-popup-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exit-popup-btns .btn-primary {
  padding: 14px 28px;
  font-size: 0.95rem;
  justify-content: center;
  width: 100%;
}

.exit-popup-btns .btn-line {
  background: #06C755;
  padding: 14px 28px;
  font-size: 0.95rem;
  justify-content: center;
  width: 100%;
}

.exit-popup-btns .btn-line:hover {
  background: #05a648;
}

.exit-popup-trust {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Hide exit popup on mobile — mobile has sticky CTA instead */
@media (max-width: 768px) {
  .exit-popup-overlay {
    display: none !important;
  }
}

/* ─── Cookie Consent Banner ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  z-index: 9999;
  padding: 16px 20px;
  border-radius: 16px 16px 0 0;
  font-family: 'Sarabun', sans-serif;
  transform: translateY(100%);
  animation: slideUp 0.5s forwards ease-out;
  box-sizing: border-box;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-text strong {
  color: var(--text, #1a1a2e);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 6px;
}

.cookie-text p {
  color: var(--text-light, #555);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.cookie-text a {
  color: var(--pink, #DE5C8E);
  text-decoration: underline;
  font-weight: 600;
}

.cookie-text a:hover {
  color: var(--pink-dark, #c44a7a);
}

.cookie-buttons {
  display: flex;
  width: 100%;
}

.btn-cookie-primary {
  flex: 1;
  padding: 12px 16px;
  border-radius: 16px;
  background-color: var(--pink, #DE5C8E);
  color: #ffffff;
  font-family: 'Sarabun', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-cookie-primary:hover {
  background-color: var(--pink-dark, #c44a7a);
}

@keyframes slideUp {
  to { transform: translateY(0); }
}

/* Desktop Styles */
@media (min-width: 768px) {
  .cookie-banner {
    bottom: 24px;
    left: 24px;
    width: 420px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
  }
}

/* Mobile Styles */
@media (max-width: 767px) {
  .cookie-banner {
    width: 100%;
    left: 0;
    bottom: 0;
    border-radius: 16px 16px 0 0;
  }

  .cookie-content {
    flex-direction: column;
  }

  .cookie-buttons {
    flex-direction: column;
  }

}

/* =========================================
Tutor Connect - Utility Classes & Components
========================================= */

/* --- Flexbox & Layout --- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.w-full-flex-center { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; }
.d-none { display: none !important; }
.d-contents { display: contents; }
.object-contain { object-fit: contain; }

/* --- Spacing (Margin & Padding) --- */
.m-0 { margin: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mr-2 { margin-right: 8px; }
.pt-0 { padding-top: 0; }
.pt-12 { padding-top: 48px; }
.pb-2 { padding-bottom: 8px; }
.pb-12 { padding-bottom: 48px; }
.px-6 { padding-left: 24px; padding-right: 24px; }

/* --- Typography --- */
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-base { font-size: 0.95rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.8rem; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-white { color: #fff; }
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.text-pink { color: var(--pink); }
.underline { text-decoration: underline; }
.whitespace-nowrap { white-space: nowrap; }

/* --- Colors & Backgrounds --- */
.bg-pink { background: var(--pink); }
.bg-light-gray { background: #fafafa; }

/* --- Reusable Components --- */
.btn-md { padding: 12px 24px; font-size: 1rem; }
.btn-xl { font-size: 1.1rem; padding: 14px 32px; }
.btn-lg { padding: 16px 36px; border-radius: 50px; font-size: 1.05rem; font-weight: 700; }
.btn-line-color { background: #06C755; color: #fff; }
.shadow-pink-lg { box-shadow: 0 4px 16px rgba(222,92,142,0.3); }

.section-cta-bg {
  background: linear-gradient(170deg, var(--pink-light) 0%, #fff 100%);
  padding: 80px 24px;
  text-align: center;
}

.footer-block {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.trust-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
}
