/* ==========================================================================
   BREAKPOINTS & RESPONSIVIDADE ERGONÔMICA MOBILE & TABLET
   Cintra Cartuchos & Print Delivery
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. AJUSTES GERAIS MOBILE (< 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  :root {
    --space-md: 0.85rem;
    --space-lg: 1.25rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
    --space-4xl: 3.5rem;
  }

  /* Evitar qualquer transbordo horizontal */
  *, *::before, *::after {
    max-width: 100%;
    box-sizing: border-box;
  }

  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* -----------------------------------------------------------------------
     HEADER / NAV
     ----------------------------------------------------------------------- */
  .site-header {
    height: auto;
  }

  .header-container {
    height: 64px;
    padding: 0 0.85rem;
  }

  .brand-logo-img {
    height: 38px;
    width: 38px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-tagline {
    font-size: 0.625rem;
  }

  /* -----------------------------------------------------------------------
     TOP BANNERS
     ----------------------------------------------------------------------- */
  .top-launch-banner,
  .top-promo-banner {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .top-launch-container,
  .top-promo-container {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.5rem;
  }

  .top-launch-content,
  .top-promo-content {
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
  }

  .top-launch-actions,
  .top-promo-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }

  .top-launch-btn,
  .btn-copy-coupon {
    flex: 1;
    min-height: 38px;
    justify-content: center;
  }

  .top-launch-close,
  .top-promo-close {
    min-width: 40px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
  }

  /* -----------------------------------------------------------------------
     HERO SECTION
     ----------------------------------------------------------------------- */
  .hero-section {
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
    text-align: center;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero-badge-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    word-break: break-word;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .hero-cta-group {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 0.65rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    min-height: 52px;
  }

  /* Trust bar: forçar 3 colunas iguais com fonte menor */
  .hero-trust-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 1rem;
  }

  .trust-number {
    font-size: 1.1rem;
  }

  .trust-label {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  /* Pills de serviço */
  .hero-service-pill {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
    text-align: left;
  }

  .hero-service-pill > div:last-child {
    min-width: 0;
    flex: 1;
    text-align: left;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Vídeo teaser — altura controlada no mobile */
  .hero-teaser-banner {
    margin-top: 1.25rem;
    max-height: 200px;
    aspect-ratio: unset;
  }

  .hero-teaser-video {
    max-height: 200px;
    object-fit: cover;
  }

  /* -----------------------------------------------------------------------
     SEÇÃO COMO FUNCIONA (STEPS)
     ----------------------------------------------------------------------- */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .step-card {
    padding: 1.1rem 1rem;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .step-number {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  /* -----------------------------------------------------------------------
     SIMULADORES (RECARGA & PRINT)
     ----------------------------------------------------------------------- */
  .simulator-box {
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-lg) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .simulator-step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .form-radio-group,
  .form-checkbox-group {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .custom-option {
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    min-height: 48px;
    text-align: center;
  }

  /* Todos os inputs e selects 100% de largura */
  .form-input,
  .form-select,
  .form-textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    /* Previne zoom automático do iOS ao focar */
    font-size: max(16px, 0.9rem) !important;
  }

  /* Cupom: input + botão empilhados no mobile */
  .coupon-field-wrap {
    flex-direction: column;
    gap: 0.5rem;
  }

  .coupon-field-wrap input {
    width: 100%;
  }

  .coupon-field-wrap .btn {
    width: 100%;
    justify-content: center;
  }

  /* Card de preço do simulador */
  .price-display-card {
    padding: 1.25rem 0.85rem;
    margin: 1.25rem 0;
    width: 100%;
    box-sizing: border-box;
  }

  .price-display-value {
    font-size: 1.65rem;
    color: #ffffff !important;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .price-display-value strong,
  .price-display-value span {
    color: #ffffff !important;
  }

  /* -----------------------------------------------------------------------
     SEÇÃO ECONOMIA / COMPARATIVO
     ----------------------------------------------------------------------- */
  .economy-proof-header {
    padding: 1rem 1.25rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .economy-compare-grid {
    padding: 1rem;
    gap: 1rem;
  }

  .compare-col {
    padding: 1rem;
  }

  .compare-metric-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.5rem 0;
  }

  .compare-metric-label {
    font-size: 0.8rem;
    font-weight: 600;
  }

  .compare-metric-val {
    font-size: 0.875rem;
  }

  .economy-tech-pills {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.65rem;
  }

  /* -----------------------------------------------------------------------
     MARCAS ATENDIDAS
     ----------------------------------------------------------------------- */
  .brands-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .brand-chip {
    white-space: normal !important;
    word-break: break-word;
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
  }

  /* -----------------------------------------------------------------------
     FEATURE CARDS (Print Delivery Diferenciais)
     ----------------------------------------------------------------------- */
  .feature-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .feature-card {
    padding: 1rem 0.75rem;
  }

  .feature-card-icon {
    font-size: 1.5rem;
  }

  .feature-card-title {
    font-size: 0.875rem;
  }

  .feature-card-desc {
    font-size: 0.75rem;
  }

  /* -----------------------------------------------------------------------
     DIAGNÓSTICO / FORMULÁRIO B2B
     ----------------------------------------------------------------------- */
  .diagnostic-info {
    width: 100%;
    box-sizing: border-box;
  }

  .diagnostic-form-wrap {
    padding: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* -----------------------------------------------------------------------
     SEÇÃO CORPORATIVA / ESCOLAS
     ----------------------------------------------------------------------- */
  .corporate-segment-card {
    padding: 1.1rem;
  }

  .corporate-case-card {
    padding: 1.25rem 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .corporate-case-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .corp-col {
    padding: 1rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .corp-list li {
    display: block !important;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* -----------------------------------------------------------------------
     PRINT DELIVERY — LAYERS (3 CAMADAS)
     ----------------------------------------------------------------------- */
  .layers-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .layer-card {
    padding: 1.25rem 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  /* -----------------------------------------------------------------------
     LOJA / PRODUTOS
     ----------------------------------------------------------------------- */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .store-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    justify-content: flex-start;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }

  /* -----------------------------------------------------------------------
     FAQ / CONTATO
     ----------------------------------------------------------------------- */
  .faq-question {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  .faq-answer {
    padding: 0 1rem 0.85rem 1rem;
  }

  .contact-grid {
    gap: 1.5rem;
  }

  /* -----------------------------------------------------------------------
     BAIRROS DE ATENDIMENTO
     ----------------------------------------------------------------------- */
  .neighborhoods-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .neighborhood-badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.65rem;
    word-break: break-word;
  }

  /* -----------------------------------------------------------------------
     PORTFÓLIO
     ----------------------------------------------------------------------- */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* -----------------------------------------------------------------------
     BOTÃO FLUTUANTE WHATSAPP
     ----------------------------------------------------------------------- */
  .wa-floating-btn {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
    z-index: var(--z-floating-wa);
  }

  .wa-floating-btn .wa-floating-text {
    display: none;
  }

  .wa-floating-btn .wa-icon-wrap svg {
    width: 28px;
    height: 28px;
  }

  /* -----------------------------------------------------------------------
     BOTÕES GERAIS
     ----------------------------------------------------------------------- */
  .btn {
    min-height: 48px;
    font-size: 0.95rem;
    padding: 0.75rem 1.2rem;
    white-space: normal !important;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    touch-action: manipulation;
  }

  .btn-lg {
    min-height: 52px;
    font-size: 1rem;
  }

  /* -----------------------------------------------------------------------
     UTILITÁRIOS
     ----------------------------------------------------------------------- */
  .d-none-sm {
    display: none !important;
  }

  /* section-header no mobile */
  .section-header {
    margin-bottom: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   2. MOBILE MUITO PEQUENO (< 380px)
   -------------------------------------------------------------------------- */
@media (max-width: 379px) {
  .form-radio-group,
  .form-checkbox-group {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .brand-text {
    max-width: 130px;
    overflow: hidden;
  }

  /* Trust bar: em telas muito pequenas empilha tudo */
  .hero-trust-bar {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .trust-number {
    font-size: 1rem;
  }

  /* Feature cards: 1 coluna em telas < 380px */
  .feature-cards-grid {
    grid-template-columns: 1fr;
  }

  /* Bairros: 1 coluna em telas muito pequenas */
  .neighborhoods-grid {
    grid-template-columns: 1fr;
  }

  /* Portfólio: mantém 1 coluna mas com margem menor */
  .portfolio-item {
    border-radius: var(--radius-md);
  }
}

/* --------------------------------------------------------------------------
   3. TABLETS (768px a 1023px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta-group {
    grid-template-columns: repeat(3, 1fr);
  }

  .diagnostic-card {
    grid-template-columns: 1fr;
  }

  .layers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .economy-tech-pills {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   4. DESKTOP GRANDE (>= 1440px)
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
}

/* --------------------------------------------------------------------------
   5. MODO DE IMPRESSÃO
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .wa-floating-btn,
  .lgpd-banner,
  .site-footer,
  .btn,
  .top-launch-banner,
  .top-promo-banner,
  .modal-backdrop {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }
}

/* ==========================================================================
   TIPOGRAFIA MOBILE E SCROLL BAR
   ========================================================================== */
@media (max-width: 767px) {
  p, .step-desc, .benefit-text p, .layer-item {
    line-height: 1.65;
  }
  
  .hero-description {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.6;
  }
}

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cyan));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Micro-interao para pill de servio do hero */
.hero-service-pill:active {
  transform: scale(0.98);
  background-color: var(--color-accent-light);
  border-color: var(--color-accent);
  transition: all 80ms ease;
}
