.modern-search-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.modern-search-section > .container {
    margin-left: auto;
    margin-right: auto;
}

.modern-search-form {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.modern-search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(1, 32, 112, 0.1);
}

.search-input-group {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 2;
    pointer-events: none;
}

.modern-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.modern-search-input:focus {
    outline: none;
    border-color: #012070;
    box-shadow: 0 0 0 3px rgba(1, 32, 112, 0.1);
}

.modern-search-form .search-bar-btn,
.modern-search-form .reset-filter-btn {
    border-radius: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.modern-search-form .search-bar-btn {
    background: linear-gradient(135deg, #012070 0%, #0d49e0 100%);
    color: #ffffff;
}

.modern-search-form .reset-filter-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #ffffff;
}

.modern-search-form .search-bar-btn:hover,
.modern-search-form .reset-filter-btn:hover {
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .modern-search-section {
        padding: 1.5rem 0;
    }

    .modern-search-section > .container,
    .modern-search-section > .container > .row,
    .modern-search-section > .container > .row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
    }

    .modern-search-section > .container > .row > [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .modern-search-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(120px, 160px));
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }

    .modern-search-form .search-input-group {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
    }

    .modern-search-form .search-input-group input,
    .modern-search-form .form-control,
    .modern-search-form .search-bar-btn,
    .modern-search-form .reset-filter-btn {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .modern-search-form .search-bar-btn,
    .modern-search-form .reset-filter-btn {
        justify-content: center;
        padding: 0.85rem 1rem;
    }

    /* When a search form only has a single action button (no reset button
       alongside it), let it span both grid columns instead of sitting in
       the left half of the centered block. */
    .modern-search-form:not(:has(.reset-filter-btn)) .search-input-group + .search-bar-btn:last-child {
        grid-column: 1 / -1;
    }
    .modern-search-section > .container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .modern-search-section > .container > .row:last-child {
        margin-top: 0.75rem;
    }

    .modern-search-section > .container > .row:last-child .search-bar-btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
}

@media (max-width: 576px) {
    .modern-search-section {
        padding: 1rem 0;
    }

    .modern-search-form {
        display: flex;
        flex-direction: column;
        padding: 0.75rem;
    }

    .modern-search-form .search-input-group,
    .modern-search-form .search-bar-btn,
    .modern-search-form .reset-filter-btn {
        width: 100%;
    }

    .modern-search-section > .container > .row:last-child .search-bar-btn {
        width: 100%;
    }
}
