/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5490;
    --primary-dark: #0f3a66;
    --secondary-color: #2c7fb8;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --link-color: #1a5490;
    --link-hover: #0f3a66;
    --max-width: 1200px;
    --spacing: 1.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Main Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    border: none;
}

.nav-logo:hover {
    border: none;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: white;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.nav-menu a:hover {
    border-bottom-color: white;
    color: white;
}

/* Breadcrumb */
.breadcrumb {
    text-align: left;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.breadcrumb a:hover {
    border-bottom-color: white;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    opacity: 0.7;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Main Content */
main {
    padding-bottom: 3rem;
}

article {
    max-width: 800px;
    margin: 0 auto;
}

section {
    margin-bottom: 3rem;
}

section.intro {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.section-nav {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    margin-left: 0;
    margin-top: 0.5rem;
}

.nav-links li {
    margin-bottom: 0;
}

.nav-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background-color: var(--primary-color);
    color: white;
    border-bottom-color: var(--primary-color);
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Lists */
ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

li strong {
    color: var(--primary-color);
}

/* CTA Section */
section.cta {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f4f8 100%);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 4rem;
    border: 2px solid var(--primary-color);
}

.cta-link {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    margin-top: 1rem;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    border-bottom: none;
    box-shadow: 0 4px 12px rgba(26, 84, 144, 0.3);
}

.cta-secondary {
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

/* FAQ Section */
.faq-section {
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.faq-container {
    margin-top: 2rem;
}

.faq-item {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.faq-item p {
    margin-bottom: 0;
}

/* Related Topics */
.related-topics {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.topic-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.topic-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.topic-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Guide Grid for Oversikt Page */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.guide-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.guide-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.guide-card h3 a {
    color: var(--primary-color);
    border: none;
}

.guide-card h3 a:hover {
    color: var(--primary-dark);
    border: none;
}

.guide-card p {
    margin-bottom: 0;
    line-height: 1.7;
}

/* Glossary Styles */
.glossary-section {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.glossary-term {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.glossary-term h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.glossary-term p {
    margin-bottom: 0;
    line-height: 1.7;
}

/* Games Grid for Spill Page */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.game-card p {
    margin-bottom: 0;
    line-height: 1.7;
}

/* Footer */
footer {
    background-color: var(--bg-light);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 2px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-section h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    margin-top: 0;
}

.footer-section ul {
    list-style: none;
    margin-left: 0;
    margin-bottom: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    font-size: 0.95rem;
    color: var(--text-color);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    text-align: center;
}

.footer-note {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    section.intro,
    section.cta,
    .faq-section {
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    ul {
        margin-left: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    header {
        padding: 2rem 0;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .cta-link {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    header {
        background: var(--primary-color);
    }
    
    .cta-link {
        background-color: var(--primary-color);
    }
}

