/* GENERAL */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

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

body {
    font-family: "Poppins", sans-serif;
    
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.site {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 
        "header"
        "main"
        "footer";
    position: relative;
    width: 100%;
    max-width: 100vw;
}

p {
    color: rgb(85, 85, 85);
}

/* TRANSITION */
a,
.btn {
    transition: all 300ms ease;
}

/* DESKTOP NAV - Unified positioning and glass effect for both pages */
nav#desktop-nav {
    /* Layout og posisjonering */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%); /* Sentrerer horisontalt */
    width: calc(100% - 20px); /* Full bredde minus margin */
    max-width: 1200px; /* Eventuell max-bredde */
    height: 60px;
    z-index: 100;
    
    /* Glass effect */
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    
    /* Performance optimering */
    transform: translateX(-50%) translate3d(0,0,0);
    will-change: transform;
}

nav#desktop-nav > div {
    align-items: center;
    width: 100%;
}

nav#desktop-nav > .product_name {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: auto;
    max-width: calc(100vw - 200px); /* Sikrer at den ikke går utenfor skjermen */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product_name {
    padding-bottom: 40px;
    padding-top: 37px;
    margin: 0;
    font-family: "Noto Sans Batak", sans-serif;
    letter-spacing: 10px;
}

.logo {
    font-size: 23px;
    font-weight: 600;
    letter-spacing: 1px;
    
    flex-shrink: 0;
}

.logo a {
    text-decoration: none;
    color: #222;
    transition: color 0.3s ease;
    font-family: Arial, Helvetica, sans-serif;
}

.logo a:hover {
    color: #656565;
}

/* Glass effect elements */
.glass-header-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform: translate3d(0,0,0);
    will-change: transform;
}

.glass-header-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
}

.header-ui {
    position: relative;
    z-index: 3;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav#desktop-nav::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 50px; /* Matcher header radius */
    z-index: 5;
}

#socials-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#socials-container a {
    color: inherit !important;
    text-decoration: none !important;
}

#socials-container a:hover {
    color: #0778b1;
    scale: 1.1;
}

.icon {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    filter: grayscale(100%);
}

.icon img {
    width: 100%;
    height: 100%;
    filter: grayscale(100%);
}

.icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
    filter: grayscale(0%);
}

/* MAIN CONTENT */
main {
    grid-area: main;
    min-height: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* FOOTER */
footer {
    grid-area: footer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #272727;
    color: white;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    z-index: 10;
    position: relative;
    margin-top: 70px;
}


     /* Navigation - modifisert for dropdown */
       #desktop-nav {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: 95%;
            height: 50px;
            background: rgba(255, 255, 255, 0.353);
            backdrop-filter: blur(20px);
            border-radius: 30px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 10000;
            overflow: hidden;
        }

        #desktop-nav.open {
            height: 95vh;
            border-radius: 25px;
        }

        

        .header-ui {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 10px 10px 30px;
            height: 50px;
        }

        .logo a {
            font-size: 23px;
            font-weight: 600;
            color: #333;
            text-decoration: none;
        }


        .menu-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-family: 'Poppins', sans-serif;
            font-size: 18px;
            font-weight: 300;
            color: #4d4d4d;
            padding: 13px 8px;
            border-radius: 25px;
            transition: all 0.3s ease;
            text-decoration: none;
            margin-right: 20px;
        }

        

        .menu-btn:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        /* Skjul original dropdown-menu når ny dropdown er aktiv */
        .dropdown-menu {
            display: none;
        }

        /* Ny dropdown content */
        .dropdown-content {
            opacity: 0;
            visibility: hidden;
            padding: 20px 30px;
            height: calc(100% - 80px);
            overflow-y: auto;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #desktop-nav.open .dropdown-content {
            opacity: 1;
            visibility: visible;
        }

        /* Container som matcher din about.css */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            
        }

        /* About header section */
        .about-header {
            display: flex;
            gap: 40px;
            margin-bottom: 40px;
            align-items: flex-start;
        }

        .about-intro {
            flex: 1;
        }

        .about-intro h1 {
            font-size: 2.5rem;
            font-weight: 600;
            margin-bottom: 20px;
            color: #333;
        }

        .about-intro p {
            font-size: 1.1rem;
            color: #2e2e2e;
            line-height: 1.7;
        }

        .about-image {
            flex: 0 0 300px;
        }

        .about-image img {
            width: 100%;
            height: 300px;
            object-fit: cover;
            border-radius: 15px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }

        /* About details */
        .about-details {
            margin-bottom: 40px;
        }

        .about-details p {
            font-size: 1rem;
            color: #2e2e2e;
            line-height: 1.7;
        }

        /* Skills and Hardware section */
        .skills-hardware {
            display: flex;
            gap: 40px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }

        .skills, .hardware {
            flex: 1;
            min-width: 250px;
            background: rgba(255, 255, 255, 0.8);
            padding: 30px;
            border-radius: 20px;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        }

        .skills h2, .hardware h2 {
            font-size: 1.4rem;
            font-weight: 600;
            margin-bottom: 20px;
            color: #2e2e2e
        }

        .skills ul, .hardware ul {
            list-style: none;
        }

        .skills li, .hardware li {
            padding: 12px 0;
            color: #666;
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
            font-size: 0.95rem;
        }

        .skills li:last-child, .hardware li:last-child {
            border-bottom: none;
        }

        .quote {
            width: 100%;
            text-align: center;
            margin-top: 30px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 55px;
        }

        .quote p {
            font-style: italic;
            font-size: 1.3rem;
            color: #858585;
            font-weight: 300;
        }

        /* Main content som ikke er i dropdown */
        main {
            margin-top: 100px;
            padding: 40px 0;
        }

        /* Footer */
        

        #socials-container {
            margin-bottom: 20px;
        }

        #socials-container a {
            color: #007bff;
            text-decoration: none;
            margin: 0 15px;
            font-weight: 500;
        }

        #socials-container a:hover {
            text-decoration: underline;
        }

        /* Custom scrollbar */
        .dropdown-content::-webkit-scrollbar {
            width: 6px;
        }

        .dropdown-content::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.05);
            border-radius: 3px;
        }

        .dropdown-content::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 3px;
        }

        .dropdown-content::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3);
        }



        /* Mobile responsiveness */
        @media (max-width: 768px) {
            #desktop-nav {
                width: 95%;
                top: 20px;
            }

            .header-ui {
                padding: 10px 10px 10px 30px;
            }

            .dropdown-content {
                padding: 15px 20px;
            }

            .about-header {
                flex-direction: column;
                gap: 25px;
                text-align: center;
            }

            .about-image {
                flex: none;
                align-self: center;
            }

            .about-image img {
                width: 200px;
                height: 200px;
            }

            .about-intro h1 {
                font-size: 2rem;
            }

            .skills-hardware {
                flex-direction: column;
                gap: 20px;
            }

            .skills, .hardware {
                min-width: auto;
            }

            .quote p {
                font-size: 1.1rem;
            }
        }

        @media (max-width: 480px) {
            .header-ui {
                padding: 10px 20px;
            }

            .menu-btn {
                font-size: 14px;
                padding: 6px 12px;
            }

            .about-intro h1 {
                font-size: 1.8rem;
            }

            .about-image img {
                width: 150px;
                height: 150px;
            }

            .skills, .hardware {
                padding: 20px;
            }
        }

        #aboutContent,
