:root {
    touch-action: pan-x pan-y;
    height: 100%;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body {
    top: 0px;
    background-color: #242526;
    height: 100%;
    width: 100vw;
    overflow: -moz-hidden-unscrollable;
    color: white;
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
}

a {
    color: rgb(161, 136, 206);               /* Ta bort blå text på länkar */
    text-decoration: none;        /* Ta bort understrukning av länkar */
}

.nav-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    position: fixed;
    background-color: rgb(39, 35, 46);
    width: 100vw;
    height: 70px;
    top: 0px;
    margin: 0px;
    padding: 0px 0px;
    display: flex;
    gap: 0px;
    margin: 0px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    z-index: 1;
}

.menu-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 900px;
    height: 70px;
    top: 0px;
    margin: 0px;
    gap: 0px;
    margin: 0px;
    z-index: 1;
}

.top-logo {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.top-square-wrap {
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 6px;
}

.travelphotodice-sq {
    height: 50px;
}

.nav-legado-buttons {
    display: flex;
    background-color: rgb(59, 35, 95);
    border: solid rgb(59, 35, 95) 3px;
    border-radius: 25px;
    height: 49px;
}
  
  /* .nav-legado-buttons:hover {
    box-shadow: 0px 0px 3px 3px rgb(255, 255, 255, 0.3);
  } */
  
  .legado-se-logo {
    border: solid 0px rgb(255, 255, 255);
    border-radius: 0px;
    /*border-top-left-radius: 22px;
    border-bottom-left-radius: 22px;*/
    transition: 250ms;
    width: 150px;
    height: 44px;
    padding: 0px;
    padding-left: 10px;
    padding-top: 5px;
    /* background-color: rgb(26, 23, 31); */
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0px;
    margin-top: 0px;
  }

  .yin-yang {
    border-top-right-radius: 22px;
    border-bottom-right-radius: 22px;
    height: 44px;
    padding: 0px;
    margin: 0px;
    margin-top: 0px;
    object-fit: cover;
    position: relative;
  }
  
  .legado {
    font-family: "Piazzolla", serif;
    display: inline;
    font-size: 32px;
    line-height: 40px;
    font-weight: 900;
  }
  
  .tech {
    font-family: "Roboto", sans-serif;
    display: inline;
    font-size: 32px;
    font-weight: 300;
  }

.menus-container {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    align-items: end;
    height: fit-content;
}
  
.main-menu {
    display: flex;
    gap: 10px;
    flex-direction: row;
    margin: 5px 0px 5px 5px;
}
  
.button {
    font-weight: 500;
    font-size: 14px;
    background-color: rgb(100, 60, 160);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 4px 6px;
    transition: 0.2s;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
    width: fit-content;
    height: fit-content;
}

.button:hover {
    background-color: rgb(94, 34, 190);
    border-radius: 5px;
    padding: 7px 9px;
    margin: -3px;
}

.sub-button:hover {
    background-color: rgb(94, 34, 190);
    border-radius: 5px;
    padding: 6px;
    margin: -3px;
  }

.sub-menu {
    display: flex;
    gap: 10px;
    flex-direction: row;
    margin: 3px 0px 5px 5px;
}

.sub-button {
    font-weight: 300;
    font-size: 12px;
    cursor: pointer;
    background-color: rgb(59, 35, 95);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 3px;
    transition: 0.2s;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
    width: fit-content;
    height: fit-content;
}

.square-top-button {
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    background-color: rgb(59, 35, 95);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 1px 3px;
    transition: 0.2s;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
    width: fit-content;
    height: fit-content;
    /* 3D button */
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    box-shadow: inset 0px -2px 1px rgba(0,0,0,0.5),
    inset 0 2px 1px rgba(255,255,255,0.5);
    background: linear-gradient(top, rgb(59, 35, 95), rgb(59, 35, 95));
    background: -webkit-linear-gradient(top, rgb(59, 35, 95)4, rgb(59, 35, 95)4);
    background: -moz-linear-gradient(top, rgb(59, 35, 95)4, rgb(59, 35, 95)4);
    background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgb(59, 35, 95)4), color-stop(100%, rgb(59, 35, 95)4));
}

.square-top-button:hover {
    background-color: rgb(94, 34, 190);
    border-radius: 5px;
    padding: 3px 5px;
    margin: -2px;
}

.main-page {
    scroll-behavior: smooth;
    flex-direction: column;
    display: flex;
    gap: 15px;
}

.about-me {
    background-color: rgb(26, 23, 31);
    position: relative;     /* Egna ändringar */
    top: 85px;              
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px auto;
    padding: 8px 8px 8px 8px;
    max-width: 900px;
    height: 520px;           /* Ändrat från 85vh */
    border-radius: 15px;
    /* border: 1px solid black; */
    gap: 5px;
    box-shadow: rgba(0, 0, 0, 0.15) 6px 4px 6px;
}

