/* CSS Reset & Variables */
:root {
    --primary-color: #0f4c81; /* Deep sea blue */
    --primary-light: #2b6cb0;
    --secondary-color: #f7fafc;
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --bg-main: #ffffff;
    --bg-alt: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center { text-align: center; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.mt-2 { margin-top: 1rem; }
.rounded-image { border-radius: 1rem; }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Typography */
.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    height: 4px;
    width: 60px;
    background-color: var(--primary-light);
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(15, 76, 129, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 76, 129, 0.23);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.navbar.scrolled .logo {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.navbar.scrolled .nav-links li a {
    color: var(--text-main);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-light);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.navbar.scrolled .nav-links li a:hover {
    color: var(--primary-color);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: var(--transition);
}

.navbar.scrolled .mobile-toggle span {
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.4)), url('../assets/holmesund.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    transform: scale(1.05); /* for subtle scale animation maybe */
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: -1px;
}

.hero p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 2.5rem;
    font-weight: 300;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #fff;
    border-right: 3px solid #fff;
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(-20px) rotate(45deg); }
    60% { transform: translateY(-10px) rotate(45deg); }
}

/* Common Section Styles */
.section {
    padding: 6rem 0;
}

.section-alt {
    background-color: var(--bg-alt);
}

/* Cards Grid (Aktuelt) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-light);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card .date {
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more::after {
    content: '→';
    transition: transform 0.2s ease;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* Split Layout (Om Oss) */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.glass-box {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.glass-box h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Archive List */
.archive-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.document-item {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.document-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.doc-icon {
    font-size: 2rem;
    margin-right: 1.25rem;
    background: var(--bg-alt);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.doc-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-main);
    font-size: 1.1rem;
}

.doc-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Contact */
.contact-card {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-block {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: 1rem;
    transition: var(--transition);
}

.info-block:hover {
    background: var(--primary-color);
    color: #fff;
}

.info-block:hover h3, .info-block:hover p, .info-block:hover a {
    color: #fff;
}

.info-block h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-block a {
    color: var(--text-main);
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: var(--text-main);
    color: #fff;
    padding: 2rem 0;
}

/* --- Animations & Utilities --- */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.slide-up {
    transform: translateY(40px);
}

.slide-right {
    transform: translateX(40px);
}

/* --- Responsive Design --- */
@media screen and (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(26, 32, 44, 0.98);
        width: 70%;
        height: 100vh;
        padding-top: 5rem;
        align-items: center;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li a {
        color: #fff !important;
        font-size: 1.2rem;
    }
    
    .navbar.scrolled .mobile-toggle.active span {
        background-color: #fff;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .contact-card {
        padding: 2rem;
    }
}
