/* Natural, Calm, Warm Aesthetic - Digital Storybook */
:root {
    --bg-color: #f8f6f0;
    /* Soft ivory / Alabaster - warm but very light */
    --text-color: #2c2a29;
    /* Deep, soft charcoal */
    --text-light: #5d5a56;
    /* Lighter text for descriptions */
    --accent-color: #787364;
    /* Natural stone/earth tone */
    --accent-blue: #466b8c;
    /* Nordic Blue - Warm and natural */
    --accent-hover: #355370;
    /* Darker blue for hover */
    --warm-brown: #c8b7a6;
    /* Muted wood tone */
    --header-font: 'Georgia', 'Times New Roman', serif;
    /* Classic storytelling font */
    --body-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --spacing-unit: 2rem;
    --max-width: 1400px;
    --transition-speed: 0.4s;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--body-font);
    line-height: 1.8;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--header-font);
    font-weight: normal;
    color: var(--text-color);
    line-height: 1.3;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 1rem;
    color: var(--accent-blue);
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 2px;
}

.object-pos-top {
    object-position: top;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

/* Accessibility: Focus visible for keyboard users */
:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(248, 246, 240, 0.95);
    backdrop-filter: blur(5px);
    z-index: 1000;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

nav {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    min-height: 45px;
}

.nav-logo {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-logo:hover img {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 2.5rem;
    width: 100%;
}

nav a {
    font-family: var(--body-font);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    color: var(--text-light);
}

nav a:hover {
    color: var(--accent-blue);
}

/* Active state for navigation links */
nav a.active {
    font-weight: bold;
    color: var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
    background-color: transparent !important;
    /* Force remove any background */
    /* Thicker distinct underline */
    padding-bottom: 2px;
    /* Adjust spacing */
}

nav a:focus {
    outline: none;
    /* Remove default yellow highlight */
    color: var(--accent-blue);
}

/* Main Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    /* Above the menu */
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Hamburger open state */
.menu-toggle.active .hamburger {
    background-color: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

@media (max-width: 800px) {
    .menu-toggle {
        display: block;
    }

    header {
        padding: 1.5rem 0;
        /* Keep same padding as desktop so it covers the menu toggle */
        background-color: var(--bg-color) !important;
        /* Force solid background */
    }

    /* Class controlled by main.js to hide header on scroll down */
    .header-hidden {
        transform: translateY(-100%);
        box-shadow: none;
        /* remove shadow while hiding */
    }

    /* Mobile full-screen menu overlay */
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        /* Start from top */
        width: 100%;
        height: 100vh;
        /* Full viewport height */
        position: fixed;
        /* Stick it to the viewport */
        top: 0;
        left: 0;
        background-color: rgba(248, 246, 240, 0.98);
        padding: 5rem 1rem 3.5rem 1rem;
        /* Push down past the fixed header */
        gap: 1.5rem;
        z-index: 1000;
        /* Sit just below the header (which is 1001 or 2000 usually) */

        /* Smooth transform instead of clip-path */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }

    nav ul.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    nav a {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
        display: block;
        width: 100%;
        text-align: center;
    }
}

/* Hero Section */
/* Hero Section */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    /* Center vertical */
    justify-content: center;
    /* Center horizontal */
    position: relative;
    overflow: hidden;
    color: white;
    padding: 0;
    /* Remove padding */
}

.hero-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #8c887d;
    /* Placeholder muted earth tone */
    z-index: 1;
}

.hero-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    /* Center text */
    max-width: 900px;
    /* Standard width */
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    /* Stronger shadow for legibility */
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    color: #fff;
    line-height: 1.1;
    white-space: nowrap;
    /* Single line */
}

.hero-content p {
    font-size: 1.5rem;
    font-family: var(--header-font);
    /* Match title font */
    font-weight: normal;
    /* Normal weight */
    text-transform: none;
    /* Normal case */
    letter-spacing: normal;
    /* Normal spacing */
    opacity: 1;
    /* Full opacity */
    margin-bottom: 3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 0.5rem;
    /* Move further down */
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.7;
    z-index: 2;
    font-size: 1.5rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Intro Section */
.intro {
    padding: 8rem 0;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.intro p {
    font-size: 2rem;
    font-family: var(--header-font);
    color: var(--text-light);
    line-height: 1.5;
}

/* Navigation Grid Section */
.nav-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 4rem 2rem;
}

.nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center content */
    text-decoration: none;
    text-align: center;
    /* Center text */
    width: 100%;
    /* Safari fix */
}

