* {
    box-sizing: border-box;
}


/* Light mode (default) */
:root {
    --text-main: #1f2933;
    --heading-color: #0f2f5f;

    --card-bg: rgba(255, 255, 255, 0.65);
    --card-bg-strong: rgba(255, 255, 255, 0.75);
    --page-padding: 2px;
    --content-width: 1400px;

    --overlay-dark: rgba(0, 0, 0, 0.35);

    --bg-image: url("../images/Backdrop.jpg");
}


/* Dark mode */
html.dark {
    --text-main: #e5e7eb;
    --heading-color: #93c5fd;

    --card-bg: rgba(15, 23, 42, 0.75);
    --card-bg-strong: rgba(15, 23, 42, 0.85);
    --page-padding: 2px;

    --overlay-dark: rgba(0, 0, 0, 0.6);

    --bg-image: url("../images/valor_wallpaper_dark.png");
}






/* -------------  Base ------------------- */
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    transition: background-image 0.4s ease;

    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* Dark overlay  */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--overlay-dark);
    z-index: -1;
}







/* -------------   Header -----------  */
header {
    background: linear-gradient(90deg, #0f2f5f, #1f4f8f);
    padding: 20px 0;
    transition: background 0.4s ease;

    position: relative;
    z-index: 20;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

html.dark header {
    background: linear-gradient(90deg,
            #020617,
            #0f172a);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    background: linear-gradient(90deg,
            rgba(2, 6, 23, 0.9),
            rgba(15, 23, 42, 0.9));
}


/* -------------------  Navbar container ------------------- */
.navbar {
    max-width: 1200px;
    margin: auto;
    padding: 0 var(--page-padding);

    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 900px) {
    .navbar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .nav-center {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-partners {
        justify-content: center;
    }
}


/* ---------- Navbar layout ---------- */

.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* VALOR – hovedidentitet */
.valor-logo-main {
    height: 50px;
}

/* Center navigation */
.nav-center {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Menylenker */
.nav-center a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.nav-center a:hover {
    text-decoration: underline;
}

/* Partner logos */
.nav-partners .logo {
    opacity: 0.9;
}

.nav-partners .usn-logo {
    height: 40px;
}

.nav-partners .kda-logo {
    height: 60px;
}

.logo {
    margin-left: 15px;
}

.nav-partners {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}






/*------------------Toggle-button-------------*/

.theme-toggle {
    display: inline-flex;
    align-items: center;
}

/* Skjul checkbox korrekt */
.theme-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Track */
.toggle-track {
    position: relative;
    width: 72px;
    height: 32px;
    border-radius: 999px;
    cursor: pointer;

    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.05));

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.25),
        0 8px 20px rgba(0, 0, 0, 0.35);

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    box-sizing: border-box;

    transition: background 0.4s ease;
}




.toggle-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;

    background: linear-gradient(145deg, #e5e7eb, #9ca3af);

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        0 6px 14px rgba(0, 0, 0, 0.45);

    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1),
        background 0.35s ease;
    z-index: 1;
}


.thumb-icon {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}



/* -------------------- DARK MODE ACTIVE --------------- */

.theme-toggle input:checked+.toggle-track {
    background: linear-gradient(145deg,
            rgba(15, 23, 42, 0.9),
            rgba(2, 6, 23, 0.9));
}

