/* =============================================================================
   RESPONSIVE — Texting for Less Theme
   Breakpoints: tablet ≤ 1024px | mobile ≤ 768px | small ≤ 480px
   ============================================================================= */

/* ── Logo image ───────────────────────────────────────────────────────────── */
.nav-logo-img {
  height: 44px;
  width: auto;
  display: block;
}

/* ── Hamburger Button ─────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.nav-hamburger:hover { border-color: var(--orange); }
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
  pointer-events: none;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav Drawer ────────────────────────────────────────────────────── */
/*
 * NOTE: `nav` in main.css has `position: sticky` which establishes a
 * containing block for absolutely-positioned children — no `position: relative`
 * override needed here (and it would break sticky).
 */
.nav-mobile {
  /* Hidden on desktop */
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
  z-index: 500;
  /* Animate via visibility+opacity so transitions work */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
}

.nav-mobile.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-mobile-links li a {
  display: block;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: color 0.2s, background 0.2s;
}
.nav-mobile-links li:last-child a { border-bottom: none; }
.nav-mobile-links li a:hover,
.nav-mobile-links li.current-menu-item > a {
  color: var(--orange);
  background: #fff8f0;
}
.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 24px 8px;
  border-top: 1px solid #f3f4f6;
  margin-top: 4px;
}
.nav-mobile-actions .btn-ghost,
.nav-mobile-actions .btn-primary {
  text-align: center;
  width: 100%;
  display: block;
}
.nav-mobile-actions .nav-phone {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
}

/* Lock scroll when mobile menu open */
body.nav-open { overflow: hidden; }

/* ============================================================================
   TABLET  ≤ 1024px
   ============================================================================ */