.nav-image {
    width: 100%;
    aspect-ratio: 4/3;
    /* Classic photo ratio */
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 2px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transform: translateZ(0);
    /* Safari border-radius fix */
}

.nav-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.nav-card:hover .nav-image img {
    transform: scale(1.05);
}

.nav-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-family: var(--header-font);
    font-weight: normal;
    text-transform: none;
    /* Ensure not uppercase */
    transition: color 0.3s ease;
}

.nav-card:hover h3 {
    color: var(--accent-blue);
}

.nav-card p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    font-family: var(--body-font);
    max-width: 90%;
    margin: 0 auto 1.5rem auto;
}

.nav-link-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-color);
    border-bottom: 1px solid #d1d1c6;
    padding-bottom: 4px;
    transition: all 0.3s ease;
}

.nav-card:hover .nav-link-text {
    border-bottom-color: var(--text-color);
    color: var(--accent-blue);
}

/* Narrative / Story Layouts */
.story-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: start;
    /* Changed from center to start for long text */
    margin-bottom: 8rem;
}

@media (min-width: 800px) {
    .story-block {
        grid-template-columns: 1fr 1fr;
    }

    .story-block.reversed {
        direction: rtl;
        /* Simple way to swap, ensure text direction is reset */
    }

    .story-block.reversed>* {
        direction: ltr;
    }
}

.story-text {
    padding: 2rem;
    min-height: 80vh;
    /* Minimum height to ensure sticky effect with short text */
}

.story-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.story-image {
    width: 100%;
    /* aspect-ratio removed to allow natural shape or full fill */
    background-color: transparent;
    display: block;
    position: sticky;
    top: 150px;
}

.story-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    /* Add soft shadow instead of background */
}

/* Page Headers */
.page-header {
    padding: 12rem 0 6rem;
    text-align: center;
    background-color: var(--bg-color);
    /* Flat warm background */
}

.page-title {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.5rem;
    font-family: var(--header-font);
    font-style: italic;
    color: var(--accent-color);
}

.page-intro {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
    padding: 0 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* Footer */
footer {
    background-color: #262423;
    color: #9d9a96;
    text-align: center;
    padding: 4rem 0;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}



/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    /* Increased from 350px */
    gap: 2rem;
    margin-bottom: 4rem;
}

