/* =========================================
   mobile.css
   MOBILE OVERRIDES (SINGLE SOURCE OF TRUTH)
   Uses ONLY ss-offcanvas menu
   Load LAST in base.html
========================================= */


/* =========================================
   1) GLOBAL MOBILE SAFETY + WRAPPER
========================================= */
@media (max-width: 991.98px) {

  /* Global safety */
  *, *::before, *::after { box-sizing: border-box; }

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--ss-paper, #f7f2ea);
  }

  img, svg, video, canvas {
    max-width: 100%;
    height: auto;
  }

  /* Main width wrapper */
  .site-frame {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Prevent footer / rails from affecting page width */
  footer.site-footer,
  .rail {
    overflow-x: hidden;
  }
}


/* =========================================
   2) NAVBAR (MOBILE PILL + BRAND SUBTITLE)
   - Restores: "Shiatsu Shane | Health & Wellbeing"
   - Makes navbar feel like an inset pill on mobile
========================================= */
@media (max-width: 991.98px) {

  /* Let pill “float” */
  .main-nav {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    background: transparent;
  }

  /* The pill container (site-frame nav-frame) */
  .main-nav .nav-frame {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    /* inset pill feel */
    width: 94%;
    max-width: 520px;
    margin: 0 auto;

    padding: 0.65rem 0.9rem;
    border-radius: 22px;

    background: #9fb3a2; /* your sage */
    box-shadow: 0 10px 26px rgba(0,0,0,0.12);

    overflow: hidden; /* prevents toggler overflow */
  }

  /* Brand */
  .main-nav .navbar-brand {
    flex: 1 1 auto;
    min-width: 0;            /* critical for ellipsis */

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 0.95rem;
    line-height: 1.2;
  }

  /* Show separator + subtitle again (subtle) */
  .main-nav .brand-sep,
  .main-nav .brand-sub {
    display: inline;
    opacity: 0.65;
    font-weight: 600;
  }

  .main-nav .brand-sep { margin: 0 0.25rem; }

  .main-nav .brand-sub {
    font-size: 0.85em;
    letter-spacing: -0.01em;
  }

  /* Hamburger */
  .main-nav .navbar-toggler.ss-burger {
    flex: 0 0 auto;
    margin-left: auto;

    width: 44px;
    height: 44px;
    padding: 0.35rem;

    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;

    display: grid;
    place-items: center;
  }

  /* Remove Bootstrap hidden “Menu” label */
  .navbar-toggler .visually-hidden { display: none !important; }

  /* Darken the burger lines */
  .main-nav .ss-burger .navbar-toggler-icon {
    filter: opacity(0.95) brightness(0.25);
  }
}


