/* ==================================================
   GLOBAL
================================================== */
body {
    margin: 0;
    height: 100vh;
    background-image: linear-gradient(
        to bottom,
        rgb(111, 73, 139),
        rgba(75, 70, 70, 0.6)
    );
    background-repeat: no-repeat;
    overflow: hidden;
}


/* ==================================================
   PRODUCTS LAYOUT
================================================== */
.grid {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
}

.row {
    display: grid;
    grid-auto-flow: column;
    column-gap: 60px;
    justify-content: center;
}

.images {
    margin-bottom: 10px;
}

.img-wrap {
    width: 150px;
    height: 150px;
    border: 4px solid rgb(181, 54, 145);
    border-radius: 50%;
    overflow: hidden;
    transition: border 0.4s ease;
}

.img-wrap:hover {
    border-color: rgb(60, 55, 148);
}

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text {
    width: 150px;
    text-align: center;
    font-size: 1rem;
    color: #ffffff;
    padding-top: 20px;
    font-style: italic;
}


/* ==================================================
   HEADER
================================================== */
.fade-text {
    font-family: "Times New Roman", Times, serif;
    text-align: center;
    font-size: 50pt;
    transform: translateY(-150%);
    color: white;
    text-shadow: 2px 7px 3px rgba(76, 35, 159, 0.185);
}

.fade-line {
    height: 2px;
    width: 140%;
    margin: 30px auto;
    transform: translateX(-12%);
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0)
    );
}


/* ==================================================
   BUTTONS
================================================== */
#important {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
    z-index: 20;
}

.toggle-group {
    position: relative;
}

.hidden-check {
    display: none;
}

.impbutton {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 130px;
    height: 45px;

    border: 1px solid #ffffff;
    border-radius: 25px;

    font-size: 1rem;
    font-family: Verdana, sans-serif;
    font-weight: 500;

    color: #ffffff;
    background-color: gray;

    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}


/* ==================================================
   DESKTOP HOVER
================================================== */
@media (hover: hover) and (pointer: fine) {

    .impbutton:hover {
        transform: translateY(-5px);
        background-color: #5a6969;
    }

    .hidden-check {
        pointer-events: none;
    }

    .toggle-group:nth-of-type(1):hover ~ .impbuttoninfo .contact-text,
    .toggle-group:nth-of-type(2):hover ~ .impbuttoninfo .about-text,
    .toggle-group:nth-of-type(3):hover ~ .impbuttoninfo .help-text {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}


/* ==================================================
   CHECKED STATE (MOBILE ACTIVE)
================================================== */
.hidden-check:checked + .impbutton {
    background-color: rgb(111, 73, 139);
    box-shadow: 0 0 10px white;
    transform: translateY(-2px);
}


/* ==================================================
   INFO BOX
================================================== */
.impbuttoninfo {
    position: fixed;
    bottom: 30%;
    right: 150%;
    transform: translateX(-50%);
    width: 60%;
    text-align: center;
    color: white;
    pointer-events: none;
}

.impbuttonin {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;

    opacity: 0.3;
    visibility: hidden;
    transform: translateY(-20px);

    transition: opacity 0.75s ease-in, transform 0.35s ease;

    font-size: 1.2rem;
    line-height: 1.5;
}

/* ==================================================
   MOBILE - CLEAN CENTERED LAYOUT (NO SHIFT BUG)
================================================== */
@media (max-width: 768px) {

    body {
        height: 100vh;
        margin: 0;
        overflow: hidden;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Remove transform shifting */
    .fade-text,
    .fade-line,
    .grid {
        position: relative;
        transform: none;
        text-align: center;
    }

    /* Header */
    .fade-text {
        font-size: 26pt;
        margin-bottom: 6px;
        transform: translateY(-120%);
    }

    .fade-line {
        width: 80%;
        margin: 0 auto 25px auto;
    }

    /* Products */
    .grid {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-bottom: 120px; /* space above buttons */
    }

    .row {
        display: flex;
        justify-content: center;
        gap: 15px;
    }

    .img-wrap {
        width: 110px;
        height: 110px;
    }

    .text {
        width: 110px;
        padding-top: 15px;
    }

    /* =========================
       TOGGLED INFO TEXT
    ========================== */

    .impbuttonin {
        display: none;
    }

    #check-contact:checked ~ .impbuttoninfo .contact-text,
#check-about:checked ~ .impbuttoninfo .about-text,
#check-help:checked ~ .impbuttoninfo .help-text {
    display: block;
}

    .impbuttoninfo {
        position: fixed;
        bottom: 105px; /* sits above buttons */
        left: 50%;
        transform: translateX(-50%);
        width: 85%;
        text-align: center;
        z-index: 5;
    }

    /* Buttons */
    #important {
        position: absolute;
        bottom: 45px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
    }

    .impbutton {
        width: 90px;
        height: 36px;
        font-size: 0.8rem;
    }

    /* Disable hover effects on mobile */
    .impbutton:hover,
    .img-wrap:hover {
        transform: none !important;
        filter: none !important;
    }
}