/* =========================
   GLOBAL ELEMENT STYLES
   ========================= */
body {
    height: auto;
}

button {
    font-size: 1rem;
    background-color: var(--bg-color);
    border: none;
}


/* #floatingLoginDiv {
    display: none;
} */

#languageselectDiv {
    position: absolute;
    top: calc(var(--header-height) + 0.5rem);
    left: 0.5rem;
    z-index: 1;
    width: 8rem;
    display: flex;
    gap: 0.2rem;
    background-color: var(--contrast-color-a25);
    border-radius: var(--border-radius);
    padding: 0.2rem;
}

#languageselectDiv img {
    width: 30%;
    height: auto;
}

/* =========================
     MAIN LAYOUT SECTIONS
     ========================= */
#main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-inline: 0;
    margin-top: var(--header-height);
}

#topSection {
    text-align: center;
    height: 0;
    margin-top: 0;
}

#middleSection {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

#bottomSection {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
    margin-bottom: calc(2rem + var(--header-height));
}

/* =========================
     FRONT PAGE SALE STYLES
     ========================= */
#frontPageSaleWrapper {
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 3rem;
    max-width: 1300px;
}

#frontPageSaleMainItemWrapper {
    background-image: url('../img/frontpageglupusmatte.avif');
    background-size: cover;
    margin: 1rem;
    border-radius: var(--border-radius);
    position: relative;
}

#frontPageSaleMainItemWrapper h2 {
    margin: 0;
    background-color: rgba(255, 255, 255, 0.308);
    padding-block: 2rem;
    position: absolute;
    bottom: 0;
    width: 100%;
    color: var(--contrast-color);
    font-size: 2rem;
    text-align: center;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

#frontPageFeideBtn {
    margin-top: 0.5rem;
    padding: 0.25rem;
    background-color: white;
}

#frontPageFeideBtn>img {
    height: 1.5rem;
    width: auto;
    margin: auto;
}

#frontPageSaleInfoWrapper {
    max-width: 20rem;
}

.frontPageItemWrapper {
    display: flex;
    flex-direction: column;
    margin: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background-color: var(--panel-color);
}

.frontPageItemWrapper a {
    display: block;
}

.frontPageItemWrapper button {
    width: 100%;
    border: 1px solid var(--color);
}

/* =========================
     “GLUPUS” IMAGES & PREVIEWS
     ========================= */
#glupusimg {
    position: relative;
    box-shadow: none;
}

#glupImg {
    visibility: hidden;
}

#glupImg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

#glupImgTest {
    min-width: 20vw;
}

#glupPreviewSlot {
    z-index: 2;
}

#previewTextDiv {
    box-sizing: border-box;
    background-color: rgba(100, 100, 100, 0.7);
    color: white;
    position: absolute;
    padding: 1rem;
    margin-top: 50%;
    width: 100%;
    height: 50%;
    z-index: 5;
    font-size: 1vw;
    text-shadow: 1px 1px 2px black;
    border-radius: 0 0 5px 5px;
    display: none;
}

#previewTitleDiv {
    position: absolute;
    z-index: 5;
    background-color: rgba(100, 100, 100, 0.3);
    font-size: xx-large;
    text-shadow: 1px 1px 2px black;
    color: white;
    text-align: center;
    width: 100%;
}

/* =========================
     MIDDLE SECTION – PLANET CARDS
     ========================= */
.planetCard {
    display: flex;
    font-size: normal;
    width: 30%;
    max-height: 20vh;
}

.planetCardImg {
    width: 90%;
}

#planetCard1 {
    position: absolute;
    top: 45vh;
    left: 30%;
}

#planetCard2 {
    position: absolute;
    top: 20vh;
    left: 10%;
}

#planetCard3 {
    position: absolute;
    top: 20vh;
    left: 60%;
}

.planetCardLeftWrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 33%;
}

.planetCardTitle {
    width: 100%;
    text-align: center;
    margin-bottom: 1.2rem;
    font-size: x-large;
    font-weight: bolder;
    margin-top: 0.6rem;
}

.planetCardRightWrapper {
    letter-spacing: 0.05rem;
    padding: 1rem;
    overflow: hidden;
    width: 66%;
    background-color: var(--contrast-color-a25);
    border-radius: var(--border-radius);
}

