/* ==========================================================================
   Fredericia Bankocenter – FDF Støtteforening
   Vanilla CSS. No framework. Rebuilt 2026 from the original 2016 site.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
    --brand: #0a4d8c;          /* FDF blue */
    --brand-dark: #073a6b;
    --accent: #e8a23c;         /* warm gold – cosy bingo feel */
    --ink: #1f2933;
    --muted: #5b6770;
    --bg: #ffffff;
    --bg-soft: #f4f6f9;
    --line: #e2e8f0;
    --white: #ffffff;

    --maxw: 1120px;
    --radius: 12px;
    --shadow: 0 6px 24px rgba(15, 35, 60, 0.10);
    --header-h: 68px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
        Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

h1,
h2,
h3 {
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 0.6em;
}

h2.section-title {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    position: relative;
    padding-bottom: 0.4rem;
}

h2.section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 0.5rem;
    background: var(--accent);
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

section {
    scroll-margin-top: calc(var(--header-h) + 12px);
}

.section-pad {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 0.6rem 1rem;
    z-index: 200;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    left: 0;
}

/* ---- Header / navigation ------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    color: var(--brand);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.brand:hover {
    text-decoration: none;
}

.brand-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    display: block;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.97rem;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    background: var(--bg-soft);
    color: var(--brand);
    text-decoration: none;
}

.primary-nav a.is-current {
    color: var(--brand);
    background: rgba(10, 77, 140, 0.08);
}

/* Hamburger */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero carousel ------------------------------------------------------- */
.carousel {
    position: relative;
    height: clamp(260px, 46vw, 480px);
    overflow: hidden;
    background: #111;
    touch-action: pan-y;
}

.carousel-track {
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 1.25rem 1.4rem;
    color: #fff;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
}

.slide figcaption h2 {
    color: #fff;
    margin: 0 0 0.2rem;
    font-size: clamp(1.1rem, 3.4vw, 1.9rem);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.slide figcaption p {
    margin: 0;
    font-size: clamp(0.9rem, 2.4vw, 1.15rem);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s ease;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev {
    left: 12px;
}

.carousel-btn.next {
    right: 12px;
}

.carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.7rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 2;
}

.carousel-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dots button.is-active {
    background: #fff;
    transform: scale(1.1);
}

/* ---- About --------------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.about-text p {
    margin: 0 0 0.9rem;
}

.about-media {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.about-media img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.note {
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    font-weight: 600;
}

/* ---- Facebook button ----------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    background: var(--brand);
    color: #fff;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover,
.btn:focus-visible {
    background: var(--brand-dark);
    text-decoration: none;
    color: #fff;
}

.btn:active {
    transform: translateY(1px);
}

.btn-facebook {
    background: #1877f2;
}

.btn-facebook:hover,
.btn-facebook:focus-visible {
    background: #0e5fcc;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ---- Support cards ------------------------------------------------------- */
.support {
    background: var(--bg-soft);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 35, 60, 0.16);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--line);
}

.card-body {
    padding: 1.2rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: var(--brand);
}

.card-body p {
    margin: 0;
    color: var(--muted);
}

/* ---- Find / map ---------------------------------------------------------- */
.map-wrap {
    margin-top: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    line-height: 0;
}

.map-wrap iframe {
    width: 100%;
    height: 420px;
    border: 0;
    display: block;
}

.map-link {
    margin-top: 1rem;
}

/* ---- Contact ------------------------------------------------------------- */
.contact {
    background: var(--brand);
    color: #fff;
}

.contact h2 {
    color: #fff;
}

.contact h2.section-title::after {
    background: var(--accent);
}

.contact a {
    color: #fff;
    text-decoration: underline;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
    font-size: 1.05rem;
}

.contact-list li {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
}

.contact-list .label {
    font-weight: 700;
    min-width: 5.5rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
    background: var(--brand-dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    padding-block: 1.1rem;
    text-align: center;
}

.site-footer a {
    color: #fff;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 820px) {
    .nav-toggle {
        display: flex;
    }

    .primary-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .primary-nav.is-open {
        max-height: 70vh;
    }

    .primary-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 1rem 1rem;
    }

    .primary-nav a {
        padding: 0.85rem 0.5rem;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
    }

    .primary-nav li:last-child a {
        border-bottom: 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-media {
        position: static;
        order: -1;
        max-width: 460px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Motion preferences -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .slide,
    .nav-toggle-bar,
    .card,
    .primary-nav {
        transition: none;
    }
}
