/* --- INSTÄLLNINGAR & FÄRGER --- */
:root {
    --primary-color: #2c3e50;  /* Mörkblå - Professionalism */
    --accent-color: #27ae60;   /* Grön - Tillväxt/Pengar */
    --bg-light: #f8f9fa;       /* Ljusgrå bakgrund */
    --text-color: #333;        /* Mörkgrå text */
    --border-color: #e9ecef;   /* Ljusa linjer */
}

/* --- GRUNDLÄGGANDE LAYOUT --- */
* {
    box-sizing: border-box; /* Gör storlekshantering enklare */
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: #fff;
    /* Dessa tre rader tvingar footern längst ner även om sidan är kort */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1; /* Fyller ut utrymmet mellan header och footer */
    padding: 40px 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- NAVIGATION & HEADER (Modern Hamburger) --- */
.navbar {
    background: var(--primary-color);
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky; /* Menyn fastnar i toppen */
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Länkarna (Desktop-läge) */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
}

/* Animerad understrykning vid hover */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* Hamburgare-ikon (Dold på desktop) */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- HERO & RUBRIKER --- */
.hero {
    background: var(--bg-light);
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

h1 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; }
h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 8px;
    margin-top: 50px;
    margin-bottom: 25px;
}
h3 { color: #444; margin-top: 25px; margin-bottom: 10px; font-size: 1.3rem; }

/* --- KORT & GRID (Responsivt) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Automatiska kolumner */
    gap: 25px;
    margin-top: 30px;
}

.card {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--accent-color);
}

.card h3 { margin-top: 0; color: var(--primary-color); }
.card p { color: #666; margin-bottom: 20px; flex-grow: 1; }
.card a { 
    color: var(--accent-color); 
    text-decoration: none; 
    font-weight: 700; 
    display: inline-block;
}
.card a:hover { text-decoration: underline; }

/* --- VERKTYG & TIPS-BOXAR --- */
.tool-box {
    background: #fff;
    border: 1px solid #eee;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.pro-tip {
    background-color: #e8f6f3;
    border: 1px solid #d4efdf;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    position: relative;
}

.pro-tip strong { display: block; color: var(--accent-color); font-size: 1.1rem; margin-bottom: 10px; }

/* Checklistor */
ul.checklist { list-style: none; padding: 0; margin-top: 15px; }
ul.checklist li { 
    padding: 12px 0; 
    border-bottom: 1px solid #eee; 
    display: flex;
    align-items: flex-start;
}
ul.checklist li:before { 
    content: "✓"; 
    color: var(--accent-color); 
    font-weight: bold; 
    margin-right: 15px; 
    font-size: 1.2rem;
}
ul.checklist li a { color: var(--primary-color); font-weight: 500; }

/* --- FOOTER --- */
footer {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    margin-top: auto;
}
footer p { opacity: 0.8; font-size: 0.9rem; }

/* --- MOBILANPASSNING (Responsivitet & Animationer) --- */
@media (max-width: 768px) {
    /* Förhindra scroll i sidled när menyn glider in */
    body { overflow-x: hidden; }

    .navbar { padding: 0 15px; }

    /* Visa hamburgaren */
    .hamburger { display: block; z-index: 1001; }

    /* Animation: Streck till Kryss */
    .hamburger.toggle div:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .hamburger.toggle div:nth-child(2) { opacity: 0; }
    .hamburger.toggle div:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

    /* Menyn i mobiläge */
    .nav-links {
        position: fixed; /* Låser menyn över hela skärmen */
        right: 0;
        top: 70px;
        height: calc(100vh - 70px);
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%); /* Göm menyn utanför skärmen */
        transition: transform 0.4s ease-in-out;
        padding-top: 50px;
    }

    /* När menyn är öppen */
    .nav-links.active { transform: translateX(0%); }

    .nav-links li { 
        margin: 20px 0; 
        opacity: 0; /* För att kunna animera in dem */
    }

    /* Länkar i mobilen */
    .nav-links a { font-size: 1.4rem; padding: 10px; display: block; }
    .nav-links a::after { display: none; } /* Ingen understrykning i mobilen */

    /* Animation för länkarna - de "flyger in" en efter en */
    .nav-links.active li { animation: navLinkFade 0.5s ease forwards 0.2s; }
    
    /* Anpassa Hero-texten för mobil */
    .hero h1 { font-size: 2rem; }
}

/* Keyframes för länk-animation */
@keyframes navLinkFade {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}