.careers-gallery {
    background: linear-gradient(to right, #36C166 70%, rgba(242, 238, 26, 0.75));
    position: relative;
    overflow: clip;
    padding: 175px 0;
}

.careers-gallery__content {
    display: flex;
    align-items: center;
    gap: 80px;
}

.careers-gallery__text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 25px 0;
}

.careers-gallery__gallery-container {
    flex: 0 0 31%;
    max-width: 31%;
    display: flex;
}

.careers-gallery__gallery-grid {
    display: flex;
    gap: 10px;
    width: 100%;
    height: fit-content;
    align-items: center;
}

.careers-gallery__column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.careers-gallery__column--left {
    justify-content: center;
}

.careers-gallery__column--right {
    justify-content: flex-start;
}

.careers-gallery__image-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 50px;
    overflow: hidden;
    border: 10px solid transparent;
    transition: border 0.3s ease;
}

.careers-gallery__image-item:hover {
    border: 10px solid #F3EE1A;
}

/* Remove the old grid positioning rules */
.careers-gallery__image-item--1,
.careers-gallery__image-item--2,
.careers-gallery__image-item--3,
.careers-gallery__image-item--4,
.careers-gallery__image-item--5 {
    grid-column: unset;
    grid-row: unset;
    align-self: unset;
}

.careers-gallery__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.careers-gallery__image:hover {
    transform: scale(1.08);
}

.careers-gallery__title {
    color: #F3EE1A;
    margin-bottom: 35px !important;
    width: 100%;
}

.careers-gallery__text {
    color: #fff;
    margin-bottom: 35px;
    font-size: 30px;
    line-height: 1.5;
    font-weight: 300;
}

.careers-gallery__text p {
    margin-bottom: 20px;
}

.careers-gallery__text p:last-child {
    margin-bottom: 0;
}

.careers-gallery__links-container {
    margin-top: 20px;
}

.careers-gallery__link-title {
    color: #fff;
    font-size: 30px;
    line-height: 1.5;
    font-weight: 400 !important;
    margin-bottom: 15px;
}

.careers-gallery__link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.careers-gallery__link-item {
    margin-bottom: 20px;
}

.careers-gallery__link-item:last-child {
    margin-bottom: 0;
}

.careers-gallery__link {
    color: #fff;
    font-size: 30px;
    line-height: 1.5;
    font-weight: 300 !important;
    transition: color 0.3s ease;
    text-decoration: none !important;
    position: relative;
}

.careers-gallery__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #F3EE1A;
    transition: width 0.3s ease;
}

.careers-gallery__link:hover {
    color: #F3EE1A;
    text-decoration: none !important;
}

.careers-gallery__link:hover::after {
    width: 100%;
}

/* Reverse layout */
.careers-gallery--reverse .careers-gallery__content {
    flex-direction: row-reverse;
}

/* Margin fix options */
.careers-gallery--margin-top {
    margin-top: -350px;
    padding-top: 525px;
    z-index: 1;
}

.careers-gallery--margin-bottom {
    margin-bottom: -350px;
    padding-bottom: 525px;
    z-index: 1;
}

/* Border radius options */
.careers-gallery--border-top-left {
    border-top-left-radius: 200px;
}

.careers-gallery--border-top-right {
    border-top-right-radius: 200px;
}

.careers-gallery--border-bottom-left {
    border-bottom-left-radius: 200px;
}

.careers-gallery--border-bottom-right {
    border-bottom-right-radius: 200px;
}

/* Responsive styles */
@media (max-width: 1660px) {
    .careers-gallery__text-container {
        max-width: 910px;
        width: 100%;
    }
}

@media (max-width: 1440px) {
    .careers-gallery__image-item {
        border-radius: 50px;
    }
    .careers-gallery {
        padding: 100px 0;
    }
    
    .careers-gallery__content {
        gap: 60px;
    }
    .careers-gallery__text {
        font-size: 26px;
    }
    
    .careers-gallery__link-title,
    .careers-gallery__link {
        font-size: 26px !important;
    }
    
    .careers-gallery--margin-top {
        margin-top: -200px;
        padding-top: 300px;
        z-index: 1;
    }
    
    .careers-gallery--margin-bottom {
        margin-bottom: -200px;
        padding-bottom: 300px;
        z-index: 1;
    }
    
    .careers-gallery--border-top-left {
        border-top-left-radius: 150px;
    }
    
    .careers-gallery--border-top-right {
        border-top-right-radius: 150px;
    }
    
    .careers-gallery--border-bottom-left {
        border-bottom-left-radius: 150px;
    }
    
    .careers-gallery--border-bottom-right {
        border-bottom-right-radius: 150px;
    }
}