#contactContent {
    display: none;
} 


footer #socials-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
    left: 35px;
}

footer p {
    margin: 0;
    font-size: 10px;
    color: #ffffff;
    text-align: center;
}

.menu-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transform: none !important;
    box-shadow: none !important;
    transition: none !important;
    background-color: inherit;
    outline: none;
}

.menu-btn:active {
    transform: none !important;
    box-shadow: none !important;
    background-color: inherit !important;
}

/* Hamburger Button */
.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    
    position: relative;
    z-index: 10;
    margin-left: auto;
    
    flex-shrink: 0;
}

.menu-btn div {
    width: 30px;
    height: 3px;
    background: rgb(102, 102, 102);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Rotating lines when active */
.menu-btn.active .line1 {
    transform: translateY(8px) rotate(45deg);
}

.menu-btn.active .line2 {
    opacity: 0;
}

.menu-btn.active .line3 {
    transform: translateY(-8px) rotate(-45deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    height: 45px;
    right: 100px;
    
    max-width: calc(100vw - 80px); /* Sikrer at dropdown ikke går utenfor skjermen */
    
    border-radius: 23px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    display: flex;

    z-index: 100000;
    
}
.dropdown-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    display: block;
    padding-left: 15px;
    align-content: center;
    text-decoration: none;
    color: rgb(66, 66, 66);
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    color: #5e5e5e;
}

/* Hero sections */
.hero-image-small {
    top: calc(50 * var(--vh) - 100px);
    background-image: url('https://jwk.no/pictures/about/meg.jpg');
}

.hero-text-small {
    top: calc(50 * var(--vh) + 0px);
}

.hero-image-large {
    top: calc(50 * var(--vh) - 200px);
    background-image: url('https://jwk.no/pictures/about/meg.jpg');
}

.hero-text-large {
    top: calc(50 * var(--vh) - 74px);
}

/* Responsivitet */
@media (max-width: 768px) {
    .logo {
        font-size: 20px;
        margin-left: 20px;
    }

    .product_name h1 {
        font-size: 21px;
    }

    nav#desktop-nav {
        width: calc(100% - 10px); /* Mindre margin på mobil */
        max-width: none; /* Fjern max-width på små skjermer */
    }

    nav#desktop-nav > .product_name {
        margin-right: 0;
        max-width: calc(100vw - 150px); /* Juster for mindre skjermer */
        letter-spacing: 5px; /* Reduser letter-spacing på mobil */
    }

    footer p {
        font-size: 10px;
    }

    footer {
        display: flex;
        padding: 15px;
    }

    footer #socials-container {
        font-size: 10px;
        left: 20px;
        margin-right: 20px; /* Mindre margin på mobil */
        gap: 0.5rem; /* Mindre gap mellom ikoner */
    }

    .site {
        min-height: 100dvh;
    }

    main {
        min-height: 0;
    }

    .menu-btn {
        margin-right: 30px;
    }

   .dropdown-menu {
        right: 70px;
        width: 80%;
        height: 50px;
        max-width: calc(100vw - 40px);
        top:5px;
        background: #ffffff;
    }


    .icon {
        width: 28px; /* Litt mindre ikoner på mobil */
        height: 28px;
    }
}

.special-product #desktop-nav {
    background-color: rgb(0, 0, 0);
    color: white;
}

.special-product .logo a {
    color: rgb(255, 255, 255);
}