/* ==========================================================================
   Block: Resources (curated resource cards)
   ========================================================================== */

.resources-block {
    position: relative;
    overflow: hidden;
}

.res-wrapper {
    max-width: var(--max-w-wrapper);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

@media (min-width: 1024px) {
    .res-wrapper {
        padding-left: 80px;
        padding-right: 80px;
    }
}

.res-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .res-container {
        gap: 40px;
    }
}

.res-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.res-no-title .res-title-row {
    justify-content: flex-end;
}

.res-title {
    font-size: var(--font-h2-size);
    font-weight: 300;
    margin: 0;
}

.res-separator {
    border: none;
    border-top: 1px solid currentColor;
    margin: 0;
}

/* ---------- Responsive visibility ---------- */

.res-thumb-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.res-cards,
.swiper.res-swiper,
.res-arrows {
    display: none;
}

@media (min-width: 768px) {
    .res-thumb-list {
        display: none;
    }

    .res-cards {
        display: grid;
    }

    .swiper.res-swiper {
        display: block;
    }
	
	.res-arrows {
		display: flex;
	}
}

/* ---------- Mobile thumbnail list (below 768px) ---------- */

.res-thumb {
    display: grid;
    grid-template-columns: 80px auto;
    height: auto;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 1024px) {
	.res-thumb {
		border-bottom: 1px solid var(--color-border, #a0a0a0);
	}
}

.res-thumb-image,
.res-thumb-text {
    height: auto;
	min-height:71px;
}

.res-thumb-image {
    overflow: hidden;
}

.res-thumb-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.res-thumb-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 0 10px 16px;
}

.res-thumb-eyebrow {
    font-size: 14px;
    color: var(--white);
    margin: 0;
}

.res-thumb-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
	text-decoration: underline;
}

.res-thumb-list li{
	background: var(--color-black);
	color: var(--color-white);
	margin-bottom: 20px;
}

/* ---------- Static grid (3 or fewer items, 768px+) ---------- */

.res-cards {
    grid-template-columns: 1fr;
    gap: 8px 16px;
}

@media (min-width: 1024px) {
    .res-cards {
        grid-template-columns: repeat(12, 1fr);
        grid-column: 3 / span 10;
        gap: 16px 8px;
    }

    .res-cards .res-card {
        grid-column: span 4;
    }
}

/* ---------- Carousel (more than 3 items, 768px+) ---------- */

.res-arrows {
    gap: 16px;
    flex-shrink: 0;
}

.res-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.res-arrow svg rect {
    fill: white;
}

.res-arrow-prev {
    transform: rotate(180deg);
}

.res-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.res-swiper {
    overflow: visible;
    width: 100%;
}

.res-swiper .swiper-wrapper {
    align-items: stretch;
}

.res-swiper .swiper-slide {
    width: 320px;
    height: auto;
    flex-shrink: 0;
}

/* ---------- Card (used in grid + carousel) ---------- */

.res-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    overflow: hidden;
	margin-bottom: 20px;
}

@media (min-width: 1024px) {
    .res-card {
        height: 400px;
		margin-bottom: 0;
    }
}

.res-card article {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.res-card-image {
    width: 100%;
    height: 216px;
    background-color: #FF9682;
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .res-card-image {
        height: 272px;
    }
}

.res-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.res-card-content {
    padding: 16px;
    background-color: #000000;
    color: #ffffff;
    transition: all 0.25s 0.125s ease-out;
}

@media (min-width: 1024px) {
    .res-card-content {
        height: 258px;
        padding: 24px;
    }
}

.res-card-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    height: auto;
}

@media (min-width: 1024px) {
    .res-card-inner {
        gap: 0;
		height: 210px;
    }
}

.res-card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.res-card-eyebrow {
    font-size: 14px;
    color: var(--color-white);
    margin: 0;
}

.res-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.res-card-description {
    font-size: 14px;
    line-height: 1.25;
    margin: 0;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.res-card-link {
    align-self: flex-end;
    width: 24px;
    height: 24px;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.res-card-link svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {

    .res-card:hover .res-card-content {
        background-color: #0099B8;
        transform: translateY(-130px);
        transition-delay: 0s;
    }

    .res-card:hover .res-card-description {
        opacity: 1;
        transition-delay: 0.1s;
    }

    .res-card:hover .res-card-link {
        opacity: 1;
        transition-delay: 0.3s;
    }
}