/* ==========================================================================
   TopTutorBD — assets/css/public.css
   Author: RaKiBuL HaSaN - CEO & Founder, The One Stop BD (theonestopbd.com)
   Developer Phone: +8801752986368 | Developer Email: rhs.rakibul@gmail.com

   PUBLIC website shell (home / about / services / contact / 404).
   Mobile-first. Sections: 1 Variables · 2 Base · 3 Header · 4 Bottom nav + FAB · 5 Layout &
   sections · 6 Cards · 7 Forms · 8 Footer · 9 Motion · 10 Media queries.
   Colors come ONLY from the global tokens in style.css (so dark mode just works).
   ========================================================================== */

/* ---------- 1. Variables ---------- */
:root {
  --pub-bar-h: 56px;
  --pub-bottom-h: 62px;
  --pub-gap: 16px;
  --pub-radius: 14px;
  --pub-max: 1200px;
}

/* ---------- 2. Base ---------- */
body.pub {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  /* room for the fixed top bar (mobile) + bottom nav + notch / home indicator */
  padding-top: calc(var(--pub-bar-h) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--pub-bottom-h) + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  overflow-x: hidden;
}
.pub img { max-width: 100%; height: auto; }
.pub a { color: inherit; }
.pub-wrap { width: 100%; max-width: var(--pub-max); margin: 0 auto; padding: 0 var(--pub-gap); }
.pub-main { display: block; }
.pub h1, .pub h2, .pub h3 { font-family: 'Poppins', 'Hind Siliguri', sans-serif; line-height: 1.3; }
.pub-sec { padding: 1.75rem 0; }
.pub-sec.alt { background: var(--card-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pub-sec h2 { font-size: clamp(1.25rem, 4.6vw, 1.875rem); margin: 0 0 .375rem; }
.pub-sec .pub-sub { color: var(--text2); margin: 0 0 1.125rem; font-size: .9375rem; line-height: 1.6; max-width: 640px; }
.pub-hide-m { display: none !important; }
.pub-show-m { display: inline-flex !important; }

/* ---------- 3. Header (top app bar on mobile, sticky site header on desktop) ---------- */
.pub-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: var(--green); color: #fff; box-shadow: var(--shadow);
  padding-top: env(safe-area-inset-top, 0px);
}
.pub-top-in { display: flex; align-items: center; gap: .5rem; height: var(--pub-bar-h); }
.pub-brand { display: inline-flex; align-items: center; gap: .5rem; color: #fff !important; text-decoration: none; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.125rem; flex-shrink: 0; }
.pub-brand b { color: #ffd640; }
.pub-brand-t { display: none; }                 /* mobile: just the icon + page title */
.pub-logo { width: 34px; height: 34px; border-radius: 50%; background: var(--red); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pub-page-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-nav { display: none; }
.pub-actions { display: flex; align-items: center; gap: .375rem; margin-left: auto; }
.pub-chip { background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 999px; padding: .375rem .75rem; font-weight: 700; font-size: .8125rem; cursor: pointer; min-height: 36px; min-width: 36px; }
.pub-icon-btn { align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff !important; text-decoration: none; }
.pub-link { color: #fff !important; text-decoration: none; font-weight: 600; font-size: .9375rem; padding: .5rem .625rem; }
.pub-btn { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--green) !important; text-decoration: none; font-weight: 700; font-size: .875rem; padding: .5rem 1rem; border-radius: 999px; min-height: 40px; transition: filter .15s ease, transform .12s ease; }
.pub-btn:active { transform: scale(.97); }
.pub-chip:active, .pub-icon-btn:active { opacity: .75; }

/* ---------- 4. Bottom navigation (mobile app) + floating action button ---------- */
.pub-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; background: var(--card-bg); border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pub-bottom a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--pub-bottom-h); text-decoration: none; color: var(--text2); font-size: .6875rem; font-weight: 600;
  position: relative; transition: transform .1s ease, opacity .1s ease;
}
.pub-bottom a:active { transform: scale(.94); opacity: .8; }
.pub-bottom a.active { color: var(--green-text); }
.pub-bottom a.active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--green); }