.gallery-item {
    aspect-ratio: 1;
    background-color: transparent;
    /* Removed #eee */
    break-inside: avoid;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    object-fit: cover;
    object-position: center 25%;
    /* Focus mainly on top-third (faces, horizons) */
    width: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

/* Object Position Utilities */
.pos-top {
    object-position: top center;
}

.pos-bottom {
    object-position: bottom center;
}

.pos-center {
    object-position: center center;
}

.pos-top-left {
    object-position: top left;
}

.pos-top-right {
    object-position: top right;
}

.pos-utmerkelser {
    object-position: center 85% !important;
    /* Focus on the lower blue part of the award */
}

.pos-overbekken {
    object-position: top center !important;
    /* Focus slightly below the very top for better face framing */
}

/* Contact Form Clean */
input,
textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    background: transparent;
    font-family: var(--body-font);
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

button {
    background-color: var(--text-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--accent-hover);
}

/* Contact Page Styles */
.centered-text {
    text-align: center;
}

.contact-info {
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.contact-email {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.contact-form-container {
    background: rgba(255, 255, 255, 0.6);
    padding: 3rem;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* Contact Grid Redesign */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-card {
    background: rgba(255, 255, 255, 0.6);
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-phone {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.contact-link {
    font-size: 1.1rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-blue);
    padding-bottom: 2px;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--accent-blue);
}

.contact-address {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Timeline Components - Restyle */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 0;
}

/* Central Line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background-color: #d1d1c6;
    /* Subtle warm grey line */
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8rem;
    position: relative;
    cursor: pointer;
    width: 100%;
    /* Explicit width for Safari */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Alternating Layout */
.timeline-item {
    flex-direction: row-reverse;
    /* Default: Text Left, Image Right */
}

.timeline-item:nth-child(even) {
    flex-direction: row;
    /* Even: Image Left, Text Right */
}

/* Image Side */
.timeline-image {
    width: 44%;
    flex: 0 0 44%;
    /* Prevent shrinking/growing */
    max-width: 44%;
    /* Safari safeguard */
    position: relative;
}

.timeline-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.timeline-item:hover .timeline-image img {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* Text Side */
.timeline-text {
    width: 44%;
    flex: 0 0 44%;
    /* Prevent shrinking/growing */
    max-width: 44%;
    /* Safari safeguard */
    padding-top: 1rem;
    /* Visual alignment with image top */
    text-align: left;
}

/* Typography & Content */
.timeline-text .chapter-meta {
    display: block;
    font-family: var(--body-font);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #8c887d;
    /* Muted earth tone */
    margin-bottom: 1.5rem;
}

.timeline-text h2 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: normal;
    color: var(--text-color);
}

.timeline-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 95%;
}

.read-more-btn {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid #d1d1c6;
    padding-bottom: 4px;
    color: var(--text-color);
    transition: all 0.3s ease;
    background: none;
    border-radius: 0;
    padding: 0 0 4px 0;
    display: inline-block;
    margin: 0;
}

.read-more-btn:hover {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
    background: none;
}

.read-more-btn::after {
    content: ' →';
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
    transform: translateX(-5px);
}

.read-more-btn:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Marker (Dot) */
.timeline-marker {
    position: absolute;
    left: 50%;
    top: 5.2rem;
    /* Aligns with the h2 title text */
    width: 10px;
    height: 10px;
    background-color: #d1d1c6;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 0 0 10px var(--bg-color);
    /* Creates "gap" in line */
}

.timeline-item:hover .timeline-marker,
.timeline-item.visible .timeline-marker {
    background-color: var(--accent-blue);
    transform: translateX(-50%) scale(1.3);
}

/* Mobile Responsiveness */
@media screen and (max-width: 800px) {
    .timeline::before {
        left: 20px;
        transform: none;
    }

    .timeline-item {
        flex-direction: column !important;
        /* Force column on mobile */
        padding-left: 50px;
        margin-bottom: 5rem;
        align-items: flex-start;
    }

    .timeline-image,
    .timeline-text {
        width: 100%;
        max-width: none;
        padding-top: 0;
    }

    .timeline-image {
        margin-bottom: 2rem;
        order: -1;
        /* Image first always on mobile? Or text? Image looks nice first */
    }

    .timeline-marker {
        left: 20px;
        top: 0;
        /* Align to top of item */
        transform: translateX(-50%);
    }

}

/* Scroll Fade-In Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Diary / Blog Styles */
.diary-header-section {
    background-color: var(--warm-brown);
    padding: 6rem 0;
    text-align: center;
    margin-bottom: 4rem;
    color: white;
}

.diary-header-section .page-title {
    color: #2e2c2b;
}

.diary-header-section .page-subtitle {
    color: #5d5956;
}

.diary-header-bg {
    background-color: #e3dec9;
    /* Match reference beige */
    padding: 8rem 0 6rem;
    text-align: center;
    margin-bottom: 4rem;
}

.diary-feed {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 6rem;
}

.diary-post {
    margin-bottom: 4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 4rem;
}

.diary-post:last-child {
    border-bottom: none;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--body-font);
}

.post-title {
    font-size: 2.2rem;
    font-family: var(--header-font);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a4846;
    margin-bottom: 1.5rem;
}

.read-more-btn {
    font-size: 0.9rem;
    color: var(--text-color);
    background-color: transparent;
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
}

.read-more-btn:hover {
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
}


/* Media Page Styles */
.media-section {
    margin-bottom: 8rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.media-section:last-child {
    border-bottom: none;
}

.media-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-color);
}

/* Radio / Audio Block */
.audio-block {
    background-color: rgba(255, 255, 255, 0.6);
    padding: 2rem;
    border-radius: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    gap: 2rem;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 2rem;
    flex-direction: column;
}

@media (min-width: 700px) {
    .audio-block {
        flex-direction: row;
        text-align: left;
    }
}

.audio-icon {
    font-size: 3rem;
    color: var(--accent-color);
    background: var(--bg-color);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.audio-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.audio-player-placeholder {
    background: #f0f0f0;
    height: 40px;
    width: 100%;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    margin-top: 1rem;
    color: #999;
    font-size: 0.8rem;
}

/* Awards Section */
.awards-grid {
    display: grid;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .awards-grid {
        grid-template-columns: 1.5fr 1fr;
        /* Larger space for the image-heavy award */
        align-items: start;
    }
}

.award-card {
    background: rgba(255, 255, 255, 0.6);
    padding: 2.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.award-card.featured {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: none;
}

.award-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Newspaper / Article List */
.article-list {
    max-width: 900px;
    margin: 0 auto;
}

.media-article {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    align-items: center;
}

@media (min-width: 700px) {
    .media-article {
        grid-template-columns: 300px 1fr;
    }
}

.article-image {
    width: 100%;
    height: 250px;
    background-color: #ddd;
    object-fit: cover;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.article-meta {
    font-family: var(--header-font);
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: block;
}

/* Book Section */
.book-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 800px) {
    .book-showcase {
        flex-direction: row;
        text-align: left;
    }
}

.book-cover {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: auto;
    background-color: transparent;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    display: block;
    border-radius: 4px;
}


/* Sub-navigation Page (Seter & Gård) */
.sub-hero {
    height: 60vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center 35%;
    /* Adjusted to show some grass */
    color: white;
    margin-bottom: 0;
    /* Nav sits directly below */
}

.sub-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.0);
    /* Removed overlay as requested */
}

.sub-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding-top: 5rem;
    /* Move text slightly down */
}

