/* =========================================================
   CARDGAME – Scoped & Bootstrap Safe
========================================================= */

/* ------------------------------
   Header Fix (optional)
--------------------------------*/
.site-header .site-title a,
.site-navigation ul.menu li a {
    text-decoration: none;
}

/* =========================================================
   GRID CARDS
========================================================= */

.cardgame-grid-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.cardgame-grid-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 22px rgba(0,0,0,0.25);
}

.cardgame-grid-img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================================
   FULLSCREEN OVERLAY
========================================================= */

#cardOverlay {
    position: fixed;
    inset: 0;
    background: rgba(11,16,31,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99999;
}

#cardOverlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ------------------------------
   Overlay Layout
--------------------------------*/

#cardOverlay .card-overlay-content {
    width: 90%;
    height: 90%;
    display: flex;
    gap: 30px;
    color: white;
}

/* ------------------------------
   Left Image Column
--------------------------------*/

#cardOverlay .card-overlay-left {
    width: 60%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cardOverlay .card-overlay-left img {
    max-height: 95%;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}

/* ------------------------------
   Right Scroll Column
--------------------------------*/

#cardOverlay .card-overlay-right {
    width: 40%;
    height: 100%;
    overflow-y: auto;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#cardOverlay .card-overlay-right::-webkit-scrollbar {
    display: none;
}

/* ------------------------------
   Close Buttons
--------------------------------*/

.overlay-close,
.overlay-close-end {
    background: transparent;
    color: white;
    font-size: 32px;
    border: none;
    cursor: pointer;
}

.overlay-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.overlay-close-end {
    margin: 80px 0 40px auto;
    display: block;
}

.overlay-close-end:hover {
    color: white;           /* Textfarbe */
    background-color: #608AE2; /* Optional: Hintergrund bleibt transparent */
    cursor: pointer;           /* Schön für Hover */
}

/* =========================================================
   CONTENT STYLING
========================================================= */

.guiding-question {
    color: white;
    margin-bottom: 10vh;
}

#guiding-question4 {
    margin-top: 2em;
    margin-bottom: 1vh;
}

.guiding-question h1,
.guiding-question h2,
.guiding-question h3,
.guiding-question h4,
.guiding-question h5,
.guiding-question h6,
#overlay-card-story h1,
#overlay-card-story h2,
#overlay-card-story h3,
#overlay-card-story h4,
#overlay-card-story h5,
#overlay-card-story h6,
#overlay-card-theory h1,
#overlay-card-theory h2,
#overlay-card-theory h3,
#overlay-card-theory h4,
#overlay-card-theory h5,
#overlay-card-theory h6,
#overlay-card-activity h1,
#overlay-card-activity h2,
#overlay-card-activity h3,
#overlay-card-activity h4,
#overlay-card-activity h5,
#overlay-card-activity h6 {
    color: #ffffff;
}

/* Titles */

#overlay-card-title,
#overlay-card-StTitle,
#overlay-card-ThTitle,
#overlay-card-AcTitle {
    margin-top: 25vh;
    color: white;
}

/* Content Blocks */

#overlay-card-story,
#overlay-card-theory,
#overlay-card-activity {
    margin-top: 1vh;
    margin-bottom: 2em;
    color: white;
}

.overlay-section {
    display: none;
}

/* =========================================================
   SECTION ARROWS
========================================================= */

.section-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto 100vh auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 28px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.section-arrow:hover {
    transform: translateY(6px);
    background: rgba(255,255,255,0.25);
}

/* =========================================================
   MOBILE OPTIMIZATION
========================================================= */

@media (max-width: 768px) {

    #cardOverlay .card-overlay-content {
        flex-direction: column;
        height: auto;
        gap: 0.5rem;
    }

    #cardOverlay .card-overlay-left {
        width: 100%;
        height: auto;
        margin-top: 1rem;
    }

    #cardOverlay .card-overlay-left img {
        width: 90%;
        max-height: 40vh;
    }

    #cardOverlay .card-overlay-right {
        width: 100%;
        height: calc(100vh - 40vh - 2rem);
        padding: 1rem;
    }

    #overlay-card-title,
    #overlay-card-StTitle,
    #overlay-card-ThTitle,
    #overlay-card-AcTitle {
        margin-top: 1rem;
    }

    .section-arrow {
        margin: 1rem auto 2rem auto;
    }
}