/* Procurar Emprego Styles */

/* Classe para centrar conteúdo com max-width */
.maxWidthSite {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
    box-sizing: border-box;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    min-height: 450px;
    overflow: hidden;
}

/* Banner image - 100% width */
.banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Overlay para conteúdo sobre a imagem */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero .maxWidthSite {
    position: relative;
    height: 100%;
    padding: 0 2rem;
}

/* Smaller height on narrow screens */
@media (max-width: 900px) {
    .hero {
        min-height: 480px;
    }
}

.hero-box {
    background: #fff;
    color: #000;
    padding: 0.6rem;
    position: absolute;
    top: 20rem;
    width: 80%;
    margin-left: 10%;
}

.hero-box .input {
    border-bottom: 1px solid #000;
    margin-right: 2rem;
}

.title-hero-box {
    text-align: center;
    justify-content: center;
    color: #fff;
    padding: 0.2rem;
    position: absolute;
    top: 12rem;
    width: 100%;
}

.title-hero-box h1 {
    font-size: 2.2rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}

.title-hero-box p {
    color: #fff;
    font-size: 1rem;
    font-weight: 400;
}

.popular-hero-p {
    text-align: start;
    justify-content: start;
    color: #fff;
    padding: 1rem 0 0 0;
    position: absolute;
    top: 25rem;
    width: 100%;
    font-size: 0.8rem;
    margin-left: 10%;
}

.hero-box h1 {
    color: #2533ff;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.hero-box p {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    overflow: visible;
    padding: 10px;
}

.search-bar-field {
    display: flex;
    flex: 1;
}

.search-bar-field--location {
    position: relative;
}

.search-location-error {
    position: absolute;
    left: 10px;
    right: 2rem;
    bottom: calc(100% + 10px);
    background: #fff;
    color: #222;
    padding: 0.85rem 1rem 0.85rem 3.4rem;
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    z-index: 5;
}

