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

:root {
    --primary: #5353FF;
    --secondary: #12554F;
    --tertiary: #328079;
    --primary-back: #F8F8F7;
    --secondary-back: #EEEBFF;
}

body {
    background-color: var(--primary-back);
}

footer {
    background-color: var(--tertiary);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(248, 248, 247, 0.8);
    backdrop-filter: blur(5px);
    z-index: 75;
    opacity: 0;
    pointer-events: none;
}

#overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Skrifttyper */

h1 {
    font-family: "Ultra", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 2rem;
    color: var(--secondary-back);
    text-shadow:
    -1px -1px 0 var(--primary),  
    1px -1px 0 var(--primary),
    -1px  1px 0 var(--primary),
    1px  1px 0 var(--primary),
    5px  5px 0 var(--primary);
}

h2 {
    font-family: "Open Sans", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1.8rem;
    color: var(--secondary);
}

h3 {
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 1.2rem;
}

p {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
}

/* menu/header */

header {
    z-index: 25;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
}

.menu {
    height: 65px;
    width: 100%;
    background-color: var(--primary-back);
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    position: absolute;
    z-index: 1;
}

.menu a {
    width: 25px;
    margin-left: 35px;
    align-self: center;
}

.ham-menu {
    height: 40px;
    width: 30px;
    margin-left: auto;
    position: relative;
    align-self: center;
    margin-right: 35px;
    cursor: pointer;
}

.ham-menu span {
    width: 100%;
    border: 2px solid var(--secondary);
    border-radius: 25px; 
    top: 50%;
    left: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: .3s ease;
}

.ham-menu span:nth-child(1) {
    top: 25%;
}

.ham-menu span:nth-child(3) {
    top: 75%;
}

.ham-menu.active span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.ham-menu.active span:nth-child(2) {
    opacity: 0;
}

.ham-menu.active span:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.off-screen-menu {
    display: none;
    width: 50%;
    margin-left: 50%;
    background-color: rgba(248, 248, 247, 0.8);
    backdrop-filter: blur(5px);
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
    height: 350px;
    position: absolute;
}

.off-screen-menu.active {
    display: flex;
}

