/*
Theme Name: Hokuto-Kai Block Theme
Author: Marcus Wahlgren
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.0
*/

/* ==========================================================================
   1. RESET / BASE
   ========================================================================== */

:root :where(.is-layout-flow) > *,
:root :where(.is-layout-constrained) > * {
    margin-block-start: 0;
    margin-block-end: 0;
}

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

* {
    margin:0;
    padding:0;
}

html {
    scroll-behavior: smooth;
}


/* ==========================================================================
   2. LAYOUT / STRUCTURE
   ========================================================================== */

.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 100;
}

.section,
.section-gray,
.is-style-section,
.is-style-section-gray,
.hero,
footer {
    scroll-margin-top: 94px;
}

.wp-site-blocks,
main {
    overflow: visible;
}


/* ==========================================================================
   3. CARD — hover
   ========================================================================== */

.is-style-card,
.is-style-card-flex {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.is-style-card:hover,
.is-style-card-flex:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}


/* ==========================================================================
   4. HEADER NAVIGATION
   ========================================================================== */

/* Grundlink */
header .wp-block-navigation-item__content {
    position: relative;
    transition: color 0.15s ease-in-out;
}

/* Hover underline */
header .wp-block-navigation-item__content::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--wp--preset--color--accent);
    transition: width 0.2s ease;
}

header .wp-block-navigation-item__content:hover {
    color: var(--wp--preset--color--accent) !important;
}

header .wp-block-navigation-item__content:hover::after {
    width: 100%;
}

/* Aktiv side */
header .wp-block-navigation-link.current-menu-item > a {
    color: var(--wp--preset--color--accent) !important;
    font-weight: 700 !important;
}


/* ==========================================================================
   5. FOOTER NAVIGATION
   ========================================================================== */

.footer-nav .wp-block-navigation__container {
    gap: 6px;
}

.footer-nav .wp-block-navigation-item {
    margin: 0;
    padding: 0;
}

.footer-nav a {
    font-size: var(--wp--preset--font-size--custom-3);
    line-height: 1.6;
    font-weight: 400;
    color: var(--wp--preset--color--tekst-graa);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-nav .wp-block-navigation-item__content:hover,
.footer-col a:hover {
    color: var(--wp--preset--color--baggrund);
}

/* Fjern navbar underline i footer */
.footer-nav a::after {
    display: none;
}


/* ==========================================================================
   6. MOBILMENU IKONER
   ========================================================================== */

.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
    stroke: var(--wp--preset--color--accent);
    fill: var(--wp--preset--color--accent);
}

.wp-block-navigation__responsive-container-close svg {
    width: 32px;
    height: 32px;
}


/* ==========================================================================
   7. FOOTER CREDIT
   ========================================================================== */

.footer-credit {
    position: relative;
}

.footer-credit::before {
    content: "";
    position: absolute;
    top: 0;
    left: 60px;
    right: 60px;
    border-top: 1px solid var(--wp--preset--color--footer-border);
}

/* ==========================================================================
   8. TABEL
   ========================================================================== */

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table thead tr {
    background-color: var(--wp--preset--color--tekst);
    color: var(--wp--preset--color--baggrund);
}

.wp-block-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--wp--preset--color--baggrund);
    border: none !important;
}

.wp-block-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--wp--preset--color--tekst);
    border: none !important;
    border-bottom: 1px solid var(--wp--preset--color--border) !important;
}

.wp-block-table tbody tr:nth-child(even) {
    background-color: var(--wp--preset--color--baggrund-graa);
}

.wp-block-table tbody tr:hover {
    background-color: #f0f0f0;
}


/* ==========================================================================
   9. TRUSTBAR
   ========================================================================== */

.trustbar-gruppe .wp-block-column.trust-divider {
    width: 1px;
    background-color: rgba(255,255,255,0.3);
    align-self: stretch;
}


/* ==========================================================================
   10. GRID / UTILITY-KLASSER
   ========================================================================== */

.is-style-grid-16 {
    gap: 16px;
}

.is-style-grid-16 + .is-style-grid-16 {
    margin-top: 16px;
}

.hokuto-text,
.hokuto-billede {
    flex: 1;
}

