/* ============================================
   CORREÇÕES MOBILE - LOCAMAR
   Fixes específicos para problemas mobile
   ============================================ */

/* ============================================
   1. MENU MOBILE - CORREÇÃO DO HEADER
   ============================================ */
@media (max-width: 1023px) {
  /* FORÇAR esconder nav desktop */
  .header .nav {
    display: none !important;
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background-color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    padding: 1.5rem !important;
    transform: translateY(-120%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
    max-height: calc(100vh - 70px) !important;
    overflow-y: auto !important;
    gap: 0 !important;
  }

  /* Mostrar apenas quando ativo */
  .header .nav.active {
    display: flex !important;
    flex-direction: column !important;
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Menu hambúrguer DEVE ser visível */
  .header .menu-toggle {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 40px !important;
    height: 40px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    z-index: 1001 !important;
    gap: 5px !important;
  }

  .header .menu-toggle span {
    display: block !important;
    width: 25px !important;
    height: 3px !important;
    background-color: #486e35 !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
  }

  /* Animação do menu hambúrguer */
  .header .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px) !important;
  }

  .header .menu-toggle.active span:nth-child(2) {
    opacity: 0 !important;
  }

  .header .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px) !important;
  }

  /* Nav list em coluna */
  .header .nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .header .nav-list li {
    width: 100% !important;
    border-bottom: 1px solid #f0f0f0 !important;
    margin: 0 !important;
  }

  .header .nav-list li:last-child {
    border-bottom: none !important;
  }

  /* Links */
  .header .nav-link {
    display: block !important;
    padding: 1rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
  }

  .header .nav-link::after {
    display: none !important;
  }

  .header .nav-link:hover,
  .header .nav-link.active {
    color: #486e35 !important;
    background-color: rgba(72, 110, 53, 0.05) !important;
  }

  /* Botão de contato no menu mobile */
  .header .btn-contact {
    width: 100% !important;
    margin-top: 1rem !important;
    justify-content: center !important;
    display: inline-flex !important;
  }
}

/* ============================================
   2. FOOTER - CORREÇÃO MOBILE
   ============================================ */
@media (max-width: 767px) {
  /* Footer wrapper */
  footer {
    padding: 2rem 0 1rem !important;
  }

  /* Footer grid principal - forçar 1 coluna */
  footer .container > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
  }

  /* Cada seção do footer */
  footer .container > div:first-child > div {
    margin-bottom: 0 !important;
    text-align: left;
    width: 100% !important;
  }

  /* Descrição do footer - largura total */
  footer .container > div:first-child > div p {
    max-width: 100% !important;
  }

  /* Logo do footer */
  footer img {
    display: block;
    margin-bottom: 1rem;
    height: 45px !important;
  }

  /* Listas do footer */
  footer ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  footer ul li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem !important;
  }

  /* Links do footer */
  footer a {
    color: #666 !important;
    text-decoration: none;
    font-size: 0.9rem !important;
  }

  /* Títulos do footer */
  footer h3 {
    font-size: 1.1rem !important;
    margin-bottom: 1rem !important;
  }

  /* Footer Bottom - flex para coluna */
  footer .container > div:last-child {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
    align-items: center !important;
  }

  /* Links do footer bottom (Política/Termos) */
  footer .container > div:last-child > div {
    flex-direction: column !important;
    gap: 0.75rem !important;
    text-align: center !important;
  }

  /* Footer content class */
  .footer-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
    text-align: left;
  }

  .footer-section {
    width: 100%;
  }

  .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .footer-links li {
    margin-bottom: 0.75rem;
  }

  .footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column !important;
    gap: 1rem !important;
  }
}

/* ============================================
   3. SEÇÃO "SOBRE NÓS" - HOME
   ============================================ */
