/* #region GENERAL */

:root {
    --paper: #fffff1;
    --blue: #355ca8;
    --orange: #e98726;
    --header: #eeeee6;
    --card: #ffead0;
    --line: #8ba4d0;
    --page-padding: clamp(16px, 2.5vw, 48px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--blue);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

button {
    color: inherit;
    font: inherit;
    cursor: pointer;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 4px;
}

h1,
h2,
h3,
p,
address {
    margin: 0;
    overflow-wrap: anywhere;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 1000px) {
    body.map-modal-open {
            overflow: hidden;
        }
}

/* #endregion */

/* #region HEADER */

.map-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(16px, 4vw, 80px);

    padding: 16px clamp(12px, 2.5vw, 48px);
    background: var(--header);
    border-bottom: 1px solid var(--line);
}

.map-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.map-logo img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.map-logo span {
    font-size: 18px;
    letter-spacing: 0.24em;
}

.map-navigation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
    gap: 12px clamp(16px, 3vw, 56px);
    padding-inline: clamp(16px, 3vw, 56px);
    border-inline: 2px solid var(--blue);
}

.map-navigation a {
    padding-block: 8px;
    font-size: clamp(12px, 1vw, 18px);
    text-decoration: none;
}

.map-navigation a:hover {
    text-decoration: underline;
}

.map-webshop {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--blue);
    border-radius: 999px;
    background-color: #f1f6ff;
    color: var(--header-blue);
    font-size: clamp(8px, 1.2vw, 16px);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    font-weight: 600;
}

.map-webshop:hover {
    background: #fffff1;
    box-shadow: none;
    filter: none;
    transform: none;
}

@media (max-width: 1000px) {
    .map-logo span {
            display: none;
        }

    .map-header {
            gap: 12px;
        }
}

@media (max-width: 480px) {
    .map-header {
            gap: 8px;
            padding: 12px 8px;
        }

    .map-logo img {
            width: 30px;
            height: 30px;
        }

    .map-navigation {
            gap: 4px 8px;
            padding-inline: 6px;
        }

    .map-navigation a {
            font-size: 11px;
        }

    .map-webshop {
            padding: 5px 6px;
            border-width: 1px;
            font-size: 10px;
        }
}

/* #endregion */

/* #region MAP LAYOUT */

.map-page {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas:
        "intro map"
        "card map";
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 32px clamp(24px, 4vw, 80px);

    max-width: 1800px;
    margin-inline: auto;
    padding: 32px var(--page-padding);
    
}

.map-introduction {
    grid-area: intro;
    min-width: 0;
}

.map-introduction h1 {
    margin-bottom: clamp(24px, 3vw, 48px);
    font-size: clamp(28px, 3vw, 48px);
    font-weight: 500;
    line-height: 1.15;
}

.map-introduction p {
    max-width: 48ch;
    font-size: clamp(18px, 1.3vw, 28px);
    line-height: 1.45;
}

.map-stage {
    grid-area: map;
    position: relative;
    width: 100%;
    min-width: 0;
}

.denmark-map {
    display: block;
    width: 100%;
    height: auto;
}

.map-pin {
    position: absolute;
    left: var(--pin-x);
    top: var(--pin-y);

    display: flex;
    align-items: flex-end;
    justify-content: center;

    width: 44px;
    height: 52px;
    padding: 0;
    border: 0;

    background: transparent;
    transform: translate(-50%, -100%);
}

.map-pin img {
    display: block;
    width: 34px;
    height: auto;
    filter: drop-shadow(0 2px 3px rgba(255, 132, 17, 0.75));
}

.map-pin:hover img,
.map-pin[aria-expanded="true"] img {
    filter: drop-shadow(0 2px 3px rgb(0 0 0 / 35%));
}

@media (max-width: 1000px) {
    .map-page {
            grid-template-columns: minmax(0, 1fr);
            grid-template-areas:
                "intro"
                "map";
            grid-template-rows: auto auto;
            gap: 32px;
        }

    .map-introduction {
            text-align: center;
        }

    .map-introduction h1 {
            margin-bottom: 16px;
            font-size: clamp(26px, 4vw, 40px);
        }

    .map-introduction p {
            margin-inline: auto;
        }

    .map-stage {
            max-width: 560px;
            justify-self: center;
        }
}

