﻿/* Nordiske farver - blålig/grå nuancer */
:root {
    --primary-dark: #2c3e50;
    --primary-blue: #34495e;
    --accent-blue: #5d8aa8;
    --light-blue: #a7c7e7;
    --bg-light: #ecf0f1;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #7f8c8d;
    --border-color: #bdc3c7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--light-blue) 100%);
    color: var(--text-dark);
    min-height: 100vh;
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--accent-blue) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fixed-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.login-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

    .login-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* Main Content */
.content-wrapper {
    max-width: 1400px;
    margin: 6rem auto 2rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 1.5rem;
}

/* Sidebars */
.left-sidebar,
.right-sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 7rem;
}

    .left-sidebar h2,
    .right-sidebar h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        color: var(--primary-dark);
        border-bottom: 2px solid var(--accent-blue);
        padding-bottom: 0.5rem;
    }

    .left-sidebar nav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .left-sidebar a {
        color: var(--accent-blue);
        text-decoration: none;
        padding: 0.5rem;
        border-radius: 0.375rem;
        transition: all 0.2s;
        font-size: 0.9rem;
    }

        .left-sidebar a:hover {
            background: var(--light-blue);
            color: var(--primary-dark);
        }

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Buttons */
.btn-primary,
.btn-success,
.btn-info,
.btn-secondary,
.btn-load-more {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    width: 100%;
}

    .btn-primary:hover {
        background: var(--primary-blue);
    }

.btn-success {
    background: #27ae60;
    color: white;
}

    .btn-success:hover {
        background: #229954;
    }

.btn-info {
    background: var(--accent-blue);
    color: white;
}

    .btn-info:hover {
        background: var(--primary-blue);
    }

.btn-secondary {
    background: var(--text-gray);
    color: white;
}

    .btn-secondary:hover {
        background: var(--primary-dark);
    }

.btn-load-more {
    background: var(--text-gray);
    color: white;
    width: 100%;
}

    .btn-load-more:hover {
        background: var(--primary-dark);
    }

/* Editor Panel */
.editor-panel {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .editor-panel h3 {
        margin-bottom: 1rem;
        color: var(--primary-dark);
    }

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

    .form-input:focus {
        outline: none;
        border-color: var(--accent-blue);
        box-shadow: 0 0 0 3px rgba(93, 138, 168, 0.1);
    }

.wysiwyg-editor {
    min-height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
}

    .wysiwyg-editor:focus {
        outline: none;
        border-color: var(--accent-blue);
    }

.editor-actions {
    display: flex;
    gap: 0.75rem;
}

/* Post Cards */
.post-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

    .post-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }

    .post-card h2 {
        color: var(--primary-dark);
        margin-bottom: 0.5rem;
        font-size: 1.3rem;
    }

.post-date {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.post-preview {
    color: var(--text-dark);
    line-height: 1.6;
}

/* Right Sidebar Overview */
.post-overview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overview-item {
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

    .overview-item:hover {
        background: var(--light-blue);
    }

.overview-date {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.overview-title {
    font-size: 0.9rem;
    color: var(--primary-dark);
    font-weight: 500;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-large {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
}

    .modal-header h2 {
        color: var(--primary-dark);
        font-size: 1.5rem;
    }

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
}

    .close-btn:hover {
        background: var(--bg-light);
        color: var(--primary-dark);
    }

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.image-item {
    aspect-ratio: 1;
    background: var(--bg-light);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

    .image-item:hover {
        background: var(--light-blue);
        transform: scale(1.05);
    }

    .image-item img {
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
    }

    .image-item span {
        position: absolute;
        bottom: 0.5rem;
        font-size: 0.75rem;
        color: var(--text-dark);
        background: rgba(255, 255, 255, 0.9);
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
    }

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .left-sidebar,
    .right-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.2rem;
    }

    .content-wrapper {
        padding: 0 1rem;
        margin-top: 5rem;
    }

    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.upload-status {
    margin-left: 1rem;
    color: var(--accent-blue);
    font-weight: 600;
}

.form-input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
}

.form-input[type="file"]::-webkit-file-upload-button {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    margin-right: 1rem;
}

.form-input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--primary-blue);
}