/* =========================================
   3) SERVICES RAIL (MOBILE)
========================================= */
@media (max-width: 991.98px) {

  .rail-track {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    padding-left: 0.25rem;
    padding-right: 0.25rem;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .rail-track::-webkit-scrollbar { display: none; }

  /* Hide arrows on mobile */
  .rail-btn { display: none !important; }
}


/* =========================================
   4) FOOTER (MOBILE)
========================================= */
@media (max-width: 991.98px) {

  .footer-grid {
    grid-template-columns: 1fr !important;
    min-width: 0;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-grid > * { min-width: 0; }
  .footer-grid a { overflow-wrap: anywhere; }

  .site-footer { padding: 1.25rem 0; }
}


/* =========================================
   5) OFFCANVAS (FINAL / PREMIUM)
   Works with your latest navbar.html
========================================= */
@media (max-width: 991.98px) {

  /* Drawer container */
  .ss-offcanvas {
    width: min(82vw, 360px) !important;

    /* inset sheet look */
    right: 12px;
    height: auto;

    border-radius: 22px;
    overflow: hidden;

    background: linear-gradient(
      180deg,
      rgba(247, 242, 234, 0.98),
      rgba(247, 242, 234, 0.94)
    );
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: -18px 0 50px rgba(0,0,0,0.22);
  }

  /* Backdrop */
  .offcanvas-backdrop.show { opacity: 0.18; }

  /* Header */
  .ss-offcanvas__header {
    padding: 1.05rem 1rem 0.85rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .ss-offcanvas__brand-title {
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: 1.15rem;
    color: rgba(18, 22, 20, 0.92);
    line-height: 1.1;
  }

  .ss-offcanvas__brand-sub {
    margin-top: 0.15rem;
    font-weight: 750;
    font-size: 0.95rem;
    color: rgba(18, 22, 20, 0.60);
  }

  .ss-offcanvas__close {
    opacity: 0.75;
    filter: saturate(0) brightness(0.35);
  }
  .ss-offcanvas__close:hover { opacity: 1; }

  /* Body */
  .ss-offcanvas__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Links */
  .ss-offcanvas-links {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.25rem;
  }

  .ss-offcanvas-link {
    display: block;
    text-decoration: none;
    color: rgba(18, 22, 20, 0.88);
    font-weight: 850;

    background: rgba(110, 131, 116, 0.12);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    padding: 0.95rem 1rem;

    box-shadow: 0 14px 30px rgba(0,0,0,0.10);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  }

  .ss-offcanvas-link:hover,
  .ss-offcanvas-link:focus {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 18px 38px rgba(0,0,0,0.14);
  }

  /* CTA block */
  .ss-offcanvas-cta {
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.06);
  }

  /* PREMIUM "Book Now" button (use this class on the link in HTML) */
  .ss-offcanvas-cta-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;

    padding: 1rem 1.1rem;
    border-radius: 999px;

    background: linear-gradient(
      180deg,
      rgba(231, 127, 103, 0.98),
      rgba(231, 127, 103, 0.92)
    );

    color: rgba(255,255,255,0.96);
    font-weight: 900;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    text-decoration: none;

    border: 1px solid rgba(0,0,0,0.06);
    box-shadow:
      0 14px 34px rgba(0,0,0,0.18),
      inset 0 1px 0 rgba(255,255,255,0.25);

    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
  }

  .ss-offcanvas-cta-btn:hover,
  .ss-offcanvas-cta-btn:focus {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow:
      0 20px 46px rgba(0,0,0,0.22),
      inset 0 1px 0 rgba(255,255,255,0.25);
  }

  .ss-offcanvas-cta-btn:active {
    transform: translateY(0px);
    filter: brightness(0.99);
  }

  .ss-offcanvas-cta-arrow {
    display: inline-block;
    transform: translateY(-0.5px);
    opacity: 0.95;
  }

  .ss-offcanvas-note {
    margin-top: 0.7rem;
    text-align: center;
    font-weight: 650;
    color: rgba(18, 22, 20, 0.55);
    font-size: 0.95rem;
  }
}


/* =========================================
   6) SERVICES PAGE: push title down slightly (mobile)
========================================= */
@media (max-width: 575.98px) {
  .services-title,
  .services-kicker,
  .services-hero .kicker {
    margin-top: 0.75rem;
  }
}


/* =========================================
   7) PREMIUM MOBILE TIGHTENING (subtle)
========================================= */
@media (max-width: 575.98px) {

  /* Slight global scale down */
  html { font-size: 15px; }

  /* Tighter horizontal rhythm */
  .site-frame { padding-left: 0.9rem; padding-right: 0.9rem; }

  /* Reduce big section padding a touch */
  section { padding-top: 1.6rem; padding-bottom: 1.6rem; }

  /* Hero: reduce headline + spacing */
  .hero-inner { padding-top: 5.6rem !important; }
  .hero-title { font-size: clamp(1.55rem, 7vw, 2.05rem) !important; }
  .hero-sub   { font-size: 0.98rem !important; max-width: 34ch; }

  /* Buttons: slightly slimmer */
  .nav-pill .nav-shell { padding: 0.55rem 0.75rem !important; }
  .nav-cta-btn,
  .home-cta__btn,
  .aboutb-btn {
    padding: 0.55rem 1rem !important;
    font-size: 0.98rem !important;
  }

  /* About card (home) */
  .aboutb-title { font-size: 1.75rem !important; }
  .aboutb-text  { font-size: 0.92rem !important; line-height: 1.55 !important; }
  .aboutb-photo { height: 12.25rem !important; }

  /* Testimonials */
  .testimonials-header h2 { font-size: clamp(1.55rem, 6.2vw, 2rem) !important; }
  .t-stars { font-size: 1.25rem !important; }
  .t-card  { height: auto !important; min-height: 210px; }

  /* Services rails/cards */
  .rail-track   { grid-auto-columns: minmax(220px, 1fr) !important; }
  .service-card { min-height: 200px !important; }
}


/* =========================================
   8) HOME: ABOUT CARD — prevent overlap into testimonials (mobile)
   Clamp text + add safe spacing
========================================= */
@media (max-width: 575.98px) {

  .about-clean,
  .aboutb {
    padding-bottom: 1.5rem !important;
  }

  .aboutb-wrap {
    max-height: none !important;
    margin-bottom: 1.25rem !important;
  }

  /* If your about text is inside .aboutb-text, clamp it */
  .aboutb-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;

    -webkit-line-clamp: 7;
    line-clamp: 7;

    max-height: calc(1.62em * 7);
  }

  /* Fallback for multiple <p> tags */
  .aboutb-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;

    -webkit-line-clamp: 7;
    line-clamp: 7;
  }

  .aboutb-card .aboutb-btn,
  .aboutb-card .btn,
  .aboutb-card a.aboutb-btn {
    margin-top: 0.9rem !important;
  }
}


