/* Footer bar runs edge to edge; the logo and links stay in the content column. */
.v4-product-page footer.footer {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
  background: #19143f;
  color: #d9cfea;
  padding-left: max(56px, calc((100% - 1368px) / 2));
  padding-right: max(56px, calc((100% - 1368px) / 2));
}
.inner-page footer.footer {
  padding-left: max(40px, calc((100% - 1120px) / 2));
  padding-right: max(40px, calc((100% - 1120px) / 2));
}
.v4-product-page .footer .brand img {
  width: 112px;
  height: auto;
  max-height: 72px;
  object-fit: contain;
}
.v4-product-page .footer > span { color: #d9cfea; }
.v4-product-page .footer > a:not(.brand) { color: #efe7ff; }

/* Phone and small-tablet layout for the four landing pages. */
@media (max-width: 999px) {
  html, body { overflow-x: clip; }
  .wrap {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .wrap .wrap { padding-left: 0 !important; padding-right: 0 !important; }

  h1, .tv-hero-copy h1, .maps-hero h1, #hero-title {
    font-size: clamp(32px, 8.4vw, 42px) !important;
    letter-spacing: -0.8px !important;
    overflow-wrap: break-word;
  }
  h2, .section-heading h2, .v2-heading h2, .closing-section h2 {
    font-size: clamp(28px, 7.4vw, 36px) !important;
  }
  .section { padding-block: 56px; }
  .section-heading, .scenario-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .section-intro { max-width: none; flex: none; }

  .v4-product-page .header-shell { height: 68px; }
  .v4-product-page .header.wrap {
    min-height: 68px;
    gap: 10px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    flex-wrap: nowrap;
  }
  .v4-product-page .header .desktop-nav { display: none !important; }
  .v4-product-page .header-socials { display: none; }
  .v4-product-page .header .contact-button {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 12px;
    gap: 8px;
  }
  .v4-product-page .hero-shell { padding-top: 68px; }
  .v4-product-page .hero-shell .v2-hero,
  .v2-hero {
    min-height: 0 !important;
    padding-top: 20px !important;
    padding-bottom: 36px !important;
  }
  .header.wrap, header.wrap { gap: 10px; }
  .hero-actions, .contact-channels { flex-direction: column; align-items: stretch; }
  .hero-actions .button, .contact-channels .button { width: 100%; white-space: normal; text-align: center; }

  .hero-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    gap: 24px !important;
    padding-bottom: 28px !important;
  }
  .hero-visual, .tv-hero-visual, .maps-visual { min-width: 0; width: 100%; }

  .tv-hero, .maps-hero, .template-layout, .custom-section, .price-layout,
  .faq-grid, .closing-section, .report-layout, .maps-pricing, .theme-stage,
  .benefit-grid, .work-grid, .maps-case-grid, .scenario-grid, .management-grid,
  .process-grid, .ads-strip, .offer-grid, .pricing-grid, .price-grid,
  .problem-grid, .situation-grid, .package-grid, .measure-grid, .cap-grid,
  .order-growth, .revenue-reasons, .demo-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    min-height: 0 !important;
  }
  .tv-hero, .maps-hero { padding-block: 12px 36px; align-items: start; }
  .management-grid article { flex-direction: column; gap: 12px; }
  .start-note, .design-card-top, .work-note, .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .start-note .button, .price-card .button, .maps-price-card .button { width: 100%; }
  .footer { min-height: 0; padding-block: 28px; }
  .footer > span { width: auto; margin-right: 0; }

  .theme-toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
  .theme-nav { justify-content: space-between; }
  .theme-detail h3, .theme-detail .theme-description { min-height: 0 !important; }
  .theme-thumbnail { flex-basis: 72%; min-width: 180px; }
  .template-selector { flex-wrap: wrap; width: 100%; }
  .template-selector button { flex: 1 1 auto; justify-content: center; }

  .maps-visual { height: auto !important; margin: 8px 0 0 !important; display: flex; flex-direction: column; gap: 14px; }
  .map-board { position: relative; inset: auto; height: 220px; }
  .place-preview { position: relative !important; top: auto !important; left: auto !important; width: 100% !important; }
  .map-service-badges { position: relative; bottom: auto; left: auto; right: auto; flex-wrap: wrap; justify-content: flex-start; }
  .pin-main { width: 52px; height: 52px; right: 28px; top: 120px; }
  .pin-main svg { width: 26px; height: 26px; }
  .case-main-metric strong, .maps-price, .price-amount, .price { font-size: 40px !important; }
  .maps-price span, .price-amount > span { font-size: 28px !important; }

  .offer-catalog-tabs {
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
  }
  .offer-catalog-tabs button { flex: 1 1 calc(50% - 8px); min-width: 0; }
  #offer-assistant .raccoon-strip,
  #offer-assistant-legacy .raccoon-strip,
  .raccoon-strip {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-height: 0 !important;
    gap: 16px !important;
  }
  .raccoon-invite, .raccoon-ask, .raccoon-entry, .raccoon-chips, .raccoon-portrait {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: auto !important;
  }
  #offer-assistant .raccoon-invite h2 span, #offer-assistant-legacy .raccoon-invite h2 span { white-space: normal !important; display: inline !important; }
  .raccoon-entry { height: auto !important; flex-wrap: wrap; }
  .raccoon-entry input { min-width: 0; flex: 1 1 140px; }
  .raccoon-portrait { max-width: 180px !important; margin-inline: auto; }

  .v4-mega {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
    max-height: calc(100dvh - 80px);
    border-radius: 0 0 18px 18px;
  }
  .v4-mega-body, .v4-menu-grid, .v4-company-grid, .v4-solutions-grid, .v4-overview-grid {
    grid-template-columns: 1fr !important;
    min-height: 0;
  }
  .v4-mega-categories { display: flex; gap: 8px; overflow-x: auto; padding: 12px; }
  .v4-mega-heading, .v4-mega-content, .v4-company-grid, .v4-solutions-grid { padding: 16px !important; }
  .v4-menu-item-copy > span { -webkit-line-clamp: 3; }

  dialog, .template-dialog, .maps-product .template-dialog {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px);
  }
  .demo-phone { width: min(100%, 340px); margin-inline: auto; }

  .v4-mega-footer { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .v4-mega-footer > div { margin-right: 0; width: 100%; }
  .v4-menu-cta, .v4-mega-footer a.v4-menu-phone { white-space: normal; }
  .v4-inquiry-grid { grid-template-columns: 1fr !important; }
  .v4-inquiry-info, .v4-inquiry-contacts { padding: 28px 20px; }
  .faq-list summary { font-size: 16px; align-items: flex-start; }
}
