/* ==============================================================================
   responsive.css - Adaptação Fluida para Telas Mobile e Desktop
   Breakpoints: 360px, 480px, 768px, 1024px, 1440px
   Portal Oficial Abraão Araújo (Rei dos Apps) / AC Agência Digital
   ============================================================================== */

/* Telas Grandes (>= 1440px) */
@media (min-width: 1440px) {
  :root {
    --max-width: 1360px;
  }
}

/* Notebooks e Desktops Médios (<= 1200px) */
@media (max-width: 1200px) {
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
  .footer-fiscal-box {
    grid-column: span 4;
  }
}

/* Tablets e Desktops Menores (<= 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .hero-headline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group-main {
    justify-content: center;
  }

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

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

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

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

  .footer-fiscal-box {
    grid-column: span 2;
  }
}

/* Tablets e Celulares (<= 768px) - OTIMIZAÇÃO CRÍTICA MOBILE */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  /* 1. ELIMINAR FOTO GIGANTE NA HERO E REDUZIR ESPAÇO NO MOBILE */
  .hero-section {
    padding: 28px 0 32px 0 !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    text-align: left !important;
  }

  .hero-photo-wrap {
    display: none !important; /* Elimina a foto que consome espaço vertical desnecessário */
  }

  .hero-headline {
    font-size: clamp(1.8rem, 6.5vw, 2.3rem) !important;
    line-height: 1.14 !important;
    margin-bottom: 14px !important;
    letter-spacing: -0.02em !important;
  }

  .section-desc {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    margin-bottom: 20px !important;
  }

  .hero-cta-group-main {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 18px !important;
  }

  .hero-cta-group-main .btn {
    width: 100% !important;
    padding: 13px 20px !important;
    font-size: 0.95rem !important;
  }

  .hero-stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 14px !important;
    gap: 10px !important;
    margin-top: 22px !important;
  }

  .stat-number {
    font-size: 1.5rem !important;
  }

  .stat-label {
    font-size: 0.75rem !important;
  }

  .section {
    padding: 45px 0 !important;
  }

  .section-sm {
    padding: 30px 0 !important;
  }

  .section-title {
    font-size: 1.7rem !important;
    line-height: 1.2 !important;
  }

  .section-title-wrap {
    margin-bottom: 30px !important;
    text-align: left !important;
  }

  /* 2. HEADER MOBILE LIMPO E SEM QUEBRA */
  .header-inner {
    height: var(--header-height);
  }

  .header-cta-group .btn {
    display: none !important; /* Esconde botões do header no mobile para evitar sobreposição */
  }

  .menu-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 1.3rem;
  }

  /* 3. MENU MOBILE COM FUNDO 100% SÓLIDO E COBERTURA TOTAL */
  .nav-menu {
    position: fixed !important;
    top: var(--header-height) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--header-height)) !important;
    background: #070b09 !important; /* 100% sólido, sem transparência ou vazamento */
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 24px 20px 40px !important;
    gap: 8px !important;
    border-top: 1px solid var(--border-color) !important;
    display: none;
    overflow-y: auto !important;
    z-index: 99999 !important;
  }

  .nav-menu.open {
    display: flex !important;
  }

  .nav-link {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    width: 100% !important;
    padding: 12px 14px !important;
    border-radius: var(--radius-sm);
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
  }

  .nav-link:hover, .nav-link.active {
    background: var(--accent-soft);
    border-color: var(--accent-neon);
    color: var(--accent-neon) !important;
  }

  /* Botão de WhatsApp em destaque dentro do menu mobile */
  .nav-menu-cta {
    width: 100%;
    margin-top: 12px;
  }

  /* 4. GRIDS EM 1 COLUNA NO MOBILE */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .card {
    padding: 20px !important;
  }

  /* 5. BOTÃO FLUTUANTE DO WHATSAPP COMPACTO (ÍCONE CIRCULAR) */
  .floating-whatsapp {
    right: 18px !important;
    bottom: 20px !important;
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5) !important;
    z-index: 999 !important;
  }

  .floating-whatsapp span {
    display: none !important; /* Esconde o texto no mobile para não tapar botões da página */
  }

  .floating-whatsapp svg {
    width: 28px !important;
    height: 28px !important;
  }

  /* 6. BANNER DE COOKIES COMPACTO */
  .cookie-banner {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    padding: 16px !important;
    max-width: none !important;
    font-size: 0.8rem !important;
  }

  .cookie-btn-group {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .cookie-btn-group .btn {
    width: 100% !important;
  }

  /* Rodapé no Mobile */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .footer-fiscal-box {
    grid-column: span 1 !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 10px !important;
  }
}

/* Celulares Estreitos (<= 380px) */
@media (max-width: 380px) {
  .hero-headline {
    font-size: 1.65rem !important;
  }

  .hero-stats-bar {
    grid-template-columns: 1fr 1fr !important;
  }

  .brand-logo {
    font-size: 0.95rem !important;
  }
}
