/*
 * Phones and tablets. The pages are designed for desktop with sizes written on
 * each element; below 768px these rules take over (hence !important), so the
 * desktop look never changes. Checked at 320, 360, 390, 414 and 768px.
 */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-wrap:break-word}
a,button,input,select,label{-webkit-tap-highlight-color:rgba(0,96,57,.15)}
:focus-visible{outline:3px solid #E8B21A;outline-offset:2px}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

@media (max-width:768px){
  /* Headings: big but never wider than the screen. */
  h1{font-size:clamp(30px,8.4vw,44px)!important;line-height:1.22!important;letter-spacing:0!important}
  h2{font-size:clamp(24px,6.6vw,32px)!important;line-height:1.3!important}
  h3{font-size:clamp(18px,5vw,20px)!important}
  /* Display numbers and words written outside headings. */
  [style*="font-size: 64px"],[style*="font-size: 62px"]{font-size:clamp(40px,12vw,52px)!important}
  [style*="font-size: 48px"]{font-size:clamp(32px,9vw,40px)!important}
  [style*="font-size: 40px"]:not(h1):not(h2){font-size:clamp(28px,8vw,34px)!important}
  [style*="font-size: 36px"]:not(h1):not(h2){font-size:clamp(26px,7.4vw,32px)!important}
  /* Body text a touch smaller than desktop's 20px lead lines; never under 16px. */
  p[style*="font-size: 20px"],span[style*="font-size: 20px"]{font-size:17px!important}
  p[style*="font-size: 18px"],span[style*="font-size: 18px"]{font-size:16.5px!important}

  /* Section spacing: desktop's 72–96px becomes 48px; sides 18px. */
  [style*="padding: 96px 24px"],[style*="padding: 88px 24px"],[style*="padding: 72px 24px"],[style*="padding: 80px 24px"]{padding:48px 18px!important}
  [style*="padding: 88px 24px 56px"]{padding:44px 18px 36px!important}
  [style*="padding: 40px 24px 96px"]{padding:24px 18px 48px!important}
  [style*="padding: 88px 24px 0"]{padding:48px 18px 0!important}
  [style*="padding: 48px 24px 36px"],[style*="padding: 80px 24px 40px"]{padding:40px 18px 32px!important}
  /* Section gaps. */
  [style*="gap: 56px"],[style*="gap: 48px"]{gap:28px!important}
  [style*="gap: 40px"]{gap:24px!important}
  /* Big cards: less inner space. */
  [style*="padding: 44px"],[style*="padding: 40px"]{padding:24px 20px!important}
  [style*="border-radius: 28px"]{border-radius:22px!important}
  [style*="padding: 36px"]{padding:24px 18px!important}

  /* Wide grids: one column on phones. */
  [style*="minmax(320px, 1fr)"],[style*="minmax(280px, 1fr)"]{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))!important}

  /* Phone screenshots: never wider than the screen. */
  [style*="width: 300px"],[style*="width: 280px"],[style*="width: 260px"],[style*="width: 340px"]{max-width:100%!important}

  /* SSC hero: the two phones side by side, smaller, no empty space above. */
  .hero-visual{min-height:0!important;padding-top:8px;align-items:flex-end!important}
  .hero-phone.back{width:44%!important;max-width:200px!important;transform:translateY(-18px) rotate(-3deg)!important;margin-right:-8%!important;border-radius:26px!important;padding:6px!important}
  .hero-phone.front{width:50%!important;max-width:220px!important;border-radius:28px!important;padding:6px!important}
  .hero-phone img{border-radius:21px!important}

  /* Comparison table: two short columns fit a phone, no sideways scrolling. */
  table.compare{min-width:0!important;font-size:15px!important}
  table.compare th,table.compare td{padding:12px 12px!important;vertical-align:top}

  /* Footer links and phone numbers: big enough to tap. */
  footer nav a{display:inline-flex;align-items:center;min-height:44px}
  footer nav{gap:4px 20px!important}
  a[href^="tel:"]{display:inline-flex;align-items:center;min-height:44px}
  .crumb a,nav[aria-label="অবস্থান"] a{display:inline-flex;align-items:center;min-height:44px}
  a[href*="affiliate.brainbridge"]{display:inline-flex;align-items:center;min-height:44px}
  .nav-cta{min-height:44px!important;box-sizing:border-box;display:inline-flex!important;align-items:center}
}

@media (max-width:480px){
  /* Main buttons: full width, easy to hit with a thumb. */
  section a[style*="border-radius: 14px"],footer a[style*="border-radius: 14px"]{width:100%;justify-content:center;text-align:center;box-sizing:border-box}
  section div[style*="flex-wrap: wrap"]:has(> a[style*="border-radius: 14px"]){width:100%}
  /* The how-to-buy steps' number tiles keep their size. */
  [style*="width: 40px; height: 40px"]{flex:none!important}
}

/* Smallest phones (320–359px): the header must fit on one line. */
@media (max-width:359px){
  .hdr{padding:10px 12px!important;gap:8px!important}
  .hdr-logo-text{display:none}
  .nav-cta{padding:9px 12px!important;font-size:14px!important}
  .menu-toggle{width:42px!important;height:42px!important}
}

/* Footer (every page): brand · pages · contact, then a thin bottom line. */
.site-footer{background:#0B2A1C;color:#FFFFFF}
.ft-wrap{max-width:1200px;margin:0 auto;padding:56px 24px 28px}
.ft-sep{border-top:1px solid rgba(255,255,255,.15);padding-top:40px}
.ft{display:grid;grid-template-columns:1.2fr 1fr 1.5fr;gap:40px;color:#BFD6C9;font-size:15px;line-height:1.6}
.ft-logo{display:inline-flex;align-items:center;gap:10px;color:#FFFFFF;text-decoration:none;font-family:'Hind Siliguri',sans-serif;font-weight:700;font-size:21px}
.ft-logo:hover{color:#FFFFFF}
.ft-mark{width:36px;height:36px;border-radius:10px;background:#006039;border:1.5px solid rgba(255,255,255,.7);color:#FFFFFF;display:flex;align-items:center;justify-content:center;font-family:Arial,sans-serif;font-weight:700;font-size:24px;line-height:1}
.ft-brand p{margin:12px 0 0;color:#BFD6C9}
.ft-h{margin:0 0 12px;color:#FFFFFF;font-weight:700;font-size:15px}
.ft-col{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.ft-col a{color:#BFD6C9;text-decoration:none}
.ft-col a:hover{color:#FFFFFF;text-decoration:underline}
.ft-contact a,.ft-contact p{display:flex;align-items:flex-start;gap:10px;margin:0;color:#BFD6C9}
.ft-contact a{color:#FFFFFF;font-weight:600}
.ft-contact svg{flex:none;margin-top:3px;color:#8FC5A6}
.ft-contact span{min-width:0;overflow-wrap:anywhere}
.ft-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 24px;margin-top:40px;padding-top:20px;border-top:1px solid rgba(255,255,255,.15);font-size:14px;color:#8FB3A0}
@media (max-width:900px){
  .ft{grid-template-columns:1fr 1fr}
  .ft-brand{grid-column:1 / -1}
}
@media (max-width:600px){
  .ft-wrap{padding:40px 18px 24px}
  .ft{grid-template-columns:1fr;gap:28px}
  .ft-col{gap:0}
  .ft-col a,.ft-contact p{min-height:44px;align-items:center}
  .ft-contact p{align-items:flex-start;padding:10px 0}
  .ft-bottom{margin-top:28px;flex-direction:column}
}