.pub-fab { position: fixed; right: 14px; bottom: calc(var(--pub-bottom-h) + env(safe-area-inset-bottom, 0px) + 14px); z-index: 55; display: flex; flex-direction: column; gap: .625rem; }
.pub-fab-btn { width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff !important; text-decoration: none; box-shadow: var(--shadow-md); }
.pub-fab-btn.wa { background: #25d366; }
.pub-fab-btn:active { transform: scale(.94); }

/* ---------- 5. Layout & sections ---------- */
.pub-hero { background: var(--green-l); padding: 1.5rem 0 1.25rem; }
.pub-hero-grid { display: grid; gap: 1.25rem; }
.pub-crumb { color: var(--text2); font-size: .8125rem; margin-bottom: .5rem; }
.pub-page-hero { background: var(--green-l); padding: 1.5rem 0 1.25rem; border-bottom: 1px solid var(--border); }
.pub-page-hero h1 { font-size: clamp(1.5rem, 6vw, 2.5rem); margin: 0 0 .375rem; }
.pub-page-hero p { color: var(--text2); margin: 0; max-width: 680px; line-height: 1.65; }
.pub-grid { display: grid; gap: .875rem; }
.pub-split { display: grid; gap: 1.25rem; align-items: start; }
.pub-prose p { color: var(--text2); line-height: 1.75; margin: 0 0 .875rem; font-size: .9875rem; }
.pub-prose h2 { margin-top: 0; }

/* Horizontally swipeable card rows on mobile (CSS scroll-snap); become grids from 768px */
.snap-row { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: .25rem var(--pub-gap) .75rem; margin: 0 calc(var(--pub-gap) * -1); scrollbar-width: none; }
.snap-row::-webkit-scrollbar { display: none; }
.snap-row > * { flex: 0 0 82%; scroll-snap-align: center; }

/* ---------- 6. Cards ---------- */
.pub-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--pub-radius); padding: 1rem; box-shadow: var(--shadow); text-decoration: none; color: var(--text); display: block; }
.pub-sec.alt .pub-card { background: var(--bg); }
.pub-card.hover { transition: transform .15s ease, box-shadow .15s ease; }
.pub-card.hover:active { transform: scale(.985); }
.pub-card h3 { font-size: 1.0625rem; margin: .25rem 0 .375rem; }
.pub-card p { color: var(--text2); font-size: .9rem; line-height: 1.6; margin: 0; }
.pub-card-ic { font-size: 1.75rem; line-height: 1; }
.pub-ticks { list-style: none; padding: 0; margin: .625rem 0 0; display: grid; gap: .25rem; }
.pub-ticks li { font-size: .875rem; color: var(--text); padding-left: 1.375rem; position: relative; }
.pub-ticks li::before { content: '✔'; position: absolute; left: 0; color: var(--green-text); font-weight: 700; }
.pub-quote { font-size: .9375rem; line-height: 1.65; color: var(--text); margin: 0 0 .625rem; }
.pub-quote-by { font-weight: 700; font-size: .875rem; }
.pub-quote-by span { color: var(--amber-text); margin-left: .25rem; }
.pub-team-ic { width: 64px; height: 64px; border-radius: 50%; font-size: 1.5rem; margin-bottom: .5rem; }
.pub-info-row { display: flex; gap: .75rem; align-items: flex-start; padding: .625rem 0; border-bottom: 1px dashed var(--border); }
.pub-info-row:last-child { border-bottom: 0; }
.pub-info-row .ic { font-size: 1.25rem; width: 28px; text-align: center; }
.pub-info-row b { display: block; font-size: .8125rem; color: var(--text2); font-weight: 600; }
.pub-map { border: 0; width: 100%; height: 280px; border-radius: var(--pub-radius); }
.pub-cta-row { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 1rem; }
.pub-cta-row > a { flex: 1 1 200px; }
.pub-btn-lg { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.25rem; border-radius: var(--r); font-weight: 700; text-decoration: none; background: var(--green); color: #fff !important; box-shadow: var(--shadow); }
.pub-btn-lg.green { background: var(--green); }
.pub-btn-lg.ghost { background: transparent; color: var(--green-text) !important; border: 1.5px solid var(--green); box-shadow: none; }
.pub-btn-lg:active { transform: scale(.98); }

/* ---------- 7. Forms (inputs >= 16px so iOS doesn't zoom) ---------- */
.pub-form label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .25rem; }
.pub-form .fg { margin-bottom: .875rem; }
.pub-form input, .pub-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--input);
  border: 1.5px solid var(--border); border-radius: var(--r); padding: .75rem .875rem; min-height: 48px; box-sizing: border-box;
}
.pub-form textarea { min-height: 130px; resize: vertical; }
.pub-form input:focus, .pub-form textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.pub-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot */
.pub-alert { border-radius: var(--r); padding: .75rem .875rem; margin-bottom: .875rem; font-size: .9rem; line-height: 1.5; }
.pub-alert.ok { background: var(--green-l); color: var(--green-text); border: 1px solid var(--green); }
.pub-alert.err { background: var(--red-l); color: var(--red-text); border: 1px solid var(--red); }
.pub-form button[type=submit] { width: 100%; border: 0; cursor: pointer; font-size: 1rem; }
.pub-form button[disabled] { opacity: .6; cursor: wait; }

