html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--primary-color);
}

body {
    margin: 0;
    font-family: Bahnschrift;
    font-weight: 500;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}


a:link {
    text-decoration: none;
    color: var(--primary-color);
}

a:visited {
    text-decoration: none;
    color: var(--primary-color);
}

a:active {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: red;
}


@font-face {
    font-family: Bahnschrift;
    src: url(../img/MAIN/BAHNSCHRIFT.TTF);
}

:root {
    --background-color: rgb(255, 255, 255);
    --primary-color: black;
    --secondary-color: red;
    --height-menu: 56px;
    --font-size: 1.2rem;
}



::-webkit-scrollbar {
    display: none;
}


#header {
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    z-index: 4;
}

.title {
    font-size: var(--font-size);
    padding: 0.2rem;
    padding-right: 1rem;
    border: 2px solid var(--primary-color);
    border-bottom: 0px;
    display: flex;
    justify-content: space-between;
    z-index: 4;
}


.menu {
    display: flex;
    font-size: var(--font-size);
    padding: 0.2rem;
    border: 2px solid var(--primary-color);
    gap: 1.5rem;

}

#footer {
    color: var(--primary-color);
    left: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size);
    padding: 0.2rem;
    border: 2px solid var(--primary-color);
    background-color: var(--background-color);
    gap: 1rem;
    width: 100%;
    /* Set full width */
    box-sizing: border-box;
    /* Include padding and border in the width */
    overflow: hidden;
    /* Prevent content from overflowing */
    min-height: 30px;
}

#coordinates {
    display: flex;
    gap: 1rem;
    width: 10rem;

}

#clock {
    width: 10rem;
    display: flex;
    justify-content: flex-end;
}


.nav:hover {
    color: var(--secondary-color);
    cursor: pointer;

}

.project:hover {
    background-color: var(--primary-color);
}

#main {
    flex-grow: 1;
    width: 100%;
    border-left: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    background-color: var(--background-color);
    box-sizing: border-box;
    /* Include padding and border in the width */
    overflow: hidden;
    /* Prevent content from overflowing */
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    grid-template-rows: repeat(20, 1fr);

}

.title-project {
    grid-area: 1 / 1 / 2 / 2;
    font-size: var(--font-size);
    padding: 0.2rem;
    padding-right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-color);
    /* Optional: Make the title visually distinct */
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    /* Keeps it fixed within its container */
    top: 0;
    /* Stick to the top of the container */
}



.title-about {
    font-size: var(--font-size);
    padding: 0.2rem;
    padding-right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-color);
    /* Optional: Make the title visually distinct */
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    /* Keeps it fixed within its container */
    top: 0;
    /* Stick to the top of the container */
    cursor: move;
}

@media only screen and (max-width: 1200px) {
    #title-about {
        cursor: default;

    }
}


.title-index {
    grid-area: 1 / 1 / 2 / 11;
    font-size: var(--font-size);
    padding: 0.2rem;
    padding-right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-color);
    /* Optional: Make the title visually distinct */
    border-bottom: 2px solid var(--primary-color);
    cursor: move;
    z-index: 2;
}


@media only screen and (max-width: 1200px) {
    #title-index {
        cursor: default;

    }
}

.title-contact {
    font-size: var(--font-size);
    padding: 0.2rem;
    padding-right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-color);
    /* Optional: Make the title visually distinct */
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    /* Keeps it fixed within its container */
    top: 0;
    /* Stick to the top of the container */
    cursor: move;
}

@media only screen and (max-width: 1200px) {
    #title-contact {
        cursor: default;

    }
}


.project {
    width: 100%;
    padding: 0.2rem;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--primary-color);

}

#container-index {
    grid-area: 2 / 2 / 20 / 20;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: 32px repeat(9, 1fr);
    border: 2px solid var(--primary-color);
    box-sizing: border-box;
    overflow: hidden;
}

@media only screen and (max-width: 1200px) {
    #container-index {
        grid-area: 1 / 1 / 21 / 21;
        width: 100%;
        height: 100%;
        right: 0;
        border: 0px;
        border-top: 0px solid var(--primary-color);
        ;

    }
}



#index-menu {
    grid-area: 2 / 1 / 11 / 3;
    background-color: var(--background-color);
    border-right: 2px solid var(--primary-color);
    box-sizing: border-box;
    z-index: 2;
    overflow: hidden;
}

@media only screen and (max-width: 1200px) {
    #index-menu {
        grid-area: 2 / 1 / 11 / 11;
        border: 0px;

    }
}


.list {
    display: flex;
    flex-direction: column;


}



#container-project {
    grid-area: 2 / 3 / 11 / 11;
    overflow: hidden;
    position: relative;
    height: 100%;
    width: 100%;
    background-color: var(--background-color);
}

@media only screen and (max-width: 1200px) {
    #container-project {
        grid-area: 2 / 1 / 11 / 11;
        z-index: 20;

    }
}

#container-project>div {
    position: absolute;
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 32px repeat(1, 1fr);
    box-sizing: border-box;
}


#container-about {
    grid-area: 4 / 6 / 18 / 20;
    width: 60vw;
    height: 75vh;
    border: 2px solid var(--primary-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    position: static;
    /* Make it movable */
    cursor: default;
    z-index: 2;
}





@media only screen and (max-width: 1200px) {
    #container-about {
        grid-area: 8 / 1 /21 / 21;
        width: 100%;
        height: 100%;
        right: 0;
        border: 0px;
        border-top: 2px solid var(--primary-color);
        ;

    }
}


#container-contact {
    grid-area: 15 / 13 / 19 / 20;
    width: 30vw;
    height: 20vh;
    border: 2px solid var(--primary-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    position: static;
    /* Make it movable */
    z-index: 3;
    cursor: default;
}

