.eoy-confidence {
    width: 100%;
    display: flex;
    justify-content: center;
}

.eoy-confidence .container {
    width: 100%;
    margin: 0;
    padding: 5rem 0;
}

#confidence-stars {
    max-height: 118px;
}

.eoy-confidence h2,
.eoy-confidence p,
.eoy-confidence li {
    color: white;
}

.confidence-heading {
    display: flex;
    align-items: center;
}

.confidence-text {
    display: flex;
    padding-top: 1em;
    column-gap: 3rem;
}

.confidence-text ul {
    margin: 0;
}

.confidence-text li p {
    margin: 0;
}

.confidence-text div,
.confidence-text ul {
    width: 100%;
    padding-bottom: 1em;
}

.confidence-grid {
    display: grid;
    min-height: 400px;
    gap: 12px;
    padding: 2em 0 0;
}

.grid-item {
    display: flex;
    border-radius: 12px;
    align-items: center;
    overflow: hidden;
}

.grid-item:nth-child(1) {
    background-image: url(../../images/eoy-2025/Backgrounds/BG-green.png);
}

.grid-item:nth-child(2) {
    background-image: url(../../images/eoy-2025/Backgrounds/BG-purple.png);
}

.grid-item:nth-child(3) {
    background-image: url(../../images/eoy-2025/Backgrounds/BG-teal.png);
}

.grid-item:nth-child(4) {
    background-image: url(../../images/eoy-2025/Backgrounds/BG-gold.png);
}

.grid-item p,
.grid-item h2 {
    padding: 0;
    margin: 0;
    line-height: 1.2;
    text-align: center;
    position: relative;
    transition: 0.5s ease;
    text-shadow: 0 0 50px white;
}

.item-stat h2 {
    top: 0%;
    left: 0%;
    font-size: 3em;
}

.grid-item p {
    opacity: 0;
    text-shadow: 2px 2px 20px black;
    transition: 0.5s ease;
}

.grid-item .item-stat,
.grid-item .item-content {
    position: relative;
    height: 100%;
    width: 100%;
    display: inherit;
    justify-content: space-evenly;
    align-items: center;
}

.item-content p {
    padding: 0 1em;
}

.grid-item:nth-child(1) img {
    object-position: top;
}

.item-content img {
    object-fit: cover;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0%;
    left: 0%;
    right: 0%;
    transition: 0.5s ease;
}

/* Carousel */

.card-image {
    display: flex;
    overflow: hidden;
    width: 100%;
    height: 50%;
}

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

.card-content {
    display: flex;
    flex-direction: column;
    text-align: left;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    height: 50%;
}