.search-location-error::before {
    content: '!';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.search-location-error::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 24px;
    border-width: 8px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.search-bar .input {
    display: flex;
    align-items: center;
    padding: 0 10px;
    flex: 1;
}

.search-bar i {
    color: #000;
    margin-right: 8px;
}

.search-bar .input input {
    border: none;
    padding: 10px;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.search-bar .input input::placeholder {
    color: #999;
    opacity: 1;
}

.search-bar-button {
    background: #000;
    color: white;
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        min-height: 55vh;
        justify-content: center;
    }

    .title-hero-box {
        top: 8rem;
        width: 90%;
        max-width: 27rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .title-hero-box h1 {
        font-size: 1.5rem;
    }

    .hero-box {
        top: 16rem;
        width: 90%;
        max-width: 20rem;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
    }

    .popular-hero-p {
        top: 27rem;
        width: 90%;
        max-width: 20rem;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
        text-align: center;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar-field {
        width: 100%;
    }

    .search-bar .input {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    .search-location-error {
        left: 0;
        right: 0;
        bottom: calc(100% + 8px);
    }

    .search-bar button {
        width: 100%;
        border-radius: 0;
    }
}

/* Offers Header */
.offers-header {
    display: flex;
    align-items: center;
    padding: 60px 0 15px 0;
    color: #000;
    width: 100%;
    background-color: #eceaea;
    overflow: visible;
    position: relative;
    z-index: 9999;
}

.offers-header .maxWidthSite {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.offers-header .offers-header-left {
    margin-left: 0;
}

.offers-header .offers-header-left h2 {
    color: #2533ff;
    font-size: 2rem;
}

.offers-header .offers-header-left p {
    color: #555;
    font-size: 0.9rem;
    margin-top: 5px;
}

.offers-header .offers-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.offers-header .offers-header-right strong {
    color: #000;
    cursor: pointer;
}

.offers-header .offers-header-right .icons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.offers-header .offers-header-right i {
    font-size: 1.1rem;
    color: #2533ff;
    cursor: pointer;
}

/* Sort Dropdown */
.sort-dropdown {
    position: relative;
    display: inline-block;
}

/* Results Header */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.results-header-left h2 {
    color: #000;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.results-header-left p {
    color: #555;
    font-size: 0.9rem;
    margin-top: 5px;
}

.results-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sort-dropdown-toggle:hover {
    border-color: #2533ff;
    background: #f8f9ff;
}

.sort-dropdown-toggle strong {
    color: #000;
    font-weight: 600;
}

.sort-dropdown-toggle i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.sort-dropdown.open .sort-dropdown-toggle i {
    transform: rotate(180deg);
}

.sort-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    list-style: none;
    padding: 8px 0;
    margin: 4px 0 0 0;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.sort-dropdown.open .sort-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-dropdown-menu li {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.15s ease;
}

.sort-dropdown-menu li:hover {
    background: #f0f3ff;
    color: #2533ff;
}

.sort-dropdown-menu li.active {
    background: #2533ff;
    color: #fff;
    font-weight: 600;
}

.sort-dropdown-menu li.active:hover {
    background: #1a28cc;
    color: #fff;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 16px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.view-toggle-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.view-toggle-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.view-toggle-btn:hover {
    background: #f8f9ff;
    color: #2533ff;
    border-color: #2533ff;
}

.view-toggle-btn.active {
    background: #2533ff;
    color: #fff;
    border-color: #2533ff;
}

.view-toggle-btn.active i {
    color: #fff;
}

.view-toggle-btn i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .offers-header {
        padding: 150px 0 15px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .title-hero-box {
        top: 8rem;
        width: 90%;
        max-width: 27rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .title-hero-box h1 {
        font-size: 1.5rem;
    }

    .hero-box {
        top: 16rem;
        width: 90%;
        max-width: 20rem;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
    }

    .popular-hero-p {
        top: 27rem;
        width: 90%;
        max-width: 20rem;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
        text-align: center;
    }
}

/* Job List Section */
.job-list {
    padding: 1rem 0 8rem 0;
    background-color: #eceaea;
    position: relative;
    z-index: 1100;
    padding-top: 4rem;
}

.job-list .maxWidthSite {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: nowrap;
    position: relative;
    z-index: 1100;
}

/* Filters Sidebar */
.filters {
    flex: 0 1 22rem;
    min-width: 0;
    max-width: 22rem;
    position: relative;
    overflow: hidden;
    z-index: 1100;
}

/* Truncate filter items text */
.filters li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.filters li label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    overflow: hidden;
}

.filters li label span,
.filters li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Filter Accordion Styles */
.filter-accordion {
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.filter-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.8rem 0;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    user-select: none;
    transition: color 0.2s;
}

.filter-accordion-header:hover {
    color: #2533ff;
}

.filter-accordion-header i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: #666;
}

.filter-accordion-header.active i {
    transform: rotate(180deg);
}

.filter-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-accordion-content.open {
    max-height: 500px;
}

#county-filters.open {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.35rem;
    scrollbar-gutter: stable;
}

/* Large screens - slight shrink */
@media (max-width: 1400px) and (min-width: 1201px) {
    .filters {
        flex: 0 1 18rem;
        max-width: 18rem;
    }
}

/* Medium screens - shrink filters more */
@media (max-width: 1200px) and (min-width: 901px) {
    .job-list .maxWidthSite {
        gap: 20px;
    }

    .filters {
        flex: 0 1 14rem;
        max-width: 14rem;
    }

    .filters h3 {
        font-size: 1rem;
    }

    .filters li {
        font-size: 0.8rem;
    }
}

/* Mobile Filters Toggle Button - Hidden on desktop */
.filters-toggle-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 997;
    background: #2533ff;
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s, transform 0.3s;
    box-shadow: 0 4px 15px rgba(37, 51, 255, 0.4);
}

.filters-toggle-btn:hover {
    background: #1a28cc;
    transform: scale(1.05);
}

.filters-toggle-btn i {
    font-size: 1rem;
}

/* Overlay for mobile drawer */
.filters-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filters-overlay.open {
    display: block;
    opacity: 1;
}

/* Close button for mobile drawer */
.filters-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2533ff;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.filters-close-btn:hover {
    color: #1a28cc;
}

.filters h3 {
    color: #000;
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filters ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.filters li {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filters input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-right: 8px;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #000;
    background-color: #fff;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
    outline: none !important;
    box-shadow: none !important;
}

.filters input[type="checkbox"]:checked {
    background-color: #2533ff;
    border: none;
    outline: none !important;
    box-shadow: none !important;
}

.filters input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.filters input[type="checkbox"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Active Filters Pills */
.active-filters {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.active-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.active-filters-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

.clear-all-filters {
    background: none;
    border: none;
    color: #2533ff;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.clear-all-filters:hover {
    color: #1a28cc;
}

.active-filters-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #e8ebff;
    color: #2533ff;
    padding: 0.35rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    max-width: 100%;
}

.filter-pill-label {
    color: #666;
    font-weight: 400;
}

.filter-pill-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.filter-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2533ff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.filter-pill-remove:hover {
    background: #1a28cc;
}

/* Results Section */
.results {
    flex: 1 1 auto;
    min-width: 0;
}

.results .header {
    justify-content: space-between;
    align-items: center;
    color: #2533ff;
    margin-bottom: 20px;
}

/* Job Card */
.job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 0 !important;
    margin-bottom: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.job-card h3 {
    color: #000;
    margin: 0 0 5px;
    font-size: 1.5rem;
    font-weight: 600;
}

.tags {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.tags span {
    padding: 5px 10px;
    font-size: 1rem;
    font-weight: bold;
}

.tags .green {
    background: #00b51a;
    color: white;
}

.tags .blue {
    background: #2533ff;
    color: white;
}

.apply a {
    display: block;
    font-size: 1.6rem;
    background: #2533ff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 1rem;
}

/* Grid View (Mosaico) */
#job-offers-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

#job-offers-list.grid-view .job-card {
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    min-height: 280px;
}

#job-offers-list.grid-view .job-card .info {
    width: 100%;
    flex: 1;
}

#job-offers-list.grid-view .job-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

#job-offers-list.grid-view .job-card .tags {
    flex-wrap: wrap;
}

#job-offers-list.grid-view .job-card .tags span {
    font-size: 0.85rem;
    padding: 4px 8px;
}

#job-offers-list.grid-view .job-card .apply {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#job-offers-list.grid-view .job-card .apply a {
    font-size: 1rem;
    padding: 8px 16px;
    margin-bottom: 0;
}