.theme-toggle input:checked+.toggle-track .toggle-thumb {
    transform: translateX(40px);
    background: linear-gradient(145deg,
            #9ca3af,
            #6b7280);
}






/* ---------- Icon animation --------- */



/* Light mode */
.theme-toggle input:not(:checked)+.toggle-track .sun {
    opacity: 1;
}

/* Dark mode */
.theme-toggle input:checked+.toggle-track .moon {
    opacity: 1;
}








/* --------------- Global card ---------- */
main {
    flex: 1;

    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    max-width: 1100px;
    width: calc(100% - 40px);
    margin: 40px auto;
    padding: 50px;

    border-radius: 18px;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}





/* --------------   Text ------------- */

h1,
h2,
h3 {
    color: var(--heading-color);
}

p,
li {
    color: var(--text-main);
}


ul {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}











/* ----------------   Footer ------------ */

.site-footer {
    background-color: var(--card-bg);
    color: var(--text-main);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

/* Layout */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
    padding: 0.5rem var(--page-padding);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* Sections */
.footer-section h3 {
    margin-bottom: 0.4rem;
    color: var(--heading-color);
    font-size: 1rem;
}

.footer-section p {
    margin: 0;
    line-height: 1.45;
}

/* Links */
.footer-section a {
    color: var(--heading-color);
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

/* Link lists */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.35rem;
}

/* VALOR branding */
.footer-brand h3 {
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* Bottom bar */
.footer-bottom {
    text-align: center;
    padding: 0.6rem;
    font-size: 0.8rem;
    background-color: rgba(0, 0, 0, 0.03);
}

/* 
   DARK MODE
 */

.dark .site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dark .footer-bottom {
    background-color: rgba(255, 255, 255, 0.05);
}



@media (max-width: 800px) {
    .footer-content {
        grid-template-columns: 1fr;
        /* ← stack vertically */
        gap: 1.25rem;
        text-align: center;
    }

    .footer-section ul {
        align-items: center;
    }
}











/* ------------   About us ---------------- */

.avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
}


.intro {
    max-width: 700px;
    margin-bottom: 40px;
    color: var(--text-main);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.team-card {
    background: var(--card-bg-strong);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-radius: 16px;
    padding: 25px;
    text-align: center;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
}

.team-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}

.team-card h3 {
    margin: 10px 0 5px;
    color: var(--heading-color);
}

.team-card .role {
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.team-card p {
    font-size: 0.9rem;
    color: var(--text-main);
}







/* --------------------   Updates ------------- */

/* Sprintene i hver sin boks */

.timeline-title {
    text-align: center;
    margin-bottom: 60px;
    color: var(--heading-color);
}

.phase-title {
    text-align: center;
    margin: 80px 0 40px;
    font-size: 1.8rem;
    color: var(--heading-color);
}

.timeline-alt {
    position: relative;
    max-width: 100%;
    margin: auto;
    padding: 20px 0;
}



.timeline-alt::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: var(--heading-color);
    transform: translateX(-50%);
}





@media (min-width: 1000px) {

    .timeline-row {
        position: relative;
        width: 50%;
        padding: 20px 40px;
    }

    /* LEFT side */
    .timeline-row.left {
        left: 0;
        text-align: right;
    }

    /* RIGHT side */
    .timeline-row.right {
        left: 50%;
        text-align: left;
    }

    /* Dot positioning */
    .timeline-row.left::before {
        right: -7px;
        left: auto;
    }

    .timeline-row.right::before {
        left: -7px;
        right: auto;
    }


    .timeline-row.left .content {
        margin-right: 40px;
        margin-left: auto;
    }

    .timeline-row.right .content {
        margin-left: 40px;
        margin-right: auto;
    }

}




@media (max-width: 900px) {

    
    .timeline-alt::before {
        left: 20px;
        transform: none;
    }

    
    .timeline-row {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 20px 20px 20px 60px;
        text-align: left;
    }

    
    .timeline-row.left,
    .timeline-row.right {
        margin-left: 0;
        margin-right: 0;
    }

    
    .timeline-row::before {
        left: 13px;
        right: auto;
    }
}




.timeline-row::before {
    content: "";
    position: absolute;
    top: 30px;
    width: 14px;
    height: 14px;
    background-color: #0f2f5f;
    border-radius: 50%;
    z-index: 2;
}








/* ------------- Timeline content------------ */
.timeline-row .content {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    padding: 22px 26px;
    border-radius: 16px;

    text-align: left;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.timeline-row .content h3 {
    margin-top: 0;
    color: var(--heading-color)
}

.timeline-row .date {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1f4f8f;
}


.timeline-image .content {
    padding: 0;
    overflow: hidden;
}

.timeline-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}


.timeline-row+.timeline-row {
    margin-top: 40px;
}



/* --------- For bildet -------*/

.sprint-with-image {
    position: relative;
}

/* Bildet som eget kort */

.sprint-image-card {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 310px;
}




/* Når teksten er på venstre side → bilde til høyre */
.timeline-row.left .sprint-image-card {
    left: calc(100% + 80px);
}

/* Når teksten er på høyre side → bilde til venstre */
.timeline-row.right .sprint-image-card {
    right: calc(100% + 80px);
}

/* Bildekort styling */
.sprint-image-card img {
    width: 100%;
    display: block;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}