.trin-nummer {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
    margin: 0 auto 16px;
}


/* ==========================================================================
   11. TIDSLINJE
   ========================================================================== */

.tidslinje {
    position: relative;
    padding-left: 24px;
}

.tidslinje::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--wp--preset--color--border);
}

.tl-item {
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    transition:
            opacity 0.5s ease,
            transform 0.5s ease;
}

.tl-item::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--wp--preset--color--accent);
    border: 2px solid var(--wp--preset--color--baggrund);
    box-shadow: 0 0 0 2px var(--wp--preset--color--accent);
}

.tl-item.synlig {
    opacity: 1;
    transform: translateX(0);
}


/* ==========================================================================
   12. BUTTONS
   ========================================================================== */

/*
   Brug denne klasse på knapper der skal have accent-kant.
   Undgår at alle centrerede knapper bliver påvirket.
*/

.wp-block-buttons.is-content-justification-center .wp-block-button:not(.is-style-outline) .wp-block-button__link {
    border: 2px solid var(--wp--preset--color--accent);
}

.wp-block-buttons.is-content-justification-center .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    border: 2px solid color-mix(in srgb, var(--wp--preset--color--accent) 85%, black);
}

.wp-block-button__link.has-baggrund-background-color:hover {
    background-color: color-mix(in srgb, var(--wp--preset--color--baggrund) 85%, black) !important;
    border-color: var(--wp--preset--color--accent) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: rgba(0,0,0,0.15);
}


/* ==========================================================================
   13. FACILITETER
   ========================================================================== */

.facilitet-img-wrapper {
    overflow: hidden;
}

.facilitet-img-wrapper img {
    transition: transform 0.3s ease;
}

.facilitet-item:hover .facilitet-img-wrapper img {
    transform: scale(1.05);
}


/* ==========================================================================
   14. KONTAKT / INFO IKONER
   ========================================================================== */

.kontakt-icon,
.info-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(221,51,51,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


/* ==========================================================================
   15. SOCIALE KNAPPER
   ========================================================================== */

.sociale-btn {
    background-color: var(--wp--preset--color--baggrund-graa);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wp--preset--color--tekst);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sociale-btn:hover {
    background-color: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--baggrund);
    border-color: var(--wp--preset--color--accent);
}


/* ==========================================================================
   16. SPONSORER
   ========================================================================== */

.ok-tekst a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   17. MOBIL / RESPONSIVE
   ========================================================================== */

