/*
 * ═══════════════════════════════════════════════════════
 *  COBERMINAS — CSS MOBILE DEDICADO
 *  Cobre todos os breakpoints: 768px, 480px, 390px
 *  Carregado APÓS style.css e coberminas-modern.css
 * ═══════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════
   BASE MOBILE — até 768px
═══════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Scroll horizontal: ZERO ── */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* ── Container ── */
  .container {
    padding: 0 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ── HEADER ── */
  #header {
    padding: 0 1rem !important;
  }
  .nav { display: none !important; }
  .mobile-menu-btn { display: flex !important; }
  .header-cta .btn-white { display: none !important; }
  .header-cta { gap: 0.4rem !important; }
  .logo-img { height: 42px !important; max-width: 150px !important; }
  .header-cta .btn {
    padding: 0.45rem 0.8rem !important;
    font-size: 0.72rem !important;
  }
  /* Ocultar botão de orçamento rápido no header mobile — mantém só WhatsApp */
  .header-cta .btn-secondary { display: none !important; }

  /* ── STATS BAR ── */
  .stats-bar { padding: 0.6rem 0 !important; }
  .stats-bar-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0 !important;
  }
  .stats-bar-item {
    padding: 0.5rem 0.75rem !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.12) !important;
    font-size: 0.72rem !important;
  }
  .stats-bar-item:nth-child(odd) {
    border-right: 1px solid rgba(255,255,255,0.12) !important;
  }
  .stats-bar-item:nth-last-child(-n+2) { border-bottom: none !important; }
  .stats-bar-icon { font-size: 1rem !important; }
  .stats-bar-text { font-size: 0.7rem !important; }

  /* ── HERO CLEAN — mobile ── */
  #hero {
    min-height: 100svh !important;
    min-height: 100vh !important; /* fallback */
    align-items: stretch !important;
  }

  /* Wrap mobile: padding considera header 60px + espaço visual */
  .hero-clean-wrap {
    padding: calc(60px + 1.5rem) 1.25rem calc(70px + 1rem) !important;
    max-width: 100% !important;
    min-height: unset !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  /* Logo: reaparece no mobile (oculto no desktop) */
  .hero-clean-logo {
    display: block !important;
    margin-bottom: 0.65rem !important;
  }
  .hero-clean-logo img {
    height: 44px !important;
    max-width: 180px !important;
  }

  /* Kicker: textos compactos em linha */
  .hero-clean-kicker {
    font-size: 0.6rem !important;
    padding: 0.3rem 0.8rem !important;
    gap: 0.15rem 0.4rem !important;
    margin-bottom: 0.85rem !important;
    line-height: 1.5 !important;
  }

  /* Título: grande mas que caiba */
  .hero-clean-title {
    font-size: clamp(1.55rem, 7vw, 2.2rem) !important;
    margin-bottom: 0.6rem !important;
    line-height: 1.15 !important;
  }

  /* Subtítulo */
  .hero-clean-sub {
    font-size: 0.84rem !important;
    margin-bottom: 1.1rem !important;
    line-height: 1.55 !important;
  }

  /* Botões: coluna no mobile */
  .hero-clean-cta {
    flex-direction: column !important;
    gap: 0.6rem !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
    max-width: 320px !important;
  }
  .hero-clean-btn-primary,
  .hero-clean-btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    padding: 0.82rem 1.25rem !important;
  }

  /* Stats: grid compacto */
  .hero-clean-stats {
    padding: 0.85rem 0.25rem !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 320px !important;
  }
  .hero-clean-stat {
    padding: 0 0.75rem !important;
  }
  .hero-clean-stat strong {
    font-size: 1.15rem !important;
  }
  .hero-clean-stat span {
    font-size: 0.57rem !important;
  }
  .hero-clean-stat-divider {
    height: 28px !important;
  }

  /* Scroll chevron: oculto no mobile */
  .hero-clean-scroll {
    display: none !important;
  }

  /* ── PORTFÓLIO GRID ── */
  #portfolio-slider { height: auto !important; overflow: visible !important; min-height: unset !important; }
  #portfolio-slider .container { padding: 2rem 1rem !important; }
  #portfolio-slider [style*="grid-template-columns"],
  .portfolio-photos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  #portfolio-slider h2 { font-size: 1.4rem !important; }

  /* ── SEÇÕES ── */
  .section { padding: 2.5rem 0 !important; }
  .section-header { margin-bottom: 2rem !important; }
  .section-title { font-size: clamp(1.3rem, 5vw, 1.8rem) !important; }
  .section-subtitle { font-size: 0.88rem !important; }
  .section-badge { font-size: 0.7rem !important; }
  .divider-accent { margin: 0.75rem auto !important; }

  /* ── SERVIÇOS ── */
  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .service-card { border-radius: 10px !important; }
  .isotelha-slideshow { height: 180px !important; }
  .service-card-content { padding: 1.1rem !important; }
  .service-card-title { font-size: 1rem !important; }
  .service-card-desc { font-size: 0.82rem !important; }
  .service-card-cta {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  .service-card-cta .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .gallery-filters {
    gap: 0.35rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  .filter-btn {
    font-size: 0.7rem !important;
    padding: 0.35rem 0.7rem !important;
  }

  /* ── GALERIA ── */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  .gallery-item { border-radius: 6px !important; }

  /* ── BLOG ── */
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .blog-card-image { height: 180px !important; }
  .blog-card-body { padding: 1rem !important; }
  .blog-title { font-size: 0.92rem !important; }
  .blog-excerpt { font-size: 0.8rem !important; }
  .blog-meta .btn { font-size: 0.75rem !important; }

  /* ── DIFERENCIAIS ── */
  .why-grid { grid-template-columns: 1fr !important; }
  .why-card { padding: 1.25rem !important; }

  /* ── HISTÓRIA ── */
  .historia-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .historia-logo-box { padding: 1.25rem !important; }
  .historia-stats-row { grid-template-columns: repeat(3, 1fr) !important; }
  .hist-stat { padding: 0.75rem 0.5rem !important; }
  .hist-stat-value { font-size: 1.4rem !important; }
  .milestone { gap: 0.75rem !important; }
  .milestone-dot { width: 38px !important; height: 38px !important; }
  .dif-grid { grid-template-columns: 1fr !important; }

  /* ── KINGSPAN ── */
  .kingspan-inner {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  .kingspan-text { text-align: center !important; }
  .kingspan-badges { justify-content: center !important; }
  .ksp-badge { font-size: 0.72rem !important; }

  /* ── AVALIAÇÕES ── */
  #reviews-grid { grid-template-columns: 1fr !important; }

  /* ── CONTATO ── */
  .contact-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .contact-form { padding: 1.5rem 1rem !important; }
  .form-title { font-size: 1rem !important; }
  .form-row { grid-template-columns: 1fr !important; }
  .contact-info-item { padding: 0.75rem !important; }

  /* ── FOOTER ── */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 1.5rem !important; }
  .footer-bottom { flex-direction: column !important; text-align: center !important; gap: 0.75rem !important; }
  .footer-seo-tags { justify-content: center !important; }
  .footer-title { font-size: 0.8rem !important; }
  .footer-link { font-size: 0.78rem !important; }

  /* ── MOBILE NAV (menu hamburguer) ── */
  .mobile-nav { top: var(--header-h, 64px) !important; }
  .mobile-nav a { padding: 0.9rem 1.25rem !important; font-size: 0.88rem !important; }

  /* ── BOTÃO FLUTUANTE WHATSAPP ── */
  .whatsapp-float, .whatsapp-fab {
    bottom: 70px !important;
    right: 1rem !important;
    width: 52px !important;
    height: 52px !important;
    font-size: 1.4rem !important;
  }

  /* ── BARRA INFERIOR DE NAVEGAÇÃO ── */
  .bottom-nav, #bottomNav, .service-quick-nav {
    padding: 0.4rem 0.2rem !important;
  }
  .bottom-nav-item, .quick-nav-item {
    font-size: 0.58rem !important;
    gap: 0.2rem !important;
    padding: 0.3rem 0.2rem !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .bottom-nav-item i, .quick-nav-item i {
    font-size: 1rem !important;
  }
  .bottom-nav-item span, .quick-nav-item span {
    font-size: 0.55rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 48px !important;
  }

  /* ── MASCOTE LEO — posiciona no canto, nunca sobrepõe conteúdo ── */
  #leo-wrap {
    bottom: 68px !important;
    left: 8px !important;
    transform: scale(0.78) !important;
    transform-origin: bottom left !important;
  }
  /* Barra TTS — mantém na base */
  #leo-tts-bar {
    bottom: 8px !important;
    right: 8px !important;
  }
  .mascot-wrapper, .mascot-float, [class*="mascot"], [id*="mascot"],
  .chat-mascot, .lion-mascot {
    bottom: 65px !important;
    right: 1rem !important;
    transform: scale(0.8) !important;
    transform-origin: bottom right !important;
  }

  /* ── TOASTS ── */
  .toast-container, #toastContainer {
    left: 1rem !important;
    right: 1rem !important;
    bottom: 70px !important;
    max-width: 100% !important;
  }

  /* ── MODAL / LIGHTBOX ── */
  .modal-content, .lightbox-content {
    margin: 0.5rem !important;
    border-radius: 8px !important;
    max-height: 95vh !important;
    overflow-y: auto !important;
  }
}

