body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f4f1ea;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #8B2323; /* Falu rödfärg */
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 5px solid #fff;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin: 0 15px;
    padding: 5px 0;
    transition: all 0.3s;
}

/* Den aktiva länken */
nav a.active {
    color: #ffd700; /* Guldgul */
    border-bottom: 2px solid #ffd700;
}

nav a:hover {
    color: #ffd700;
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('stugan.jpg');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.hero h1 { font-size: 3.5rem; margin: 0; text-shadow: 2px 2px 8px rgba(0,0,0,0.7); }

section {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

h2 {
    color: #8B2323;
    border-left: 5px solid #2D5A27;
    padding-left: 15px;
}

.content-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.gallery-img {
    width: 100%;
    border-radius: 4px;
}

.button {
    display: inline-block;
    background: #8B2323;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 15px;
}

footer {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    nav ul { flex-direction: column; align-items: center; }
    nav a { margin: 5px 0; }
    .hero h1 { font-size: 2.5rem; }
}
/* Styling för nästa/föregående knappar */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.nav-btn {
    background-color: #8B2323;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.nav-btn:hover {
    background-color: #2D5A27; /* Byter till skogsgrönt vid hover */
}

.nav-btn.disabled {
    background-color: #ccc;
    pointer-events: none; /* Gör knappen oklickbar om år saknas */
}
/* Skapar ett rutnät för bilderna */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Skapar rader automatiskt */
    gap: 15px; /* Mellanrum mellan bilderna */
    margin-top: 20px;
}

/* Ändra din befintliga .gallery-img till detta */
.gallery-img {
    width: 100%;          /* Fyller ut sin plats i rutnätet */
    height: 150px;        /* Alla bilder får samma höjd */
    object-fit: cover;    /* Beskär bilden snyggt istället för att trycka ihop den */
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: block;       /* Tar bort glipor under bilden */
}

.gallery-img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
/* Nyhetssida - Grid och Kort */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.news-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.news-card h3 {
    margin: 10px 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.news-card h3 a {
    color: #333;
    text-decoration: none;
}

.news-card h3 a:hover {
    color: #2980b9;
}

.news-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    flex-grow: 1;
}

.news-date {
    font-size: 0.75rem;
    font-weight: bold;
    color: #8B2323; /* Din mörkröda färg */
    text-transform: uppercase;
}

.read-more {
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #2980b9;
    text-decoration: none;
}