.sub-hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sub-hero-content p {
    font-size: 1.5rem;
    font-family: var(--header-font);
    font-style: italic;
    opacity: 0.9;
}

/* Tab Navigation Bar */
.sub-nav-bar {
    background-color: rgba(248, 246, 240, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    /* Adjust based on main header height */
    z-index: 90;
}

.sub-nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 3rem;
    padding: 0;
    margin: 0;
}

.sub-nav-item {
    padding: 1.5rem 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.sub-nav-item:hover {
    color: var(--accent-color);
}

.sub-nav-item.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Tab Content Areas */
.tab-content {
    display: none;
    /* Hidden by default */
    padding-top: 5rem;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-section-header {
    margin-bottom: 3rem;
}

.tab-section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Ysting Page Styles */
.ysting-step {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 4rem;
}

@media (min-width: 800px) {
    .ysting-step {
        grid-template-columns: 1fr 1fr;
    }

    .ysting-step.reversed {
        direction: rtl;
    }

    .ysting-step.reversed>* {
        direction: ltr;
    }

    .ysting-image-container {
        flex-direction: row;
        gap: 1.5rem;
    }
}

.ysting-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
}

.ysting-image-container img {
    max-width: 100%;
    max-height: 400px;
    /* Begrenser høyden for å holde det "litt mindre" */
    width: auto;
    border-radius: 12px;
    /* Softened to 12px */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Slightly softer shadow */
}

.ysting-image-container.double {
    flex-direction: row;
    align-items: stretch;
}

.ysting-image-container.double img {
    flex: 1;
    width: 0;
    height: 100%;
    object-fit: cover;
}

.ysting-text {
    padding: 1rem;
}

.ysting-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-family: var(--header-font);
}

.ysting-text p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-color);
    padding: 3rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: var(--accent-color);
    background: none;
    /* Override button generic hover */
}

.modal-body img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.modal-body h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    animation-name: zoom;
    animation-duration: 0.3s;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@keyframes zoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: 100;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -25px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    background: transparent;
    border: none;
    z-index: 2001;
    opacity: 0.7;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
    border-radius: 4px;
}

