/* 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%;
}
/* Ensure header stays on top of hero backgrounds */
header { z-index: 1000; }

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

.logo img {
    width: 120px;
}

/* Hamburger / Mobile nav styles */
.hamburger{
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1001;
}
.hamburger:focus{outline:none}
.hamburger-box{display:inline-block;width:24px;height:16px;position:relative}
.hamburger-inner{position:absolute;top:50%;left:0;right:0;height:2px;background:#fff;transform:translateY(-50%);transition:all .25s ease}
.hamburger-inner:before,.hamburger-inner:after{content:'';position:absolute;left:0;right:0;height:2px;background:#fff;transition:all .25s ease}
.hamburger-inner:before{top:-8px}
.hamburger-inner:after{bottom:-8px}
.hamburger.open .hamburger-inner{background:transparent}
.hamburger.open .hamburger-inner:before{transform:translateY(8px) rotate(45deg)}
.hamburger.open .hamburger-inner:after{transform:translateY(-8px) rotate(-45deg)}

.main-nav{display:block}
.main-nav ul{display:flex;gap:20px}

@media (max-width: 820px){
    header{height:80px;padding:12px}
    .logo img{width:100px}
    /* Show hamburger button */
    .hamburger{display:block}
    /* Larger circular hamburger in top-right */
    .hamburger{
        width:56px;
        height:56px;
        border-radius:50%;
        background:rgba(0,0,0,0.35);
        display:flex;
        align-items:center;
        justify-content:center;
        right:16px;
        top:16px;
        transform:none;
        padding:6px;
    }

    /* Full-screen mobile nav overlay when opened */
    .main-nav ul{
        display:none;
        flex-direction:column;
        position:fixed;
        inset:0; /* top:0; right:0; bottom:0; left:0; */
        background:rgba(10,10,10,0.98);
        padding:60px 20px;
        border-radius:0;
        min-width:auto;
        box-shadow:none;
        justify-content:center;
        align-items:center;
        gap:18px;
        z-index:10050;
        overflow:auto;
    }
    .main-nav.open ul{display:flex;z-index:10050}
    .main-nav ul li{margin:12px 0;font-size:1.4rem}
    .main-nav ul li a{display:block;padding:12px 20px;font-size:1.2rem}
}

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: #40E757;
    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, #40E757),
            rgba(64, 231, 87, 0.3),
            var(--primary-color, #40E757),
            rgba(64, 231, 87, 0.3),
            var(--primary-color, #40E757)
        ) border-box;
    background-size: 100%, 200% 100%;
    animation: flowingBorder 2s linear infinite;
}

nav ul li a.active {
    color: #40E757;
    font-weight: 900;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) padding-box,
                linear-gradient(45deg, #40E757, #40E757, #40E757, #40E757) border-box;
    background-size: 100% 100%, 400% 400%;
    animation: navFlowingBorder 15s ease-in-out infinite;
    box-shadow: 
        0 0 20px rgba(40, 231, 87, 0.4),
        0 8px 25px rgba(40, 167, 69, 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: #28a745;
    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, #40E757),
            rgba(64, 231, 87, 0.3),
            var(--primary-color, #40E757),
            rgba(64, 231, 87, 0.3),
            var(--primary-color, #40E757)
        ) 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(40, 167, 69, 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, #40E757),
            rgba(64, 231, 87, 0.3),
            var(--primary-color, #40E757),
            rgba(64, 231, 87, 0.3),
            var(--primary-color, #40E757)
        ) border-box;
    background-size: 100% 100%, 200% 100%;
    animation: flowingBorder 2s linear infinite;
    transform: translateY(-2px);
    box-shadow: 
        0 0 20px rgba(64, 231, 87, 0.6),
        0 8px 25px rgba(40, 167, 69, 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(40, 167, 69, 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: #28a745 !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: #28a745;
    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: #28a745;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-section p a:hover {
    color: #34d058;
    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: #28a745;
}

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

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

.social-links a:hover {
    color: #28a745;
}

.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;
    }
}