/* Página de Busca - Estilos Específicos */

/* Campo de Busca customizado para a página de busca */
.search-input-container {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
}

.search-input {
    width: 100%;
    height: 42px;
    padding: 10px 50px 10px 16px;
    font-size: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;    color: #374151;
    /* transition: all 0.3s ease; - Removido para evitar fade/underlap no dropdown */
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.5;
    pointer-events: none;
}

/* ==================== SEÇÃO DE CTA (EXATAMENTE IGUAL À PÁGINA DE CATEGORIA) ==================== */

/* Resetar estilos do grid quando CTA está dentro do groups-grid */
.groups-grid .cta-section {
    grid-column: 1 / -1; /* Ocupar todas as colunas do grid */
    display: block; /* Resetar display para block */
    margin: 0; /* Reset margin */
}

.cta-section {
    background: #ffffff;
    padding: 60px 0 40px 0; /* Reduzido padding inferior de 100px para 40px */
    text-align: left;
    width: 100%;
    transition: all 0.3s ease; /* Transição suave para interações */
}

/* Desativado efeito hover para mobile - manter background branco sempre */
@media (min-width: 769px) {
    .cta-section:hover {
        background: #fafafa; /* Fundo ligeiramente mais escuro no hover apenas para desktop */
    }
}

.cta-section.btn-add-group {
    cursor: default; /* Cursor normal para a seção */
}

/* Reduzir ainda mais o padding na página de busca */
.buscar-page .cta-section {
    padding: 40px 0 20px 0; /* Padding ainda menor para página de busca */
}

.cta-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

.cta-title-main {
    font-size: 1.4rem;
    font-weight: 600;
    font-family: Arial, sans-serif;
    color: #1f2937;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cta-title-sub {
    font-size: 2.2rem;
    font-weight: 900;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif !important; /* Mesma fonte do título principal */
    color: #1f2937;
    margin-bottom: 25px;
    line-height: 1.3;
    max-width: 550px;
    letter-spacing: -0.5px; /* Mesmo letter spacing do título principal */
}

.cta-description {
    font-size: 1.1rem;
    font-weight: 400; /* Inter Regular (400) */
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif !important; /* Fonte Inter */
    color: #4b5563;
    margin-bottom: 35px;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

.cta-button-container {
    display: flex;
    justify-content: flex-start;
    margin-top: 30px;
}

.btn-cta {
    background-color: #059669;
    color: white;
    padding: 8px 28px;
    font-size: 1rem;
    font-weight: 500;    border-radius: 6px;
    text-decoration: none;
    /* transition: all 0.3s ease; - Removido para evitar fade/underlap no dropdown */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    box-shadow: none;
    cursor: pointer; /* Cursor pointer apenas no botão */
}

.btn-cta:hover {    background-color: #047857;
    text-decoration: none;
    color: white;
    /* transform: none; - Desnecessário após remoção da transição */
    box-shadow: none;
}

.btn-cta i {
    font-size: 0.9rem;
}

/* Responsividade da seção CTA */
@media (max-width: 768px) {
    .search-input-container {
        margin-bottom: 24px;
    }
    
    .search-input {
        height: 40px;
        font-size: 16px;
    }
      .cta-section {
        padding: 50px 0 30px 0; /* Reduzido padding inferior para mobile */
    }
    
    .cta-section .groups-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 16px;
    }
    
    .cta-content {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }
    
    .cta-title-main {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
      .cta-title-sub {
        font-size: 1.8rem;
        margin-bottom: 18px;
        max-width: 100%;
        font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif !important; /* Mesma fonte do título principal */
        letter-spacing: -0.5px; /* Mesmo letter spacing do título principal */
    }
      .cta-description {
        font-size: 1rem;
        margin-bottom: 25px;
        font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif !important; /* Fonte Inter */
        font-weight: 400; /* Inter Regular */
    }
    
    .btn-cta {
        padding: 8px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .cta-section .groups-container {
        padding: 0 12px;
    }
    
    .cta-content {
        padding-left: 0;
        padding-right: 0;
    }
    
    .cta-title-main {
        font-size: 1.1rem;
    }
      .cta-title-sub {
        font-size: 1.6rem;
        line-height: 1.4;
        max-width: 100%;
        font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif !important; /* Mesma fonte do título principal */
        letter-spacing: -0.5px; /* Mesmo letter spacing do título principal */
    }
      .cta-description {
        font-size: 0.95rem;
        font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif !important; /* Fonte Inter */
        font-weight: 400; /* Inter Regular */
    }
    
    .btn-cta {
        padding: 9px 20px;
        font-size: 0.95rem;
    }
}

/* Estilos para o CTA final da página de busca */
#finalCtaSection {
    margin-top: 60px;
    padding-top: 60px !important;
}

#finalCtaSection .cta-content {
    padding: 0;
}

@media (max-width: 768px) {
    #finalCtaSection {
        margin-top: 60px;
        padding-top: 50px !important;
    }
}

@media (max-width: 480px) {
    #finalCtaSection {
        margin-top: 70px;
        padding-top: 50px !important;
    }
}