@media (max-width: 767px) {
  /* Container da seção sobre */
  .section [style*="grid-template-columns: 1fr 1fr"] {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  /* Título menor no mobile */
  .section h2 {
    font-size: 1.75rem !important;
  }

  /* Features grid - 1 coluna no mobile */
  .section [style*="grid-template-columns: 1fr 1fr"][style*="gap: 1rem"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* Features items */
  .section [style*="display: flex; align-items: flex-start"] {
    font-size: 0.9rem !important;
  }

  /* Botão full width */
  .section a[style*="display: inline-block"] {
    display: block !important;
    text-align: center;
    width: 100%;
  }

  /* Stats cards */
  .section [style*="display: flex; align-items: center; gap: 1rem"] {
    padding: 1.25rem !important;
  }

  .section [style*="font-size: 2rem"] {
    font-size: 1.5rem !important;
  }

  /* Missão box */
  .section [style*="background: linear-gradient"] {
    padding: 1.5rem !important;
    margin-top: 1.5rem;
  }
}

/* ============================================
   4. HERO SECTION - MOBILE
   ============================================ */
@media (max-width: 767px) {
  .hero {
    min-height: 400px !important;
  }

  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }

  .hero-subtitle {
    font-size: 0.95rem !important;
  }

  .hero-buttons {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100% !important;
  }
}

/* ============================================
   5. CARDS E PRODUTOS - MOBILE
   ============================================ */
@media (max-width: 767px) {
  .card {
    padding: 1.25rem !important;
  }

  .products-grid,
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* Product cards */
  .card h3 {
    font-size: 1rem !important;
  }

  .card [style*="font-size: 2.5rem"] {
    font-size: 1.75rem !important;
  }
}

/* ============================================
   6. CONTATO - MOBILE
   ============================================ */
@media (max-width: 767px) {
  /* Contact methods */
  .grid-md-3 {
    grid-template-columns: 1fr !important;
  }

  /* Contact cards */
  .card[style*="padding: 2.5rem 2rem"] {
    padding: 1.5rem 1rem !important;
  }

  .card h3[style*="font-size: 1.5rem"] {
    font-size: 1.25rem !important;
  }
}

/* ============================================
   7. HEADER - GARANTIR VISIBILIDADE
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.header-logo img {
  height: 40px;
  width: auto;
}

/* ============================================
   8. UTILITY FIXES
   ============================================ */
@media (max-width: 767px) {
  /* Container padding */
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Section spacing */
  .section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Text sizes */
  h1 {
    font-size: 2rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  /* Gaps */
  .gap-6 {
    gap: 1rem !important;
  }

  .gap-8 {
    gap: 1.5rem !important;
  }

  /* Grid cols */
  .grid-cols-1 {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================
   9. OVERLAY PARA FECHAR MENU
   ============================================ */
@media (max-width: 1023px) {
  .nav-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* ============================================
   10. SEÇÃO "ENTRE EM CONTATO" VERDE - HOME
   ============================================ */
@media (max-width: 767px) {
  /* Seção verde de contato */
  section[style*="background: linear-gradient"] {
    padding: 2.5rem 1rem !important;
  }

  /* Grid de 3 colunas (Telefone/WhatsApp/Endereço) para 1 coluna */
  section[style*="background: linear-gradient"] [style*="display: grid"][style*="grid-template-columns: repeat(3, 1fr)"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  /* Cards individuais de contato */
  section[style*="background: linear-gradient"] > div > div > div {
    width: 100%;
    padding: 1.5rem !important;
  }

  /* Ícones nos cards */
  section[style*="background: linear-gradient"] [style*="width: 70px; height: 70px"] {
    width: 60px !important;
    height: 60px !important;
  }

  section[style*="background: linear-gradient"] svg {
    width: 28px !important;
    height: 28px !important;
  }

  /* Títulos nos cards */
  section[style*="background: linear-gradient"] h3 {
    font-size: 1.25rem !important;
  }

  /* Texto nos cards */
  section[style*="background: linear-gradient"] p {
    font-size: 1rem !important;
  }

  /* Botão WhatsApp */
  section[style*="background: linear-gradient"] a[style*="background-color: #57D163"] {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
    justify-content: center !important;
  }

  /* Horário de atendimento */
  section[style*="background: linear-gradient"] [style*="text-align: center; margin-top: 2rem"] {
    margin-top: 1.5rem !important;
  }

  section[style*="background: linear-gradient"] [style*="display: inline-flex; align-items: center"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    text-align: center !important;
  }
}

/* ============================================
   11. GARANTIR QUE O MENU NÃO QUEBRE
   ============================================ */
@media (min-width: 1024px) {
  .nav {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .nav-list {
    flex-direction: row !important;
    gap: 2rem !important;
  }

  .nav-link {
    padding: 0 !important;
    border-bottom: none !important;
  }

  .btn-contact {
    width: auto !important;
    margin-top: 0 !important;
  }
}
