/**
 * Sjukpenning.se - Premium Design System
 * Inspired by Begravningsbyråer.se
 * Elegant beige tones with excellent mobile support
 * 
 * VERSION 3.0 - Updated 2025-10-30
 * Fixes: Footer styling + Glossary/Ordlista styling
 */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Primary Colors - Beige/Sand Theme */
    --primary-dark: #2d2d2d;
    --primary-main: #3a3a3a;
    --primary-light: #666666;

    /* Accent Colors - Elegant Beige/Sand Tones */
    --accent-sand: #d4cec4;
    --accent-sand-light: #e5dfd5;
    --accent-taupe: #a89f91;
    --accent-cream: #f5f3f0;
    --accent-beige: #c9b9a6;

    /* Text Colors */
    --text-primary: #2d2d2d;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #b3b3b3;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f3f0;
    --bg-tertiary: #fafaf8;
    --bg-light: #fcfcfb;

    /* Status Colors */
    --success: #4a9d7d;
    --success-light: #e8f5f0;
    --warning: #d4a373;
    --warning-light: #faf3ed;
    --error: #c67d7d;
    --error-light: #f9eded;
    --info: #7d9fb8;
    --info-light: #eef4f8;

    /* Typography */
    --font-primary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 5rem;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows - Softer for elegant look */
    --shadow-xs: 0 1px 2px rgba(45, 45, 45, 0.04);
    --shadow-sm: 0 1px 3px rgba(45, 45, 45, 0.08);
    --shadow-md: 0 4px 6px rgba(45, 45, 45, 0.06);
    --shadow-lg: 0 10px 15px rgba(45, 45, 45, 0.08);
    --shadow-xl: 0 20px 25px rgba(45, 45, 45, 0.10);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --header-height: 70px;
    --container-max: 1200px;
    --container-narrow: 900px;
}

/* ==================== RESET ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== BASE STYLES ==================== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hide any direct text children of body that aren't in proper containers */
body> :not(header):not(main):not(footer):not(script):not(noscript) {
    display: none !important;
}

main {
    flex: 1;
}

/* ==================== TYPOGRAPHY ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--primary-main);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

/* ==================== HEADER & NAVIGATION ==================== */
/* Hide any potential page titles or breadcrumbs before main content */
.page-title,
.breadcrumb,
main>h1:first-child {
    display: none;
}

/* Hide any stray text nodes that might appear in header area */
.header-container> :not(.logo):not(.nav-desktop):not(.mobile-menu-toggle),
.header> :not(.header-container):not(.nav-mobile) {
    display: none !important;
}

.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    transition: all var(--transition-base);
}

/* Header blir solid när man scrollar */
.header.scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(45, 45, 45, 0.08);
    border-bottom: 1px solid var(--accent-sand-light);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-base);
}

.header.scrolled .logo {
    color: var(--primary-dark);
    text-shadow: none;
}

.logo:hover {
    color: var(--accent-sand);
}

.header.scrolled .logo:hover {
    color: var(--accent-taupe);
}

