/* NLA Høgskolen Fargepalett & Temafarger */
:root {
    --nla-dark-green: #0A4D3E;
    --nla-light-green: #1a6f5b;
    --nla-light-beige: #F7F5F0; 
    --nla-accent: #E29F5B;
    
    --accent-bg: var(--nla-light-beige); 
    --accent-text: var(--nla-dark-green);
    
    --text-heading: #1a202c;
    --text-body: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --bg-color: #ffffff;

    --font-sans: 'Inter', system-ui, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-body);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* --- GRID SYSTEM --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    padding: 0 1rem;
    max-width: 100%;
}

.nav-inner, .hero-inner, .content-wrapper, .footer-inner { grid-column: 1 / -1; }
.sidebar-left { display: none; }

@media (min-width: 64rem) { 
    .nav-inner, .hero-inner, .footer-inner { grid-column: 2 / span 11; }
    .content-wrapper { grid-column: 2 / span 9; }
}

@media (min-width: 80rem) { 
    .nav-inner, .hero-inner, .footer-inner { grid-column: 2 / span 10; }
    .sidebar-left { display: block; grid-column: 2 / span 2; }
    .content-wrapper { grid-column: 4 / span 7; }
}

/* --- SEKSJONER --- */
.nav-section { background-color: var(--accent-bg); position: sticky; top: 0; z-index: 50; padding: 1rem 0; border-bottom: 1px solid rgba(10, 77, 62, 0.1); }
.hero-section { background-color: var(--accent-bg); padding: 2rem 0 3rem 0; border-bottom: 1px solid var(--border-color); }
@media (min-width: 48rem) { .hero-section { padding: 4rem 0 5rem 0; } }
.main-section { padding: 3rem 0; flex: 1; }
.footer-section { background-color: var(--nla-dark-green); color: rgba(255, 255, 255, 0.9); padding: 4rem 0 2rem 0; margin-top: 4rem; }

/* --- TOPPMENY --- */
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo-link { text-decoration: none; color: var(--accent-text); transition: opacity 0.2s; }
.nav-logo-link:hover { opacity: 0.8; }
.nav-logo-text { font-weight: 700; letter-spacing: 0.05em; font-size: 1.1rem; text-transform: uppercase; }

.nav-desktop-menu { display: none; }
@media (min-width: 48rem) { .nav-desktop-menu { display: block; } }
.nav-desktop-menu ul { display: flex; gap: 1.5rem; list-style: none; }
.nav-desktop-menu a { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: color 0.15s; }
.nav-desktop-menu a:hover, .nav-desktop-menu a.active { color: var(--accent-text); font-weight: 600; }

