/* ===================================================================
   NOVA BARRA DE PESQUISA RESPONSIVA - DESIGN COMPLETAMENTE NOVO
   =================================================================== */

/* Container principal da área de pesquisa */
.new-search-area {
    position: relative;
    z-index: 100;
    margin-top: -120px;
    padding: 0;
    background: transparent;
}

/* Wrapper da barra de pesquisa */
.new-search-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Container dos filtros */
.new-filters-container {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    background: #FFFFFF;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(203, 205, 48, 0.2);
    min-height: 110px;
}

/* Item individual de filtro */
.new-filter-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Labels dos filtros */
.new-filter-item label {
    display: block;
    color: #030E0F;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 16px;
    margin-bottom: 12px;
    white-space: nowrap;
}

/* Estilos dos selects */
.new-select {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: #F0F1F1;
    color: #030E0F;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23030E0F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.new-select:hover {
    background-color: #E8E9E9;
}

.new-select:focus {
    outline: none;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(203, 205, 48, 0.3);
}

/* Estilos do input */
.new-input {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: #F0F1F1;
    color: #030E0F;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.new-input::placeholder {
    color: #7A7A7A;
    opacity: 1;
}

.new-input:hover {
    background-color: #E8E9E9;
}

.new-input:focus {
    outline: none;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(203, 205, 48, 0.3);
}

/* Wrapper do botão de pesquisa */
.new-search-button-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Espaço invisível para alinhar com outros elementos */
.new-search-button-wrapper::before {
    content: "";
    height: 28px;
    display: block;
}

/* Botão de pesquisa */
.new-search-submit {
    height: 48px;
    padding: 0 20px;
    min-width: 130px;
    border: none;
    border-radius: 8px;
    background: #CBCD30;
    color: #030E0F;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.new-search-submit:hover {
    background: #073B3A;
    color: #FFFFFF;
}

.new-search-submit:hover .new-search-icon {
    color: #FFFFFF;
}

/* Ícone de pesquisa */
.new-search-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ===================================================================
   RESPONSIVIDADE
   =================================================================== */

/* Tablet grande (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .new-search-area {
        margin-top: -100px;
    }
    
    .new-filters-container {
        gap: 16px;
        padding: 20px 24px;
    }
    
    .new-filter-item label {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .new-search-submit {
        min-width: 120px;
        font-size: 13px;
    }
}

/* Tablet médio (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .new-search-area {
        margin-top: -90px;
    }
    
    .new-filters-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 24px;
    }
    
    .new-search-button-wrapper {
        grid-column: 1 / -1;
        justify-content: center;
        align-items: center;
    }
    
    .new-search-button-wrapper::before {
        display: none;
    }
    
    .new-search-submit {
        width: 200px;
        margin-top: 10px;
    }
}

/* Tablet pequeno e mobile (max 767px) */
@media (max-width: 767px) {
    .new-search-area {
        margin-top: -80px;
    }
    
    .new-search-wrapper {
        padding: 0 12px;
    }
    
    .new-filters-container {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        min-height: auto;
    }
    
    .new-filter-item {
        width: 100%;
    }
    
    .new-filter-item label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .new-select,
    .new-input {
        height: 50px;
        font-size: 15px;
    }
    
    .new-search-button-wrapper {
        width: 100%;
        margin-top: 4px;
    }
    
    .new-search-button-wrapper::before {
        display: none;
    }
    
    .new-search-submit {
        width: 100%;
        height: 50px;
        font-size: 16px;
    }
}

/* Mobile pequeno (max 575px) */
@media (max-width: 575px) {
    .new-search-area {
        margin-top: -60px;
    }
    
    .new-filters-container {
        padding: 16px;
        border-radius: 12px;
    }
    
    .new-search-text {
        font-size: 15px;
    }
}

/* Mobile muito pequeno (max 360px) */
@media (max-width: 360px) {
    .new-search-wrapper {
        padding: 0 8px;
    }
    
    .new-filters-container {
        padding: 14px;
        gap: 14px;
    }
    
    .new-select,
    .new-input {
        padding: 0 10px;
        padding-right: 32px;
    }
}

/* ===================================================================
   ANIMAÇÕES E ESTADOS
   =================================================================== */

/* Animação ao focar nos campos */
.new-filter-item.focused .new-select,
.new-filter-item.focused .new-input {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Animação do botão ao clicar */
.new-search-submit.searching {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Transição suave para todos os elementos interativos */
.new-select,
.new-input,
.new-search-submit {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estado desabilitado */
.new-select:disabled,
.new-input:disabled,
.new-search-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5 !important;
}

/* Estado de carregamento para selects */
.new-select:disabled {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 2V6M10 14V18M18 10H14M6 10H2M15.657 4.343L13.536 6.464M6.464 13.536L4.343 15.657M15.657 15.657L13.536 13.536M6.464 6.464L4.343 4.343' stroke='%23666666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===================================================================
   AJUSTES PARA SEÇÃO SEGUINTE
   =================================================================== */

.properties1-section-area.sp2 {
    padding-top: 80px !important;
}

@media (min-width: 1200px) {
    .properties1-section-area.sp2 {
        padding-top: 90px !important;
    }
}

@media (max-width: 991px) {
    .properties1-section-area.sp2 {
        padding-top: 70px !important;
    }
}

@media (max-width: 767px) {
    .properties1-section-area.sp2 {
        padding-top: 60px !important;
    }
}

@media (max-width: 575px) {
    .properties1-section-area.sp2 {
        padding-top: 50px !important;
    }
}

/* ===================================================================
   MENSAGEM DE ERRO DA PESQUISA
   =================================================================== */

.search-error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
    color: #c33;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

.search-error-message i {
    font-size: 18px;
    color: #c33;
}

.new-input.error {
    border-color: #c33 !important;
    animation: shake 0.5s;
}

.new-input.loading {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}