/* Kun tilføjelser til BFD's eksisterende layout – style.css ændres ikke. */

/* Underlink på forsiden, placeret i afsnittet 'Lær bridge' */
.bfd-subpage-links {
    margin: 22px 0 34px;
    display: flex;
    justify-content: center;
}

.bfd-subpage-links a {
    display: inline-block;
    background: #17324d;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.15);
}

.bfd-subpage-links a:hover,
.bfd-subpage-links a:focus-visible {
    background: #295c83;
    color: #ffffff;
}

/* Ny underside med samme header og fem faner som forsiden */
main.bfd-melderuter-main {
    width: min(1300px, calc(100% - 40px));
}

.bfd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 22px;
    color: #355770;
    font-size: 0.95rem;
}

.bfd-breadcrumb a {
    color: #17324d;
}

.bfd-melderuter-intro {
    max-width: 940px;
    margin: 0 auto 26px;
    text-align: center;
    line-height: 1.55;
    font-size: 1.1rem;
}

.bfd-melderute-kort {
    margin: 10px 0 25px;
    padding: 18px;
    background: #f3f7fb;
    border: 1px solid #cbd9e6;
    border-radius: 12px;
}

.bfd-melderute-kort h3 {
    margin: 0 0 8px;
    font-size: 1.55rem;
    color: #17324d;
}

.bfd-melderute-kort p {
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Stationsskiltet passer både til skærmens bredde OG højde. */
.bfd-melderute-zoom {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: zoom-in;
}

.bfd-melderute-zoom:focus-visible {
    outline: 3px solid #17324d;
    outline-offset: 4px;
}

.bfd-melderute-zoom img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 75vh;
    max-height: 75dvh;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 6px;
}

/* Ved klik åbnes skiltet over hjemmesiden, altid med hele billedet synligt. */
.bfd-image-dialog {
    box-sizing: border-box;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    color: #ffffff;
    background: #10263b;
}

.bfd-image-dialog::backdrop {
    background: rgba(0, 0, 0, 0.82);
}

.bfd-image-dialog-indhold {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.bfd-image-dialog-top {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.bfd-image-dialog-top button {
    padding: 8px 16px;
    border: 0;
    border-radius: 7px;
    font-weight: bold;
    font-size: 1rem;
    color: #17324d;
    background: #ffffff;
    cursor: pointer;
}

.bfd-image-dialog-indhold > img {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 0;
    object-fit: contain;
}

.bfd-tilbage {
    text-align: center;
    margin: 25px 0 0;
}

.bfd-tilbage a {
    color: #17324d;
    font-weight: bold;
}

@media (max-width: 750px) {
    main.bfd-melderuter-main {
        width: calc(100% - 24px);
    }

    .bfd-melderute-kort {
        padding: 8px;
    }

    .bfd-melderute-kort h3 {
        font-size: 1.3rem;
    }
}

/* =========================
   MELDERUTE KLIK – 2NT
   Den procentbaserede klikzone følger BILLEDSTØRRELSEN
   både i almindelig visning og i stor visning.
   Billedformat 1448 × 1086 (4:3).
   ========================= */

.bfd-skilt-stage {
    position: relative;
    width: min(100%, calc(75dvh * 1.333333333));
    aspect-ratio: 1448 / 1086;
    margin: 0 auto;
}

.bfd-skilt-aabner {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: zoom-in;
}

.bfd-skilt-aabner img,
.bfd-skilt-stage--stor > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.bfd-skilt-aabner:focus-visible {
    outline: 3px solid #17324d;
    outline-offset: 3px;
}

/* Klik og highlight på 2NT – Bekkasin-rækken.
   Originalbillede 1448 x 1086: cirka x 912–1383, y 596–682.
   Ned og mod højre i forhold til forrige version; større felt,
   med fri afstand til 3 ruder ovenover og den turkise række nedenunder.
   Procentmål følger billedet i både almindelig og stor visning. */
.bfd-skilt-bekkasin {
    position: absolute;
    z-index: 2;
    display: block;
    left: 63.00%;
    top: 54.85%;
    width: 32.53%;
    height: 7.92%;
    border-radius: 14px;
    cursor: pointer;
    background: transparent;
    -webkit-tap-highlight-color: rgba(116, 43, 165, 0.25);
}

.bfd-skilt-bekkasin:hover,
.bfd-skilt-bekkasin:focus-visible {
    background: rgba(139, 39, 181, 0.16);
    outline: 3px solid #7422a2;
    outline-offset: -3px;
}

.bfd-kun-skaermlaeser {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bfd-skilt-stage--stor {
    width: min(100%, calc((100dvh - 100px) * 1.333333333));
    flex: 0 1 auto;
    margin: auto;
}

/* På browservinduer uden dvh bruger vi almindelig vh. */
@supports not (height: 1dvh) {
    .bfd-skilt-stage { width: min(100%, calc(75vh * 1.333333333)); }
    .bfd-skilt-stage--stor { width: min(100%, calc((100vh - 100px) * 1.333333333)); }
}

/* =========================
   BEKKASIN – KOMMENDE SKABELON
   ========================= */
.bfd-bekkasin-intro {
    text-align: center;
    max-width: 740px;
    margin: 0 auto 24px;
    font-size: 1.1rem;
    line-height: 1.65;
}

.bfd-bekkasin-kladde {
    max-width: 740px;
    margin: 0 auto;
    padding: 26px;
    border-radius: 12px;
    border: 1px solid #d6c6e9;
    background: #f8f5fc;
    text-align: center;
}

.bfd-bekkasin-kladde h3 {
    color: #542278;
    margin: 0 0 12px;
    font-size: 1.4rem;
}

.bfd-bekkasin-kladde p {
    margin: 0;
    line-height: 1.65;
}
