/* ==========================================================================
   FERTAGIL FERTILIZANTES - RESPONSIVE STYLES (FASE 2)
   Otimizado para: 1920px | 1440px | 1366px | 1024px | 768px | 430px | 390px | 360px
   ========================================================================== */

/* --- TELAS MÉDIAS & NOTEBOOKS (< 1200px) --- */
@media (max-width: 1200px) {
  .about-grid {
    gap: 3.2rem;
  }

  .products-editorial-grid {
    gap: 1.5rem;
  }

  .differentials-grid {
    gap: 1.8rem;
  }

  .market-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }

}

/* --- TABLETS (< 992px) --- */
@media (max-width: 992px) {
  .section {
    padding: 5rem 0;
  }

  /* Header & Menu Mobile Drawer */
  .header.floating,
  .header.scrolled {
    width: calc(100% - 24px);
    top: 8px;
  }

  .header-inner {
    padding: 0.75rem 1.25rem;
  }

  .header.floating .header-inner,
  .header.scrolled .header-inner {
    padding: 0.58rem 1.1rem;
  }

  .header-actions .header-action-btn {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #FFFFFF;
    box-shadow: -10px 0 35px rgba(1, 38, 31, 0.15);
    flex-direction: column;
    align-items: stretch;
    padding: 5.5rem 1.8rem 2rem 1.8rem;
    gap: 0;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    overflow-y: auto;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(1, 38, 31, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    /* Fica atrás do cabeçalho/menu para não desfocar nem bloquear os links. */
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    width: 100%;
    padding: 0.95rem 0;
    color: #01261F;
    border-bottom: 1px solid rgba(1, 64, 53, 0.08);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link-cta-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    padding: 0.88rem 1.4rem;
    background-color: var(--color-brand-primary);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(1, 64, 53, 0.2);
    transition: background-color 0.2s ease;
  }

  .nav-link-cta-mobile:hover {
    background-color: var(--color-brand-dark);
  }

  /* Seção A FertAgil */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.8rem;
  }

  .about-img {
    height: 380px;
  }

  /* Produtos */
  .products-editorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    margin: 0;
    gap: 1.5rem;
  }

  /* Diferenciais */
  .differentials-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
    gap: 1.6rem;
  }

  .market-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  /* Contato */
  .contact-info-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
  }

  /* Footer */
  .footer-top-row {
    flex-direction: column;
    text-align: center;
    gap: 2.2rem;
  }

  .footer-logo {
    display: inline-block;
  }

  .footer-brand-area {
    width: 100%;
  }

  .footer-nav {
    justify-content: center;
  }

  .footer-contact-area {
    text-align: center;
  }
}

/* --- SMARTPHONES & TELAS PEQUENAS (< 768px) --- */
@media (max-width: 768px) {
  .section {
    padding: 4.2rem 0;
  }

  .section-market {
    padding: 4.2rem 0;
  }

  .market-indicator-card {
    padding: 1.35rem 1.2rem;
  }

  .market-price-val {
    font-size: 1.7rem;
  }

  .clients-showcase {
    margin-top: 2.5rem;
    padding: 0.6rem;
  }

  .clients-showcase-heading {
    align-items: center;
    padding: 0 0.8rem 0 0.2rem;
    margin-right: 0.5rem;
  }

  .client-logo-slot {
    flex-basis: 135px;
    min-height: 50px;
  }

  .section-header {
    margin-bottom: 2.8rem;
  }

  /* Hero Mobile (Impactante & Imponente com 100svh) */
  .hero-section {
    min-height: 100svh;
  }

  .hero-container {
    padding-top: 90px;
    padding-bottom: 45px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.7rem);
    line-height: 1.18;
  }

  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.9rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Indicadores do Mercado */
  .market-cards-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
    gap: 1.2rem;
  }

  /* Contato */
  .section-contact-hero {
    padding: 5.5rem 0;
  }

  .contact-info-strip {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.2rem;
    padding: 1.6rem 1.2rem;
  }

  .btn-primary-light {
    width: 100%;
  }

  /* Botão Flutuante WhatsApp */
  .whatsapp-floating {
    bottom: 1.2rem;
    right: 1.2rem;
    padding: 0.65rem 1.1rem;
    font-size: 0.84rem;
  }

  .whatsapp-floating svg {
    width: 18px;
    height: 18px;
  }
}

/* --- TELAS ULTRA COMPACTAS (< 430px: 390px, 360px) --- */
@media (max-width: 430px) {
  .hero-title {
    font-size: 1.95rem;
  }

  .about-img {
    height: 280px;
  }

  .product-card-media {
    height: 250px;
  }

  .product-card-body {
    padding: 1.6rem 1.2rem;
  }

  .diff-card {
    padding: 2rem 1.5rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.9rem;
  }
}

@media (max-width: 768px) {
  .products-editorial-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }
}