@media screen and (max-width: 675px) {
    .eoy-confidence .container {
        padding: 0 !important;
        padding-bottom: 2rem !important;
    }

    .confidence-carousel-track .carousel-slide {
        background:
            linear-gradient(135deg, #35373c, #35373c),
            linear-gradient(142deg, #6a4b9a, #c7a436);
        background-origin: padding-box, border-box;
        background-clip: padding-box, border-box;
        background-repeat: no-repeat;

        padding: 0px;
        gap: 0px;
    }

    .confidence-carousel-track .carousel-slide h2 {
        font-size: 5em;
        line-height: 1;
        margin: 0;
        font-weight: 700;
        color: #c6a336;
    }

    .confidence-carousel-track>.slide-1 {
        justify-content: center;
        border-radius: 20px;
        background:
            linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.25) 100%),
            linear-gradient(142deg, #c7a436 0%, #6a4b9a 100%),
            linear-gradient(142deg, #6a4b9a, #c7a436);
        background-origin: padding-box, border-box;
        background-clip: padding-box, border-box;
        background-repeat: no-repeat;

        padding: 1rem;
    }

    .confidence-carousel-track>.slide-2 img {
        object-position: top;
    }
}

/* Desktop View */
@media screen and (min-width: 900px) {
    .confidence-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
        grid-template-rows: 1fr 1fr;
    }

    .grid-item:nth-child(1) {
        grid-area: 1 / 1 / 3 / 2;
        flex-direction: column;
    }

    .grid-item:nth-child(2) {
        grid-area: 1 / 2 / 2 / 4;
    }

    .grid-item:nth-child(3) {
        grid-area: 2 / 2 / 3 / 4;
    }

    .grid-item:nth-child(4) {
        grid-area: 1 / 4 / 3 / 5;
        flex-direction: column;
    }

    .grid-item div,
    .grid-item img {
        width: 100%;
    }

    .grid-item div {
        flex-direction: column;
    }

    .grid-item:nth-child(1) p,
    .grid-item:nth-child(4) p {
        top: -50%;
        left: 25%;
    }

    .grid-item:nth-child(2) p {
        left: -50%;
    }

    .grid-item:nth-child(3) p {
        left: 200%;
    }

    /* Slide the end images down */
    .confidence-grid:hover .grid-item:nth-child(1) img {
        top: 100%;
    }

    .confidence-grid:hover .grid-item:nth-child(1) h2 {
        top: 25%;
    }

    .confidence-grid:hover .grid-item:nth-child(1) p {
        top: -25%;
        left: 0%;
        opacity: 1;
    }

    .confidence-grid:hover .grid-item:nth-child(4) img {
        top: 100%;
    }

    .confidence-grid:hover .grid-item:nth-child(4) h2 {
        top: 25%;
    }

    .confidence-grid:hover .grid-item:nth-child(4) p {
        top: -25%;
        left: 0%;
        opacity: 1;
    }

    /* Slide the middle images sideways */
    .confidence-grid:hover .grid-item:nth-child(2) img {
        left: 100%;
    }

    .confidence-grid:hover .grid-item:nth-child(2) p {
        left: 0%;
        opacity: 1;
    }

    .confidence-grid:hover .grid-item:nth-child(3) h2 {
        left: -100%;
    }

    .confidence-grid:hover .grid-item:nth-child(3) p {
        left: 100%;
        opacity: 1;
    }

    .confidence-grid:hover .grid-item:nth-child(3) img {
        left: -100%;
    }
}

/* Tablet View */
@media screen and (min-width: 676px) and (max-width: 899px) {
    .confidence-text {
        display: flex;
        flex-direction: column;
        color: white;
    }

    .confidence-text ul {
        padding-left: 1em;
    }

    .confidence-grid {
        flex-direction: column;
        height: fit-content;
    }

    .grid-item {
        min-height: 140px;
    }

    .item-content p {
        left: -100%;
        right: 0%;
        top: 0%;
    }

    .grid-item:nth-child(3) p {
        left: 210%;
    }

    .confidence-grid:hover .grid-item p {
        opacity: 1;
    }

    .confidence-grid:hover .grid-item p {
        left: 0%;
        opacity: 1;
    }

    .confidence-grid:hover .grid-item:nth-child(3) p {
        left: 100%;
        opacity: 1;
    }

    .confidence-grid:hover .grid-item:nth-child(3) h2 {
        left: -100%;
    }

    .confidence-grid:hover .grid-item img {
        left: 100%;
    }

    .confidence-grid:hover .grid-item:nth-child(3) img {
        left: -100%;
    }
}

/* Mobile View */
@media screen and (max-width: 675px) {
    .confidence-heading {
        flex-direction: column;
        justify-content: center;
    }

    .confidence-text {
        display: none;
    }

    .confidence-grid {
        display: none;
        flex-direction: column;
        height: fit-content;
    }

    .grid-item {
        min-height: 100px;
    }

    .item-content p {
        left: -100%;
        right: 0%;
        top: 0%;
    }

    .grid-item:nth-child(3) p {
        left: 210%;
    }

    .confidence-grid:hover .grid-item p {
        opacity: 1;
    }

    .confidence-grid:hover .grid-item p {
        left: 0%;
        opacity: 1;
    }

    .confidence-grid:hover .grid-item:nth-child(3) p {
        left: 100%;
        opacity: 1;
    }

    .confidence-grid:hover .grid-item:nth-child(3) h2 {
        left: -100%;
    }

    .confidence-grid:hover .grid-item img {
        left: 100%;
    }

    .confidence-grid:hover .grid-item:nth-child(3) img {
        left: -100%;
    }
}