﻿/* Grundläggande återställning */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f9f9f9;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Wrapper för centrerad kolumn */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #003366;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

a.button {
    display: inline-block;
    background-color: #003366;
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

    a.button:hover {
        background-color: #0055a5;
    }

footer {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 3rem;
}

button {
    padding: 0.5rem 1.5rem;
    background-color: #93C01B;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.post-checkbox {
    margin-top: 7px;
    float: left;
}


/* Nyhetssidan */

h1, h2 {
    color: #333;
}

.introduction {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #555;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.news-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

    .news-item img {
        width: 100%;
        height: 180px; /* Fast höjd för alla bilder */
        object-fit: cover; /* Beskär bilden så den fyller utan att förvrängas */
        border-radius: 6px;
        margin-bottom: 12px;
        display: block;
    }

/*    .news-item img {
        width: 100%;
        height: auto;
        border-radius: 4px;
    }*/

    .news-item h3 {
        margin-top: 10px;
        font-size: 1.1em;
    }

    .news-item p {
        color: #666;
        font-size: 0.95em;
    }

.retro-section {
    margin-top: 50px;
}

    .retro-section p {
        margin-bottom: 20px;
        color: #444;
    }

.retro-news {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

    .retro-news img {
        width: 100%;
        height: auto;
        border-radius: 4px;
    }

    .retro-news h3 {
        margin-top: 10px;
    }

    .retro-news p {
        color: #666;
    }




/* Dölj radio inputs men behåll funktionalitet */
.button-group input[type="radio"] {
    display: none;
}

/* Gör varje label till en knapp */
.radio-button {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 180px;
    height: 40px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background-color: #f0f0f0;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 12px;
}

/* Gruppera knapparna horisontellt */
.button-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

/* Markera vald knapp */
input[type="radio"]:checked + .radio-button {
    background-color: #007acc;
    color: white;
    border-color: #007acc;
}

#createNewsletter {
    margin: 0px 0px 10px 0px;
    font-size: 24px;
}




@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}



.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6); /* vit dimma över allt */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998; /* under spinnern men över allt annat */
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #007acc;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
    background: white;
    z-index: 9999;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none;
}