/* Estilos generales (mantienen los mismos de tu código original) */
.job-listing-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filters-and-search {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
    align-items: flex-end;
}

.filters-and-search label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    width: 100%; /* Para que la etiqueta esté en su propia línea */
}

.filters-and-search select,
.filters-and-search input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95em;
    flex: 1; /* Permite que los campos crezcan y ocupen espacio */
    min-width: 150px; /* Ancho mínimo para buena visualización */
}

.filters-and-search button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    flex-shrink: 0; /* Evita que el botón se encoja */
}

.filters-and-search button:hover {
    background-color: #0056b3;
}

.clear-filters-btn {
    background-color: #6c757d;
}

.clear-filters-btn:hover {
    background-color: #5a6268;
}

/* New styles for the job cards (mantienen los mismos) */
.job-cards-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid; /* Use grid for layout */
    grid-template-columns: 1fr; /* Single column layout */
    gap: 25px; /* Spacing between cards */
}

.job-card-new {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    background-color: #fff;
}

.job-card-new:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.job-card-new .card-body {
    padding: 20px;
    display: flex;
    align-items: flex-start; /* Align items to the top */
}

.job-card-new .rt-single-icon-box {
    display: flex;
    width: 100%;
    align-items: flex-start;
}

.job-card-new .icon-thumb {
    flex-shrink: 0; /* Prevent shrinking */
    width: 70px; /* Adjust as needed */
    height: 70px; /* Adjust as needed */
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #f0f0f0; /* Fallback background */
    display: flex;
    justify-content: center;
    align-items: center;
}

.job-card-new .icon-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Use contain for logos */
    border-radius: 50%;
}

.job-card-new .iconbox-content {
    flex-grow: 1;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.job-card-new .post-main-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping for badge */
}

.job-card-new .post-main-title .badge {
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    background-color: #e0f7fa; /* Light blue */
    color: #007bff; /* Darker blue */
}

.job-card-new .company-name-new {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
}

.job-card-new .body-font-4 {
    font-size: 0.9em;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 10px; /* Added margin for separation */
}

.job-card-new .info-tools {
    display: flex;
    align-items: center;
    gap: 5px;
}

.job-card-new .info-tools svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.job-card-new .job-description-new {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limita a 3 líneas */
    -webkit-box-orient: vertical;
}

.job-card-new .text-danger {
    color: #dc3545; /* Red color for expired */
    font-weight: bold;
}

.job-card-new .iconbox-extra {
    flex-shrink: 0;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center; /* Center items vertically */
    gap: 10px;
}

.job-card-new .plain-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: background-color 0.2s;
    border-radius: 5px;
    color: #B62E2E; /* Color for the bookmark icon */
}
.job-card-new .plain-button:hover {
    background-color: #f0f0f0;
}


.job-card-new .btn-primary2-50 {
    background-color: #28a745; /* Green */
    color: white;
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease;
}

.job-card-new .btn-primary2-50:hover {
    background-color: #218838;
}

.no-offers {
    text-align: center;
    padding: 30px;
    font-size: 1.2em;
    color: #777;
}

.pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    gap: 10px;
    flex-wrap: wrap; /* Added for responsive pagination */
}

.pagination a, .pagination span {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #007bff;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-bottom: 5px; /* Added for spacing when wrapping */
}

.pagination a:hover {
    background-color: #007bff;
    color: white;
}

.pagination .current-page {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
}

.pagination .disabled {
    color: #ccc;
    pointer-events: none;
    background-color: #f0f0f0;
}

/* Responsive adjustments for job cards */
@media (max-width: 768px) {
    .job-card-new .rt-single-icon-box {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items horizontally */
        text-align: center; /* Center text within content */
    }

    .job-card-new .icon-thumb {
        margin-right: 0; /* Remove horizontal margin */
        margin-bottom: 15px; /* Add vertical margin below logo */
    }

    .job-card-new .iconbox-content {
        align-items: center; /* Center content vertically */
    }

    .job-card-new .post-main-title {
        justify-content: center; /* Center title and badge */
    }

    .job-card-new .body-font-4 {
        justify-content: center; /* Center info tools */
        gap: 10px; /* Adjust gap for stacked items */
    }

    .job-card-new .job-description-new {
        text-align: center; /* Center description */
    }

    .job-card-new .iconbox-extra {
        flex-direction: row; /* Buttons side-by-side */
        width: 100%; /* Take full width */
        margin-left: 0; /* Remove left margin */
        margin-top: 15px; /* Add margin above buttons */
        justify-content: center; /* Center buttons horizontally */
        gap: 15px; /* Space between buttons */
    }

    .job-card-new .btn-primary2-50 {
        padding: 8px 15px; /* Adjust padding for smaller screens */
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .job-listing-container {
        padding: 10px;
    }

    .filters-and-search {
        padding: 10px;
        gap: 10px;
    }

    .filters-and-search select,
    .filters-and-search input[type="text"],
    .filters-and-search button,
    .clear-filters-btn {
        width: 100%; /* Full width for better touch on small screens */
        min-width: unset; /* Remove min-width constraint */
        flex: unset; /* Remove flex grow */
    }

    .job-card-new .post-main-title {
        font-size: 1.2em; /* Smaller title */
    }

    .job-card-new .company-name-new,
    .job-card-new .body-font-4,
    .job-card-new .job-description-new {
        font-size: 0.85em; /* Smaller text */
    }

    .job-card-new .icon-thumb {
        width: 60px; /* Smaller logo */
        height: 60px;
    }
}
/* Existing styles in home.css remain */

/* Country Selection Modal Styles */
.modal {
    display: none; /* Esto oculta el modal por defecto, el JS lo mostrará cuando sea necesario */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex; /* Esto ayuda a centrar el contenido, pero 'none' lo oculta primero */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%; /* Responsive width */
    max-width: 500px; /* Max width for larger screens */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.modal-content p {
    color: #555;
    font-size: 1.1em;
    margin-bottom: 25px;
}

.modal-content select {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding in width */
}

.modal-content button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.modal-content button:hover {
    background-color: #0056b3;
}

/* Responsive adjustments for modal */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .modal-content h2 {
        font-size: 1.5em;
    }
    .modal-content p {
        font-size: 1em;
    }
}


/* Estilos para mostrar la bandera del país seleccionado dentro del modal */
.modal-flag-display {
    display: flex; /* Oculto por defecto y mostrado por JS */
    align-items: center;
    justify-content: center; /* Centrar la bandera y el texto */
    gap: 10px;
    margin-bottom: 20px;
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.modal-flag-display .country-flag-in-modal {
    width: 40px; /* Tamaño de la bandera dentro del modal */
    height: auto;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.modal-flag-display span {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}