@media only screen and (max-width: 700px) {
    .lightbox-content {
        max-width: 100%;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }
}

.modal-body p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #4a4846;
    line-height: 1.8;
}

/* Contact Page Layout - Unified Card */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    background-color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6rem;
    max-width: 1000px;
    /* Reduced max-width slightly for compactness */
    margin-left: auto;
    margin-right: auto;
}

.contact-image-wrapper {
    min-height: 300px;
    position: relative;
    top: auto;
}

.contact-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Focus on faces */
    border-radius: 0;
    box-shadow: none;
    display: block;
}

.contact-content {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem 0;
    /* Reduced padding */
    margin-bottom: 1rem;
    /* Reduced margin */
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    font-family: var(--body-font);
    font-size: 1rem;
    background: transparent;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-blue);
}

.form-button {
    background-color: var(--accent-blue);
    color: white;
    padding: 0.8rem 2rem;
    /* Slightly smaller button */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 0.5rem;
    align-self: flex-start;
}

.form-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}


@media (min-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr 1fr;
        /* Balanced 50/50 split */
        align-items: stretch;
    }

    .contact-image-wrapper {
        min-height: auto;
        height: 100%;
    }

    .contact-content {
        padding: 3rem;
        /* Reduced from 5rem to avoid stretching */
    }
}

/* Animal Page Styles */
.animal-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.animal-card:hover {
    transform: translateY(-5px);
}

.animal-card img {
    width: 100%;
    aspect-ratio: 4/3;
    /* Slightly rectangular for portraits */
    object-fit: cover;
    display: block;
}