@media (max-width: 1194px) {
    .careers-gallery__gallery-container {
        flex: 0 0 41%;
        max-width: 41%;
        display: flex;
    }
}

@media (max-width: 1024px) {
    
    .careers-gallery__image-item {
        border-radius: 40px;
        border: 5px solid transparent;
    }
    .careers-gallery__image-item:hover {
        border: 5px solid #F3EE1A;
    }
    .careers-gallery__content {
        gap: 40px;
    }
    
    .careers-gallery__text {
        font-size: 22px;
    }
    
    .careers-gallery__link-title{
        font-size: 23px !important;
    }

    .careers-gallery__link {
        font-size: 24px !important;
    }
    
    .careers-gallery__gallery-grid {
        gap: 10px;
    }
    
    .careers-gallery--border-top-left {
        border-top-left-radius: 100px;
    }
    
    .careers-gallery--border-top-right {
        border-top-right-radius: 100px;
    }
    
    .careers-gallery--border-bottom-left {
        border-bottom-left-radius: 100px;
    }
    
    .careers-gallery--border-bottom-right {
        border-bottom-right-radius: 100px;
    }
}

@media (max-width: 768px) {
    .careers-gallery {
        padding: 60px 0;
    }
    
    .careers-gallery__content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .careers-gallery__gallery-container {
        flex: none;
        max-width: 100%;
        order: 1;
    }
    
    .careers-gallery__text-container {
        order: 2;
        padding: 0;
    }
    
    .careers-gallery__title {
        margin-bottom: 20px !important;
    }
    
    .careers-gallery__text {
        margin-bottom: 24px;
        font-size: 18px;
    }
    
    .careers-gallery__link-title,
    .careers-gallery__link {
        font-size: 18px;
    }
    
    /* Ensure gallery is always on top in mobile, even with reverse layout */
    .careers-gallery--reverse .careers-gallery__content {
        flex-direction: column;
    }
    
    .careers-gallery--reverse .careers-gallery__gallery-container {
        order: 1;
    }
    
    .careers-gallery--reverse .careers-gallery__text-container {
        order: 2;
    }

    /* Margin fix responsive adjustments */
    .careers-gallery--margin-top {
        margin-top: -120px;
        padding-top: 180px;
    }

    .careers-gallery--margin-bottom {
        margin-bottom: -120px;
        padding-bottom: 180px;
    }

    /* Border radius responsive adjustments */
    .careers-gallery--border-top-left {
        border-top-left-radius: 100px;
    }

    .careers-gallery--border-top-right {
        border-top-right-radius: 100px;
    }

    .careers-gallery--border-bottom-left {
        border-bottom-left-radius: 100px;
    }

    .careers-gallery--border-bottom-right {
        border-bottom-right-radius: 100px;
    }
}

@media (max-width: 480px) {
    .careers-gallery__image-item {
        border-radius: 30px;
    }
    .careers-gallery__text {
        font-size: 16px;
    }
    
    .careers-gallery__link-title,
    .careers-gallery__link {
        font-size: 16px;
    }
    
    .careers-gallery__gallery-grid {
        gap: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .careers-gallery__link,
    .careers-gallery__image {
        transition: none;
    }
}

@media (max-width: 767px) {
    .careers-gallery__gallery-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Create two rows */
    .careers-gallery__column--right {
        order: 1;
        flex-direction: row;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .careers-gallery__column--left {
        order: 2;
        flex-direction: row;
        justify-content: center;
        margin-top: 0;
    }
    
    /* Ensure images maintain aspect ratio in mobile */
    .careers-gallery__image-item {
        flex: 0 0 auto;
        width: calc(33.333% - 8px);
    }
}