/*
 * Section And Card Layout Overview
 * --------------------------------
 * This file holds structural layout rules for major sections and card shells:
 * - games section and role section wrappers
 * - generic card container variants
 * - case-study card grid flow and flip behavior
 * - shared heading blocks used across cards
 *
 * Why separated from component visuals:
 * Layout concerns (size, width, alignment, flow) are easier to reason about
 * when grouped together and loaded before detailed component skin styles.
 */

.games-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background-color: #ccccdd;
}

.role-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.role-container {
    position: relative;
    width: 80%;
    max-width: 44rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.role-backdrop {
    position: absolute;
    inset: 0 -300px;
    background: #f8f8ff99;
    -webkit-mask-image: 
        linear-gradient(to right, transparent 0px, black 360px, black calc(100% - 360px), transparent 100%), 
        linear-gradient(to bottom, transparent 0px, black 50px, black calc(100% - 50px), transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: 
        linear-gradient(to right, transparent 0px, black 360px, black calc(100% - 360px), transparent 100%), 
        linear-gradient(to bottom, transparent 0px, black 50px, black calc(100% - 50px), transparent 100%);
    mask-composite: intersect;
    pointer-events: none;
    z-index: 0;
}

* {
    font-family: 'Roboto', sans-serif;
}

/* Card Styles */
.card {
    background-color:#f8f8ff;
    margin: 0 auto;
}

.card.gamecard {
    row-gap: 0.5rem;
    padding: clamp(1rem, 1.5vw, 2rem);
    width: 90%;
    max-width: 64rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 15px;
    border: 1px solid #110033;
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
    min-width: 0;
    font-size: clamp(0.9rem, 1.5vw, 1rem) !important;
    line-height: 1.3em;
    box-sizing: border-box;
}

.game-note {
    padding: clamp(0.75rem, 1vw, 1.25rem);
    width: 40rem !important;
    text-align: center;
}

.gamecard-top {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: clamp(2rem, 2vw, 6.75rem);
    width: 100%;
}

.gamecard-bottom {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(2rem, 2vw, 6.75rem);
    width: 100%;

}

.gamecard-bottom-left {
    flex: 0 0 auto;
    width:50%;
    max-width: 428px;
}

.gamecard-bottom-right {
    flex: 1;
}

.gamecard-platform-mobile {
    display: none;
}

.card.rolecard {
    text-align: left;
    gap: clamp(1rem, 2vw, 6.75rem); /* 48px - 108px */
    padding: 2rem 3rem 2rem 3rem;
    width: 100%;
    max-width: 44rem;
    background-color: transparent;
    position: relative;
    z-index: 1;
}

.card.casecard {
    gap: clamp(2rem, 4vw, 12rem); /* 48px - 108px */
    padding: 2rem 3rem 2rem 3rem;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(380px, 4fr);
    align-items: flex-start;
    background-color: transparent;
    position: relative;
    z-index: 1;
}

.card.casecard.flipped {
    grid-template-columns: minmax(380px, 4fr) minmax(0, 5fr);
}

.card.casecard > .casecard-content,
.card.casecard > .video-box-wrapper {
    min-width: 0;
}

.card.casecard > .casecard-content {
    grid-column: 1;
    grid-row: 1;
}

.card.casecard > .video-box-wrapper {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
}

.card.casecard.flipped > .casecard-content {
    grid-column: 2;
}

.card.casecard.flipped > .video-box-wrapper {
    grid-column: 1;
}

.video-box-wrapper-content {
    width: 50%;
    min-height: 200px;
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 1;
}


.casecard-content{
    height: 100%;
    position: relative;
    z-index: 1;
}
.casecard-back {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

.casecard-back a {
    flex: 0 0 auto;
    text-align: center;
}

.casecard-back-desktop {
    display: flex;
}

.casecard-back-mobile {
    display: none;
}

@media only screen and (max-width: 850px) {
    .casecard-back-desktop {
        display: none;
    }
    
    .casecard-back-mobile {
        display: flex;
    }
}

