﻿/* Grundläggande stilar för body och html */
body, html {
    overflow-x: hidden; /* Förhindrar horisontell scrollning som kan uppstå ibland */
    font-family: "Times New Roman", Times, serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    --logo-height: 70px;
    --banner-height: 20px;
    --image-container-width: 100%;
    --image-container-height: auto;
    background-color: #FFFFFF;
    color: #000099;
    letter-spacing: 0.8px;
}

/* Header-stilar */
header {
    width: 100%;
    background-color: #000099;
    color: #FFFF00;
    height: calc(var(--logo-height) + var(--banner-height));
    position: relative;
    border-bottom: 1px solid #ccc;
    box-sizing: border-box;
}

/* Logotypområde stilar */
.logo-area {
    text-align: center;
    padding: 10px 0;
    height: var(--logo-height);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.logo-area img {
    max-height: calc(var(--logo-height) - 15px);
    max-width: 90%;
    height: auto;
    box-sizing: border-box;
}

/* Rullande text-container stilar */
.rolling-text-container {
    width: 100%;
    height: var(--banner-height);
    white-space: nowrap;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    background-color: #000099;
    padding: 0 10px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Rullande text stilar */
.rolling-text {
    display: inline-block;
    padding-left: 100%;
    animation: roll-text 80s linear infinite;
    font-size: 1em;
    text-decoration: underline;
    box-sizing: border-box;
    color: #FFFF00; /* Lägger till färg på den rullande texten */
}

.rolling-text span {
    margin-right: 30px;
    box-sizing: border-box;
}

/* Rullande text animation */
@keyframes roll-text {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Container stilar */
.container {
    display: flex;
    flex-grow: 1;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Meny stilar */
.menu {
    width: 135px;
    background-color: #000099;
    padding-top: 30px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 20px;
    bottom: auto;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow-y: auto;
    box-sizing: border-box;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.menu li {
    margin-bottom: 15px;
    box-sizing: border-box;
}

.menu a {
    text-decoration: none;
    color: #FFFFFF;
    padding: 8px 0;
    display: block;
    transition: background-color 0.3s ease;
    font-family: "Times New Roman", Times, serif;
    box-sizing: border-box;
}

.menu a:hover {
    background-color: #d4e1e7;
    color: #000099;
    box-sizing: border-box;
}

/* Innehållsstilar */
.content {
    flex-grow: 1;
    background-color: #e0e0e0;
    overflow-y: auto !important;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.content-inner {
    height: auto;
    background-color: #e0e0e0;
    box-sizing: border-box;
}

/* Slideshow stilar */
.slideshow {
    width: 90%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    background-color: #ccc; /* Placeholder för bildspelet */
}

.slideshow img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    box-sizing: border-box;
}

.slideshow img:first-child {
    opacity: 1;
    box-sizing: border-box;
}

/* Sidfot stilar */
footer {
    background-color: #000099;
    color: #FFFFFF;
    text-align: center;
    padding: 10px 0 0px 0;
    position: static; /* Standardläge */
    left: auto;
    right: auto;
    bottom: 0;
    width: 100%; /* Tar upp hela bredden som standard */
    font-family: "Times New Roman", Times, serif;
    box-sizing: border-box;
}

footer p {
    white-space: pre-line;
    margin-bottom: 10px;
    box-sizing: border-box;
}

footer a {
    color: #FFFF00; /* Stil för länken i footern */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Fasta bildbehållare stilar */
.fixed-image-containers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.fixed-image-container {
    --image-container-width: 200px;
    --image-container-height: auto;
    flex-basis: auto;
    width: var(--image-container-width);
    height: var(--image-container-height);
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    margin: 5px;
    max-width: 100%;
}

.fixed-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.fixed-image-container:hover img {
    transform: scale(1.05);
    box-sizing: border-box;
}

.fixed-image-container:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-color: #007bff;
    box-sizing: border-box;
}

.fixed-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.fixed-image-container:hover::before {
    background-color: rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* Bild-text-container stilar */
.image-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    visibility: visible;
    text-align: center;
    box-sizing: border-box;
}

.image-text-container:nth-child(2) {
    left: auto;
    top: auto;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Textinnehåll stilar */
.text-content {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
    order: 1;
    margin-bottom: 5px;
    box-sizing: border-box;
}

/* Kalkylatorstilar (responsiv bredd) */
.calculator {
    background: linear-gradient(135deg, #283048, #859398);
    width: 90%;
    max-width: 400px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

input[type=text] {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: right;
    font-size: 24px;
    border: none;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 5px;
    box-sizing: border-box;
}

input[type=button] {
    padding: 10px;
    margin: 0;
    border-radius: 8px;
    background: linear-gradient(to bottom, #4a90e2, #63b8ff);
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

input[type=button]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

input[value=AC] {
    grid-column: 1 / span 2;
    background: linear-gradient(to bottom, #