#name {
    color: white;
    font-size: 45px;
    font-weight: 200;
    margin-top: 5px;
    margin-bottom: 20px;
    text-align: center;
}

#profession {
    color: rgb(209, 196, 231);
    font-size: 22px;
    font-weight: 600;
    margin-top: 5px;
    margin-bottom: 10px;
    text-align: center;
}

.about-me p {
    color: rgb(209, 196, 231);
    font-size: 18px;
    line-height: 24px;
    margin: 10px;
    font-weight: 300;
    text-align: center;
}

#jimmy-legado-holmevi-portrait {
    margin-top: 3px;
    height: 500px;
    border-radius: 10px;
}

.content-photo-right {
    background-color: rgb(26, 23, 31);
    color: rgb(209, 196, 231);
    position: relative;     /* Egna ändringar */
    top: 85px;              
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
    margin: 0px auto;
    padding: 8px 8px 8px 8px;
    width: 900px;
    height: fit-content;           /* Ändrat från 85vh */
    border-radius: 15px;
    /* border: 1px solid black; */
    gap: 0px;
    box-shadow: rgba(0, 0, 0, 0.15) 6px 4px 6px;
}

.content-photo-right p {
    color: rgb(209, 196, 231);
    font-size: 18px;
    line-height: 24px;
    margin: 10px;
    font-weight: 300;
    text-align: center;
}

.content-photo-left {
    background-color: rgb(26, 23, 31);
    color: rgb(209, 196, 231);
    position: relative;     /* Egna ändringar */
    top: 85px;              
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    margin: 0px auto;
    padding: 8px 8px 8px 8px;
    width: 900px;
    height: fit-content;           /* Ändrat från 85vh */
    border-radius: 15px;
    /* border: 1px solid black; */
    gap: 0px;
    box-shadow: rgba(0, 0, 0, 0.15) 6px 4px 6px;
}

.content-photo-left p {
    color: rgb(209, 196, 231);
    font-size: 18px;
    line-height: 24px;
    margin: 10px;
    font-weight: 300;
    text-align: center;
}

.header-text {
    color: white;
    font-size: 45px;
    font-weight: 200;
    margin-top: 0px;
    margin-bottom: 10px;
    text-align: center;
}

.content-image {
    margin: 2px 2px 0px 2px;
    height: 400px;
    border-radius: 10px;
}

.sponsor-image {
    margin: 2px 2px 0px 2px;
    width: 412px;
    border-radius: 10px;
}

.text-container {
    margin: 0px 40px;
}

.content-section p {
    color: rgb(209, 196, 231);
    font-size: 18px;
    line-height: 24px;
    margin: 5px 10px 5px 10px;
    text-align: center;
}

.photo-section {
    background-color: rgb(26, 23, 31);
    position: relative;     /* Egna ändringar */
    top: 80px;              
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row-reverse;
    margin: 0px auto;
    padding: 8px 8px 8px 8px;
    max-width: 900px;
    height: 520px;           /* Ändrat från 85vh */
    border-radius: 15px;
    /* border: 1px solid black; */
    gap: 5px;
    box-shadow: rgba(0, 0, 0, 0.15) 6px 4px 6px;
}

.photo-section p {
    color: rgb(209, 196, 231);
    font-size: 18px;
    line-height: 24px;
    margin: 5px 10px 5px 10px;
    text-align: center;
}

.sq-logo {
    height: 20px;
    border-radius: 5px;
    margin-left: 5px;
}

.end {
    position: relative;     /* Egna ändringar */
    top: 45px;              
    margin: 0px auto;
    width: 250px;
    height: 70px;           /* Ändrat från 85vh */
    /* border: 1px solid black; */
}

.content-title {
    color: white;
    text-align: center;
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 10px;
}

.content-text {
    color: rgb(209, 196, 231);
    font-size: 18px;
    margin-bottom: 3px;
    margin-top: 3px;
    text-align: center;
}

#contact-field {
    width: 800px;
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.contact-block {
    width: 400px;
    margin: 0px;
    line-height: 20px;
    text-align: right;
}

.chip-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 10px 0px 5px 0px;
}

.chip {
    border-radius: 99px;
    padding: 4px 12px;
    font-size: 14px;
    border: 1px solid black;
    background-color: white;
}

.project {
    position: relative;     /* Egna ändringar */
    top: 0px; 
}

.projects-container {
    background-color: rgb(228, 228, 255);
    position: relative;     /* Egna ändringar */
    top: 55px;              
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 10px auto;
    padding: 8px 0px 8px 0px;
    max-width: 900px;
    height: fit-content;           /* Ändrat från 85vh */
    border-radius: 10px;
    /*border: 1px solid black;*/
    gap: 10px;
}

