/* Megainffo - CSS Responsivo */

:root {
  --primary: #004a8f; /* Azul principal */
  --secondary: #f37021; /* Laranja secundária */
}

.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.btn-primary { background-color: var(--primary); border: none; }
.btn-primary:hover { background-color: #003366; }

.hero {
  background: var(--primary);
  color: white;
  padding: 35px 0;
  text-align: center;
}

.card-icon {
  font-size: 40px;
  color: var(--primary);
}

/* Logo Desktop - Tamanho maior */
.navbar-brand img {
  height: 70px;
  transition: height 0.3s ease;
}

/* Ajuste da navbar para acomodar logo maior */
.bg-white {
  padding: 15px 0 !important;
}

/* Imagens responsivas */
.card-img-top {
  transition: transform 0.3s ease;
}

.card-img-top:hover {
  transform: scale(1.05);
}

.card {
  overflow: hidden;
}

/* Responsividade para Tablets (768px e abaixo) */
@media (max-width: 768px) {
  .hero {
    padding: 40px 0;
  }
  
  .hero h1 {
    font-size: 2rem !important;
  }
  
  .hero p {
    font-size: 1rem !important;
  }
  
  .card-icon {
    font-size: 30px;
  }
  
  .navbar-brand img {
    height: 45px !important;
  }

  .bg-white {
    padding: 10px 0 !important;
  }
  
  .alert .row {
    text-align: center;
  }
  
  .alert .col-md-2 {
    margin-bottom: 1rem;
  }
  
  section {
    padding: 3rem 0 !important;
  }
  
  .display-4 {
    font-size: 2.5rem !important;
  }
  
  .lead {
    font-size: 1.1rem !important;
  }
  
  h1 {
    font-size: 2rem !important;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .card-body ul {
    font-size: 0.9rem;
  }
  
  /* Ajustes para formulários */
  .form-control {
    font-size: 16px; /* Evita zoom no iOS */
  }
  
  /* Melhor espaçamento em mobile */
  .mb-5 {
    margin-bottom: 2rem !important;
  }

  .mt-5 {
    margin-top: 2rem !important;
  }

  /* Ajustes para imagens em mobile */
  .card-img-top {
    height: 150px !important;
  }

  /* Banner responsivo */
  section[style*="background"] {
    padding: 2rem 0 !important;
  }

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

/* Responsividade para Smartphones (576px e abaixo) */
@media (max-width: 576px) {
  .hero {
    padding: 30px 0;
  }

  .hero h1 {
    font-size: 1.75rem !important;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .card-body {
    padding: 1rem !important;
  }

  .display-4 {
    font-size: 2rem !important;
  }

  h1 {
    font-size: 1.75rem !important;
  }

  .card-body h5 {
    font-size: 1.1rem !important;
  }

  .navbar-brand img {
    height: 40px !important;
  }
  
  /* Ajustes específicos para cards pequenos */
  .card-text {
    font-size: 0.9rem;
  }
  
  /* Navbar mobile */
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  /* Footer mobile */
  footer {
    padding: 2rem 0 !important;
  }
  
  /* Botões mobile */
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* Tabelas responsivas */
  .table-responsive {
    font-size: 0.875rem;
  }
}

/* Responsividade para telas muito pequenas (480px e abaixo) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem !important;
  }

  .card-icon {
    font-size: 25px;
  }

  .card-body {
    padding: 0.75rem !important;
  }

  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .navbar-brand img {
    height: 35px !important;
  }

  /* Imagens ainda menores em telas pequenas */
  .card-img-top {
    height: 120px !important;
  }

  /* Ajustes para seção da sede em mobile */
  .row.align-items-center {
    text-align: center;
  }

  .row.align-items-center .col-lg-6:first-child {
    margin-bottom: 2rem;
  }

  /* Ajustes para logos de produtos */
  .card-body img {
    max-height: 60px !important;
  }

  /* Garantir que gradientes funcionem */
  .card[style*="gradient"] {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
  }
  
  /* Ajustes para ícones grandes em mobile */
  .alert div[style*="font-size: 50px"] {
    font-size: 35px !important;
  }
  
  .alert div[style*="font-size: 60px"] {
    font-size: 40px !important;
  }
  
  .alert div[style*="font-size: 80px"] {
    font-size: 50px !important;
  }
}

/* Melhorias gerais de UX mobile */
@media (max-width: 768px) {
  /* Touch targets maiores */
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Melhor legibilidade */
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  
  /* Espaçamento otimizado */
  .row.g-4 {
    --bs-gutter-y: 2rem;
  }
  
  /* Cards mais compactos em mobile */
  .card {
    margin-bottom: 1rem;
  }
  
  /* Imagens responsivas */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 20px 0;
  }
  
  .hero h1 {
    font-size: 1.75rem !important;
  }
}

/* Ajustes para acessibilidade */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
