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

body {
    font-family: Arial, sans-serif;
    background-color: #02111B;
    min-height: 100vh;
    color: #00A7E1;
    line-height: 1.7; /* Økt fra 1.6 for bedre lesbarhet */
    font-size: 1.125rem; /* 18px base størrelse */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* GLOBALE TYPOGRAFI-REGLER (unngår hero-konflikter) */
h2:not(.hero h2) {
    font-size: 2.5rem;
    color: #00A7E1;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

h3 {
    font-size: 2rem;
    color: #00A7E1;
    margin-bottom: 1rem;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    color: #00A7E1;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

p:not(.hero p) {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Header - Forbedret navigasjon med sentrert meny */
header {
    background-color: #041C2C;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0, 167, 225, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: flex-end;
    gap: 2rem;
}

/* Logo til venstre */
.logo {
    display: flex;
    align-items: flex-end;
}

.logo h1 {
    color: #00A7E1;
    font-size: 1.8rem;
}

/* Logo størrelse */
.header-logo {
    height: 80px;
    width: auto;
    display: block;
}

/* Navigasjon sentrert */
nav {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: flex-end;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0 0.6rem; /* Mindre margin for bedre sentrering */
}

nav ul li a {
    color: #00A7E1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
}

nav ul li a:hover, nav ul li a.active {
    color: #00A7E1;
    border-bottom: 2px solid #00A7E1;
}

/* Login button til høyre */
.login-btn {
    color: #00A7E1;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: normal;
    transition: color 0.3s;
    line-height: 1;
    justify-self: end;
}

.login-btn:hover {
    color: #ffffff;
}

#loggut-knapp {
    color: #00A7E1;
    cursor: pointer;
    transition: color 0.3s;
}

#loggut-knapp:hover {
    color: #ffffff;
}

/* Hero section - BEVAR NØYAKTIG SOM DEN ER */
.hero {
    padding: 2rem 0;
    text-align: center;
    background-color: rgba(4, 28, 44, 0.6);
    margin-bottom: 0.5rem;
    animation: fadeIn 0.8s ease-in-out;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #00A7E1;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: #00A7E1;
}

/* Form styles */
.form-container {
    background-color: #041C2C;
    border-radius: 8px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(0, 167, 225, 0.3);
    border-radius: 4px;
    background-color: rgba(2, 17, 27, 0.5);
    color: #ffffff;
    font-size: 1rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: #00A7E1;
    box-shadow: 0 0 0 2px rgba(0, 167, 225, 0.2);
}

small {
    display: block;
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.checkbox {
    display: flex;
    align-items: center;
}

.checkbox input {
    margin-right: 0.5rem;
    width: auto;
}

.checkbox label {
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem; /* Økt padding for bedre touch targets */
    border: none;
    border-radius: 8px; /* Økt border-radius */
    font-size: 1.125rem; /* Økt font-størrelse */
    font-weight: 600; /* Økt font-weight */
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #00A7E1;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0086b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 167, 225, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #00A7E1; /* Økt border-width */
    color: #00A7E1;
}

.btn-secondary:hover {
    background-color: rgba(0, 167, 225, 0.1);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #e74c3c;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.alt-action {
    margin-top: 1.5rem;
    text-align: center;
}

.alt-action a {
    color: #00A7E1;
    text-decoration: none;
}

.alt-action a:hover {
    text-decoration: underline;
}

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.success-message {
    color: #2ecc71;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.message {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Profile styles */
.profil-seksjon {
    padding: 2rem 0 4rem;
}

.profil-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.profil-kort {
    background-color: #041C2C;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profil-kort h3 {
    margin-bottom: 1.5rem;
    color: #00A7E1;
    font-size: 1.2rem;
}

.abonnement-info {
    margin-bottom: 1.5rem;
}

.abonnement-info p {
    margin-bottom: 0.5rem;
}

.abonnement-info span {
    font-weight: 500;
}

.fare-sone {
    border-left: 4px solid #e74c3c;
}

/* Registration and login section */
.registrering, .logg-inn {
    padding: 2rem 0 4rem;
}

/* Footer */
footer {
    background-color: #041C2C;
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(0, 167, 225, 0.3);
}

.footer-innhold {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-kolonne {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.footer-kolonne h4 {
    color: #00A7E1;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-kolonne ul {
    list-style: none;
}

.footer-kolonne ul li {
    margin-bottom: 0.5rem;
}

.footer-kolonne a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-kolonne a:hover {
    color: #00A7E1;
}

.footer-kolonne p {
    color: rgba(255, 255, 255, 0.7);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN FIXES - PRESERVES 3440x1440 EXPERIENCE
   ============================================================================ */

/* SPESIFIKK FIX FOR 1920x1200 - AGGRESSIV OPTIMALISERING */
@media (width: 1920px) and (height: 1200px) {
    /* MINIMAL HERO PADDING */
    .hero {
        padding: 0.6rem 0 !important;
    }
    
    /* MINIMAL HERO CONTENT */
    .hero h2 {
        font-size: 1.8rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .hero p {
        font-size: 0.9rem !important;
        margin-bottom: 0.6rem !important;
        line-height: 1.4 !important;
    }
    
    /* MINIMAL RESULTATER SECTION SPACING */
    .resultater {
        padding: 0.3rem 0 !important;
        margin-bottom: 0.2rem !important;
    }
    
    .resultater h2 {
        font-size: 1.8rem !important;
        margin-bottom: 0.6rem !important;
    }
    
    .result-intro {
        font-size: 0.9rem !important;
        margin-bottom: 0.6rem !important;
        line-height: 1.4 !important;
    }
    
    /* KOMPAKT GRAF CONTAINER */
    .graf-container {
        margin: 0.4rem 0 !important;
        padding: 0.4rem !important;
    }
    
    /* KOMPAKTE STATS BOKSER */
    .stats-grid {
        gap: 0.6rem !important;
        margin: 0.6rem 0 !important;
    }
    
    .stat-box {
        padding: 1rem !important;
        min-height: 100px !important;
    }
    
    .stat-box h3 {
        font-size: 0.8rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .big-number {
        font-size: 1.6rem !important;
        margin-bottom: 0.2rem !important;
    }
    
    .comparison, .date {
        font-size: 0.75rem !important;
    }
    
    /* KOMPAKT CTA SECTION */
    .cta-center {
        margin: 0.4rem 0 !important;
    }
    
    .btn {
        padding: 0.5rem 1.2rem !important;
        font-size: 0.85rem !important;
    }
    
    /* MINIMAL DISCLAIMER */
    .disclaimer {
        font-size: 0.7rem !important;
        margin-top: 0.3rem !important;
        line-height: 1.3 !important;
    }
    
    /* GLOBAL LINE-HEIGHT REDUCTION */
    body {
        line-height: 1.4 !important;
    }
    
    /* KOMPAKTE CONTAINER */
    .container {
        padding: 0 1rem !important;
    }
}

/* Desktop intermediate - 1920px to 3440px (HIGHEST PRIORITY)
   Fixes for standard desktop screens while preserving ultrawide */
@media (max-width: 3440px) and (min-width: 1920px) {
    /* CRITICAL: Reduce hero section padding even more for complete resultater visibility */
    .hero {
        padding: 1rem 0; /* down from 1.2rem - extra space for complete resultater section */
    }
    
    /* Scale down typography slightly for standard desktop */
    h2:not(.hero h2) {
        font-size: 2rem; /* down from 2.1rem */
        margin-bottom: 1rem; /* down from 1.2rem */
    }
    
    h3 {
        font-size: 1.6rem; /* down from 1.7rem */
        margin-bottom: 0.7rem; /* down from 0.8rem */
    }
    
    h4 {
        font-size: 1.1rem; /* down from 1.2rem */
        margin-bottom: 0.5rem; /* down from 0.6rem */
    }
    
    /* Container adjustments */
    .container {
        max-width: 1200px; /* down from 1400px */
        padding: 0 1.3rem; /* down from 1.5rem - save horizontal space too */
    }
    
    /* Header typography */
    .logo h1 {
        font-size: 1.5rem; /* down from 1.6rem */
    }
    
    nav ul li a {
        font-size: 1rem; /* down from 1.1rem */
    }
    
    /* Hero section adjustments */
    .hero h2 {
        font-size: 2rem; /* down from 2.1rem */
        margin-bottom: 0.7rem; /* down from 0.8rem */
    }
    
    .hero p {
        font-size: 0.95rem; /* down from 1rem */
        margin-bottom: 1rem; /* explicit margin control */
    }
    
    /* Form and button sizing */
    .btn {
        padding: 0.7rem 1.4rem; /* down from 0.8rem 1.6rem */
        font-size: 0.9rem; /* down from 0.95rem */
    }
    
    /* Footer adjustments */
    .footer-kolonne h4 {
        font-size: 0.95rem; /* down from 1rem */
    }
    
    /* Base body line-height optimization */
    body {
        line-height: 1.6; /* down from 1.7 */
    }
    
    /* Paragraph spacing optimization */
    p:not(.hero p) {
        font-size: 1rem; /* down from 1.125rem */
        line-height: 1.6; /* down from 1.7 */
        margin-bottom: 1.2rem; /* down from 1.5rem */
    }
}

/* Large desktop - 1200px to 1920px (MEDIUM PRIORITY)
   More significant layout changes for smaller desktops */
@media (max-width: 1920px) and (min-width: 1200px) {
    /* Container should be wider on 1920px screens to prevent height issues */
    .container {
        max-width: 1300px; /* increased from 1000px */
        padding: 0 1.5rem; /* increased from 1.25rem */
    }
    
    /* Typography scaled more conservatively */
    h2:not(.hero h2) {
        font-size: 2.1rem; /* less aggressive reduction */
    }
    
    h3 {
        font-size: 1.7rem; /* less aggressive reduction */
    }
    
    .hero h2 {
        font-size: 1.5rem; /* less aggressive reduction */
    }
    
    /* Header layout optimization */
    header .container {
        gap: 1.5rem; /* down from 2rem */
        max-width: 1400px; /* wider for header */
    }
    
    nav ul li {
        margin: 0 0.5rem; /* down from 0.6rem */
    }
    
    /* Footer optimization */
    .footer-kolonne {
        padding-right: 1.5rem; /* down from 2rem */
    }
}

/* Tablet landscape - 968px to 1200px */
@media (max-width: 1200px) and (min-width: 968px) {
    /* Container mobile-friendly */
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    /* Header becomes more compact */
    header .container {
        gap: 1rem;
    }
    
    .header-logo {
        height: 70px; /* down from 80px */
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    /* Typography for tablets */
    h2:not(.hero h2) {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.4rem;
    }
    
    /* Hero responsive */
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Profile grid single column for tablets */
    .profil-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Ultra-wide screen optimization (for screens larger than 3440px) */
@media (min-width: 3441px) {
    /* Prevent over-stretching on very large displays */
    .container {
        max-width: 1600px;
    }
    
    header .container {
        max-width: 1600px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 1rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    header .container {
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-items: center;
    }

    header .logo {
        justify-content: center;
        text-align: center;
    }

    .header-logo {
        height: 64px;
    }

    nav {
        width: 100%;
        justify-content: center;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        font-size: 1.05rem;
        padding: 0.25rem 0;
    }

    .login-btn {
        justify-self: center;
        align-self: center;
        padding: 0.6rem 1.4rem;
        border: 1px solid rgba(0, 167, 225, 0.4);
        border-radius: 999px;
    }

    .hero {
        padding: 1.5rem 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .footer-innhold {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .footer-kolonne {
        padding-right: 0;
    }
}

@media (max-width: 600px) {
    h2:not(.hero h2) {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .hero p {
        font-size: 0.95rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1rem;
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content-1 {
    background-color: #041C2C;
    border: 1px solid #00A7E1;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: #00A7E1;
    cursor: pointer;
    transition: color 0.3s ease;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #ffffff;
    background-color: rgba(0, 167, 225, 0.2);
}

.modal-content-1 h2 {
    color: #00A7E1;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.modal-content-1 p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-align: center;
}

.highlight {
    color: #00E676;
    font-weight: 700;
}

.requirements-section {
    margin-bottom: 1.5rem;
}

.requirements-section h3 {
    color: #00A7E1;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.requirements-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.requirements-section ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #d1d9e0;
}

.requirements-section ul li:before {
    content: '✓';
    color: #00E676;
    position: absolute;
    left: 0;
}

.reward {
    background-color: #00A7E1;
    color: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.important-notice {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 193, 7, 0.15));
    border: 2px solid #ff9800;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 152, 0, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 152, 0, 0.5); }
}

.important-notice .highlight {
    color: #ff9800;
}

#joinBetaBtn {
    background: linear-gradient(135deg, #00A7E1, #0086b3);
    color: #ffffff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 167, 225, 0.3);
}

#joinBetaBtn:hover {
    background: linear-gradient(135deg, #00c4ff, #006d94);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 167, 225, 0.4);
}

#joinBetaBtn:active {
    transform: translateY(0);
}

.small-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.small-text a {
    color: #00A7E1;
    text-decoration: none;
}

.small-text a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .modal-content-1 {
        padding: 20px;
        max-width: 90%;
    }
    .modal-content-1 h2 {
        font-size: 1.5rem;
    }
    #joinBetaBtn {
        padding: 0.8rem 1.5rem;
    }
}