/* ===========================
   FONTS
   =========================== */
@font-face {
    font-family: "Frutiger";
    src: url("../fonts/FrutigerLTPro-Roman.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Frutiger";
    src: url("../fonts/FrutigerLTStd-Black.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: "Frutiger";
    src: url("../fonts/FrutigerLTStd-Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "Frutiger";
    src: url("../fonts/FrutigerLTStd-Italic.otf") format("opentype");
    font-weight: normal;
    font-style: italic;
}

body,
.main-header,
.main-header a {
    font-family: "Frutiger", sans-serif;
    font-weight: 300;
}

/* ===========================
   HEADER
   =========================== */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 60px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    font-size: 20px;
    color: #333;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a:focus {
    color: #4a90e2;
    outline: none;
}

.language-switcher img {
    display: block;
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switcher button,
.language-switcher a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    line-height: 0;
    text-decoration: none;
}

.language-switcher button:hover,
.language-switcher button:focus-visible,
.language-switcher a:hover,
.language-switcher a:focus-visible {
    border-color: currentColor;
}

.language-switcher button[aria-current="true"],
.language-switcher a.active {
    border-color: #4a90e2;
}

/* ===========================
   PAGE CONTAINER
   =========================== */
html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* ===========================
   CHART WRAPPER
   =========================== */
/* Bred bånd der spænder hele skærmen, uafhængigt af .page-container */
.chart-wrapper {
    position: relative;
    height: 400px;
    margin-top: 24px;

    /* bryd ud af forælderens max-width */
    width: 100vw;
    max-width: 1200px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.day-switch {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.day-switch button {
    font: inherit;
    font-size: 0.95rem;
    padding: 6px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.day-switch button:hover:not(:disabled) {
    border-color: #4a90e2;
    color: #4a90e2;
}

.day-switch button.is-active {
    background: #4a90e2;
    border-color: #4a90e2;
    color: #fff;
}

/* Grået når morgendagens priser ikke er offentliggjort endnu */
.day-switch button:disabled {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
}

.chart-date {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
}

.meta {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* ===========================
   FOOTER
   =========================== */
.main-footer {
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-right {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 28px;
}

.footer-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* ===========================
   SWUP TRANSITION
   =========================== */
.transition-fade {
    opacity: 1;
    transition: opacity 0.7s ease-in-out;
}

html.is-animating .transition-fade {
    opacity: 0;
}

/* ===========================
   DESKTOP IMAGE SIZE
   =========================== */
@media (min-width: 769px) {
    .intro-section {
        min-height: 300px;
        display: flex;
        gap: 40px;
        align-items: flex-start;

        /* stabilizes layout */
    }

    .intro-section img {
        margin-top: 25px;

        /* move image down */
        max-width: 350px !important;
        width: 350px !important;
        max-height: 400px !important;
        height: auto !important;
        object-fit: contain;
        flex: 0 0 350px;
    }

    .intro-text {
        flex: 1;
    }
}

/* ===========================
   MOBILE LAYOUT
   =========================== */
@media (max-width: 768px) {
    /* Hide logo on mobile */
    .logo {
        display: none;
    }

    /* Header stacks */
    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 0 15px;
    }

    /* Intro section stacks */
    .intro-section {
        display: block;
        text-align: left;
    }

    /* Mobile image size */
    .intro-section img {
        display: block;
        max-width: 200px;
        height: auto;
        margin: 0 auto;
        object-fit: contain;
    }

    /* Footer: to linjer, hvert par på én linje */
    .footer-right {
        display: grid;
        grid-template-columns: max-content max-content;
        justify-content: center;
        align-items: center;
        gap: 8px 16px;
    }

    /* Labels får ens bredde, så kolonne 2 starter samme sted */
    /* Mobile padding */
    .page-container {
        padding: 15px;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 12px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 0.9rem;
        white-space: nowrap;
        min-width: 0;
    }

    .chart-wrapper {
        width: 100%;
        max-width: none;
        margin-left: 0;
        transform: none;
        height: 260px;
        margin-top: 16px;
    }
}