.project {
    margin: 10px;
    /*  max-width: calc(1024px - 40px);     */
    max-width: 420px;
    height: 450px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#project-collection {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 900px;
}

.img-container {
    width: 100%;
    height: 100%;
    position: relative;
    animation-name: project-frames;
    animation-duration: 20s;
    animation-iteration-count: infinite;
}

@keyframes project-frames {
    0%  {transform: scale(1);}
    50%  {transform: scale(2);}
}

.img-overlay {
    position: absolute;
    inset: 0px;
    background-color: #26262699;
    opacity: 0;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* Bestämmer hur bild ska passa innuti div*/
}

.project-text-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.project-text-title {
    font-size: 36px;
    line-height: 40px;
    color: white;
    font-weight: 900;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px #000000;
}

.chip-wrapper-project {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 0px 20px;
}

.project-text-subtitle {
    font-size: 18px;
    margin-bottom: 30px;
    color: white;
    margin-top: 30px;
    text-shadow: 2px 2px 2px #000000;
    text-align: center;
}

footer {
    position: fixed;
    width: 100vw;
    height: 30px;
    bottom: 0px;
    padding: 10px 0px;
    background-color: rgb(39, 35, 46);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    /* border-top: 1px black solid; */
    /* border-bottom: solid 1px black; */
}

.footer-licence {
    text-align: center;
    color: rgb(209, 196, 231);
    font-size: 10px;
    font-weight: 300;
}

.project-button {
    border: solid 2px white;
    border-radius: 6px;
    transition: 250ms;
    width: 250px;
    height: 50px;
    padding: 8px 0px;
    background-color: black;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    color:white;
    box-shadow: 0 0 20px rgb(228, 228, 255);
}

.project-button:hover {
    background-color: rgb(35, 35, 179);
}

.project-button:active {
    background-color: rgb(122, 122, 233);
}

.white-button {
    background-color: white;
    color: black;
}

@media screen and (max-width: 940px) {
    .nav-bar {
        padding: 0px 30px;
    }

    .main-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: right;
        width: 350px;
        gap: 8px;
        flex-direction: row;
        margin: 6px 6px 3px 6px;
    }

    .sub-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: right;
        width: 350px;
        gap: 8px;
        flex-direction: row;
        margin: 3px 6px 6px 6px;
    }

    .about-me {
        /* flex-direction: column;
        padding: 12px 0px;
        margin-top: 10px; */
        flex-direction: column;
        max-width: 500px;
        height: fit-content;           /* Ändrat från 85vh */
        top: 95px;
        gap: 0px;
    }

    #jimmy-legado-holmevi-portrait {
        margin-top: 10px;
        padding: 0px;
    }

    #name {
        font-size: 40px;
        font-weight: 200;
        line-height: 45px;
        text-align: center;
        margin-top: 10px;
        margin-bottom: 15px;
    }

    .header-text {
        font-size: 40px;
    }
    
    #profession {
        font-size: 19px;
        font-weight: 600;
        margin-bottom: 15px;
        text-align: center;
    }

    .about-me p {
        text-align: center;
        max-width: 500px;
    }

    .hero-image img {
        position: relative;
        height: 420px;
    }

    .content-photo-right {
        /* flex-direction: column;
        padding: 12px 0px;
        margin-top: 10px; */
        flex-direction: column-reverse;
        max-width: 500px;
        height: fit-content;           /* Ändrat från 85vh */
        gap: 20px;
        top: 95px;
    }

    .content-photo-left {
        /* flex-direction: column;
        padding: 12px 0px;
        margin-top: 10px; */
        flex-direction: column-reverse;
        max-width: 500px;
        height: fit-content;           /* Ändrat från 85vh */
        gap: 20px;
        top: 95px;
    }

    .content-section {
        max-width: 500px;
    }

    #contact-field {
        width: 400px;
    }
    
    .contact-block {
        width: 400px;
        margin: 0px;
        line-height: 20px;
        text-align: right;
    }

    .photo-section {
        /* flex-direction: column;
        padding: 12px 0px;
        margin-top: 10px; */
        flex-direction: column;
        max-width: 500px;
        height: fit-content;           /* Ändrat från 85vh */
        gap: 0px;
    }

    .project {
        margin: 5px;
        /*  max-width: calc(1024px - 40px);     */
        max-width: 470px;
        height: 487px;
        border-radius: 10px;
        overflow: hidden;
        position: relative;
    }

    .projects-container {
        max-width: 400px;
    }

    .end {
        top: 55px;
    }
}

