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

body {
    background-color: #f0f0f0;
    font-family: 'Inter', system-ui, sans-serif;
}

/* ============== FONT DEFINITION ============== */
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Black.woff2') format('woff2'),
         url('fonts/Inter-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Medium.woff2') format('woff2'),
         url('fonts/Inter-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-ExtraLight.woff2') format('woff2'),
         url('fonts/Inter-ExtraLight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

/* ============== HEADER & MENU ============== */
header {
    position: sticky;
    top: 0;
    height: 0px;
    display: flex;
    align-items: flex-start;
    padding: 0px 0px;
    z-index: 3000;
    pointer-events: none;
}

.logo {
    height: 156px;
    margin-left: 14px;
    width: auto;
    pointer-events: none;
}

.menu-toggle {
    margin-left: auto;
    margin-top: 46px;
    margin-right: 40px;
    font-size: 26px;
    cursor: pointer;
    color: black;
    pointer-events: auto;
    z-index: 4000;
    background-color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Collapsible Menu */
.collapsible-menu {
    position: fixed;
    top: 0;
    right: -35%;
    width: 35%;
    height: 100vh;
    border-left: 10px solid black;
    background-color: white;
    box-shadow: -4px 0 12px rgba(0,0,0,0.15);
    transition: right 0.4s ease;
    padding: 120px 30px 30px;
    z-index: 2000;
}

.collapsible-menu.open { 
    right: 0; 
}

.menu-item {
    padding: 18px 0;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

/* ============== STORY GRID (index.php) ============== */
.story-block {
    display: flex;
    height: 100vh;
}

.big {
    flex: 2;
    height: 100%;
    position: relative;
    filter: grayscale(100%);
    transition: all 1s ease;
}

.big:hover {
    filter: grayscale(0%);
}

.small-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.small {
    flex: 1;
    position: relative;
    min-height: 0;
    filter: grayscale(100%);
    transition: all 1s ease;
}

.small:hover {
    filter: grayscale(0%);
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Yellow Highlight Box */
.image-overlay, .image-overlay-small {
    position: absolute;
    bottom: 40px;
    left: 30px;
    background: rgba(0, 0, 0, 0.9);
    color: rgba(255, 215, 0, 0.99);
    padding: 14px 18px;
    border-radius: 4px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.25);
    z-index: 10;
    max-width: 85%;
    width: fit-content;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.image-overlay { 
    font-size: 3em; 
}

.image-overlay-small { 
    font-size: 2.1em; 
}

.image-meta {
    margin-top: 8px;
    font-size: 0.5em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
    font-weight: 200;
    letter-spacing: -0.02em;
}

.image-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon, .icon-medium {
    filter: brightness(0) saturate(100%) invert(63%) sepia(0%) saturate(0%) hue-rotate(21deg) brightness(97%) contrast(91%);
}

.icon { width: 14px; height: 14px; margin-top: -1px; }
.icon-medium { width: 20px; height: 20px; margin-top: 0px; }

/* ============== SINGLE PAGE STYLES (flyttet hit) ============== */

/* Persistent Background */
.story-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 114%;
    height: 114%;
    background: url('uploads/seaside-ruins.jpg') center/cover no-repeat;
    z-index: -2;
    transition: transform 0.8s ease-out;
}

.single-container {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    height: 100vh;
    scroll-behavior: smooth;
}

.single-section {
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: top;
    justify-content: center;
}

/* ============== HERO TITLE - LAYERED MARKER EFFECT ============== */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.hero-title {
    position: absolute;
    top: 63%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-3.2deg);
    color: #111;
    font-size: 3.05rem;
    font-weight: 900;
    line-height: 1.15;
    font-family: 'Inter', sans-serif;
    text-align: center;
    max-width: 94%;
    z-index: 3;
    padding: 0 15px;
    pointer-events: none;
}

/* Bakre lag med filter + oransje-rød tekst */
.hero-title.duplicate {
    z-index: 1;
    color: #d35400;                    /* Oransje-rød */
    opacity: 0.99;
    filter: url(#marker-shape);
}

/* Markering på begge lag */
.hero-title mark,
.hero-title.duplicate mark {
    background-color: #ffd700;
	color: rgba(255, 244, 202, 0.9); 
    padding: 6px 14px;
    border-radius: 3px;
    margin-bottom: 0px;
    display: inline-block;
}

/* Kun bakre lag får filteret */
.hero-title.duplicate mark {
    filter: url(#marker-shape);
}

/* Original lag har ren, mørk tekst */
.hero-title mark {
    background: transparent;
    color: #111;
    padding: 6px 14px;
}

/* Responsiv */
@media (max-width: 768px) {
    .hero-title, .hero-title.duplicate {
        font-size: 2.1rem;
        transform: translate(-50%, -50%) rotate(-2deg);
        max-width: 92%;
    }
}

@media (max-width: 480px) {
    .hero-title, .hero-title.duplicate {
        font-size: 1.75rem;
    }
}



/* Other sections */
.ingress-section {
    background: rgba(0, 0, 0, 0.38);
	padding-top: 140px;
}

.ingress-content {
    max-width: 720px;
    color: white;
    font-size: 1.45rem;
    line-height: 1.7;
    text-align: center;	
    padding: 0 8%;
}

.story-overlay {
    max-width: 100%;
    background: rgba(255, 255, 255, 0.76);
    padding: 80px 75px;
    border-radius: 3px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

/* ============== STORY BODY (brødtekst) ============== */
.story-section {
    background: rgba(240, 240, 240, 0.55);
    backdrop-filter: blur(12px);
}

.story-body {
    max-width: 820px;
	height: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    padding: 120px 50px;
    border-radius: 3px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    text-align: left;
    line-height: 1.75;
    font-size: 1.18rem;
}

.story-body h2 {
    margin-bottom: 35px;
    font-size: 2.4rem;
}

/* SMOOTH SCROLLING */
html, .story-container, .single-container {
    scroll-behavior: smooth;
}

/* Scroll Navigation */
.scroll-nav {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 5000;
}

.scroll-nav button {
    width: 55px;
    height: 55px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.scroll-nav button:hover {
    transform: scale(1.1);
    background: #ffe066;
}


/* ============== KARUSELL - SENTERT + 5:4 ASPECT RATIO ============== */
.gallery-section {
    background: rgba(240, 240, 240, 0.55);
    backdrop-filter: blur(12px);
    padding: 0px 0;
    min-height: 100vh;
	width: 100%;
    display: flex;
    align-items: center;
}

.gallery-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.gallery-container h2 {
    font-size: 2.4rem;
    margin-bottom: 50px;
    color: #222;
}

/* Karusell wrapper */
.carousel-wrapper {
    position: absolute;
	margin-top: 120px;
	left: 50%;
    translate: -50% -50%; 
    width: 100%;  
    margin: 0 auto;
    height: 68vh;
    min-height: 540px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel {
    display: flex;
    align-items: center;
    height: 640px;
    position: relative;
    transition: transform 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}

.carousel-item {
    flex: 0 0 33.333%;
    padding: 0 20px;
    transition: all 0.7s cubic-bezier(0.32, 0.72, 0, 1);
    opacity: 0.45;
    transform: scale(0.76);
    z-index: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1.1);
    z-index: 3;
}

.carousel-item.prev,
.carousel-item.next {
    opacity: 0.68;
    transform: scale(0.76);
    z-index: 2;
}

/* Bilde med fast 5:4 ratio */
.carousel-item .image-wrapper {
  
	height: 560px;
    aspect-ratio: 5 / 4;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,0.28);
}

.carousel-item img {
  	width: 780px;
    height: 100%;
	aspect-ratio: 5 / 4;
    object-fit: cover;
    transition: all 0.6s ease;
}

/* Sidebilder */
.carousel-item.prev { margin-left: -80px; }
.carousel-item.next { margin-right: -80px; }

.carousel-item.prev img,
.carousel-item.next img {
    filter: brightness(0.82) contrast(0.95);
}

/* Navigasjonsknapper */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border: none;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.prev { left: 40px; }
.next { right: 40px; }

/* Mobiltilpasning */
@media (max-width: 768px) {
    .carousel-wrapper {
        height: 60vh;
        min-height: 420px;
    }
    .carousel-item.prev { margin-left: -45px; }
    .carousel-item.next { margin-right: -45px; }
    
    .carousel-item .image-wrapper {
        max-width: 420px;
    }
}


/* ============== RESPONSIVE HEADER ============== */

@media (max-width: 768px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 90px;
        background: rgba(255, 255, 255, 0.0);
        backdrop-filter: blur(0px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.0);
        z-index: 3000;
        padding: 0 15px;
        display: flex;
        align-items: center;
        pointer-events: auto;
    }

    .logo {
        height: 120px;
        margin-left: 0px;
        margin-top: 18px;
    }

    .menu-toggle {
        margin-top: 10px;
        margin-right: 10px;
        width: 44px;
        height: 44px;
        font-size: 24px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    }

    /* Collapsible Menu p? mobil */
    .collapsible-menu {
        width: 100%;
        right: -100%;
        padding-top: 120px;
    }

    .collapsible-menu.open {
        right: 0;
    }


/* ============== HERO TITLE - RESPONSIVE MOBILE ============== */

@media (max-width: 768px) {
    .hero-title {
        position: absolute;
        top: 58%;                    /* Litt lavere på mobil */
        left: 50%;
        transform: translate(-50%, -50%) rotate(-2deg);
        font-size: 2.05rem;
        line-height: 1.32;
        min-width: 80%;
		max-width: 90%;
        padding: 0 10px;
        text-align: center;
    }

    .hero-title .marker-line {
        padding: 5px 12px;
        margin-bottom: 8px;
        font-size: 2.0rem;
        white-space: normal;
    }


@media (max-width: 480px) {
    .hero-title {
        top: 60%;
        font-size: 1.68rem;
        min-width: 80%;
		max-width: 90%;
        padding: 0 6px;
    }



/* Ekstra sikkerhet mot horisontal scrolling */
.hero-title {
    box-sizing: border-box;
    word-break: break-word;
}


@media (max-width: 768px) {
    .single-section.hero {
        padding: 0 6px;
    }
}
