/* =========================================
   PÁGINA DOWNLOADS (MOBILE OVERRIDES - FIX FINAL)
   Arquivo: /assets/css/mobile/downloads.css
   ========================================= */

@media (max-width: 1024px) {
  
  /* --- 1. HERO --- */
  .downloads-hero {
    padding: 60px 0;
  }
  .downloads-hero h1 {
    font-size: 32px;
    margin-bottom: 25px;
  }
  .breadcrumbs {
    font-size: 11px;
    margin-bottom: 15px;
  }

  /* --- 2. BUSCA (CORREÇÃO DA LUPA E INPUT) --- */
  .search-wrapper {
    position: relative;
    width: 100%;
  }

  .search-wrapper input {
    height: 55px;
    font-size: 16px; 
    padding-right: 50px; 
    padding-left: 20px;
    border-radius: 50px; 
    border: 1px solid #ddd; /* Borda visível no fundo branco */
    background: #FFFFFF;
    color: #333;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  }
  
  /* Lupa: Removemos o quadrado azul e invertemos a cor da imagem */
  .search-wrapper .search-icon {
    position: absolute !important;
    top: 50% !important;
    right: 5px !important;
    transform: translateY(-50%) !important;
    
    width: 45px !important;
    height: 45px !important;
    
    background: transparent !important; /* REMOVE O AZUL */
    border: none !important;
    box-shadow: none !important;
    border-radius: 50%;
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10;
    padding: 0 !important;
  }

  /* Inverte a cor da lupa (de branca para cinza escuro) */
  .search-wrapper .search-icon img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    filter: invert(0.6) !important; /* Truque: inverte cores */
    transform: none !important;
  }

  /* --- 3. FILTROS --- */
  .filters-header {
    flex-direction: column; align-items: flex-start; gap: 15px; margin-bottom: 30px;
  }
  .filter-tabs {
    flex-wrap: wrap; gap: 10px; width: 100%;
  }
  .tab-btn {
    background: #fff; border: 1px solid #ddd; color: #555;
    padding: 12px 15px; font-size: 14px; border-radius: 6px; 
    flex-grow: 1; justify-content: center; text-align: center;
  }
  .tab-btn.active {
    background: var(--azul-cardan, #0067ab); color: #fff; border-color: var(--azul-cardan, #0067ab); font-weight: 700;
  }
  .tab-btn i { display: none; }

  /* --- 4. GRID E CARDS --- */
  .downloads-grid-visual { grid-template-columns: 1fr; gap: 25px; }
  .dl-img-box { height: auto; aspect-ratio: 16/9; }
  .dl-content { padding: 20px; gap: 15px; }
  .btn-dl-action {
    padding: 15px 0; font-size: 14px; width: 100%; display: block; text-align: center;
    border: 2px solid var(--azul-cardan, #0067ab); color: var(--azul-cardan, #0067ab); background: transparent;
  }
  .btn-load-more {
    width: 100%; padding: 15px; justify-content: center;
  }

  /* --- 5. MODAL (FUNDO BRANCO) --- */
  .modal-container {
    padding: 15px;
    align-items: center;
    z-index: 99999;
  }

  .modal-content.form-content {
    width: 100%;
    max-width: 100%;
    /* Padding topo extra para o botão X */
    padding: 50px 20px 30px 20px; 
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
    margin: 0;
    position: relative;
    background: #FFFFFF; /* Fundo branco */
  }

  .form-header h3 { font-size: 22px; color: var(--azul-cardan, #0067ab); margin-top: 0; }
  .form-group input {
    padding: 12px; font-size: 16px; background: #fff; border: 1px solid #ccc; color: #333; border-radius: 6px; width: 100%;
  }
  .btn-enviar-form {
    width: 100%; padding: 15px; font-size: 16px; font-weight: 800; border-radius: 6px; background: var(--azul-cardan, #0067ab); color: #fff; border: none;
  }

  /* --- BOTÃO FECHAR (X) FORÇADO --- */
  .fechar-modal-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    
    width: 44px !important; 
    height: 44px !important;
    
    background: #f0f2f5 !important; /* Fundo cinza visível no branco */
    border: none !important;
    border-radius: 50% !important;
    
    /* Z-index alto para garantir clique */
    z-index: 9999 !important; 
    cursor: pointer !important;
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* DESENHA O X VIA CSS (Caso o HTML esteja vazio) */
  .fechar-modal-btn::after {
    font-size: 32px;
    font-weight: bold;
    color: #555;
    line-height: 1;
    display: block;
  }
}