@media screen and (max-width: 860px) {
    html, body {
        scroll-padding-top: 135px;
        margin: 0;
        padding: 0;
        overflow-x: hidden; /* Disable horizontal scrolling */
        max-width: 100%;    /* Ensure content doesn't exceed the viewport width */
      }
    
      /* Ensure no accidental zooming or content overflow */
      body {
        touch-action: manipulation; /* Prevents pinch-zoom gestures */
        overflow: hidden;           /* Prevents any additional scrolling */
        overflow-y: auto;  /* Allow vertical scrolling */
        position: relative;
      }
    
      * {
        box-sizing: border-box;
      }
    
      /* Prevent zooming for inputs */
      input, select, textarea {
        touch-action: manipulation;
      }
    
      /* Force all elements to fit within the viewport */
      img, iframe, video {
        max-width: 100%;
        height: auto;
      }
    
      /* Prevent flex items from expanding beyond viewport */
      .container {
        display: flex;
        flex-wrap: wrap;
      }

    p {
        font-size: 12px;
        line-height: 18px;
    }

    .nav-bar {
        height: 125px;
        width: 100vw;
        padding: 0px;
        flex-direction: column-reverse;
        align-items: start;
    }

    .menu-wrap {
        height: 115px;
        width: 100vw;
        padding: 0px;
        flex-direction: column-reverse;
    }

    .top-logo {
        padding: 5px;
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
        width: 350px;
        height: 52px;
        background-color: rgb(26, 23, 31);
        border-radius: 10px;
        border-top-left-radius: 26px;
        border-bottom-left-radius: 26px;
    }

    .top-square-wrap {
        flex-direction: row-reverse;
    }

    .travelphotodice-sq {
        height: 36px;
    }

    .nav-legado-buttons {
        border: solid rgb(59, 35, 95) 3px;
        border-radius: 21px;
        height: 42px;
        padding-top: 0px;
    }

    .legado-se-logo {
        border-top-left-radius: 18px;
        border-bottom-left-radius: 18px;
        width: 150px;
        height: 35px;
        margin-top: 0px;
      }
    
      .yin-yang {
        border-top-right-radius: 18px;
        border-bottom-right-radius: 18px;
        height: 37px;
        padding: 0px 0px;
        margin-top: 0px;
        object-fit: cover;
      }
      
      .legado {
        font-family: "Piazzolla", serif;
        display: inline;
        font-size: 25px;
        line-height: 30px;
        font-weight: 900;
        margin-left: 5px;
      }
      
      .tech {
        font-family: "Roboto", sans-serif;
        display: inline;
        font-size: 26px;
        line-height: 22px;
        font-weight: 300;
      }

    .menus-container {
        height: 36px;
        margin-bottom: 0px;
    }

    .main-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 350px;
        gap: 10px;
        flex-direction: row;
        margin: 6px 6px 3px 6px;
    }

    .sub-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 350px;
        gap: 10px;
        flex-direction: row;
        margin: 3px 6px 6px 6px;
    }
      
    .button {
        padding: 3px 4px;
        transition: 0.2s;
        box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    }

    .button:hover {
        padding: 6px 7px;
        margin: -3px;
      }
    
    .nav-links img {                /* Gäller alla bild-element under nav-links */
        height: 25px;
        width: 25px;
    }

    .main-page {
        scroll-behavior: smooth;
        flex-direction: column;
        display: flex;
        gap: 0px;
    }

    .about-me {
        margin: 10px auto;
        top: 130px;
        padding: 8px 12px 8px 12px;
        max-width: 350px;
        gap: 10px;
    }

    .content-photo-right {
        margin: 10px auto;
        top: 130px;
        padding: 8px 12px 8px 12px;
        max-width: 350px;
        gap: 10px;
    }

    .content-photo-left {
        margin: 10px auto;
        top: 130px;
        padding: 8px 12px 8px 12px;
        max-width: 350px;
        gap: 10px;
    }

    #jimmy-legado-holmevi-portrait {
        margin-top: 0px;
        width: 330px;
        border-radius: 10px;
        height: auto;
    }

    .content-image {
        margin-top: 0px;
        width: 330px;
        border-radius: 10px;
        height: auto;
    }
    
    #name {
        font-size: 30px;
        font-weight: 200;
        line-height: 30px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    #profession {
        font-size: 22px;
        font-weight: 600;
        margin-bottom: 15px;
        text-align: center;
    }

    .content-section {
        top: 45px;
        max-width: 350px;
        height: fit-content;
    }

    .work {
        top: 50px;
    }

    .work-title {
        font-size: 30px;
        line-height: 36px;
        margin-bottom: 6px;
    }
    
    #project-collection {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 350px;
    }

    button {
        height: 40px;
        width: 200px;
        font-size: 18px;
    }

    .end {
        top: 95px;
    }
}