/* --- GLOBAL STYLES (Applies to all) --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 30px;
}

body {
    background-color: var(--bg);
    margin: 0;
    font-family: var(--font-main);
    color: var(--text-bright);
}

.blog-container {
    display: flex;
    flex-direction: column; /* Default: Stacks vertically for mobile */
}

/* --- DESKTOP LAYOUT (Only for screens wider than 992px) --- */
@media (min-width: 993px) {
    .blog-container {
        flex-direction: row; /* Side-by-side for desktop */
    }

    .blog-sidebar {
        width: 300px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        background: rgba(10, 25, 47, 0.98);
        border-right: 1px solid rgba(100, 255, 218, 0.1);
        padding: 100px 40px 40px;
        z-index: 1000;
    }

    .blog-main-content {
        margin-left: 300px; /* Only push content when sidebar is fixed */
        flex-grow: 1;
        padding: 100px 60px;
    }

    .blog-card {
        display: grid;
        grid-template-columns: 380px 1fr;
    }
}

/* --- MOBILE LAYOUT (Only for screens 992px and smaller) --- */
@media (max-width: 992px) {
    .blog-sidebar {
        width: 100%;
        position: relative;
        padding: 60px 20px 20px;
        background: var(--bg);
        border-bottom: 1px solid rgba(100, 255, 218, 0.1);
    }

    .blog-main-content {
        margin-left: 0; /* Remove the 300px gap entirely */
        padding: 40px 20px;
    }

    .category-list {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch; /* Smooth swipe on iPhone */
    }

    .category-list li {
        white-space: nowrap;
        margin-bottom: 0;
    }

    .sidebar-promo {
        display: none; /* Hide promo to keep mobile view clean */
    }

    .blog-card {
        grid-template-columns: 1fr; /* Stack image on top of text */
    }
}

/* --- SHARED CARD & CONTENT STYLING (Applies to both Mobile & Desktop) --- */
.blog-image {
    height: 300px;
    position: relative; /* PLACERET HER: Nu ved tagget altid, hvor det skal placere sig! */
    overflow: hidden;   /* Sikrer at billedets skarpe hjørner ikke dækker for kortets runde hjørner */
}

.blog-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent);
    color: var(--bg);
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 900;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 10; /* Tvinger tagget helt frem i forgrunden foran billedet */
}

.sidebar-inner h3 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s ease;
}

.category-list a:hover {
    color: var(--accent);
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
}

.blog-card:hover {
    border-color: var(--accent);
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 30px;
}

.blog-content h2 {
    margin: 10px 0;
    font-size: 1.5rem;
    color: var(--text-bright);
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}