#job-offers-list.grid-view .job-card .apply small {
    font-size: 0.85rem;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    margin: 0 5px;
    text-decoration: none;
    color: #2533ff;
    display: inline-flex;
    width: 32px;
    text-align: center;
    justify-content: center;
}

.pagination a.active {
    background: #00b51a;
    color: white;
    padding: 4px 10px;
    border-radius: 50%;
}

/* Responsive: stack on small screens */
@media (max-width: 900px) {
    /* Show filters toggle button on mobile - floating button */
    .filters-toggle-btn {
        display: flex;
    }

    /* Filters as slide-in drawer on mobile */
    .filters {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 999;
        overflow-y: auto;
        padding: 70px 20px 100px 20px;
        transition: left 0.3s ease;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
        margin: 0;
    }

    /* Show filters drawer when open */
    .filters.open {
        left: 0;
    }

    /* Show close button on mobile */
    .filters-close-btn {
        display: block;
    }

    .results {
        width: 100%;
    }

    .job-list {
        flex-direction: column;
        gap: 20px;
    }

    .job-card {
        display: inline-block;
        min-width: 100%;
    }


    .job-card .tags span {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .job-card .apply {
        margin-top: 1rem;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .title-hero-box {
        top: 8rem;
        width: 90%;
        max-width: 27rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .title-hero-box h1 {
        font-size: 1.3rem;
    }

    .hero-box {
        top: 16rem;
        width: 90%;
        max-width: 20rem;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
    }

    .popular-hero-p {
        top: 27rem;
        width: 90%;
        max-width: 20rem;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
        text-align: center;
        font-size: 0.7rem;
    }
}

/* Candidatura Espontânea Box */
.candidatura-espontanea-box {
    background: #3556ff;
    color: #fff;
    text-align: center;
    padding: 40px 30px;
    margin-top: 30px;
    border-radius: 0;
}

/* No Results Box - quando pesquisa não retorna resultados */
.no-results-box {
    background: #fff;
    border: 1px solid #ddd;
    text-align: center;
    padding: 50px 30px;
    margin: 20px 0;
}

.no-results-box .no-results-text {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-style: italic;
}

.no-results-box .btn-candidatura-inline {
    display: inline-block;
    background: #3556ff;
    color: #fff;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.no-results-box .btn-candidatura-inline:hover {
    background: #2a45cc;
    transform: translateY(-2px);
}

.candidatura-espontanea-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    color: #fff;
}

.candidatura-espontanea-box p {
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 25px;
    opacity: 0.9;
}

.candidatura-espontanea-box .btn-candidatura {
    display: inline-block;
    background: #fff;
    color: #000;
    padding: 14px 35px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.candidatura-espontanea-box .btn-candidatura:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .candidatura-espontanea-box {
        padding: 30px 20px;
        margin-top: 20px;
    }

    .candidatura-espontanea-box h3 {
        font-size: 1rem;
    }

    .candidatura-espontanea-box p {
        font-size: 0.85rem;
    }

    .candidatura-espontanea-box .btn-candidatura {
        padding: 12px 28px;
        font-size: 0.9rem;
    }
}