/* Desktop Navigation */
.nav-desktop {
    display: none;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header.scrolled .nav-link {
    color: var(--text-secondary);
    text-shadow: none;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.header.scrolled .nav-link:hover {
    color: var(--primary-dark);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.header.scrolled .nav-link.active {
    color: var(--primary-dark);
    background: var(--accent-sand-light);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    z-index: 101;
}

.menu-text {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-base);
}

.header.scrolled .menu-text {
    color: var(--primary-dark);
    text-shadow: none;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger-icon span {
    display: block;
    width: 25px;
    height: 2.5px;
    background: #ffffff;
    transition: all var(--transition-base);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.header.scrolled .hamburger-icon span {
    background: var(--primary-dark);
    box-shadow: none;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.nav-mobile {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    transform: translateY(-100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--accent-sand-light);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 99;
    /* Fix: Ensure mobile menu appears above hero section */
    /* CRITICAL FIX: Hide menu completely when not active */
    visibility: hidden;
    opacity: 0;
    transition: transform var(--transition-slow), visibility 0s var(--transition-slow), opacity var(--transition-slow);
}

.nav-mobile.active {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
    transition: transform var(--transition-slow), visibility 0s 0s, opacity var(--transition-slow);
}

.nav-mobile .nav-list {
    flex-direction: column;
    gap: 0;
    padding: var(--space-md);
}

.nav-mobile .nav-link {
    display: block;
    width: 100%;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    /* Fix: Override white text color for mobile menu with white background */
    color: var(--text-secondary) !important;
    text-shadow: none !important;
}

.nav-mobile .nav-link:hover {
    color: var(--primary-dark) !important;
    background: var(--bg-secondary);
}

.nav-mobile .nav-link.active {
    color: var(--primary-dark) !important;
    background: var(--accent-sand-light);
}

/* ==================== HERO SECTION - MODERN WITH VIDEO SUPPORT ==================== */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
}

/* Smaller hero for subpages */
.hero.hero-small {
    min-height: 400px;
}

/* Ordlista hero needs more space for search */
.hero.hero-ordlista {
    min-height: 500px;
}

@media (min-width: 768px) {
    .hero.hero-small {
        min-height: 450px;
    }

    .hero.hero-ordlista {
        min-height: 550px;
    }
}

@media (max-width: 767px) {
    .hero.hero-small {
        min-height: 350px;
    }

    .hero.hero-ordlista {
        min-height: 450px;
    }
}

/* Video Background */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

/* Image Background */
.hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(45, 45, 45, 0.7) 0%,
            rgba(45, 45, 45, 0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: calc(var(--header-height) + var(--space-2xl)) var(--space-md) var(--space-2xl);
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: var(--space-lg);
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Hero CTA Button - Modern Glassmorphism */
.hero-cta {
    display: inline-block;
    margin-top: var(--space-xl);
    padding: 0.6rem 1.4rem;

    /* Glassmorphism effect - Premium & Modern */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);

    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    text-shadow: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.hero-cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 767px) {
    .hero-cta {
        font-size: 1rem;
        padding: var(--space-sm) var(--space-lg);
    }
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ==================== CONTENT SECTIONS ==================== */
.content-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-primary);
}

.page-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-primary);
}

/* ==================== PROCESS TIMELINE (NEW!) ==================== */
.process-timeline {
    background: linear-gradient(to bottom, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: var(--space-3xl) 0;
    margin: 0 0 var(--space-3xl) 0;
}

.process-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
}

.process-intro h2 {
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
}

.process-intro p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 60px;
    bottom: 60px;
    width: 3px;
    background: linear-gradient(to bottom,
            var(--accent-sand) 0%,
            var(--accent-taupe) 100%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-2xl);
    position: relative;
}

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

.timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 4px solid var(--accent-sand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.timeline-content {
    flex: 1;
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--accent-sand-light);
    transition: all var(--transition-base);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-sand);
    transform: translateY(-2px);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: calc(50% + 60px);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: calc(50% + 60px);
}

.timeline-day {
    display: inline-block;
    background: var(--accent-sand);
    color: var(--primary-dark);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.timeline-content h3 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin-bottom: var(--space-sm);
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--primary-dark);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-main);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--accent-sand);
    color: var(--primary-dark);
}

.btn-secondary:hover {
    background: var(--accent-taupe);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-sand);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: var(--accent-sand-light);
    border-color: var(--accent-taupe);
}

/* ==================== INFO BOXES ==================== */
.info-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-sand);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.info-box h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
}

.info-box.tip {
    border-left-color: var(--info);
    background: var(--info-light);
}

.info-box.warning {
    border-left-color: var(--warning);
    background: var(--warning-light);
}

.info-box.success {
    border-left-color: var(--success);
    background: var(--success-light);
}

