/* =========================================
   GRUNDLAYOUT
========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f7fa;
    color: #273444;
    margin: 0;
    padding: 20px;
    line-height: 1.5;
}

img {
    max-width: 100%;
}


/* =========================================
   LOGO / HEADER
========================================= */

.page-logo {
    text-align: center;
    margin: 10px auto 30px;
    padding: 0 10px;
}

.page-logo img {
    display: block;
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 0 auto;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(31, 58, 95, 0.12);
}


/* =========================================
   HUVUDINNEHÅLL
========================================= */

#innehall {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}


/* =========================================
   HUVUDRUBRIK
========================================= */

h1 {
    text-align: center;
    color: #173f67;
    font-size: clamp(1.9rem, 5vw, 2.7rem);
    line-height: 1.15;
    margin: 10px 0 30px;
    letter-spacing: -0.5px;
}


/* =========================================
   KATEGORIRUBRIKER
========================================= */

h2 {
    position: relative;
    background: transparent;
    color: #1d4f7a;

    padding: 0 0 10px 0;

    border-radius: 0;
    border-left: none;

    font-size: clamp(1.25rem, 4vw, 1.6rem);
    line-height: 1.2;

    margin: 40px 0 18px;
}


/* =========================================
   HÄNDELSEKORT
========================================= */

.handel {
    background: #ffffff;

    border-radius: 16px;

    padding: 18px;
    margin: 16px 0;

    border: 1px solid rgba(31, 58, 95, 0.06);

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.04),
        0 8px 25px rgba(0, 0, 0, 0.06);

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.handel:hover {
    transform: translateY(-2px);

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.06),
        0 12px 30px rgba(0, 0, 0, 0.08);
}


/* =========================================
   BILDER
========================================= */

.handel img {
    width: 100%;

    aspect-ratio: 16 / 9;

    object-fit: cover;

    border-radius: 12px;

    display: block;

    margin-bottom: 14px;
}


/* =========================================
   BILDTEXT
========================================= */

.bildtext {
    font-size: 0.78rem;

    color: #7a8794;

    margin: -6px 0 12px;
}


/* =========================================
   HÄNDELSETITEL
========================================= */

.handel h3 {
    margin: 0 0 10px;

    color: #2563a8;

    font-size: clamp(1.1rem, 4vw, 1.4rem);

    line-height: 1.3;
}


/* =========================================
   DATUM
========================================= */

.datum {
    display: inline-flex;

    align-items: center;

    background: #edf4fa;

    color: #245783;

    padding: 6px 12px;

    border-radius: 999px;

    font-size: 0.88rem;

    font-weight: 600;

    margin-bottom: 12px;
}


/* =========================================
   TEXT
========================================= */

.beskrivning {
    line-height: 1.65;

    font-size: 1rem;

    margin: 8px 0;

    color: #3d4b59;
}

.info {
    font-size: 0.94rem;

    margin: 8px 0;

    color: #657381;
}


/* =========================================
   LÄNKAR
========================================= */

a {
    color: #2563a8;

    text-decoration: none;

    transition: color 0.2s ease;
}

a:hover {
    color: #163f6b;

    text-decoration: underline;
}


/* =========================================
   KALENDER
========================================= */

.calendar-container {
    width: 100%;

    max-width: 900px;

    margin: 0 auto;

    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 20px;
}

.month-box {
    border: 1px solid #e5e9ee;

    padding: 18px;

    width: 100%;

    max-width: 400px;

    text-align: center;

    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.04),
        0 8px 25px rgba(0, 0, 0, 0.05);
}

.month-title {
    font-weight: 700;

    font-size: 1.4rem;

    color: #173f67;

    margin-bottom: 14px;
}

table {
    border-collapse: separate;

    border-spacing: 3px;

    width: 100%;
}

th,
td {
    border: 0;

    padding: 8px;

    text-align: center;

    font-size: 0.95rem;

    position: relative;

    border-radius: 7px;
}

th {
    color: #718096;

    font-size: 0.8rem;

    font-weight: 600;
}

td {
    color: #374151;
}


