/* ==========================================
   Fredrik Svensson.se - Mobilanpassad SPA
   ========================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Färgschema - blå/gröna toner */
    --primary-blue: #2563eb;
    --primary-green: #10b981;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --hover-bg: #f1f5f9;
    --shadow: rgba(0, 0, 0, 0.1);
    
    /* Typografi */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

body {
    font-family: var(--font-main);
    font-weight: var(--font-weight-normal);
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    
    /* Siluett som bakgrund på mobil (svagt synlig) */
    background-image: url('../img/FS_Siluett.png');
    background-repeat: no-repeat;
    background-position: center 120px;
    background-size: 280px auto;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 250, 252, 0.88);
    pointer-events: none;
    z-index: 0;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    color: var(--white);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
    position: relative;
    z-index: 10;
}

header h1 {
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

header h1 .initial {
    font-size: 2.25rem;
}

header h1 .domain {
    text-transform: lowercase;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* Navigation & Content Area */
.content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow);
}
.intro-text {
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
/* Kategorier */
.category {
    margin-bottom: 2.5rem;
}

.category:last-child {
    margin-bottom: 0;
}

.category h2 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-green);
}

/* Länkar */
.links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-item {
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.link-item:hover {
    background-color: var(--hover-bg);
    border-left-color: var(--primary-green);
    transform: translateX(4px);
}

.link-item a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.link-item a:hover {
    color: var(--primary-green);
}

.link-item strong {
    font-weight: var(--font-weight-semibold);
}

.link-item p {
    color: var(--text-medium);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    line-height: 1.5;
}

/* Sub-länkar */
.sub-links {
    margin-top: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
}

.link-item h3 {
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-blue);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sub-link-item {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    background-color: var(--hover-bg);
    transition: all 0.2s ease;
}

.sub-link-item:last-child {
    margin-bottom: 0;
}

.sub-link-item:hover {
    background-color: var(--border-color);
    transform: translateX(4px);
}

.sub-link-item a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.sub-link-item a:hover {
    color: var(--primary-green);
}

.sub-link-item strong {
    font-weight: var(--font-weight-semibold);
}

.sub-link-item p {
    color: var(--text-medium);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Siluett-aside (dold på mobil, synlig på desktop) */
.silhouette {
    display: none;
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

footer p {
    font-size: 0.875rem;
    line-height: 1.6;
}

footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* ==========================================
   Desktop Layout (768px och uppåt)
   ========================================== */
@media (min-width: 768px) {
    /* Ta bort bakgrundsbild på desktop */
    body {
        background-image: none;
        height: 100vh;
        overflow: hidden;
        display: grid;
        grid-template-rows: auto 1fr auto;
    }
    
    body::before {
        display: none;
    }
    
    header h1 {
        font-size: 2.25rem;
    }
    
    header h1 .initial {
        font-size: 3rem;
    }
    
    /* Grid-layout för content och siluett */
    main {
        flex-direction: row;
        gap: 2.5rem;
        padding: 3rem 2rem;
        display: grid;
        grid-template-columns: 2fr 1fr;
        align-items: start;
        overflow: hidden;
    }
    
    .content {
        padding: 2rem;
        overflow-y: auto;
        max-height: 100%;
    }
    
    /* Visa siluett i sidebar */
    .silhouette {
        display: block;
    }
    
    .silhouette img {
        width: 100%;
        height: auto;
    }
    
    .category h2 {
        font-size: 1.5rem;
    }
    
    .link-item a {
        font-size: 1.0625rem;
    }
    
    footer p {
        font-size: 0.9375rem;
    }
}

/* ==========================================
   Stora skärmar (1024px och uppåt)
   ========================================== */
@media (min-width: 1024px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    main {
        padding: 4rem 3rem;
    }
    
    .content {
        padding: 2.5rem;
    }
}