.info-box ul {
    margin-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.info-box li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

/* ==================== GLOSSARY / ORDLISTA ==================== */
.glossary-intro {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.glossary-intro h1 {
    margin-bottom: var(--space-md);
}

.page-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Hero Search for Ordlista */
.hero-ordlista .hero-content {
    max-width: 800px;
}

.hero-search {
    max-width: 600px;
    margin: var(--space-xl) auto 0;
    width: 100%;
}

.search-input-hero {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: 1.05rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-input-hero::placeholder {
    color: var(--text-muted);
}

.search-input-hero:focus {
    outline: none;
    border-color: var(--accent-taupe);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Glossary Search (legacy, for other pages if needed) */
.glossary-search {
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    border: 2px solid var(--accent-sand);
    border-radius: var(--radius-md);
    background: var(--bg-light);
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-taupe);
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Glossary Grid */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

/* Glossary Cards */
.glossary-card {
    background: var(--bg-light);
    border: 1px solid var(--accent-sand-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.glossary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-taupe);
}

.glossary-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.glossary-term {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.glossary-short-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Individual Term Page */
.term-content {
    max-width: 800px;
    margin: 0 auto;
}

.term-header {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--accent-sand-light);
}

.term-header h1 {
    margin-bottom: var(--space-md);
}

.term-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
}

.related-terms {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-top: var(--space-xl);
}

.related-terms h3 {
    margin-bottom: var(--space-md);
    color: var(--primary-dark);
}

.related-terms ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-terms li {
    margin-bottom: var(--space-sm);
}

.related-terms a {
    color: var(--primary-main);
    text-decoration: none;
    transition: color var(--transition-base);
}

.related-terms a:hover {
    color: var(--accent-taupe);
}

/* Mobile adjustments for glossary */
@media (max-width: 767px) {
    .glossary-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .glossary-card {
        padding: var(--space-md);
    }

    .glossary-term {
        font-size: 1.15rem;
    }
}

/* ==================== SAJTKARTA / SITEMAP ==================== */
.sajtkarta-page {
    max-width: 1000px;
    margin: 0 auto;
}

.sitemap-section {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--accent-sand-light);
}

.sitemap-section:last-of-type {
    border-bottom: none;
    margin-bottom: var(--space-xl);
}

.sitemap-section h2 {
    color: var(--primary-dark);
    font-size: 1.75rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--accent-sand);
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sitemap-list li {
    padding: var(--space-sm) 0;
    margin-left: var(--space-lg);
    position: relative;
}

.sitemap-list li::before {
    content: "→";
    position: absolute;
    left: calc(-1 * var(--space-lg));
    color: var(--accent-taupe);
    font-weight: bold;
}

.sitemap-list a {
    color: var(--primary-main);
    text-decoration: none;
    transition: all var(--transition-base);
    font-weight: 500;
}

.sitemap-list a:hover {
    color: var(--accent-taupe);
    padding-left: var(--space-xs);
}

.sitemap-list.glossary-sitemap li {
    font-size: 0.95rem;
    padding: var(--space-xs) 0;
}

.sitemap-footer {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-top: var(--space-2xl);
    text-align: center;
}

.sitemap-footer p {
    margin-bottom: var(--space-sm);
}

.sitemap-footer p:last-child {
    margin-bottom: 0;
}

/* ==================== INTEGRITETSPOLICY / PRIVACY POLICY ==================== */
.privacy-policy {
    max-width: 900px;
    margin: 0 auto;
}

.privacy-policy h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--accent-sand-light);
}

.privacy-policy h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.privacy-policy h3 {
    color: var(--primary-main);
    font-size: 1.2rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.privacy-policy .last-updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--accent-sand-light);
}

.privacy-policy ul {
    margin-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.privacy-policy li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.privacy-policy strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.privacy-policy p {
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

/* ==================== PAGE CONTENT GENERAL ==================== */
.page-content {
    padding: 0;
}

.content-text {
    line-height: 1.8;
}

.content-text h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.content-text h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.content-text p {
    margin-bottom: var(--space-md);
}

.content-text ul,
.content-text ol {
    margin-bottom: var(--space-md);
    margin-left: var(--space-xl);
}

.content-text li {
    margin-bottom: var(--space-xs);
}

/* Contact info styling */
.contact-info {
    background: var(--bg-secondary);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
}

.contact-info h2 {
    margin-top: 0;
}

.email-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-main);
    text-decoration: none;
    transition: color var(--transition-base);
}

.email-link:hover {
    color: var(--accent-taupe);
}

.contact-note {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
    margin-top: var(--space-md);
}

/* ==================== FOOTER ==================== */
/* Footer - Support both .footer and .site-footer */
.footer,
.site-footer {
    background: var(--primary-dark);
    color: #ffffff;
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: auto;
}

/* Footer content - can work as grid directly */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* Legacy support for footer-grid */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h3 {
    color: #ffffff;
    margin-bottom: var(--space-md);
    font-size: 1.2rem;
}

/* Style all lists in footer sections */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.85);
    transition: color var(--transition-base);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--accent-sand-light);
}

/* Legacy classes for backward compatibility */
.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    transition: color var(--transition-base);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-sand-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: var(--space-lg);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #ffffff;
}

/* ==================== RESPONSIVE - DESKTOP ==================== */
@media (min-width: 768px) {
    .nav-desktop {
        display: block;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .nav-mobile {
        display: none;
    }

    .hero {
        min-height: 650px;
    }

    .content-section {
        padding: var(--space-3xl) 0;
    }
}

/* ==================== RESPONSIVE - MOBILE TIMELINE ==================== */
@media (max-width: 767px) {
    .timeline::before {
        left: 40px;
    }

    .timeline-icon {
        left: 40px;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 90px;
        margin-right: 0;
    }

    .hero {
        min-height: 500px;
    }

    .hero-content {
        padding: calc(var(--header-height) + var(--space-lg)) var(--space-md) var(--space-lg);
    }

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }

    .process-timeline {
        padding: var(--space-2xl) 0;
        margin: 0 0 var(--space-2xl) 0;
    }

    .timeline-content {
        padding: var(--space-md);
    }

    .content-section {
        padding: var(--space-2xl) 0;
    }

    .footer-content,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* ==================== ACCESSIBILITY ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--accent-sand);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}