@media only screen and (max-width: 1200px) {
    #container-contact {
        grid-area: 16 / 1 / 21 / 21;
        width: 100%;
        height: 100%;
        right: 0;
        border: 0px;
        border-top: 2px solid var(--primary-color);
    }
}

/* Default state: part of the grid */
#container-index,
#container-about,
#container-contact {
    position: relative;
    /* Keep inside the grid */
    /* Smooth transition when switching positions */
}

/* Draggable state: absolute positioning */
#container-index[style*="position: absolute"],
#container-about[style*="position: absolute"],
#container-contact[style*="position: absolute"] {

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Optional visual feedback */
}


.content {
    display: flex;
    gap: 1rem;
    flex-grow: 1;
    /* Fills remaining space below title */
    overflow-y: auto;
    /* Enable vertical scrolling */
    padding: 1rem;
    /* Add padding for content spacing */
}

@media only screen and (max-width: 800px) {
    .content {
        flex-direction: column;
    }
}

#image-about {
    height: 500px;
    width: auto;
}

.downloadpdf {
    text-decoration: underline;
    font-size: 1rem;
    text-transform: uppercase;
}

.downloadpdf:hover {
    color: var(--secondary-color);
}





.hide-menu {
    visibility: hidden;
    opacity: 0;
    transform-origin: top;
    position: absolute;

}


.show-menu {
    visibility: visible;
    opacity: 1;
    transform-origin: top;
    position: absolute;

}






.theme {
    display: flex;
    gap: 1rem;
    margin-left: 50vw;
}

@media only screen and (max-width: 800px) {
    .theme {
        margin-left: 0;
    }
}


/* Style for each dot */
.dot {
    width: 10px;
    height: 10px;
    transition: transform 0.2s;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

/* Colors for each dot */
.dot.white {
    background-color: rgb(255, 255, 255);
}

.dot.black {
    background-color: rgb(0, 0, 0);
}

.name {
    font-size: 1.2rem;
}



@media only screen and (max-width: 800px) {
    .theme {
        margin-left: 0;
    }
}




.image-container-project {
    grid-area: 1/ 1 / 12 / 10;
    margin: 0;
    position: absolute;
    width: 100%;
    /* Full width of modelspace */
    height: 100%;
    /* Full height of modelspace */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}


.section-projects {
    z-index: 0;
    background-color: var(--background-color);
    grid-area: 2 / 1 / 3 / 2;
    position: absolute;
    width: 100%;
    height: 99%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(11, 1fr) 32px;
    box-sizing: border-box;
    overflow: hidden;

}





#credits-container-project {
    font-size: calc( var(--font-size) * 0.8);
    z-index: 3;
    border-top: 2px solid var(--primary-color);
    justify-content: flex-start;
    grid-area: 12 / 1 / 13 / 13;
    gap: 12px;
    display: flex;
    padding: 1rem;
    text-align: center;
    align-items: center;
}

.image-carousel-project {
    position: absolute;
    width: 100%;
    /* Adjusts the container width */
    height: 100%;
    /* Adjusts the container height */
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 3;
    /* Use object-fit for image containment */
    object-fit: contain;
    /* Ensures the entire image fits */
    object-position: center center;
    /* Centers the image in the container */

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    /* Ensures the entire background image fits */
}

.image-carousel-project.active {
    opacity: 1;
}


.fullscreen-project {
    border-radius: 0px;
    z-index: 999;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.976);
    background-size: contain;
    /* Contain when in fullscreen mode */
    background-repeat: no-repeat;
    background-position: center;
}


#dots-container-project {
    border-top: 2px solid var(--primary-color);
    justify-content: flex-end;
    grid-area: 12 / 7 / 13 / 10;
    gap: 8px;
    display: flex;
    padding: 1rem;
    text-align: center;
    z-index: 5;
    align-items: center;
}


.dot-project {
    height: 5px;
    width: 5px;
    background-color: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    display: inline-block;
    transition: background-color 0.3s ease;
    cursor: pointer;
}


.active-project {
    background-color: var(--primary-color);
}

#prev,
#next {
    display: flex;
    font-size: 2rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 15;
}

#prev {
    grid-area: 6 / 1 / 7 / 2;
    z-index: 15;
    padding-right: 2rem;
}

#fullscreen-button {
    grid-area: 6 / 1 / 7 / 2;
    z-index: 15;
    padding-right: 2rem;
}
#next {
    grid-area: 6 / 9 / 7 / 10;
    z-index: 15;
    padding-left: 2rem;
}


#text-project {
    position: static;
    grid-area: 1 / 10 / 12 / 13;
    border-left: 2px solid var(--primary-color);
    max-height: 100vh;
    /* Fixed width */
    color: var(--primary-color);
    padding: 0.2rem;
    overflow-y: scroll;
    /* Allows scrolling if content overflows */
}

@media only screen and (max-width: 1200px) {
    .image-container-project {
        grid-area: 1 / 1 / 8 / 13;
    }

    #text-project {
        grid-area: 9 / 1 / 13 / 13;
        border: 0px;
    }

    #dots-container-project {
        grid-area: 8 / 10 / 9 / 13;
    }

    #credits-container-project {
        grid-area: 8 / 1 / 9 / 13;
        border-bottom: 2px solid var(--primary-color);
    }

    #next {
        grid-area: 4 / 11 / 5 / 13;
    }

    #prev {
        grid-area: 4 / 1 / 5 / 2;
    }
    :root {
        --font-size: 1rem;
    }
    
    #credits-container-project {
    font-size: calc( var(--font-size) * 0.8);
    }
    
    .dot-project {
        height: 3px;
        width: 3px;
}

.uppercase {
    text-transform: uppercase;
    font-size: 1.2rem;
}

