.company__desc-wrapper {
    position: relative;
}

.company__desc {
    margin: 0;
    transition: max-height 0.3s ease-out;
}

.company__desc-toggle {
    background: none;
    border: none;
    color: #585858;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
    font-size: 14px;
    text-decoration: underline;
    float: right;
}

.company__desc-toggle:hover {
    color: #000000;
}

.company__desc-full {
    display: none;
}

/* One line grid styles */
.companies-row {
    position: relative;
    padding: 0px;
}

.companies-grid.one_line {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.companies-grid.one_line::-webkit-scrollbar {
    display: none;
}

.companies-grid.one_line .company {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
    min-width: 300px;
}

.companies-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 100%;
    border: none;
    cursor: pointer;
    z-index: 2;
    opacity: 0.1;
    transition: opacity 0.3s ease;
    display: none;
    background: none;
}

.companies-nav-button.prev {
    left: -50px;
    background: linear-gradient(-90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 30%, rgba(255,255,255,0.9) 100%);
}

.companies-nav-button.next {
    opacity: 0.1;
    right: -50px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 30%, rgba(255,255,255,0.9) 100%);
}

.companies-nav-button:hover {
    opacity: 1;
}

.companies-nav-button i {
    color: var(--happy-purple);
    font-size: 45px;
}

.companies-row:hover .companies-nav-button {
    opacity: 0.7;
}
.cities-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0 15px;
}

.city-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.city-link:hover {
    background-color: #e0e0e0;
    color: #000;
    text-decoration: none;
}

.js__dropdown-filter{
    transition: border-color 0.3s ease;
}

.js__dropdown-filter.has-active-filters {
    border: 1px solid var(--happy-purple);
}
.js__dropdown-filter.has-active-filters .dropdown__text{
    color: var(--happy-purple);
}

/* Borderbox version styles */
.company--borderbox {
    background: #fff;
    border: 1px solid rgba(33, 33, 38, 0.1);
    border-radius: 4px;
    padding: 0px 6px 0px 6px;
    transition: box-shadow 0.3s ease;
}

.company--borderbox:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.company--borderbox .company__header-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.company--borderbox .company__logo {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    flex-shrink: 0;
}

.company--borderbox .company__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company--borderbox .company__title {
    font-size: 18px;
    line-height: 1.4;
    margin: 0;
    color: #212126;
    align-content: center;
}

.company--borderbox .company__footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(33, 33, 38, 0.1);
}
.comp_new.no_cover .company{
    flex: 0 0 calc(25% - 12px) !important;
    max-width: 0 0 calc(25% - 12px) !important;
}

/* Navigation buttons adaptation for purple background */
.section-selected .companies-nav-button.prev {
    background: linear-gradient(-90deg, rgba(var(--happy-purple-rgb), 0) 0%, rgba(var(--happy-purple-rgb), 0.15) 30%, rgba(var(--happy-purple-rgb), 0.15) 100%);
}

.section-selected .companies-nav-button.next {
    background: linear-gradient(90deg, rgba(var(--happy-purple-rgb), 0) 0%, rgba(var(--happy-purple-rgb), 0.15) 30%, rgba(var(--happy-purple-rgb), 0.15) 100%);
}

.section-selected .companies-nav-button:hover {
    opacity: 0.8;
}

.section-selected .companies-nav-button i {
    color: #fff;
}

/* Top 10 Companies styles */
.top-10-companies {
    margin: 20px 0 40px;
    padding: 0 15px;
}

.top-10-companies__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
    width: 100%
}

.top-company-card {
    position: relative;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(33, 33, 38, 0.1);
    /*height: 100%;*/
    display: flex;
    flex-direction: column;
}

.top-company-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.top-company-card__rank {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    background:#e7e7e8;
    color:#322d2d;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
}

.top-company-card__content {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.top-company-card__logo {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.top-company-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.top-company-card__logo.no-logo {
    background: var(--happy-purple);
    opacity: 0.9;
}

.company-name-placeholder {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.top-company-card__info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.top-company-card__name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #212126;
    line-height: 1.4;
}

.top-company-card__jobs {
    font-size: 14px;
    color: #585858;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(33, 33, 38, 0.1);
}

.top-company-card__jobs .jobs-count {
    font-weight: 600;
    color: var(--happy-purple);
}

.top-company-card__jobs-link {
    position: relative;
    z-index: 4;
    color: inherit;
    text-decoration: none;
}

.top-company-card__jobs-link:hover {
    color: var(--happy-purple);
}

.top-company-card__link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
}

@media (min-width: 769px) {
    .companies-nav-button {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .companies-row {
        padding: 0px;
        overflow: hidden;
    }
    
    .companies-grid.one_line {
        gap: 15px;
    }
    
    .companies-grid.one_line .company {
        flex: 0 0 280px;
        max-width: 280px;
    }
    .companies-nav-button.prev{
        left: -25px;
    }
    .companies-nav-button.next{
        right: -25px;
    }
    .container.all_companies_page{
        padding-right:0px;
    }
    .section-title__text{
        font-size: 20px;
        line-height: 24px;
    }
    .cities-links {
        justify-content: center;
        text-align: center;
    }
}
/* Responsive styles for top companies */
@media (max-width: 1200px) {
    .top-10-companies__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .top-10-companies__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .top-10-companies {
        padding: 0;
        margin: 20px 0;
        overflow: hidden;
    }

    .top-10-companies__grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding: 0px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .top-10-companies__grid::-webkit-scrollbar {
        display: none;
    }

    .top-company-card {
        flex: 0 0 280px;
        max-width: 280px;
        min-height: 160px;
    }

    .top-company-card__content {
        padding: 15px;
    }

    .top-company-card__logo {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }

    .top-company-card__name {
        font-size: 16px;
        margin-bottom: 8px;
    }
}