/* #endregion */

/* #region INFORMATION CARD */

.station-card {
    grid-area: card;
    position: relative;
    inset: auto;

    width: 100%;
    max-width: none;
    min-width: 0;

    margin: 0;
    padding: 24px;

    border: 1px solid var(--line);
    border-radius: 26px;

    background: var(--card);
    color: var(--blue);
}

.station-card:not([open]) {
    display: none;
}

.station-close {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 44px;
    height: 44px;

    padding: 0;
    border: 0;
    background: transparent;

    font-size: 36px;
    line-height: 1;
}

.station-card h2 {
    padding-right: 28px;
    font-size: clamp(24px, 2.1vw, 34px);
    font-weight: 400;
    line-height: 1.15;
}

.station-card address {
    margin: 6px 0 16px;
    font-size: 16px;
    line-height: 1.35;
}

.station-body {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas:
        "information hours"
        "links hours";
    gap: 24px;
}

.station-information {
    grid-area: information;
    min-width: 0;
}

.station-social {
    display: block;
    padding-block: 6px;
    border-block: 1px solid var(--line);

    color: var(--orange);
    font-size: 14px;
    font-style: italic;
    overflow-wrap: anywhere;
}

.station-information p {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.station-hours {
    grid-area: hours;
    min-width: 0;
}

.station-hours h3 {
    padding-block: 6px;
    border-block: 1px solid var(--line);

    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    text-align: center;
}

.station-hours table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;

    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.station-hours th,
.station-hours td {
    padding: 3px 0;
    font-weight: 400;
}

.station-hours th {
    padding-right: 8px;
    text-align: left;
}

.station-hours td {
    text-align: right;
    white-space: nowrap;
}

.station-hours tr:nth-child(even) {
    color: var(--orange);
}

.station-links {
    grid-area: links;
    display: flex;
    flex-wrap: wrap;
    align-self: end;
    gap: 10px;
}

.station-links a {
    flex: 1 1 auto;
    padding: 6px 10px;

    border: 1px solid var(--orange);
    border-radius: 4px;

    color: var(--orange);
    text-align: center;
    text-decoration: none;
}

.station-links a:hover {
    background: var(--paper);
}

@media (min-width: 1001px) and (max-width: 1300px) {
    .station-body {
            grid-template-columns: minmax(0, 1fr);
            grid-template-areas:
                "information"
                "hours"
                "links";
        }
}

@media (max-width: 1000px) {
    .station-card {
            position: fixed;
            inset: 0;
    
            width: calc(100% - 24px);
            max-width: 460px;
    
            max-height: calc(100vh - 24px);
            max-height: calc(100dvh - 24px);
            overflow-y: auto;
    
            margin: auto;
            padding: 48px 20px 24px;
            text-align: center;
        }

    .station-card::backdrop {
            background: rgb(255 255 241 / 70%);
        }

    .station-card h2 {
            padding-right: 0;
        }

    .station-body {
            grid-template-columns: minmax(0, 1fr);
            grid-template-areas:
                "information"
                "hours"
                "links";
        }

    .station-hours table {
            max-width: 280px;
            margin-inline: auto;
            font-size: 18px;
        }

    .station-links {
            margin-top: 8px;
        }
}

/* #endregion */

/* #region MAP CONTACT INFORMATION */

.station-contact-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;

    gap: 6px 16px;
    padding-block: 6px;

    border-block: 1px solid var(--line);
}

.station-contact-row a {
    min-width: 0;

    color: var(--orange);
    font-size: 14px;
    line-height: 1.4;

    overflow-wrap: anywhere;
    text-underline-offset: 3px;
}

.station-contact-row .station-social {
    display: inline;
    padding: 0;
    border: 0;
}

.station-reservations {
    margin-top: clamp(24px, 3vw, 40px);
}

.station-reservations h3 {
    margin: 0 0 8px;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.station-reservations a {
    display: inline-block;
    max-width: 100%;

    color: var(--orange);
    font-size: 14px;
    line-height: 1.4;

    overflow-wrap: anywhere;
    text-underline-offset: 3px;
}

@media (max-width: 1000px) {
    .station-contact-row {
            justify-content: center;
        }

    .station-reservations {
            text-align: center;
        }
}

/* #endregion */