/* =========================================
   9) TESTIMONIALS: seam killer between spacer + section (mobile)
   (Keep it simple + reliable)
========================================= */
@media (max-width: 991.98px) {

  .t-spacer {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
  }

  .testimonials,
  .testimonials-bg {
    margin-top: 0 !important;
    border-top: 0 !important;
  }

  /* Micro-seam killer */
  .t-spacer { margin-bottom: -1px !important; }

  .testimonials,
  .testimonials-bg,
  .testimonials-bg::before,
  .testimonials-bg::after {
    border-top: 0 !important;
    box-shadow: none !important;
  }
}


/* =========================================
   10) HOME BENEFITS — mobile upgrade (premium + readable)
========================================= */
@media (max-width: 575.98px) {

  /* Kill special last-row centering behavior */
  .benefits-row-center {
    grid-column: auto !important;
    display: contents !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* Single column list */
  .benefits-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    align-items: stretch;
  }

  /* Each becomes a compact “card row” */
  .benefit-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 0.85rem !important;

    text-align: left !important;
    padding: 0.95rem 1rem !important;

    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.08);
  }

  /* Icon badge */
  .benefit-icon {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  }

  .benefit-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* Copy: stop narrow wrapping */
  .benefit-text {
    max-width: none !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
  }
}


/* =========================================
   11) ABOUT PAGE: reduce gap between hero and cards (mobile)
========================================= */
@media (max-width: 575.98px) {

  /* Reduce the "double py-5" join */
  .about-hero  { padding-bottom: 1.75rem !important; }
  .about-cards { padding-top:    1.75rem !important; }

  /* Optional: tighten all about sections slightly */
  .about-cards,
  .about-expect,
  .about-practice,
  .about-final-cta {
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
  }
}


/* =========================================
   12) ABOUT: What to Expect — premium (2 columns on phones)
========================================= */
.about-expect {
  background: var(--ss-paper, #f7f2ea);
}

.about-section-title h2 {
  font-weight: 850;
  letter-spacing: -0.02em;
  color: rgba(18, 22, 20, 0.92);
}

/* Card styling */
.expect-item {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.10);
  backdrop-filter: blur(8px);

  padding: 1.25rem 1.1rem;

  /* Center the whole block content */
  text-align: center;
}

/* Icon badge */
.expect-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  margin: 0 auto 0.75rem;

  background: rgba(110, 131, 116, 0.14);
  border: 1px solid rgba(0,0,0,0.06);
  display: grid;
  place-items: center;
}

.expect-svg {
  width: 26px;
  height: 26px;
  color: rgba(110, 131, 116, 0.95);
}

.expect-title {
  font-weight: 850;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
  color: rgba(18, 22, 20, 0.90);
}

.expect-text {
  margin: 0;
  color: rgba(18, 22, 20, 0.65);
  line-height: 1.5;
}

/* Mobile tightening */
@media (max-width: 575.98px) {

  .about-expect {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }

  .about-expect .row { --bs-gutter-y: 0.9rem; }

  .expect-item { padding: 1.1rem 1rem; }
  .expect-icon { margin-bottom: 0.6rem; }

  /* Force 2 columns on phones */
  .about-expect .col-12 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Fit nicely */
  .expect-title { font-size: 1.02rem; }
  .expect-text  { font-size: 0.92rem; }

  .expect-icon { width: 50px; height: 50px; }
  .expect-svg  { width: 24px; height: 24px; }
}

/* MOBILE: tighten the gap above Testimonials */
@media (max-width: 575.98px){

  /* make the green bar slimmer on mobile */
  .t-spacer{
    height: 22px; /* was 42px */
  }

  /* remove the “double padding” feeling */
  .testimonials{
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* reduce the big top padding on the bg image section */
  .testimonials-bg{
    padding-top: 1.5rem !important;   /* was clamp(...) */
    padding-bottom: 2.25rem !important;
  }
}
