/* Key Components */

section.key-components {
    padding: clamp(50px, 10vw, 100px) 0;
    background: #000;
}

section.key-components h2 {
    margin-bottom: clamp(10px, 2vw, 20px);
}

section.key-components > .wrap > p {
    margin-bottom: clamp(30px, 5vw, 60px);
    max-width: 700px;
}

.key-components-grid {
    display: flex;
    gap: 20px;
}

.key-components-card {
    position: relative;
    max-height: 563px;
    height: 55vw;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    transition: all 0.5s ease;
}

.key-components-card:is(:hover, :focus-within) {
    width: 200%;
}

.key-components-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.key-components-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.key-components-card::before {
    background: linear-gradient(180deg, rgba(80, 81, 38, 0.25) 0%, #505126 85%);
    mix-blend-mode: multiply;
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    pointer-events: none;
}

.key-components-card::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    border-radius: 100%;
    width: 0;
    height: 0;
    transition: linear 0.5s;
    background: #000;
    z-index: 2;
    opacity: 0.8;
    pointer-events: none;
}

.key-components-card:is(:hover, :focus-within)::after {
    width: 2000px;
    height: 2000px;
    left: -500px;
    bottom: -500px;
}

.key-components-card-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    margin-top: auto;
    padding: clamp(15px, 3vw, 30px);
    gap: clamp(10px, 2vw, 20px);
    text-align: left;
    height: 100%;
}

.key-components-card-text {
    max-height: 0;
    /*overflow: hidden;*/
    margin: 0;
    opacity: 0;
    transition: opacity 0s;
}
.key-components-card-text ul li {
    margin-bottom: 10px;
}
.key-components-card-text a.button {
    padding: clamp(5px, 1vw, 8px) clamp(12px, 2vw, 20px);
    align-items: center;
    border-radius: 34px;
    border: 2px solid #E36F51;
    background: rgba(255, 113, 13, 0.00);
    color: #fff;
    margin-top: 20px;
    display: flex;
    width: fit-content;
    transition: 0.6s ease;
    font-size: clamp(13px, 1.5vw, 16px);
}
.key-components-card-text a.button:hover { background: #E36F51; }

.key-components-card:is(:hover, :focus-within) .key-components-card-text {
    max-height: 500px;
    opacity: 1;
    transition: opacity 0.5s ease 0.5s;
}

.key-components-card-number {
    color: #FFF;
    text-align: left;
    font-family: Poppins, sans-serif;
    font-size: clamp(24px, 4vw, 44px);
    font-style: normal;
    font-weight: 400;
    line-height: clamp(26px, 4vw, 46px);
    margin-bottom: clamp(5px, 1vw, 10px);
}

.key-components-card-content h3 {
    color: #FFF;
    font-family: Poppins, sans-serif;
    font-size: clamp(16px, 2.5vw, 28px);
    font-style: normal;
    font-weight: 400;
    line-height: clamp(18px, 2.5vw, 30px);
}

@media (max-width: 1200px) {
    .key-components-card:is(:hover, :focus-within) {
        width: 200%;
    }
}

@media (max-width: 980px) {
    .key-components-grid {
        flex-wrap: wrap;
    }

    .key-components-card {
        width: calc(50% - 10px);
        flex: none;
        height: 70vw;
        max-height: 680px;
    }

    .key-components-card:is(:hover, :focus-within) {
        width: calc(50% - 10px);
    }
}

@media (max-width: 600px) {
    .key-components-card {
        width: 100%;
        height: 100%;
        max-height: none;
    }

    .key-components-card:is(:hover, :focus-within) {
        width: 100%;
    }

    .key-components-card::after {
        width: 2000px;
        height: 2000px;
        left: -500px;
        bottom: -500px;
    }

    .key-components-card-text {
        max-height: none;
        opacity: 1;
    }
}

.key-components-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Atlas descriptions must also work on touch devices and on cards without artwork. */
.atlas-overview .key-components-card {
    height: auto;
    max-height: none;
    min-width: 0;
    background: var(--wp--preset--color--grey, #2b2b2b);
}
.atlas-overview .key-components-card:has(.key-components-card-image) {
    min-height: clamp(325px, 42vw, 563px);
}
.atlas-overview .key-components-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 75%), rgb(0 0 0 / 45%));
}
.atlas-overview .key-components-card:not(:has(.key-components-card-image)) .key-components-card-text,
.atlas-overview .key-components-card:focus-within .key-components-card-text {
    opacity: 1;
    max-height: none;
}
@media (max-width: 980px), (hover: none), (pointer: coarse) {
    .atlas-overview .key-components-card-text { opacity: 1; max-height: none; }
}
@media (max-width: 600px) {
    .atlas-overview .key-components-card:has(.key-components-card-image) { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .key-components-card, .key-components-card::after, .key-components-card-text {
        transition: none !important;
    }
}