/* =========================================
   DAGENS DATUM
========================================= */

.today {
    background: #dbeafe;

    color: #245783;

    font-weight: 700;

    border-radius: 8px;
}


/* =========================================
   HELGDAGAR
========================================= */

.holiday {
    color: #dc2626;

    font-weight: 700;

    cursor: pointer;
}

.holiday:hover::after {
    content: attr(data-holiday);

    position: absolute;

    background: #1f2937;

    color: white;

    padding: 6px 9px;

    border-radius: 6px;

    font-size: 0.75rem;

    top: -30px;

    left: 50%;

    transform: translateX(-50%);

    white-space: nowrap;

    z-index: 10;
}


/* =========================================
   VECKONUMMER
========================================= */

.week-number-span,
.week-number {
    color: #0f766e;

    font-weight: 700;
}


/* =========================================
   DAGENS TOPPNYHETER
========================================= */

.top-news {
    width: 100%;

    max-width: 900px;

    margin: 40px auto 50px;

    padding: 0 10px;
}


/* Rubrik för toppnyheter */

.top-news h2 {
    text-align: left;

    margin-bottom: 22px;

    border-left: none;

    padding-left: 0;

    color: #1d4f7a;
}


/* =========================================
   TOPPNYHETSKORT
========================================= */

.top-news-card {
    width: 100%;

    display: flex;

    align-items: flex-start;

    gap: 18px;

    background: #ffffff;

    padding: 20px;

    margin-bottom: 16px;

    border-radius: 16px;

    border: 1px solid rgba(31, 58, 95, 0.06);

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.04),
        0 8px 25px rgba(0, 0, 0, 0.05);
}


/* =========================================
   NUMMER I TOPPLISTAN
========================================= */

.top-number {
    flex-shrink: 0;

    width: 44px;

    height: 44px;

    border-radius: 50%;

    background: #f59e0b;

    color: #ffffff;

    font-size: 20px;

    font-weight: 700;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* =========================================
   INNEHÅLL I TOPPNYHET
========================================= */

.top-content {
    flex: 1;
}

.top-content h3 {
    margin: 0 0 8px;

    color: #173f67;

    font-size: 1.15rem;
}

.top-content p {
    margin: 8px 0;

    line-height: 1.6;

    color: #4b5563;
}


/* =========================================
   LÄNKAR I TOPPNYHETER
========================================= */

.top-content a {
    color: #2563a8;

    font-weight: 600;

    text-decoration: none;
}

.top-content a:hover {
    color: #163f6b;

    text-decoration: underline;
}


/* =========================================
   MOBILANPASSNING
========================================= */

@media (max-width: 600px) {

    body {
        padding: 10px;
    }


    /* Logo */

    .page-logo {
        margin: 5px auto 20px;
    }

    .page-logo img {
        border-radius: 12px;
    }


    /* Huvudrubrik */

    h1 {
        margin-top: 10px;

        margin-bottom: 22px;
    }


    /* Kategorier */

    h2 {
        margin-top: 30px;

        margin-bottom: 15px;

        padding-left: 0;
    }


    /* Händelsekort */

    .handel {
        padding: 14px;

        margin: 12px 0;

        border-radius: 13px;
    }

    .handel:hover {
        transform: none;
    }


    /* Bilder */

    .handel img {
        aspect-ratio: 4 / 3;

        border-radius: 10px;
    }


    /* Datum */

    .datum {
        font-size: 0.84rem;
    }


    /* Beskrivning */

    .beskrivning {
        font-size: 0.95rem;

        line-height: 1.6;
    }


    /* Toppnyheter */

    .top-news {
        padding: 0;

        margin-top: 30px;
    }

    .top-news-card {
        flex-direction: column;

        gap: 12px;

        padding: 16px;

        border-radius: 13px;
    }


    /* Nummer */

    .top-number {
        width: 38px;

        height: 38px;

        font-size: 18px;
    }


    /* Rubrik */

    .top-content h3 {
        font-size: 1.1rem;
    }


    /* Kalender */

    th,
    td {
        padding: 6px 3px;

        font-size: 0.85rem;
    }
}