/* Globalt designoppsett for stabil layout */
:root {
--trondheim-blue: #003d7a;
--bg-light: #f8fafc;
--text-main: #1e293b;
--text-muted: #64748b;
--border-color: #e2e8f0;
--white: #ffffff;
}

body {
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Header */
header {
background-color: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--border-color);
padding: 0.8rem 3rem;
display: flex;
justify-content: space-between;
align-items: center;
position: sticky;
top: 0;
z-index: 1000;
}

.header-left {
display: flex;
align-items: center;
}

.header-logo {
height: 45px;
width: auto;
margin-right: 20px;
}

header h1 {
margin: 0;
font-size: 1.4rem;
color: var(--trondheim-blue);
font-weight: 800;
}

/* Søk-funksjonalitet */
.search-trigger {
cursor: pointer;
padding: 8px;
border-radius: 50%;
transition: all 0.2s ease;
}

.search-trigger:hover {
background-color: #f1f5f9;
transform: scale(1.1);
}

.search-trigger img {
height: 48px;
width: auto;
}

#search-overlay {
position: fixed;
top: -120px;
left: 0;
width: 100%;
height: 100px;
background-color: var(--white);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 4rem;
box-shadow: 0 10px 30px rgba(0,0,0,0.08);
transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
z-index: 1100;
box-sizing: border-box;
}

#search-overlay.active {
top: 0;
}

.search-input-wrapper {
flex: 1;
max-width: 1000px;
margin: 0 auto;
position: relative;
}

#overlay-search-input {
width: 100%;
border: none;
font-size: 28px;
color: var(--text-main);
outline: none;
background: transparent;
font-weight: 300;
}

.close-search {
cursor: pointer;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
color: var(--text-muted);
transition: color 0.2s;
}

.close-search:hover {
color: #ef4444;
}

/* Søkeresultat-liste */
#overlay-results {
position: absolute;
top: 70px;
left: 0;
width: 100%;
background: var(--white);
box-shadow: 0 15px 35px rgba(0,0,0,0.1);
max-height: 400px;
overflow-y: auto;
border-radius: 0 0 12px 12px;
border: 1px solid var(--border-color);
display: none;
}

.search-result-item {
padding: 1rem 2rem;
cursor: pointer;
border-bottom: 1px solid #f1f5f9;
transition: background 0.2s;
}

.search-result-item:hover {
background-color: #f8fafc;
}

.search-result-title {
font-weight: 700;
color: var(--trondheim-blue);
font-size: 16px;
}

.search-result-cat {
font-size: 12px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.5px;
}

/* Footer (Beholdt fra forrige suksessrike versjon) */
.main-footer {
background-color: #ffffff;
border-top: 1px solid var(--border-color);
padding: 1rem 2rem;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
box-sizing: border-box;
margin-top: auto;
}

.footer-col { display: flex; flex-direction: column; }
.footer-col.left, .footer-col.right { flex: 1; align-items: center; }
.footer-col.center { flex: 0 0 auto; text-align: center; width: 600px; }

.footer-img { display: block; max-height: 180px; width: auto; }
.footer-title { margin: 0 0 5px 0; font-size: 1.15rem; font-weight: 800; color: var(--trondheim-blue); white-space: nowrap; }
.footer-subtitle { margin: 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

.editor-box {
margin: 15px auto 0 auto;
padding-top: 10px;
border-top: 1px solid #e2e8f0;
width: 250px;
}

.editor-tag { font-weight: 700; text-transform: uppercase; font-size: 0.7rem; color: var(--text-muted); }
.editor-name { margin: 2px 0 0 0; font-weight: 600; color: var(--text-main); }