/* =========================
     MAIN LOGO
     ========================= */
#mainLogoWrapper p {
    margin-top: 0.1rem;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

#mainLogo {
    font-size: 5rem;
    color: var(--logo-color);
    font-weight: normal;
    text-align: center;
    margin-bottom: 0;
}

/* =========================
     TOPICS & SECTIONS
     ========================= */
.mainTopicWrapper {
    min-width: 20vw;
    aspect-ratio: 1/1;
    border-radius: 5%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    margin: 1.5vw;
    box-shadow: none;
}

.section {
    display: flex;
    justify-content: space-around;
    flex-direction: row;
}

.topicLogo {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.subTopicWrapper {
    display: flex;
    flex-direction: column;
}

.subTopicBtn {
    margin-bottom: 0.5em;
    text-align: left;
    padding: 0.2rem 0 0.2rem 1rem;
    font-size: 1em;
}

.linkBtn:hover {
    cursor: pointer;
}

/* =========================
     CARD HOLDER & GLUPUS CARDS
     ========================= */
#cardHolderDiv {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-inline: 10%;
}

.glupusCard {
    margin: 1rem;
    width: 15%;
    min-width: 300px;
    background-color: var(--panel-color);
    border-radius: 10px;
}

.glupusCard:hover {
    scale: 1.2;
    cursor: pointer;
    z-index: 5;
    filter: none;
}

.glupusCardTitle {
    font-size: x-large;
    text-align: center;
    padding: 0.5rem;
}

.glupusCardImage {
    width: 90%;
    transform: translate(5%, 0%);
    margin: auto;
    border-radius: 10px 10px 0 0;
}

.glupusCardDescription {
    font-size: medium;
    letter-spacing: 0.05rem;
    padding: 1rem;
}

/* =========================
     MISC.
     ========================= */
#everythingTitle {
    text-align: center;
    font-size: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#saleWrapper {
    width: 10rem;
    position: absolute;
    bottom: 5rem;
    right: 5rem;
    cursor: pointer;
    max-width: 200px;
}

#cellText {
    display: none;
    margin-inline: 3rem;
}

/* ========================
     MEDIA QUERIES
     ======================== */



@media screen and (max-width: 1500px) {
    .planetCardTitle {
        font-size: large;
        display: none;
    }

    .planetCardRightWrapper {
        font-size: small;
    }
}

/* iPad-ish: show main item on top, info below, 2 items side by side */
@media screen and (max-width: 1000px) {
    #frontPageSaleWrapper {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 0 auto;
        width: 100%;
    }

    #frontPageSaleMainItemWrapper {
        min-height: 50vh;
    }

    #frontPageSaleInfoWrapper {
        width: 100%;
        display: flex;
        align-items: center;
        max-width: none;
        justify-content: center;


    }

    .frontPageItemWrapper {
        height: 20rem;
    }



    .planetCard {
        display: flex;
        position: static;
        margin: 1rem auto;
        width: 80%;
        max-width: 400px;
        max-height: none;
    }

    #planetCard1,
    #planetCard2,
    #planetCard3 {
        position: static;
        top: auto;
        left: auto;
    }

    .glupusCard:hover {
        scale: 1;
        filter: none;
    }

    #saleWrapper {
        width: 10rem;
        bottom: 1rem;
        left: 50%;
        transform: translate(-50%, 0%);
    }

    #cellText {
        display: block;
    }
}

/* Very narrow: single column */
@media screen and (max-width: 600px) {

    #frontPageSaleMainItemWrapper {
        min-height: none;
        max-width: 90%;
    }

    #frontPageSaleInfoWrapper {
        flex-direction: column;
    }

    .planetCard {
        display: none;
    }

    #cellText {
        display: block;
        margin-inline: 5rem;
    }

    .frontPageItemWrapper {
        height: auto;
    }

    #frontPageSaleMainItemWrapper h2 {
        font-size: 1.5rem;
    }

    #mainLogoWrapper>p {
        display: none;

    }
}


@media screen and (max-width: 300px) {
    #cellText {
        display: none;
    }
}