.resources-section.purple {
    background: var(--Prince-Prince-50, #EEE5FF);
}

.resources-section.amber {
    background: var(--Sunflower-Sunflower-50, #FFF8DD);
}

.resources-section.red {
    background: var(--Hibiscus-Hibiscus-50, #FFEFF4);
}

.resources-section.blue {
    background: var(--Santorini-Santorini-50, #EBF8FF);
}

.resources-section.teal {
    background: var(--Laguna-Laguna-50, #E1FFFD);
}

.resources-section.green {
    background: var(--Wasabi-Wasabi-50, #E2FFB6);
}

.resources-section .container {
    max-width: 1440px;
}

.resources-section__header {
    margin-bottom: 30px;
}

.resources-section__header h2 {
    color: var(--Base-Black);
    margin: 0;
}

.resources-grid,
.home-contract-types-grid {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;
    align-self: stretch;
    padding-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.resources-grid::-webkit-scrollbar,
.home-contract-types-grid::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

/* Custom scrollbar styling for resources grid */
.custom-scrollbar-container {
    position: relative;
    width: 100%;
    height: 12px;
    background: #f1f1f1;
    border-radius: 6px;
}

.custom-scrollbar-thumb {
    position: absolute;
    height: 8px;
    background: var(--portal-theme-color, #888);
    opacity: 0.6;
    border-radius: 4px;
    top: 2px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.custom-scrollbar-thumb:hover {
    opacity: 0.8;
}

.resource-card {
    display: flex;
    aspect-ratio: 397 / 500;
    height: 500px;
    width: auto;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.40);
    border: 1px solid white;
    border-bottom: 0;
    padding: 16px;
    flex-direction: column;
    flex: 1 0 0;
    align-self: stretch;
}

.resource-card__type {
    align-self: stretch;
    color: var(--Base-Black, #000);
    font-family: var(--Font-Family-Title);
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 27px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.resource-card__thumbnail-link {
    border-radius: 8px;
    display: block;
    margin-bottom: 18px;
    overflow: hidden;
    margin-bottom: 24px;
}

.resource-card__thumbnail {
    display: block;
    height: 192px;
    object-fit: cover;
    width: 100%;
}

.resource-card__title {
    align-self: stretch;
    color: var(--Base-Black, #000);
    font-family: var(--Font-Family-Title);
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-card__title {
    text-decoration: none;
}

.resource-card:hover, 
.resource-card:focus-visible {
    cursor: pointer;
}
.resource-card:hover .resource-card__title,
.resource-card:focus-visible .resource-card__title {
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: 2px;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

.resource-card:hover .resource-card__cta,
.resource-card:focus-visible .resource-card__cta {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}


.resource-card__cta {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin-top: auto;
    text-decoration: none;
    font-family: var(--Font-Family-Title);
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 27px;
}

.resources-section.purple .resource-card__cta {
    color: var(--Prince-Prince, #5C2B9C);
}

    .resources-section.purple .resource-card__cta .resource-card__cta-icon svg path {
        fill: var(--Prince-Prince, #5C2B9C);
    }

.resources-section.amber .resource-card__cta {
    color: var(--Primary-Santorini-Santorini, #3067DB);
}

    .resources-section.amber .resource-card__cta .resource-card__cta-icon svg path {
        fill: var(--Primary-Santorini-Santorini, #3067DB);
    }

.resources-section.red .resource-card__cta {
    color: var(--Primary-Santorini-Santorini, #3067DB);
}

    .resources-section.red .resource-card__cta .resource-card__cta-icon svg path {
        fill: var(--Primary-Santorini-Santorini, #3067DB);
    }

.resources-section.blue .resource-card__cta {
    color: var(--Primary-Santorini-Santorini, #3067DB);
}

    .resources-section.blue .resource-card__cta .resource-card__cta-icon svg path {
        fill: var(--Primary-Santorini-Santorini, #3067DB);
    }

.resources-section.teal .resource-card__cta {
    color: var(--Primary-Santorini-Santorini, #3067DB);
}

    .resources-section.teal .resource-card__cta .resource-card__cta-icon svg path {
        fill: var(--Primary-Santorini-Santorini, #3067DB);
    }

.resources-section.green .resource-card__cta {
    color: var(--Primary-Santorini-Santorini, #3067DB);
}

    .resources-section.green .resource-card__cta .resource-card__cta-icon svg path {
        fill: var(--Primary-Santorini-Santorini, #3067DB);
    }

.resource-card__cta svg {
    transform: translateY(-3px);
}

.resource-card__cta i {
    font-size: 18px;
    line-height: 1;
    transform: translateY(-1px);
}

.resource-card__cta-icon {
    width: 24px;
    height: 24px;
    padding-left: 3px;
}

.resources-carousel__controls {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
}

.resources-carousel__controls__indicators button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.resources-carousel .carousel-control-prev,
.resources-carousel .carousel-control-next {
    opacity: 1;
    position: static;
    transform: none;
    height: 44px;
    width: 44px;
}

.resources-carousel .carousel-control-prev-icon,
.resources-carousel .carousel-control-next-icon {
    filter: invert(26%) sepia(39%) saturate(4321%) hue-rotate(212deg) brightness(94%) contrast(93%);
    height: 16px;
    width: 16px;
}

.resources-carousel .carousel-indicators {
    margin: 0 14px;
    position: static;
}

.resources-carousel .carousel-indicators [data-bs-target] {
    background-color: #8ea0b7;
    border: 0;
    border-radius: 999px;
    height: 8px;
    margin: 0 4px;
    opacity: 1;
    width: 8px;
}

.resources-carousel .carousel-indicators .active {
    background-color: var(--Primary-Mariner);
    width: 24px;
}

.resources-carousel--mobile .carousel-inner {
    min-height: 429px;
}

@media (max-width: 480px) {

    .resource-card {
        padding: 16px;
    }

    .resources-section__header h2 {
        letter-spacing: -0.36px;
    }

    .resource-card__thumbnail {
        height: 180px;
    }

    .resource-card__title {
        font-size: 22px;
        line-height: 30px;
    }

    /* Hide desktop grid on mobile */
    .resources-grid--desktop {
        display: none;
    }

    /* Show carousel on mobile */
    .resources-carousel--mobile {
        display: block;
    }

    /* Mobile carousel: show one item at full width */
    .resources-carousel--mobile .resources-grid--carousel {
        flex-direction: column;
        gap: 0;
    }

    .resources-carousel--mobile .resource-card {
        width: 100%;
        flex: 0 0 auto;
        aspect-ratio: 397 / 500;
        height: auto;
    }

    .resources-carousel--mobile .carousel-inner {
        overflow: hidden;
    }

    .resources-carousel--mobile .resources-grid--carousel {
        flex-direction: row;
        gap: 0;
        min-width: 100%;
        height: 100%;
    }

    .resources-carousel--mobile .resource-card {
        width: 100%;
        flex: 0 0 100%;
    }

    .resources-carousel--mobile .carousel-item {
        height: 100%;
    }

    .resources-section__header {
        margin-bottom: 16px;
    }

    .resources-carousel__controls {
        margin-top: 10px;
    }
}

@media (min-width: 480px) {

    /* Show desktop grid on tablet/desktop */
    .resources-grid--desktop {
        display: flex;
    }

    /* Hide carousel on tablet/desktop */
    .resources-carousel--mobile {
        display: none;
    }

    .resource-card__type {
        margin-bottom: 24px;
    }

    .resources-section .container {
        padding-right: 0px;
    }
}

@media (min-width: 768px) {

    .resource-card {
        padding: 24px;
    }
}

@media (min-width: 1024px) {
    .resources-section .container {
        padding-right: 60px;
    }
}