/* Full-width search bar */
.search-bar {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Consistent styling for buttons, inputs, and select dropdowns */
.input-group .btn,
.form-select,
.page-link {
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    box-shadow: none;
}

/* Styling for input group text */
.input-group .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 8px;
}

/* Styling for select dropdowns */
.form-select {
    border-left: none;
    padding: 6px 12px;
    background-color: #fff;
}

/* Fix spacing for inputs and buttons */
.input-group .form-select,
.input-group .form-control,
.input-group .btn {
    margin-right: 10px;
}

/* Pagination styling */
.pagination {
    flex-wrap: wrap; /* Allow pagination items to wrap on small screens */
    justify-content: center; /* Center the pagination */
}

.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
}

.pagination .page-item.active .page-link {
    background-color: #419bc0;
    border-color: #419bc0;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
}

/* Filter dropdown styling */
.custom-dropdown {
    position: absolute;
    z-index: 1000;
    left: 0;
    top: 100%;
    width: 320px;
    padding: 10px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
}

/* Ensure the checkboxes are properly aligned */
.custom-dropdown .form-check {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.custom-dropdown .form-check-input {
    margin-right: 10px;
    margin-left: 5px;
}

/* Filter button styles */
.input-group {
    position: relative;
}

.form-control {
    width: 100%;
}

/* Adjust input groups on mobile */
@media (max-width: 576px) {
    .input-group.stack-on-mobile {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group.stack-on-mobile .form-select,
    .input-group.stack-on-mobile .form-control,
    .input-group.stack-on-mobile .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .input-group.stack-on-mobile .input-group-text {
        width: 100%;
        justify-content: center;
        border-radius: 8px;
    }

    .input-group.stack-on-mobile .me-2 {
        margin-right: 0 !important;
    }
}

/* Company cards styling */
.company-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.company-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Card hover effect */
.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #419bc0;
}

/* Company info inside the card */
.company-info {
    display: flex;
    flex-direction: column; /* Mobile: stack items vertically */
    align-items: flex-start;
    width: 100%; /* Ensure full width on mobile */
}

.company-name,
.company-country {
    display: block; /* Ensure elements are block-level */
    width: 100%; /* Full width on mobile */
    text-align: left; /* Left-align text */
}

.company-name {
    font-weight: bold;
    font-size: 16px;
    color: #419bc0;
    word-break: break-word;
    margin-bottom: 5px; /* Space between name and country on mobile */
}

.company-country {
    font-size: 16px;
    color: #555;
    word-break: break-word;
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .company-info {
        flex-direction: row; /* Desktop: arrange items horizontally */
        justify-content: space-between; /* Space between items */
        align-items: center; /* Vertically center items */
    }

    .company-name,
    .company-country {
        display: inline-block; /* Inline elements for horizontal alignment */
        width: auto; /* Allow natural width */
        text-align: left; /* Maintain left alignment */
    }

    .company-name {
        margin-bottom: 0; /* Remove bottom margin on desktop */
    }
}

/* Adjust margins and paddings */
.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.btn {
    margin-right: 10px;
}

/* Loading bar positioned at the top, above the search bar */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #419bc0;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.5s ease-in-out;
}

/* When loading is active */
.loading-bar.active {
    transform: translateX(0%);
}

/* Standardize icon size */
.input-group-text i {
    font-size: 1rem; /* Adjust the value as needed */
}
