@import url('variables.css');
@import url('flexbox.css');
@import url('styles.css');

/* ====================================
   JOBS HEADER CONTENT CENTERING
   ====================================*/
.promo-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container-title-main {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container-title {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px 8px 0 8px;
}

.title-principal {
    text-align: center;
    margin: 0;
    margin-bottom: 20px;
}

.button-gradient {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #199ada 0%, #162960 100%);
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(25, 154, 218, 0.3);
    margin-top: 40px;
    font-family: var(--font-family-button);
}

    .button-gradient:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(25, 154, 218, 0.4);
    }

    .button-gradient:active {
        transform: translateY(-1px);
    }

.button-gradient-jobs {
    margin-top: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-family-button);
    font-size: var(--font-size-button);
    font-weight: var(--font-weight-button);
    border: none;
    border-radius: 7px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: black;
}

    .button-gradient-jobs:hover {
        background-color: #199ada;
        color: white;
    }

    .button-gradient-jobs:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(25, 154, 218, 0.4);
    }

    .button-gradient-jobs:active {
        transform: translateY(-1px);
    }


/* ====================================
   JOBS SPECIFIC STYLES
   ====================================*/

/* Job Cards Section */
.jobs-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.job-card {
    display: grid;
    grid-template-columns: 3fr 2.5fr 2.5fr 1.2fr;
    align-items: center;
    background-color: white;
    color: black;
    border-radius: 18px;
    padding: 24px;
    gap: 20px;
    max-width: 1400px;
    margin: 16px auto;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.job-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.job-card.selected {
    background-color: #199ada;
    box-shadow: 0 4px 20px rgba(25,154,218,0.3);
}

.job-card .title {
    font-weight: 700;
    color: black;
    white-space: normal;
    word-break: break-word;
    font-size: 20px;
    font-family: var(--font-family-body);
    line-height: 1.4;
}

.job-text {
    font-family: var(--font-family-body);
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.job-card.selected .title {
    color: #FEC851;
}

.job-card > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.job-card > div:not(.title) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: normal;
}

.job-card.selected > div {
    color: white;
}

.job-card .icon {
    background-color: #d9effa;
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 14px;
    flex-shrink: 0;
}

    .job-card .icon img {
        width: 20px;
        height: 20px;
    }

.job-card.selected .icon {
    background-color: #FEC851;
}

    .job-card.selected .icon svg {
        fill: none;
        stroke: #000000;
        stroke-width: 2;
    }

/* ====================================
   LOAD MORE JOBS BUTTON
   ====================================*/

.load-more-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.load-more-btn {
    background-color: #162960;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family-button);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(22, 41, 96, 0.2);
    min-width: 180px;
    justify-content: center;
}

    .load-more-btn:hover {
        background-color: #1a2f6b;
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(22, 41, 96, 0.3);
    }

    .load-more-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(22, 41, 96, 0.2);
    }

    .load-more-btn:disabled {
        background-color: #6c757d;
        cursor: not-allowed;
        transform: none;
        box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
    }

.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.load-more-text {
    display: inline-block;
}

.load-more-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

.load-more-arrow {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.load-more-btn:hover .load-more-arrow {
    transform: translateX(2px);
}

.initial-loading {
    font-family: var(--font-family-button);
    text-align: center;
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.initial-spinner-ring {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.initial-spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #263e80;
    border-top-color: transparent;
    border-radius: 50%;
    animation: initial-spin 1s linear infinite;
}

.initial-spinner-logo {
    width: 18px;
    height: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-60%, -60%);
    z-index: 1;
    pointer-events: none;
}

@keyframes initial-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 16px;
    font-family: var(--font-family-body);
}

/* Improved message for no jobs */
.no-jobs-jumbotron {
    background-color: white;
    border-radius: 18px;
    padding: 60px 40px;
    text-align: center;
    max-width: 800px;
    margin: 40px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.no-jobs-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-jobs-icon svg {
    width: 40px;
    height: 40px;
    stroke: #6c757d;
    fill: none;
    stroke-width: 2;
}

.no-jobs-jumbotron h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 16px;
    font-family: var(--font-family-body);
    font-weight: 700;
}

.no-jobs-jumbotron p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
    font-family: var(--font-family-body);
}

.reload-btn {
    background-color: #162960;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family-button);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(22, 41, 96, 0.2);
}

.reload-btn:hover {
    background-color: #1a2f6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(22, 41, 96, 0.3);
}

.reload-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Responsive Design for Jobs */
@media (max-width: 768px) {
    .job-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
        text-align: left;
    }

    .job-card .title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .job-card > div {
        justify-content: flex-start;
    }

    .job-card > div:not(.title) {
        font-size: 14px;
        font-weight: normal;
    }

    .jobs-section {
        padding: 20px 10px;
    }

    .container-title {
        padding: 20px 10px 0 10px;
    }

    .title-principal {
        font-size: 28px;
    }

    .load-more-section {
        padding: 30px 10px;
    }

    .load-more-btn {
        width: 100%;
        max-width: 300px;
        padding: 14px 28px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .job-card {
        margin: 12px;
        padding: 25px;
    }

        .job-card .title {
            font-size: 16px;
        }

    .title-principal {
        font-size: 24px;
    }

    .load-more-btn {
        width: 100%;
        max-width: 250px;
        padding: 12px 24px;
        font-size: 14px;
    }

    .load-more-arrow {
        width: 14px;
        height: 14px;
    }
}

.filters-section {
    font-family: var(--font-family-body);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f0f9ff;
    border: 1px solid #0384C7;
    border-radius: 20px;
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #0384C7;
}

.dropdown-toggle {
    all: unset;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .icon img {
        width: 17px;
        height: auto;
        display: block;
    }

.label {
    font-family: var(--font-family-body);
    flex-grow: 1;
    text-align: left;
}

.arrow {
    font-size: 12px;
    color: #0384C7;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: #4babde;
    color: #fff;
    padding: 6px 0;
    border-radius: 8px;
    min-width: 100%;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

    .dropdown-menu li {
        font-family: var(--font-family-body);
        padding: 8px 12px;
        cursor: pointer;
    }

        .dropdown-menu li:hover {
            background: #4094c2;
        }

.dropdown.open .dropdown-menu {
    display: block;
}