/* Custom overrides for the flat site. Loaded after the theme stylesheets so these win. */

:root { --gl-accent: #86bad0; --gl-accent-dark: #3399cc; --gl-ink: #1f2933; }

body {
    font-family: "Muli", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.site-title a { color: #181818; }
.site-description { color: #82868b; }
.trail-items li:not(:last-child):after { content: "/"; padding: 0 5px; }

/* Theme wraps everything in #page with max-width 1920px + a gray box-shadow + an
   overflow-x: hidden clip. All three made the header bands stop short of the
   viewport edge on wide monitors; kill them so chrome stretches edge-to-edge. */
#page { max-width: none; box-shadow: none; overflow-x: visible; }

/* Standardised site header: slightly taller than the logo + 8px dark accent bar
   underneath on every page. Whole header bar (logo + nav) is white. Logo and nav
   are flex-aligned so the nav pills sit on the logo's vertical center.
   The 8px divider is a border-bottom on #masthead itself (which is width: 100%
   from the legacy theme) so it spans the entire viewport without relying on any
   flex-stretch or wrapper width — bullet-proof against cascade quirks. */
.site-logo img { max-height: 72px; }
#masthead { border-bottom: 8px solid var(--gl-ink); }
#masthead .wrapper { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
#masthead .site-branding { float: none; padding: 6px 0; min-height: 0; margin: 0; }
.classic-menu .main-navigation { float: none; padding: 0; }
.classic-menu .main-navigation { background-color: #fff; }
/* Legacy decorative pseudos extend a 1000px white strip past the right edge of the
   wrapper/nav and sit ~102px tall — that covered the right ~25% of the header
   divider on wide monitors. They served no real purpose with a white header, so
   kill them outright. */
.classic-menu #masthead .wrapper:after,
.classic-menu #masthead .wrapper:before,
.main-navigation.enable:after,
.classic-menu .main-navigation:after,
.classic-menu .main-navigation:before { display: none !important; content: none !important; }
/* Old standalone 8px-band div is now redundant. */
#banner-image { display: none; }

/* ---------- Header nav pills -------------------------------------------- */

.classic-menu #primary-menu { display: flex; gap: 10px; align-items: center; margin: 0; padding: 0; list-style: none; }
.classic-menu #primary-menu > li { float: none; margin: 0; padding: 0; }
.classic-menu #primary-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(134, 186, 208, .14);
    color: var(--gl-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .02em;
    line-height: 1;
    border: 1px solid transparent;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.classic-menu #primary-menu > li > a:hover,
.classic-menu #primary-menu > li > a:focus {
    background: var(--gl-accent);
    color: #fff;
    transform: translateY(-1px);
}
.classic-menu #primary-menu > li.current-menu-item > a {
    background: var(--gl-accent-dark);
    color: #fff;
}
.gl-nav-icon { font-size: 14px; }

/* ---------- Mobile hamburger toggle ------------------------------------- */

/* Hidden on desktop. Styled as a bare icon — no button chrome, no border, no
   background. Only the icon shows; padding gives the tap target. */
.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 10px;
    margin: 0;
    cursor: pointer;
    color: var(--gl-ink);
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
}
.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle:active {
    background: transparent;
    border: 0;
    outline: none;
    color: var(--gl-accent-dark);
}
.menu-toggle:focus-visible { outline: 2px solid var(--gl-accent); outline-offset: 2px; border-radius: 4px; }
.gl-menu-icon { font-size: 24px; line-height: 1; transition: transform .2s ease, opacity .2s ease; }
.gl-menu-icon-close { display: none; }
.main-navigation.menu-open .gl-menu-icon-open { display: none; }
.main-navigation.menu-open .gl-menu-icon-close { display: inline-block; }

@media (max-width: 768px) {
    /* Anchor the masthead so absolutely-positioned children inside it size to the
       viewport. .wrapper is forced back to static so it isn't the containing block
       (otherwise the dropdown gets clipped to the 90%-wide wrapper). */
    #masthead { position: relative; }
    #masthead .wrapper {
        position: static;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0;
        padding-top: 6px;
        padding-bottom: 6px;
    }
    #masthead .site-branding {
        margin: 0 auto;
        text-align: center;
        flex: 0 0 auto;
    }
    .site-logo { display: inline-block; }
    .site-logo img { max-height: 56px; }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
    }
    .menu-label { display: none; }

    /* Dropdown drops below the entire masthead (so its containing block is
       #masthead, full viewport width). Plain display switch — no transition. */
    .main-navigation { position: static; padding: 0; margin: 0; }
    .main-navigation .menu-top-menu-container {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        width: 100%;
        background: #fff;
        padding: 12px 16px 16px;
        z-index: 4;
        border-top: 1px solid #eef1f4;
        box-shadow: 0 12px 24px rgba(20, 30, 45, .12);
    }
    .main-navigation.menu-open .menu-top-menu-container { display: block; }

    /* Stacked pills, full-width tap targets. */
    .classic-menu #primary-menu { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 0; padding: 0; list-style: none; }
    .classic-menu #primary-menu > li { display: block; margin: 0; padding: 0; }
    .classic-menu #primary-menu > li > a { display: flex; justify-content: flex-start; padding: 12px 18px; font-size: 15px; }
}

