/*
Theme Name:   WorkScout Child
Theme URI: http://workscout.in
Author: Purethemes
Author URI: http://themeforest.net/user/purethemes
Description: WordPress Job Theme
Version: 1.0
License: ThemeForest
License URI: http://themeforest.net/licenses
Text Domain: workscout
Domain Path: /languages/
Tags: light, responsive-layout, post-formats, theme-options, translation-ready, two-columns
Template:  workscout
*/
body.home form.workscout_main_search_form {
    display: none;
}

/* ==== WRAPPER ==== */
ul.resumes {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch; /* equal height per row */
    list-style: none; /* remove default ul bullets */
    margin: 0;
    padding: 0;
}

.freelancer-name {
    margin-top: 15px;
}

.freelancer-details {
    padding: 15px;
    background-color: #f8f8f8;
    flex-grow: 0;
}

/* ==== FREELANCER CARD ==== */
ul.resumes > li.freelancer {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* pushes details/button to bottom */
    margin: 0 20px 20px 0;
    width: calc(25% - 20px); /* 4 in a row */
    border-radius: 4px;
    background-color: #fff;
    transition: 0.3s;
    position: relative;
    cursor: default;
}

/* Remove right margin for every 4th card */
ul.resumes > li.freelancer:nth-child(4n) {
    margin-right: 0;
}

/* Inner overview stretches to fill */
.freelancer-overview {
    flex-grow: 1;
    text-align: center;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.freelancer-details {
    padding: 10px;
    background-color: #f8f8f8;
    flex-grow: 0;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
  ul.resumes > li.freelancer {
    width: calc(50% - 20px); /* 2 per row */
  }
  ul.resumes > li.freelancer:nth-child(2n) {
    margin-right: 0;
  }
}

@media (max-width: 600px) {
  ul.resumes > li.freelancer {
    width: 100%; /* 1 per row */
    margin: 0 0 20px 0;
  }
}

/*** Job listing */
/* ==== GRID WRAPPER ==== */
.full-page-content-inner .grid-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch; /* equal height rows */
    gap: 20px; /* spacing between cards */
}

/* ==== JOB CARD ==== */
.full-page-content-inner .grid-layout .job-listing,
.grid-layout .job-listing.grid {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* footer sticks to bottom */
    flex: 0 0 calc((100% / 3) - 13.33px); /* exactly 3 per row on desktop */
    background: #fff;
    border-radius: 4px;
    transition: 0.3s;
    min-width: 180px; /* don't shrink too small */
}
.full-page-content-inner .grid-layout .job-listing {
    margin: 0 0px 30px 0;
    width: calc(100% * (1 / 2) - 30px);
}
/* ==== LOGO ==== */
.job-listing-company-logo {
    text-align: center;
    margin-bottom: 1rem;
}

.job-listing-company-logo img {
    width: clamp(60px, 15vw, 100px);  /* dynamically scales */
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* ==== CARD INNER DETAILS ==== */
.grid-layout .job-listing-details {
    flex-grow: 1; /* middle section stretches */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    text-align: center;
}

/* Company name */
.job-listing-company {
    font-size: clamp(13px, 1.2vw, 16px);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Job title */
.job-listing-title {
    font-size: clamp(15px, 1.5vw, 20px);
    font-weight: 600;
    line-height: 1.3;
    margin: 0.3rem 0;
    word-break: break-word;
}

/* Footer */
.job-listing.grid .job-listing-footer {
    background-color: #f9f9f9;
    padding: 0.8rem 1rem;
    border-radius: 0 0 4px 4px;
    position: relative;
    font-size: clamp(12px, 1vw, 14px);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
    /* 2 per row on tablets */
    .full-page-content-inner .grid-layout .job-listing,
    .grid-layout .job-listing.grid {
        flex: 0 0 calc((100% / 2) - 10px);
    }
}

@media (max-width: 600px) {
    /* 1 per row on mobile */
    .full-page-content-inner .grid-layout .job-listing,
    .grid-layout .job-listing.grid {
        flex: 0 0 100%;
    }
}