/* Adicionando estilos para evitar que o CTA pisque ou mude de posição */
.buscar-page .groups-container {
    position: relative;
    min-height: 100px; /* Reduzido ainda mais para página de busca */
    padding-bottom: 10px; /* Reduzir padding inferior */
}

.groups-grid {
    min-height: 50px; /* Reduzido de 200px para 50px - quase sem altura mínima */
}

/* Garantindo que o CTA final fique em uma posição fixa em relação ao conteúdo */
.buscar-page #finalCtaSection {
    position: relative;
    margin-top: 0px; /* Removido margin-top */
    transition: none; /* Desativando transições que poderiam causar piscar */
}

/* Desativar hover quando modal estiver aberto */
.modal-open .cta-section:hover {
    background: #ffffff; /* Manter fundo normal quando modal aberto */
    /* Removido transform e box-shadow */
}

/* Desativar TODOS os efeitos de hover/active/pressed em mobile para a seção CTA */
@media (max-width: 768px) {
    .cta-section:hover,
    .cta-section:active,
    .cta-section:focus,
    .cta-section:focus-within {
        background: #ffffff !important; /* Forçar background branco sempre em mobile */
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Desativar também o efeito pressed/touch para dispositivos touch */
    .cta-section {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
    }
}

/* Desactivar todos os efeitos hover para mobile - manter background branco */
@media (min-width: 769px) {
    .cta-section:hover {
        background: #fafafa; /* Efeito hover apenas para desktop */
    }
}

/* ==================== BADGE VIP - CORREÇÃO ESPECÍFICA PÁGINA BUSCA ==================== */

/* Garantir que o badge VIP tenha exatamente a mesma aparência das outras páginas */
.buscar-page .badge-vip-corner {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 10002 !important;
    width: 160px !important;
    height: 60px !important;
    overflow: visible !important;
}

.buscar-page .badge-vip-left {
    left: 0 !important;
    right: auto !important;
}

.buscar-page .badge-vip {
    /* Background e cor exatamente iguais */
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
    color: #ffffff !important;
    
    /* Posicionamento idêntico */
    position: absolute !important;
    top: 22px !important;
    right: -10px !important;
    transform: rotate(45deg) !important;
    transform-origin: center !important;
    
    /* Dimensões idênticas */
    width: 140px !important;
    height: 35px !important;
    
    /* Tipografia idêntica */
    font-size: 0.8rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.8px !important;
    font-family: 'Segoe UI Medium', 'Inter', -apple-system, sans-serif !important;
    
    /* Layout interno idêntico */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    
    /* Bordas idênticas */
    border-radius: 0 !important;
    border: none !important;
    
    /* Sombra idêntica */
    box-shadow: 
        0 2px 8px rgba(37, 99, 235, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.2) !important;
    
    /* Transições idênticas */
    transition: all 0.3s ease !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
    
    /* Cursor e seleção idênticos */
    cursor: default !important;
    user-select: none !important;
    
    /* Texto idêntico */
    text-indent: 0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Posicionamento à esquerda idêntico */
.buscar-page .badge-vip-left .badge-vip {
    right: auto !important;
    left: -35px !important;
    transform: rotate(-45deg) !important;
}

/* Efeitos after idênticos */
.buscar-page .badge-vip::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 15px solid transparent !important;
    border-right: 15px solid transparent !important;
    border-top: 8px solid #1e40af !important;
    z-index: -1 !important;
}

.buscar-page .badge-vip-left .badge-vip::after {
    left: 0 !important;
    right: auto !important;
    border-top-color: #1e40af !important;
}

/* Hover idêntico */
.buscar-page .badge-vip:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%) !important;
    box-shadow: 
        0 3px 12px rgba(37, 99, 235, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.25) !important;
    transform: rotate(45deg) scale(1.05) !important;
}

.buscar-page .badge-vip-left .badge-vip:hover {
    transform: rotate(-45deg) scale(1.05) !important;
}

/* ==================== INFINITE SCROLL LOADING ==================== */

/* Loading para infinite scroll */
.infinite-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    width: 100%;
}

.infinite-loading-indicator {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animação adicional para o container de loading */
.infinite-loading-container {
    animation: fadeInLoading 0.3s ease-in-out;
}

@keyframes fadeInLoading {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== CORREÇÃO FOOTER MOBILE PÁGINA BUSCAR ==================== */

/* Garantir que a página de buscar tenha o mesmo comportamento de footer das outras páginas */
@media (max-width: 768px) {
    /* Forçar que a página buscar tenha o mesmo padding-bottom do body */
    .buscar-page {
        padding-bottom: 0 !important;
    }
    
    /* Garantir que o body mantenha o padding-bottom para o menu inferior */
    body:has(.buscar-page) {
        padding-bottom: 80px !important;
    }
    
    /* Ajustar o content-area da página buscar */
    .buscar-page .content-area {
        margin-bottom: 0 !important;
        padding-bottom: 20px !important;
    }
    
    /* Garantir que o footer apareça corretamente */
    .buscar-page ~ .simple-footer,
    .simple-footer {
        position: relative !important;
        z-index: 99 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Mesmas regras para mobile menor */
    .buscar-page .content-area {
        padding-bottom: 15px !important;
    }
}