/* ═══════════════════════════════════
   MOBILE PEQUENO — até 480px
═══════════════════════════════════ */
@media (max-width: 480px) {

  /* ── Container ── */
  .container { padding: 0 0.85rem !important; }

  /* ── Header ── */
  .logo-img { height: 38px !important; max-width: 130px !important; }
  .header-cta .btn {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.7rem !important;
  }

  /* ── Hero Clean — 480px ── */
  .hero-clean-wrap {
    padding: 4rem 1rem 2.5rem !important;
  }
  .hero-clean-logo img {
    height: 50px !important;
  }
  .hero-clean-title {
    font-size: clamp(1.5rem, 9vw, 2.1rem) !important;
  }
  .hero-clean-sub {
    font-size: 0.83rem !important;
  }
  .hero-clean-stat { padding: 0 0.65rem !important; }
  .hero-clean-stat strong { font-size: 1.1rem !important; }

  /* ── Portfólio grid ── */
  #portfolio-slider { height: auto !important; overflow: visible !important; min-height: unset !important; }
  #portfolio-slider [style*="grid-template-columns"],
  .portfolio-photos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── Cards de serviço ── */
  .isotelha-slideshow { height: 160px !important; }
  .service-card-header { height: 160px !important; }

  /* ── Blog ── */
  .blog-card-image { height: 160px !important; }

  /* ── Galeria ── */
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── Diferenciais ── */
  .why-grid { grid-template-columns: 1fr !important; }
  .dif-grid { grid-template-columns: 1fr !important; }

  /* ── História stats ── */
  .historia-stats-row { grid-template-columns: 1fr 1fr !important; }

  /* ── Footer ── */
  .footer-grid { grid-template-columns: 1fr !important; }

  /* ── Seções ── */
  .section { padding: 2rem 0 !important; }
  .section-title { font-size: clamp(1.2rem, 6vw, 1.6rem) !important; }

  /* ── Botões grandes ── */
  .btn-lg {
    padding: 0.75rem 1.1rem !important;
    font-size: 0.82rem !important;
  }

  /* ── Barra de stats ── */
  .stats-bar-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ═══════════════════════════════════
   MOBILE MUITO PEQUENO — até 360px
═══════════════════════════════════ */
@media (max-width: 360px) {

  .container { padding: 0 0.65rem !important; }

  /* ── Hero Clean — 360px ── */
  .hero-clean-title { font-size: 1.45rem !important; }
  .hero-clean-btn-primary,
  .hero-clean-btn-secondary { font-size: 0.87rem !important; padding: 0.8rem 1.2rem !important; }
  .hero-clean-kicker { font-size: 0.57rem !important; }

  .bottom-nav-item span, .quick-nav-item span {
    display: none !important;
  }
  .bottom-nav-item i, .quick-nav-item i {
    font-size: 1.1rem !important;
  }

  .blog-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; }
}
