/* style.css - Felles stil for alle språkversjoner */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --light-bg: #f9f9f9;
    --sidebar-width: 280px;
    --highlight-color: #f0f7fc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: white;
    display: flex;
    min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--secondary-color);
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar h2 {
    color: white;
    margin-bottom: 10px;
    background-color: gray;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    transition: all 0.3s;
}

.sidebar-nav a:hover {
    background-color: rgba(255,255,255,0.1);
    padding-left: 25px;
}

[dir="rtl"] .sidebar-nav a:hover {
    padding-left: 20px;
    padding-right: 25px;
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    font-weight: bold;
}

/* Main content styling */
.main-content {
    flex: 1;
    padding: 30px;
    max-width: calc(100% - var(--sidebar-width));
    overflow-y: auto;
    height: 100vh;
}

h1, h2, h3, h4 {
    color: var(--secondary-color);
    margin-top: 20px;
    margin-bottom: 15px;
}

h1 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
}

h2 {
    background-color: var(--highlight-color);
    padding: 10px 15px;
    border-left: 4px solid var(--primary-color);
}

[dir="rtl"] h2 {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
    display: block;
}

.note {
    background-color: #fffde7;
    border-left: 4px solid #ffd600;
    padding: 15px;
    margin: 20px 0;
}

[dir="rtl"] .note {
    border-left: none;
    border-right: 4px solid #ffd600;
}

.warning {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    margin: 20px 0;
}

[dir="rtl"] .warning {
    border-left: none;
    border-right: 4px solid #f44336;
}

code {
    background-color: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    margin: 5px 0;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #2980b9;
}

.steps {
    counter-reset: step-counter;
    padding-left: 0;
    margin: 15px 0;
}

[dir="rtl"] .steps {
    padding-right: 0;
    padding-left: initial;
}

.steps li {
    list-style: none;
    position: relative;
    padding-left: 45px;
    margin-bottom: 15px;
    min-height: 30px;
}

[dir="rtl"] .steps li {
    padding-left: 0;
    padding-right: 45px;
}

.steps li:before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
}

[dir="rtl"] .steps li:before {
    left: auto;
    right: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

[dir="rtl"] th, 
[dir="rtl"] td {
    text-align: right;
}

th {
    background-color: #f2f2f2;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Language switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 40px;
    z-index: 1000;
    display: flex;
    gap: 5px;
}

.language-switcher button {
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.language-switcher button:hover {
    background-color: #2980b9;
}

/* Adjust position for RTL languages */
[dir="rtl"] .language-switcher {
    right: auto;
    left: 40px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        max-width: 100%;
        height: auto;
        padding: 20px;
    }
    
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
    }
    
    .sidebar-nav li {
        flex: 1 0 auto;
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.1);
    }
    
    [dir="rtl"] .sidebar-nav li {
        border-right: none;
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    
    .sidebar-nav a {
        padding: 10px 5px;
        text-align: center;
        font-size: 14px;
    }
    
    .language-switcher {
        position: relative;
        top: 0;
        right: 0;
        left: 0;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    [dir="rtl"] .language-switcher {
        right: 0;
        left: 0;
    }
}