@media (max-width: 1024px) {

  /* ── Nav ── */
  .nav-hamburger  { display: flex; }
  .nav-links      { display: none !important; }
  .nav-actions    { display: none !important; }
  .nav-mobile     { display: block; }

  /* ── Container ── */
  .container { padding: 0 24px; }

  /* ── Hero (Homepage) ── */
  .hero { padding: 60px 0 48px; overflow: hidden; }
  .hero .container {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .hero-left { text-align: center; }
  .hero-left .hero-ctas { justify-content: center; }
  .hero-right { justify-content: center; }
  .hero h1 { font-size: 42px; letter-spacing: -1px; }
  .float-dashboard { right: -20px; top: 10px; width: 260px; }

  /* ── Inner page heroes — centered ── */
  .about-hero h1,
  .serve-hero h1,
  .comparison-hero h1,
  .faq-hero h1,
  .contact-hero h1,
  .pricing-hero h1,
  .features-hero h1,
  .team-hero h1,
  .demo-hero h1 { font-size: 40px; }

  /* ── Grids → 2 col ── */
  .serve-grid       { grid-template-columns: repeat(2, 1fr); }
  .awards-grid      { grid-template-columns: repeat(2, 1fr); }
  .proof-grid       { grid-template-columns: repeat(2, 1fr); }
  .team-grid        { grid-template-columns: repeat(2, 1fr); }
  .industries-grid  { grid-template-columns: repeat(2, 1fr); }
  .values-grid      { grid-template-columns: repeat(2, 1fr); }

  /* ── Features ── */
  .features-strip    { grid-template-columns: repeat(2, 1fr); }
  .features-overview { grid-template-columns: 1fr 1fr; gap: 32px; }
  .all-features-grid { grid-template-columns: repeat(2, 1fr); }
  .new-features-grid { grid-template-columns: 1fr; }

  /* ── About ── */
  .story-grid  { grid-template-columns: 1fr; }
  .story-visual { display: none; }
  .timeline-grid { grid-template-columns: 1fr; }

  /* ── Pricing ── */
  .pricing-cards { grid-template-columns: 1fr; }
  .billing-grid  { grid-template-columns: repeat(2, 1fr); }
  .steps-grid    { grid-template-columns: 1fr; }
  .quote-grid    { grid-template-columns: 1fr; gap: 32px; }

  /* ── Us vs Them ── */
  .comparison-table { overflow-x: auto; }
  .advantages-grid  { grid-template-columns: 1fr; }
  .breakdown-grid   { grid-template-columns: 1fr; }

  /* ── Contact ── */
  .contact-grid { grid-template-columns: 1fr; }
  .message-grid { grid-template-columns: 1fr; }
  .message-content .support-image { display: none; }

  /* ── Demo ── */
  .demo-content { grid-template-columns: 1fr; }

  /* ── FAQ ── */
  .faq-layout     { grid-template-columns: 1fr; }
  .faq-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
  .faq-cat-btn    { padding: 8px 14px; font-size: 13px; }

  /* ── Who We Serve ── */
  .overview-grid { grid-template-columns: 1fr; }

  /* ── Testimonials ── */
  .testimonials-slide { grid-template-columns: 1fr; gap: 16px; }

  /* ── Footer ── */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* ── Type ── */
  .section-title    { font-size: 34px; }
  .section-subtitle { font-size: 16px; }
}

/* ============================================================================
   MOBILE  ≤ 768px
   ============================================================================ */
@media (max-width: 768px) {

  /* ── Container ── */
  .container { padding: 0 16px; }

  /* ── Nav ── */
  nav { padding: 12px 0; }
  .nav-logo-img { height: 36px; }

  /* ── Announcement bar ── */
  .announcement-bar { font-size: 12px; padding: 8px 16px; text-align: center; }

  /* ── Homepage Hero ── */
  .hero { padding: 44px 0 36px; }
  .hero .container { gap: 28px; }
  .hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.5px; }
  .hero .hero-subtitle { font-size: 15px !important; max-width: 100%; }
  .hero .hero-badge { font-size: 12px; }
  .hero-ctas { flex-direction: column; align-items: center; gap: 12px; }
  .hero-ctas a { width: 100%; max-width: 300px; text-align: center; }
  .hero-slogan { font-size: 16px !important; margin-top: 20px !important; }
  .hero-right { display: flex !important; flex-direction: column; align-items: center; gap: 16px; }
  .phone-mockup { width: 170px; height: 320px; }
  .float-dashboard { position: relative; right: auto; top: auto; width: 100%; max-width: 340px; }

  /* ── Inner page heroes ── */
  .about-hero,
  .serve-hero,
  .comparison-hero,
  .faq-hero,
  .contact-hero,
  .features-hero,
  .team-hero,
  .demo-hero,
  .blog-hero,
  .pricing-hero { padding: 44px 0 32px; }

  .about-hero h1,
  .serve-hero h1,
  .comparison-hero h1,
  .faq-hero h1,
  .contact-hero h1,
  .features-hero h1,
  .team-hero h1,
  .demo-hero h1,
  .blog-hero h1,
  .pricing-hero h1 { font-size: 28px !important; line-height: 1.2; letter-spacing: -0.3px; }

  /* ── Grids → 1 col ── */
  .serve-grid,
  .awards-grid,
  .proof-grid,
  .team-grid,
  .industries-grid,
  .values-grid,
  .features-strip,
  .billing-grid,
  .all-features-grid,
  .footer-grid { grid-template-columns: 1fr; }

  /* ── Features ── */
  .features-overview { grid-template-columns: 1fr; }
  .core-features-grid { grid-template-columns: 1fr; }
  .hero-stats-visual { display: none; }

  /* ── About ── */
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip .stat-item { padding: 20px 12px; }

  /* ── Logos strip ── */
  .logos-row { overflow-x: auto; padding-bottom: 8px; flex-wrap: nowrap; justify-content: flex-start; }

  /* ── Pricing ── */
  .quote-section .container { grid-template-columns: 1fr; }
  .quote-box { margin-top: 0; }

  /* ── FAQ ── */
  .quick-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Us vs Them ── */
  .switch-grid { grid-template-columns: repeat(2, 1fr); }
  .table-header-cell { font-size: 13px; padding: 12px 8px; }
  .table-cell        { font-size: 13px; padding: 12px 8px; }

  /* ── Who We Serve ── */
  .overview-list { grid-template-columns: 1fr; }

  /* ── Demo ── */
  .call-types    { grid-template-columns: 1fr; }
  .trust-signals { flex-direction: column; gap: 12px; }

  /* ── Blog ── */
  .blog-grid { grid-template-columns: 1fr; }

  /* ── Testimonials ── */
  .carousel-arrows { gap: 8px; }
  .carousel-arrow  { width: 40px; height: 40px; font-size: 16px; }

  /* ── CTA ── */
  .cta-section { padding: 56px 0; }
  .cta-section h2 { font-size: 26px !important; }
  .cta-buttons { flex-direction: column; align-items: center; gap: 12px; }
  .cta-buttons a { width: 100%; max-width: 300px; text-align: center; }

  /* ── Section spacing ── */
  .section-title { font-size: 26px !important; }
  section { padding: 56px 0 !important; }

  /* ── Footer ── */
  .footer-grid { gap: 24px; }
  .footer-brand { font-size: 18px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; font-size: 13px; }
}

/* ============================================================================
   SMALL MOBILE  ≤ 480px
   ============================================================================ */
@media (max-width: 480px) {

  .nav-logo-img { height: 32px; }

  .hero h1 { font-size: 26px !important; }
  .section-title { font-size: 22px !important; }

  .about-hero h1,
  .serve-hero h1,
  .comparison-hero h1,
  .faq-hero h1,
  .contact-hero h1,
  .pricing-hero h1,
  .features-hero h1 { font-size: 24px !important; }

  .stats-strip   { grid-template-columns: 1fr; }
  .quick-grid    { grid-template-columns: 1fr; }
  .switch-grid   { grid-template-columns: 1fr; }

  .testimonial-card { padding: 24px; }
  .award-card       { padding: 28px 16px; }

  .btn-primary, .btn-ghost, .btn-white {
    padding: 13px 20px;
    font-size: 14px;
  }

  .faq-categories { flex-direction: column; }
  .faq-cat-btn    { width: 100%; }

  .how-it-works-card { padding: 24px; }
  .step-number       { width: 40px; height: 40px; font-size: 16px; }
}