/* Per-page heading strip (only rendered for calculator detail pages — they have no
   H1/H2 in their body_html, just an iframe). Tight padding, ink-colored text. */
.page-site-header { padding: 18px 0 6px; text-align: center; }
.page-site-header .page-title { color: var(--gl-ink); font-size: 28px; font-weight: 600; letter-spacing: .02em; margin: 0; line-height: 1.3; }

/* ---------- Content section spacing -------------------------------------- */

#inner-content-wrapper.page-section { padding-top: 28px; padding-bottom: 48px; }
.entry-content > p { line-height: 1.65; }
.entry-content > p + p,
.entry-content > p + br { margin-top: 1em; }
.entry-content .wp-block-separator { margin: 32px auto; max-width: 220px; opacity: .6; }
.entry-content .wp-block-heading { margin-top: 1.2em; margin-bottom: .6em; }
.entry-content .wp-block-columns { margin: 28px 0; gap: 32px; }
.entry-content .wp-block-column > h4.wp-block-heading { margin-top: 0; }
.entry-content .wp-block-image { margin: 32px 0; }
.entry-content .wp-block-button { margin: 32px 0 8px; }

/* CTA button: soft shadow + lift on hover. */
.wp-block-button__link {
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    padding: 14px 28px;
    border-radius: 4px;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
    background-color: var(--gl-accent-dark) !important;
}

/* ---------- Home page: hero-style landing that fills the viewport. ------- */

body.home .site { display: flex; flex-direction: column; min-height: 100vh; }
body.home #content { flex: 1 0 auto; display: flex; flex-direction: column; }
body.home .site-footer { flex-shrink: 0; }
body.home #inner-content-wrapper.page-section { padding-top: 36px; padding-bottom: 36px; }
/* Collapse the WP filler <p></p> blocks that pad the body_html with empty paragraphs. */
.entry-content > p:empty { display: none; }
body.home .entry-content > h2.wp-block-heading { margin: 4px 0 18px; font-size: 30px; }
body.home .entry-content > p { font-size: 16px !important; line-height: 1.55; margin: 18px 0; }
body.home .entry-content > br { display: none; }
body.home .entry-content .wp-block-separator { margin: 14px auto; }
body.home .entry-content .wp-block-button { margin: 14px 0 4px; }
body.home .wp-block-button__link { padding: 12px 32px; font-size: 15px; }

/* ---------- Footer ------------------------------------------------------- */

/* Footer row spans the full viewport so Dingoblue sits at the actual right edge,
   not at the right edge of the 1200px wrapper. ABN flexes to fill remaining space. */
