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

body {
    font-family: 'Arial', sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #000000;
    position: relative;
    height: 120px;
    width: 100%;
}

.logo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.logo img {
    width: 120px;
}

/* Mobile hamburger styles */
.nav-toggle {
    display: none; /* hidden on desktop */
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 60;
}
.nav-toggle .bar {
    display: block;
    height: 3px;
    width: 26px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 3px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.open .bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile nav behaviour */
.main-nav {
    transition: max-height 0.28s ease, opacity 0.28s ease;
}
.main-nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

@media (max-width: 880px) {
    header {
        height: 72px;
        padding: 12px 16px;
        align-items: center;
    }

    /* show toggle */
    .nav-toggle {
        display: block;
    }

    /* hide normal desktop nav */
    .main-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 72px;
        background: linear-gradient(180deg, rgba(10,10,10,0.98), rgba(0,0,0,0.95));
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        z-index: 50;
        border-top: 1px solid rgba(255,255,255,0.03);
    }

    .main-nav.open {
        max-height: 320px; /* plenty for menu items */
        opacity: 1;
    }

    .main-nav ul {
        display: block;
        padding: 10px 0 20px 0;
    }

    .main-nav ul li {
        margin: 8px 0;
        text-align: center;
    }

    .main-nav ul li a {
        display: inline-block;
        padding: 10px 20px;
        font-size: 1.05rem;
    }
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

nav ul li a:not(.active):hover {
    color: #4a90e2;
    border: 3px solid transparent;
    background: 
        linear-gradient(rgba(26, 26, 26, 0.8), rgba(45, 45, 45, 0.8)) padding-box,
        linear-gradient(90deg, 
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2)
        ) border-box;
    background-size: 100%, 200% 100%;
    animation: flowingBorder 2s linear infinite;
}

nav ul li a.active {
    color: #4a90e2;
    font-weight: 900;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) padding-box,
                linear-gradient(45deg, #4a90e2, #4a90e2, #4a90e2, #4a90e2) border-box;
    background-size: 100% 100%, 400% 400%;
    animation: navFlowingBorder 15s ease-in-out infinite;
    box-shadow: 
        0 0 20px rgba(74, 144, 226, 0.4),
        0 8px 25px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes navFlowingBorder {
    0% {
        background-position: 0% 0%, 0% 0%;
    }
    25% {
        background-position: 0% 0%, 100% 0%;
    }
    50% {
        background-position: 0% 0%, 100% 100%;
    }
    75% {
        background-position: 0% 0%, 0% 100%;
    }
    100% {
        background-position: 0% 0%, 0% 0%;
    }
}

/* Hero Section */
.hero {
    background-image: url('bilder/background.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    color: #ffffff;
}

.hero p {
    margin: 20px 0;
    color: #cccccc;
    font-size: 1.2rem;
}

.cta-buttons .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-buttons .button.secondary {
    background-color: #333333;
}

.cta-buttons .button:hover {
    background-color: #218838;
}

/* Features Section */
.features {
    padding: 30px 20px;
    background-color: #000000;
    margin-top: -330px;
}

#features {
    padding: 50px;
    background-color: #000000;
    text-align: center;
}

.feature-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    padding: 25px;
    min-width: 0;
    background: 
        linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) padding-box,
        linear-gradient(90deg, 
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2)
        ) border-box;
    border: 3px solid transparent;
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 250px;
    min-height: 250px;
    background-size: 100% 100%, 200% 100%;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.feature h3,
.feature p,
.feature a {
    position: relative;
    z-index: 2;
}

.feature:hover {
    background: 
        linear-gradient(135deg, #2d2d2d 0%, #404040 100%) padding-box,
        linear-gradient(90deg, 
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2),
            rgba(74, 144, 226, 0.3),
            var(--primary-color, #4a90e2)
        ) border-box;
    background-size: 100% 100%, 200% 100%;
    animation: flowingBorder 2s linear infinite;
    transform: translateY(-2px);
    box-shadow: 
        0 0 20px rgba(74, 144, 226, 0.6),
        0 8px 25px rgba(74, 144, 226, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.feature:hover::before {
    left: 100%;
}

.feature:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 8px rgba(74, 144, 226, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes flowingBorder {
    0% {
        background-position: center, 0% center;
    }
    100% {
        background-position: center, 200% center;
    }
}

.feature h3 {
    color: #ffffff !important;
    font-size: 1.5rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.feature p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #ffffff !important;
    position: relative;
    z-index: 2;
}

.feature a {
    color: #4a90e2 !important;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto;
    display: inline-block;
    position: relative;
    z-index: 2;
}

.feature a:hover {
    color: #218838;
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #0a0a0a;
    color: #ffffff;
    padding: 60px 0 20px 0;
    margin-top: 60px;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 0 20px;
    width: 100%;
}

.footer-section {
    flex: 1;
}

.footer-section h4 {
    color: #4a90e2;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    color: #fff;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-section p a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-section p a:hover {
    color: #6bb6ff;
    text-decoration: underline;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-section ul li a:hover {
    color: #4a90e2;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #4a90e2;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #222;
    text-align: center;
    width: 100%;
    background-color: #0a0a0a;
}

.footer-bottom p {
    color: #fff;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}
/* Mobile tilpasninger */
@media (max-width: 768px) {
    /* Header tilpasninger */
    header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .logo {
        position: relative;
        left: 0;
        transform: none;
        margin-bottom: 15px;
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
    }

    nav ul li {
        margin: 0;
    }

    /* Hero section tilpasninger */
    .hero h1 {
        font-size: 2rem;
        padding: 0 15px;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }

    /* Feature section tilpasninger */
    .feature-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .feature {
        margin-bottom: 20px;
    }

    /* CTA buttons tilpasninger */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .button {
        width: 80%;
        margin: 5px 0;
    }
}

/* Ekstra små skjermer */
@media (max-width: 480px) {
    .logo img {
        width: 100px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    #features {
        padding: 30px 15px;
    }
}

/* Mellomstore skjermer */
@media (min-width: 769px) and (max-width: 1024px) {
    .feature-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 30px;
    }

    .feature {
        padding: 15px;
    }
}