/* ---------- 8. Footer ---------- */
.pub-foot { background: var(--card-bg); border-top: 1px solid var(--border); padding: 1rem 0 .75rem; color: var(--text2); font-size: .8125rem; }
.pub-foot-cols { display: none; }
.pub-foot-bar { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; }
.pub-dev a { color: var(--green-text); font-weight: 600; text-decoration: none; }
.pub-foot h3 { font-size: .9375rem; color: var(--text); margin: 0 0 .625rem; }
.pub-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .375rem; }
.pub-foot a { color: var(--text2); text-decoration: none; }
.pub-foot a:hover { color: var(--green-text); }
.pub-foot-brand { display: flex; align-items: center; gap: .5rem; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.125rem; color: var(--text); margin-bottom: .5rem; }
.pub-foot-brand b { color: var(--green-text); }
.pub-social { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .625rem; }
.pub-social a { border: 1px solid var(--border); border-radius: 999px; padding: .25rem .75rem; font-weight: 600; }

/* ---------- 9. Motion: page transition + image fade-in (skeleton) ---------- */
@keyframes pubIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pub-main { animation: pubIn .35s ease both; }
.pub img { opacity: 1; transition: opacity .35s ease; }
.pub img.pub-lazy:not(.loaded) { opacity: 0; background: linear-gradient(90deg, var(--input), var(--border), var(--input)); background-size: 200% 100%; animation: pubShimmer 1.2s linear infinite; }
@keyframes pubShimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .pub-main, .pub img, .pub img.pub-lazy:not(.loaded) { animation: none !important; transition: none !important; }
  .pub-btn, .pub-bottom a, .pub-card.hover, .pub-btn-lg { transition: none !important; }
}

/* ---------- 10. Media queries ---------- */
/* Tablet 768px+: compact top menu, 2-column grids, no bottom app bar */
@media (min-width: 768px) {
  :root { --pub-bar-h: 64px; }
  body.pub { padding-bottom: 0; }
  .pub-bottom, .pub-show-m { display: none !important; }
  .pub-hide-m { display: inline-flex !important; }
  .pub-page-title { display: none; }
  .pub-brand-t { display: inline; }
  .pub-nav { display: flex; align-items: center; gap: .125rem; margin-left: 1rem; }
  .pub-nav a { color: rgba(255,255,255,.88); text-decoration: none; font-weight: 600; font-size: .9375rem; padding: .5rem .75rem; border-radius: 8px; }
  .pub-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
  .pub-nav a.active { color: #fff; background: rgba(255,255,255,.18); }
  .pub-fab { bottom: 20px; right: 20px; }
  .pub-sec { padding: 2.5rem 0; }
  .pub-grid { grid-template-columns: repeat(2, 1fr); }
  .pub-split { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .snap-row { display: grid; grid-template-columns: repeat(2, 1fr); overflow: visible; margin: 0; padding: 0; }
  .snap-row > * { flex: none; }
  .pub-foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 1.5rem; padding-bottom: 1.25rem; margin-bottom: .75rem; border-bottom: 1px solid var(--border); }
  .pub-foot-bar { flex-direction: row; justify-content: space-between; }
  .pub-card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
  .pub-btn:hover, .pub-btn-lg:hover { filter: brightness(.94); }
}
/* Desktop 1024px+: full website — 3-column grids, large hero */
@media (min-width: 1024px) {
  .pub-grid.cols3, .snap-row.cols3 { grid-template-columns: repeat(3, 1fr); }
  .pub-grid.cols4 { grid-template-columns: repeat(4, 1fr); }
  .pub-hero { padding: 3.5rem 0 3rem; }
  .pub-hero-grid { grid-template-columns: 1.2fr 1fr; align-items: center; gap: 3rem; }
  .pub-page-hero { padding: 2.75rem 0 2.25rem; }
  .pub-sec { padding: 3.5rem 0; }
  .pub-nav { margin-left: 2rem; }
}
/* Large desktop 1280px+: a little more breathing room */
@media (min-width: 1280px) {
  :root { --pub-max: 1280px; --pub-gap: 24px; }
  .pub-sec { padding: 4rem 0; }
}