.site-info .gl-footer-row.wrapper { width: auto; max-width: none; margin: 0; padding-left: 24px; padding-right: 24px; }
.site-info .gl-footer-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 24px; }
.site-info .gl-footer-row > span { display: block; margin: 0; }
.site-info .gl-footer-left { flex: 1 1 auto; min-width: 0; text-align: left; }
.site-info .gl-footer-right { flex: 0 0 auto; text-align: right; margin-left: auto; }
.site-info .gl-footer-right a { color: inherit; text-decoration: underline; }
.site-info .gl-footer-right a:hover, .site-info .gl-footer-right a:focus { color: var(--gl-accent); }

/* ---------- Services 2x2 panel grid ------------------------------------- */

.gl-service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin: 36px 0;
}
.gl-service-card {
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.gl-service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(20, 30, 45, .1);
    border-color: var(--gl-accent);
}
.gl-service-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(134, 186, 208, .12);
    color: var(--gl-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    margin-bottom: 18px;
}
.gl-service-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--gl-ink);
}
.gl-service-body p { margin: 0 0 12px; line-height: 1.6; }
.gl-service-body ul { margin: 8px 0 12px 18px; line-height: 1.55; }
.gl-service-body ul li { margin-bottom: 4px; }

@media (max-width: 768px) {
    .gl-service-grid { grid-template-columns: 1fr; gap: 18px; }
    .gl-service-card { padding: 24px 20px; }
}

/* ---------- Calculator iframe panel ------------------------------------- */

.gl-calc-panel {
    max-width: 880px;
    margin: 24px auto;
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(20, 30, 45, .06);
    padding: 16px;
    overflow: hidden;
}
.gl-calc-iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
}

/* ---------- Calculators card grid --------------------------------------- */

.gl-calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 36px 0;
}
.gl-calc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 8px;
    text-decoration: none;
    color: var(--gl-ink);
    text-align: center;
    min-height: 120px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease;
}
.gl-calc-card:hover,
.gl-calc-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 30, 45, .08);
    border-color: var(--gl-accent);
    color: var(--gl-accent-dark);
}
.gl-calc-icon {
    font-size: 32px;
    color: var(--gl-accent);
    margin-bottom: 12px;
    transition: color .15s ease, transform .15s ease;
}
.gl-calc-card:hover .gl-calc-icon,
.gl-calc-card:focus .gl-calc-icon { color: var(--gl-accent-dark); }
.gl-calc-label { font-size: 14px; font-weight: 600; line-height: 1.35; }

@media (max-width: 1024px) { .gl-calc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .gl-calc-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ---------- Contact form ------------------------------------------------- */

/* Fields had no visible background, blending into the page. Give them a darker
   grey shade so they read as inputs. */
#contact-form-wrap .wpcf7-form-control.wpcf7-text,
#contact-form-wrap .wpcf7-form-control.wpcf7-email,
#contact-form-wrap .wpcf7-form-control.wpcf7-tel,
#contact-form-wrap .wpcf7-form-control.wpcf7-textarea {
    background-color: #d8dde3;
    border: 1px solid #b6bdc6;
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--gl-ink);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
#contact-form-wrap .wpcf7-form-control.wpcf7-text:focus,
#contact-form-wrap .wpcf7-form-control.wpcf7-email:focus,
#contact-form-wrap .wpcf7-form-control.wpcf7-tel:focus,
#contact-form-wrap .wpcf7-form-control.wpcf7-textarea:focus {
    background-color: #c8cfd8;
    border-color: var(--gl-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(134, 186, 208, .25);
}
#contact-form-wrap label { display: block; font-weight: 600; margin-bottom: 4px; }
#contact-form-wrap p { margin: 0 0 16px; }

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 768px) {
    #inner-content-wrapper.page-section { padding-top: 28px; padding-bottom: 32px; }
    .entry-content > p { font-size: 16px !important; }
    .entry-content .wp-block-columns { gap: 16px; }
    .wp-block-columns.has-4-columns > .wp-block-column,
    .wp-block-columns.has-3-columns > .wp-block-column,
    .wp-block-columns.has-2-columns > .wp-block-column { flex-basis: 100% !important; margin-bottom: 1.25rem; }
    .site-info .gl-footer-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .site-info .gl-footer-right { text-align: left; }
}