.mobile-menu-btn { display: flex; height: 2.5rem; width: 2.5rem; align-items: center; justify-content: center; color: var(--accent-text); background: transparent; border: none; cursor: pointer; }
@media (min-width: 48rem) { .mobile-menu-btn { display: none; } }
.mobile-menu { display: none; flex-direction: column; gap: 1rem; padding: 1rem; background: white; border-bottom: 1px solid var(--border-color); position: absolute; top: 100%; left: 0; right: 0; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.mobile-menu.open { display: flex; }
.mobile-menu a { text-decoration: none; color: var(--text-body); font-weight: 500; padding: 0.5rem; }

/* --- HERO --- */
.hero-tag { font-size: 0.85rem; letter-spacing: 0.1em; font-weight: 700; color: var(--nla-accent); text-transform: uppercase; margin-bottom: 1rem; display: inline-block; }
.hero-title { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; color: var(--accent-text); }
@media (min-width: 48rem) { .hero-title { font-size: 3.5rem; } }
.hero-ingress { font-size: 1.2rem; color: var(--text-body); line-height: 1.6; margin-bottom: 1.5rem; max-width: 800px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 1rem; font-weight: 600; color: var(--accent-text); }

/* --- INNHOLDSFORTEGNELSE (SIDEBAR) --- */
.toc-sticky { position: sticky; top: 6rem; max-height: calc(100vh - 8rem); overflow-y: auto; padding-right: 1rem; }
.toc-category { font-size: 0.8rem; letter-spacing: 0.05em; font-weight: 700; color: var(--text-heading); margin: 1.5rem 0 0.5rem 0; text-transform: uppercase; }
.toc-category:first-child { margin-top: 0; }
.toc-list { list-style: none; border-left: 2px solid var(--border-color); }
.toc-list li a { display: block; margin-left: -2px; border-left: 2px solid transparent; padding: 0.3rem 0 0.3rem 1rem; text-decoration: none; color: var(--text-muted); transition: all 0.2s; font-size: 0.95rem; }
.toc-list li a:hover { color: var(--accent-text); }
.toc-list li a.active { border-left-color: var(--nla-accent); color: var(--accent-text); font-weight: 600; background: linear-gradient(90deg, rgba(247,245,240,1) 0%, rgba(255,255,255,0) 100%); }

/* --- PROSE (HOVEDINNHOLD) --- */
.prose { max-width: 800px; }
.chapter-divider { margin: 4rem 0 2rem 0; padding-bottom: 1rem; border-bottom: 3px solid var(--nla-accent); }
.chapter-divider h1 { font-family: var(--font-serif); color: var(--accent-text); font-size: 2.5rem; }
.prose section { margin-bottom: 4rem; scroll-margin-top: 6rem; }
.prose h2 { font-family: var(--font-sans); color: var(--text-heading); font-size: 1.6rem; margin-bottom: 1rem; padding-bottom: 0.5rem; }
.prose p { margin-bottom: 1.5rem; font-size: 1.125rem; color: var(--text-body); }
.prose ul { margin-bottom: 1.5rem; padding-left: 1.5rem; font-size: 1.125rem; }

.slide-img { width: 100%; height: auto; border-radius: 8px; margin: 1rem 0 2rem 0; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border: 1px solid var(--border-color); }
.image-credit { font-size: 0.85rem; color: var(--text-muted); text-align: right; margin-top: -1.5rem; margin-bottom: 2rem; font-style: italic; }

/* Video embed */
.video-container { position: relative; width: 100%; padding-bottom: 56.25%; margin: 1rem 0 2rem 0; border-radius: 8px; overflow: hidden; background: #000; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border: 1px solid var(--border-color); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* --- QUIZ-KORT --- */
.quiz-container { display: grid; gap: 0.75rem; margin-top: 2rem; }
.quiz-item { background: #fff; padding: 1rem 1.5rem; border-radius: 8px; cursor: pointer; border: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.05); font-size: 1.05rem; }
.quiz-item:hover { border-color: var(--nla-accent); transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.quiz-prompt { color: var(--nla-accent); font-weight: 600; font-size: 0.95rem; }
.quiz-answer { display: none; align-items: center; gap: 0.5rem; }
.badge { font-weight: 600; color: white; padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.badge svg { width: 16px; height: 16px; }
.badge-human { background: var(--nla-dark-green); }
.badge-ki { background: var(--nla-accent); }
.quiz-item.revealed .quiz-prompt { display: none; }
.quiz-item.revealed .quiz-answer { display: flex; }
.quiz-item.revealed { background: var(--nla-light-beige); }

/* --- FOOTER --- */
.footer-inner { display: flex; flex-direction: column; gap: 2rem; font-size: 0.95rem; }
@media (min-width: 48rem) { .footer-inner { flex-direction: row; justify-content: space-between; } }
.footer-profile h3 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 0.5rem; color: white; }
.footer-profile p { color: rgba(255, 255, 255, 0.7); max-width: 600px; margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { color: var(--nla-accent); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.footer-links a svg { width: 18px; height: 18px; }
.footer-links a:hover { text-decoration: underline; color: white; }

/* --- PRINT CSS --- */
@media print {
    body { background: white; color: black; }
    .nav-section, .sidebar-left, .footer-section { display: none !important; }
    .grid-container, .content-wrapper, .hero-inner { padding: 0 !important; grid-column: 1 / -1 !important; margin: 0 !important; display: block; }
    .hero-section { background: transparent; padding: 0 0 2rem 0; border-bottom: 2px solid black; margin-bottom: 2rem; }
    .prose section { margin-bottom: 2rem; page-break-inside: avoid; }
    .slide-img { box-shadow: none; border: 1px solid #ccc; }
    .quiz-item { border: 1px solid #ccc !important; box-shadow: none !important; background: transparent !important; }
    .quiz-prompt { display: none !important; }
    .quiz-answer { display: flex !important; }
    .badge { background: transparent !important; color: black !important; border: 1px solid black; }
}
