@import url('font.css');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

header {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #eee;
    font-size: 20px;
    z-index: 100;
    position: relative;
    padding-left: 15%;
}


.grid-container {
    display: grid;
    width: 100vw;
    height: calc(100vh - 120px);
    grid-template-columns: 1fr 2fr 2fr 2fr 2fr 2fr 2fr 1fr;
    grid-template-rows: 1fr 2fr 2fr 1fr;
}

.grid-wrapper {
    position: relative;
}

.grid-wrapper::before,
.grid-wrapper::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 2;
    pointer-events: none;
}

/* Match top with header */
.grid-wrapper::before {
    top: 0;
    background: linear-gradient(to bottom, #eee, rgba(238, 238, 238, 0));
    /* Use same #eee as header */
}

/* Match bottom with footer */
.grid-wrapper::after {
    bottom: 0;
    background: linear-gradient(to top, #eee, rgba(238, 238, 238, 0));
    /* Now both start with #eee */
}



.img-half {
    background-size: cover;
    background-position: center;
    overflow: hidden;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: opacity 0.8s ease-in-out;
    border: 1px solid #eee;
}

.img-half.fade-out {
    opacity: 0;
}

.img-full {
    grid-row: span 1;
}


.menu {
    background-color: #ccc;
    color: white;
    display: flex;
    align-items: flex-end;
    padding-left: 10px;
    padding-bottom: 20px;
    justify-content: flex-end;
    font-family: 'CG', sans-serif;
    font-size: 5vh;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    transition: background-color 0.4s ease, color 0.4s ease;
    grid-row: span 2;
    border: 1px solid #bbb;
    position: relative;
    will-change: transform, opacity, background-color;  
}


.bullet {
    display: inline-block;
    width: 3.5vw;
    height: 1.5vh;
    margin-bottom: 5vh;
    margin-left: -10px;
    border-radius: 0 1px 1px 0;
}

/* Specific bullet colors */
.bullet-11 { background-color: #F37021; }
.bullet-12 { background-color: #0081C5; }
.bullet-13 { background-color: #a8a8a8; }
.bullet-14 { background-color: #A4CE3C; }

/* Hover effect */
.menu:hover {
    color: rgb(255, 255, 255);
}
.menu:hover .bullet {
    background-color: white;
}

.menu:nth-child(11):hover {
    background-color: #F37021;
    color: rgb(255, 255, 255);
}

.menu:nth-child(12):hover {
    background-color: #0081C5;
    color: rgb(255, 255, 255);
}

.menu:nth-child(13):hover {
    background-color: #a8a8a8;
    color: rgb(255, 255, 255);
}

.menu:nth-child(14):hover {
    background-color: #A4CE3C;
    color: rgb(255, 255, 255);
}


.footer-strip {
    width: 100%;
    height: 50px;
    background: linear-gradient(to top, #eee, #eee, rgba(238, 238, 238, 0));
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 5;
}

.footer-nav {
    display: flex;
    gap: 30px;
    justify-content: space-between;
    /* or center */
    position: absolute;
    bottom: 30px;
    left: 100px;
    right: 100px;
    z-index: 10;
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.nav-label {
    position: absolute;
    bottom: 130%;
    color: #F37021;
    padding-bottom: 5px;
    font-size: 25px;
    font-family: 'CG', sans-serif;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

.nav-item:hover .nav-label {
    opacity: 1;
    transform: translateX(0);
}

.nav-dot {
    height: 1.3vh;
    width: 11.8vw;
    position: relative;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    overflow: hidden;
    transition: width 0.3s ease, height 0.3s ease;
}

.nav-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #F37021;
    transition: left 0.4s ease;
    z-index: 0;
}

.nav-dot:hover::before {
    left: 0;
}


@media (max-width: 768px) {
    .footer-nav {
        gap: 15px;
    }

    .nav-dot::after {
        font-size: 12px;
    }
}


@media (max-width: 768px) {
    .grid-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: auto;
        align-items: stretch;
        width: 100vw;
        height: 100vh;
    }

    .img-half {
        width: 100%;
        aspect-ratio: 1 / 1;
        background-size: cover;
        background-position: center;
        border: 1px solid #eee;
        opacity: 0.4;
    }

    .menu {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-size: 24px;
        padding-left: 2px;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        border: 1px solid #bbb;
        background-color: #ccc;
        color: white;
        z-index: 10;
        position: relative;
        visibility: visible;
        height: 100%;
    }

    .menu:nth-of-type(11) {
        grid-column: 1;
        grid-row: 2 / span 2;
    }

    .menu:nth-of-type(12) {
        grid-column: 2;
        grid-row: 2 / span 2;
    }

    .menu:nth-of-type(13) {
        grid-column: 3;
        grid-row: 2 / span 2;
    }

    .menu:nth-of-type(14) {
        grid-column: 4;
        grid-row: 2 / span 2;
    }
    

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-dot {
        display: none;
    }

    .menu::before {
        content: '';
        position: absolute;
        bottom: 80%;
        left: 10.5%;
        transform: translateX(-50%);
        width: 55px;
        height: 12px;
        transition: background-color 0.2s ease-out;
    }
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}