@media (max-width: 991px) {

    /* Skjul sidste header-kolonne */
    header .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column:last-child {
        display: none;
    }


    /* Mobilmenu */
    .wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none;
    }

    .wp-block-navigation .wp-block-navigation__responsive-container-open {
        display: flex;
    }

    .wp-block-navigation {
        justify-content: flex-end;
    }


    .wp-block-navigation__responsive-container-close {
        position: static;
        display: flex;
        justify-content: flex-end;
        padding-top: 34px;
        padding-right: 26px;
        width: 100%;
    }


    .wp-block-navigation__responsive-container-open svg {
        width: 36px;
        height: 36px;
    }


    .wp-block-navigation .is-menu-open .wp-block-navigation-item a,
    .wp-block-navigation .is-menu-open .wp-block-navigation-item__content,
    .wp-block-navigation .is-menu-open .wp-block-navigation-item__label {
        font-size: var(--wp--preset--font-size--custom-7);
        font-weight: 500;
    }


    .wp-block-navigation .is-menu-open .wp-block-navigation-item.current-menu-item a,
    .wp-block-navigation .is-menu-open .wp-block-navigation-item.current-menu-item a *,
    .wp-block-navigation .is-menu-open .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__label {
        font-weight: 700;
    }


    .wp-block-navigation .is-menu-open .wp-block-navigation__container {
        gap: var(--wp--preset--spacing--step-3);
    }


    /* Trustbar */
    .trustbar-gruppe {
        justify-content: space-around;
        padding: 24px 16px;
    }


    .trustbar-gruppe > .wp-block-column:not(.trust-divider) {
        flex: 0 1 auto;
        width: auto;
        max-width: 30%;
    }


    .trustbar-gruppe .has-custom-9-font-size {
        font-size: 20px;
    }


    .trustbar-gruppe .has-custom-2-font-size {
        font-size: 11px;
    }


    /* Sektioner */
    .is-style-section,
    .is-style-section-gray {
        padding: var(--wp--preset--spacing--step-3)
        var(--wp--preset--spacing--step-2);
    }


    /* Historie / wrappers */
    .wp-block-group.hokuto-wrapper {
        flex-direction: column;
        flex-wrap: wrap;
        gap: var(--wp--preset--spacing--step-3);
    }


    .wp-block-columns.historie-wrapper {
        gap: var(--wp--preset--spacing--step-3);
    }


    .wp-block-cover.hero {
        min-height: 380px !important;
        height: 380px !important;
    }


    /* Footer */
    .wp-block-columns.footer {
        padding: 24px 16px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--wp--preset--spacing--step-3);
    }


    .wp-block-columns.footer > .footer-col {
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
    }


    .footer-credit {
        padding: 24px 16px !important;
    }


    .footer-credit::before {
        left: 16px;
        right: 16px;
    }


    /* Mobilmenu overlay */
    header:has(.is-menu-open) {
        z-index: 999999;
        position: relative;
    }


    .wp-block-navigation__responsive-container.is-menu-open,
    .wp-block-navigation__responsive-container-dialog {
        z-index: 999999;
        background-color: var(--wp--preset--color--baggrund);
    }


    /* Column gaps */
    .wp-block-columns.bestyrelse-intro-split,
    .wp-block-columns.ok-wrapper,
    .wp-block-columns.sponsor-wrapper {
        gap: var(--wp--preset--spacing--step-2);
    }


    #find-os iframe {
        height: 250px;
    }
}


/* ==========================================================================
   18. DESKTOP — skjul luk ikon
   ========================================================================== */

@media (min-width: 992px) {

    .wp-block-navigation__responsive-container-close {
        display: none;
    }

}


/* ==========================================================================
   19. CONTACT FORM 7
   ========================================================================== */

.wpcf7 form {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.wpcf7 form p {
    margin: 0;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 6px;
    font-family: var(--wp--preset--font-family--barlow);
    font-size: var(--wp--preset--font-size--custom-4);
    background: var(--wp--preset--color--baggrund);
}

.form-textarea {
    height: 94px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--accent);
}

.form-button {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--baggrund);
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: var(--wp--preset--font-size--custom-4);
    font-family: var(--wp--preset--font-family--barlow);
    cursor: pointer;
    transition: 0.2s ease;
    width: 100%;
}

.form-button:hover {
    background: color-mix(in srgb, var(--wp--preset--color--accent) 85%, black);
}

.wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 12px;
}


.email-row input {
    width: 100%;
    box-sizing: border-box;
}

.email-row {
    display: flex;
    gap: 12px;
    width: 100%;
    align-items: stretch;
}


.email-row p {
    display: contents;
    margin: 0;
}


.email-row .wpcf7-form-control-wrap {
    flex: 1;
    min-width: 0;
    display: block;
}

.wpcf7-spinner {
    display: none;
}

/* Gør den absolut sidste instans af form-wrappers mindre i bundmarginen */
.wpcf7-form-control-wrap:has(textarea) {
    display: block;
    margin-bottom: 6px !important;
}

.cf-turnstile {
    margin-bottom: 6px;
}

/* ==========================================================================
   20. PRØVETIME
   ========================================================================== */

.provetime-wrapper {
    display: flex;
    align-items: stretch;
}


.provetime-form,
.provetime-billede {
    flex: 1;
}


.provetime-billede {
    display: flex;
}


.provetime-billede figure {
    flex: 1;
    margin: 0;
}


.provetime-billede img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ==========================================================================
   21. HONEYPOT
   ========================================================================== */

.honeypot-142-wrap,
.honeypot-143-wrap {
    display: none;
}


/* ==========================================================================
   22. DAGSORDEN
   ========================================================================== */

.dagsorden-liste {
    margin-left: 20px !important;
    margin-right: 0 !important;
}