.animal-info {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.animal-name {
    font-family: var(--header-font);
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.animal-desc {
    font-size: 0.9rem;
    color: #666;
    color: #666;
    font-style: italic;
}

/* Visitor Counter Styles */
.visitor-counter-section {
    padding: 4rem 0 6rem;
    text-align: center;
    background-color: var(--bg-color);
}

.counter-box {
    display: inline-block;
    padding: 2rem 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.counter-label {
    font-family: var(--header-font);
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.counter-number {
    font-family: var(--header-font);
    font-size: 3rem;
    color: var(--text-color);
    font-weight: bold;
    letter-spacing: 0.1em;
}

/* Audio Playlist Styles */
.audio-playlist {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
    border: 1px solid #eee;
    padding: 1rem;
    border-radius: 8px;
    background-color: #fcfcfc;
}

.audio-track {
    background-color: #fff;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.track-title {
    display: block;
    font-family: var(--header-font);
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.audio-track audio {
    width: 100%;
    height: 36px;
}

/* =========================================
   Mobile Optimizations (Smartphones & Tablets)
   ========================================= */
@media (max-width: 768px) {

    /* Make hero shorter and place text at the bottom */
    .hero {
        height: 75vh;
        min-height: 500px;
        align-items: flex-end;
        padding-bottom: 2rem;
        /* Reduced to push text lower */
    }

    /* Hero Image focus on mobile */
    .hero-placeholder img {
        object-position: right 15% !important;
        /* Focuses on the cows and Christian near the top right */
    }

    /* Hero Typography - scale down and allow wrapping */
    .hero-content h1 {
        font-size: 3.5rem;
        white-space: normal;
        padding: 0 1rem;
        line-height: 1.1;
    }

    .hero-content p {
        font-size: 1.3rem;
        padding: 0 1rem;
    }

    /* Intro Typography */
    .intro p {
        font-size: 1.5rem;
        padding: 0 1rem;
    }

    .intro {
        padding: 5rem 0;
    }

    /* Grid adjustments - stack elements to avoid horizontal scroll */
    .nav-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    /* Force landscape images inside timeline modals on mobile */
    .modal-body img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    /* Timeline adjustments for mobile readability */
    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: column;
        align-items: center;
        margin-bottom: 5rem;
    }

    .timeline-image,
    .timeline-text {
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
    }

    .timeline-image {
        margin-bottom: 1.5rem;
    }

    .timeline-text h2 {
        font-size: 2.2rem;
        position: relative;
    }

    /* Aligned marker on mobile next to title */
    .timeline-text h2::before {
        content: '';
        position: absolute;
        left: -30px;
        top: 50%;
        transform: translateY(-50%) translateX(-50%);
        width: 12px;
        height: 12px;
        background-color: var(--accent-blue);
        /* Always blue on mobile */
        border-radius: 50%;
        z-index: 2;
        box-shadow: 0 0 0 8px var(--bg-color);
    }

    /* Restoring timeline line on mobile */
    .timeline::before {
        display: block;
        left: 20px;
        transform: none;
    }

    .timeline-marker {
        display: none !important;
        /* Hide original top-aligned marker */
    }

    /* Global Adjustments */
    .page-title {
        font-size: 2.8rem;
    }

    .page-header {
        padding: 6rem 0 2rem;
        /* Reduced top and bottom padding for mobile */
    }

    .timeline {
        padding-top: 2rem;
        /* Reduced spacing before first timeline item */
    }

    /* Seter & Gårdsliv specific mobile fixes */
    .sub-hero {
        min-height: 350px;
        /* Slightly taller to give picture space */
        height: auto;
        padding: 6rem 0 2rem;
        /* Reduced bottom padding */
        align-items: flex-end;
        /* Push text to the bottom */
    }

    .sub-hero-content {
        padding-top: 0;
        /* Remove top padding forcing it down */
        width: 100%;
        /* Ensure text centers correctly */
    }

    .sub-hero-content h1 {
        font-size: 2.5rem;
        padding: 0 1rem;
        white-space: normal;
    }

    .sub-hero-content p {
        font-size: 1.2rem;
        padding: 0 1rem;
    }

    .sub-nav-bar {
        position: relative;
        /* Un-sticky on mobile since it takes up too much screen space vertically */
        top: 0;
        padding: 0.5rem 0;
        /* Add subtle padding for the scrollable container */
    }

    .sub-nav-list {
        flex-direction: column;
        gap: 0;
        /* Remove gap, use borders */
        padding: 0 1rem;
        overflow-x: hidden;
    }

    .sub-nav-item {
        width: 100%;
        padding: 1.2rem 0;
        /* Horizontal padding 0, generous vertical */
        background-color: transparent;
        /* Remove stark white background */
        border: none;
        border-bottom: 1px solid rgba(120, 115, 100, 0.2);
        /* Soft earthy divider */
        border-radius: 0;
        /* Remove rounded corners */
        text-align: left;
        font-size: 1rem;
        box-shadow: none;
        /* Remove app-like shadow */
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* Inherits uppercase and letter-spacing from base styles */
    }

    .sub-nav-list .sub-nav-item:last-child {
        border-bottom: none;
        /* Clean up last item */
    }

    /* Elegant rotating arrow */
    .sub-nav-item::after {
        content: '↓';
        color: var(--accent-blue);
        opacity: 0.6;
        font-size: 1.2rem;
        font-family: var(--body-font);
        transition: transform 0.3s ease, opacity 0.3s ease;
        transform: rotate(-90deg);
        /* Points right */
        text-transform: none;
    }

    .sub-nav-item.active {
        background-color: transparent;
        color: var(--accent-blue);
        border-bottom: 1px solid rgba(120, 115, 100, 0.2);
        /* Maintain border */
        font-weight: 600;
        /* Bolder than normal to stand out */
    }

    .sub-nav-item.active::after {
        opacity: 1;
        transform: rotate(0deg);
        /* Points down when active */
    }

    .tab-content {
        padding-top: 2.5rem;
    }

    .tab-section-header h2 {
        font-size: 2rem;
        text-align: center;
    }

    /* Fix image scaling if they overflow */
    .story-image img {
        width: 100%;
        height: auto;
        max-height: 400px;
        object-fit: cover;
    }
}

/* Ensure videos maintain native aspect ratio when opened in fullscreen */
video:-webkit-full-screen {
    object-fit: contain !important;
}

video:fullscreen {
    object-fit: contain !important;
}

/* Mobile Stacking for specific grids */
@media (max-width: 768px) {
    .mobile-stack {
        grid-template-columns: 1fr !important;
    }
}