.off-screen-menu ul {
    list-style: none;
    width: 100%;
    justify-content: center;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.off-screen-menu ul a {
    color: var(--secondary);
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 1.2rem;
    align-self: center;
    text-decoration: none;
    padding-top: 25px;
    position: relative;
    cursor: pointer;
}

.off-screen-menu ul li::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    border-radius: 35px;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

.off-screen-menu ul li:hover::after {
    width: 100%;
}

/* Sektioner */

.hero {
    background-color: var(--primary-back);
    margin-top: 65px;
    padding: 35px;
    display: flex;
    flex-direction: column;
}

.flex-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero img {
    width: 100%;
    max-width: 400px;
    margin: 20px 0px 20px 0px;
    align-self: center;
}

.hero p {
    margin-top: 20px;
    max-width: 380px;
}

.hero h1 {
    text-align: center;
    max-width: 380px;
}

.hero a {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.om-mig {
    background-color: var(--secondary-back);
    padding: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.om-mig h2 {
    text-align: center;
}

.om-mig p {
    margin: 20px 0 20px 0;
    max-width: 380px;
}

.om-mig img {
    width: 100%;
    max-width: 350px;
    margin-bottom: 20px;
}

.om-mig-bund {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portfolio {
    background-color: var(--primary-back);
    padding: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portfolio h2 {
    text-align: center;
}

.kontakt {
    background-color: var(--secondary-back);
    padding: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kontakt a {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

/* komponenter */

.divider {
    border: 6px dotted var(--primary);
    border-bottom: 0;
    margin: 10px 0 0 0;
    width: 100%;
    max-width: 380px;
}

.cta-hero {
    padding: 8px 20px 8px 20px;
    width: 100%;
    height: 40px;
    max-width: 380px;
    background-color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 40px;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
    margin: 20px 0px 20px 0px;
    cursor: pointer;
}

.cta-hero:hover {
    background-color: var(--primary-back);
    color: var(--primary)
}

.cta-kontakt {
    padding: 8px 20px 8px 20px;
    width: 100%;
    height: 40px;
    max-width: 380px;
    background-color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 40px;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
    margin: 20px 0px 20px 0px;
    cursor: pointer;
}

.cta-kontakt:hover {
    background-color: var(--secondary-back);
    color: var(--primary)
}

.pro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin: 20px 0 20px 0;
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    gap: 10px;
    padding: 10px;
    max-width: 380px;
}

.pro-grid p {
    font-size: 0.8rem;
    margin: 0;
}

.pro-ikon {
    width: 50px;
    height: 50px;
    background-color: var(--tertiary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 1.8rem;
    color: var(--primary-back);
}

.kode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin: 0 0 20px 0;
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px;
    max-width: 380px;
}

.kode-ikon {
    font-size: 2.4rem;
    color: var(--primary);
}

.kode-grid p {
    font-size: 0.8rem;
    margin: 0;
}

.center-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kontakt-flex {
    display: flex;
    margin: 20px 0 20px 0;
}

.kontakt-flex i {
    align-self: center;
    margin-right: 12px;
    font-size: 1.4rem;
    color: var(--secondary);
}

.some-flex {
    display: flex;
    justify-content: center;
}

.some-flex i {
    margin: 8px;
    font-size: 1.8rem;
    color: var(--secondary);
    cursor: pointer;
    transition: all .3s ease;
}

.some-flex i:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.kontakt-flex-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.kontakt-top {
    align-self: center;
}

.kontakt-bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portfolio-item {
    margin: 20px 0 20px 0;
    max-width: 400px;
}

.portfolio-item :first-child {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
}

.portfolio-item :first-child:hover {
    opacity: 0.6;
    transform: scale(1.05);
}


/* Modal */

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: .2s ease-in-out;
    background-color: var(--primary-back);
    border-radius: 10px;
    z-index: 100;
    width: 80%;
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal.active {
    transform: translate(-50%, -50%) scale(1); 
}

.modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin-right: 30px;
}

.modal-body {
    padding: 0 20px 20px 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-body img {
    width: 100%;
    margin-top: 20px;
    border-radius: 6px;
}

.close-button {
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.close-button span {
    position: absolute;
    width: 25px;
    height: 4px;
    border-radius: 35px;
    background-color: var(--secondary);
}
.close-button span:nth-child(1) {
    transform: rotate(45deg);
}
.close-button span:nth-child(2) {
    transform: rotate(-45deg);
}

/* Modal slideshow */

.slideshow-container {
    position: relative;
}

.slides {
    display: none;   
}

.prev, .next, .prev2, .next2 {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 40px;
    height: 60px;
    padding: 0;
    transition: 0.6s ease;
    border-radius: 0 6px 6px 0;
    background-color: transparent;
    border: none;
    display: flex;
    justify-content: center;
}
.next, .next2 {
    right: 0;
    border-radius: 6px 0 0 6px;
}

.next img{
    width: 20px;
    height: auto;
    transform: rotate(180deg);
    margin: 0;
    align-self: center;
}

.prev img {
    width: 20px;
    height: auto;
    margin: 0;
    align-self: center;
}

.next2 img{
    width: 20px;
    height: auto;
    transform: rotate(180deg);
    margin: 0;
    align-self: center;
}

.prev2 img {
    width: 20px;
    height: auto;
    margin: 0;
    align-self: center;
}

.prev:hover, .next:hover {
    background-color: rgba(18, 85, 79, 0.6);
}

.prev2:hover, .next2:hover {
    background-color: rgba(50, 128, 121, 0.3);
}

.dots-container {
    text-align: center;
    margin-top: 8px;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: rgba(50, 128, 121, 0.3);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}
  
.active-dot, .dot:hover {
    background-color: var(--tertiary);
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}
  
@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* Footer  */

footer {
    height: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer p {
    color: var(--primary-back);
}


/* Kode til stor skærm */

@media only screen and (min-width: 600px) {
    /* Portfolio sektion */
    .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .modal {
        max-width: 400px;
    }
    .portfolio-item {
        max-width: 400px;
        margin: 0;
    }
    .portfolio h2 {
        margin-bottom: 30px;
    }
}

@media only screen and (min-width: 800px) {
    /* Header */
    .off-screen-menu {
        display: flex;
        width: 50%;
        right: 0;
        margin: 0;
        background-color: none;
        backdrop-filter: none;
        box-shadow: none;
        height: auto;
        z-index: 50;
    }
    .off-screen-menu ul{
        width: 100%;
        flex-direction: row;
        justify-content: flex-end;
        gap: 30px;
        margin-right: 60px;
    }
    .menu a {
        margin-left: 60px;
    }
    .ham-menu {
        display: none;
    }
    .hero, .om-mig, .portfolio, .kontakt {
        padding: 60px;
    }

    .cta-hero {
        width: 380px;
    }

    /* Hero sektion */
    .hero {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        margin-top: 30px;
    }
    .divider {
        margin-top: 20px;
    }
    .cta-hero {
        margin-top: 30px;
    }
    .hero img {
        margin: 0 0 0 40px;
    }

    /* Kontakt sektion */
    .kontakt-flex-container {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        gap: 30px;
    }
    .kontakt h2 {
        margin-bottom: 40px;
    }
    .cta-kontakt {
        margin-bottom: 0;
    }
    .kontakt-bottom {
        width: 380px;
    }
}

@media only screen and (min-width: 1200px) {
    /* Om mig sektion */
    .om-mig {
        flex-direction: row;
        justify-content: space-between;
    }
    .om-mig p {
        max-width: 400px;
    }
    .om-mig img {
        max-width: 350px;
        margin: 0 30px 0 30px;
    }
    .pro-grid {
        width: 380px;
    }
    .kode-grid {
        width: 380px;
    }
    .om-mig-bund {
        width: auto;
    }

    /* Portfolio sektion */
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero img {
        max-width: 500px;
    }
}

@media only screen and (min-width: 1500px) {
    .hero, .om-mig, .portfolio, .kontakt {
        padding: 60px 100px 60px 100px;
    }
    .menu a {
        margin-left: 100px;
    }
    .off-screen-menu ul{
        margin-right: 100px;
    }
    .hero h1 {
        font-size: 3rem;
    }
}