/* =========================
   HEADER
========================= */

.site-header {
    width: 100%;
    padding: 24px 40px;
    background: #ffffff;
    border-bottom: 1px solid #e9ebef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #222;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand span {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-nav a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

.site-nav a:hover {
    color: #7657d9;
}

.mobile-menu {
    display: none;
}


/* =========================
   FOOTER
========================= */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 30px 40px;
    background: #ffffff;
    border-top: 1px solid #e9ebef;
    color: #777b84;
    font-size: 14px;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: 40px;
}

.footer-nav a {
    color: #777b84;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.footer-nav a:hover {
    color: #7657d9;
}

.back-to-top {
    display: none;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #333;
    font-weight: 700;
    text-decoration: none;
}

.footer-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.site-footer>p {
    margin-left: auto;
}


/* =========================
   REPORT A PROBLEM
========================= */

.report-problem-link {
    color: #777b84;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.report-problem-link:hover {
    color: #7657d9;
}


/* MODAL */

.report-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.report-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.report-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.report-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.report-modal-content h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.6px;
    color: #1e1e22;
}

.report-modal-intro {
    margin: 0 0 25px;
    color: #666b75;
    font-size: 15px;
}


/* CLOSE BUTTON */

.report-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #777b84;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.report-modal-close:hover {
    background: #f7f8fa;
    color: #222;
}


/* FORM */

.report-form {
    display: flex;
    flex-direction: column;
}

.report-form label {
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

.report-form label span {
    color: #777b84;
    font-weight: 400;
}

.report-form select,
.report-form textarea,
.report-form input[type="email"] {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 13px;
    background: #ffffff;
    border: 1px solid #d9dce2;
    border-radius: 8px;
    color: #222;
    font-family: inherit;
    font-size: 15px;
    outline: none;
}

.report-form select:focus,
.report-form textarea:focus,
.report-form input[type="email"]:focus {
    border-color: #7657d9;
    box-shadow: 0 0 0 3px rgba(118, 87, 217, 0.12);
}

.report-form textarea {
    min-height: 130px;
    resize: vertical;
}

.report-form select {
    cursor: pointer;
}


/* SUBMIT BUTTON */

.report-submit {
    width: 100%;
    margin-top: 5px;
    padding: 13px 18px;
    background: #7657d9;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.report-submit:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}


/* HONEYPOT */

.hidden-field {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    display: none !important;
}


/* SUCCESS MESSAGE */

.report-success {
    text-align: center;
    padding: 20px 0 5px;
}

.report-success h2 {
    margin-bottom: 8px;
}

.report-success p {
    margin: 0 0 25px;
    color: #666b75;
}

.report-success-close {
    padding: 11px 22px;
    background: #7657d9;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.report-success-close:hover {
    opacity: 0.92;
}

/* =========================
   GUIDE COMPONENTS
========================= */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #777;
}

.breadcrumbs a {
    color: #7657d9;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.guide-card {
    background: #fff;
    border: 1px solid #e3e3e8;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.guide-card a {
    color: #7657d9;
}

.guide-card a:hover {
    text-decoration: underline;
}

.related-guides {
    margin-top: 45px;
    padding-top: 35px;
    margin-bottom: 50px;
    border-top: 1px solid #e3e3e8;
}

.related-guides h2 {
    margin-top: 0;
}

.related-guides ul {
    margin-bottom: 0;
}

.related-guides a {
    color: #7657d9;
}

.related-guides a:hover {
    text-decoration: underline;
}

.faq {
    margin-bottom: 45px;
}

.faq h2 {
    margin-bottom: 15px;
    color: #222;
    font-size: 26px;
}

.faq details {
    border-top: 1px solid #e5e7eb;
}

.faq details:last-child {
    border-bottom: 1px solid #e5e7eb;
}

.faq summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 35px 16px 0;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "⌄";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #222;
    transition: transform 0.25s ease;
}

.faq details[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq summary:hover {
    color: #7657d9;
}

.faq summary:hover::after {
    color: #7657d9;
}

.faq details p {
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0 35px 0 0;
    color: #555;
    transition: max-height 0.3s ease, padding-bottom 0.3s ease;
}

/* =========================
   MOBILE BACK TO TOP
========================= */

.mobile-back-to-top {
    display: none;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .site-header {
        padding: 18px 16px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu {
        display: block;
        position: relative;
    }

    .menu-button {
        width: auto;
        margin: 0;
        padding: 8px 10px;
        background: transparent;
        color: #222;
        border: none;
        font-size: 24px;
        line-height: 1;
    }

    .menu-button:hover {
        background: transparent;
        color: #7657d9;
    }

    .mobile-nav {
        display: none;
        position: absolute;
        top: 45px;
        right: 0;
        min-width: 140px;
        padding: 8px 0;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
        z-index: 100;
    }

    .mobile-nav a {
        display: block;
        padding: 10px 16px;
        color: #333;
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
    }

    .mobile-nav a:hover {
        background: #f7f8fa;
        color: #7657d9;
    }

    .brand img {
        width: 38px;
        height: 38px;
    }

    .brand span {
        font-size: 18px;
    }

    .guide-card {
        padding: 28px 20px;
    }

    .breadcrumbs {
        display: none;
    }


    /* FOOTER */

    .site-footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 25px 18px;
        text-align: center;
    }

    .site-footer .footer-brand {
        justify-content: center;
    }

    .site-footer .back-to-top {
        text-align: center;
    }

    .site-footer>p {
        text-align: center;
        margin: 5px 0 0;
    }

    .footer-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .footer-nav a {
        display: none;
    }

    .footer-nav .report-problem-link,
    .footer-nav .footer-terms,
    .footer-nav .footer-privacy,
    .footer-nav .footer-contact,
    .footer-nav .privacy-settings-link {
        display: inline-block;
    }

    body[data-page="how-to-write-quote"] .footer-nav .footer-quote-builder,
    body[data-page="tradie-quote-template"] .footer-nav .footer-quote-builder,
    body[data-page="how-to-calculate-hourly-rate"] .footer-nav .footer-quote-builder,
    body[data-page="how-much-to-charge"] .footer-nav .footer-quote-builder {
        display: inline-block;
    }

    .back-to-top {
        display: block;
        color: #7657d9;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        margin-top: 5px;
        text-align: center;
    }

    .back-to-top:hover {
        color: #6346c2;
    }


    /* REPORT MODAL */

    .report-modal.is-open {
        align-items: flex-start;
        padding: 15px;
    }

    .report-modal-content {
        max-height: calc(100vh - 30px);
        padding: 30px 22px 25px;
        border-radius: 12px;
    }

    .report-modal-content h2 {
        font-size: 25px;
        padding-right: 30px;
    }

    .report-modal-intro {
        margin-bottom: 22px;
    }

    .mobile-back-to-top {
        display: flex;
        position: fixed;
        right: 18px;
        bottom: 18px;
        z-index: 999;

        width: 44px;
        height: 44px;

        align-items: center;
        justify-content: center;

        padding: 0;

        border: none;
        border-radius: 50%;

        background: rgba(118, 87, 217, 0.65);
        color: #fff;

        font-size: 24px;
        line-height: 1;

        cursor: pointer;

        opacity: 0;
        visibility: hidden;

        transform: translateY(10px);

        transition:
            opacity 0.2s ease,
            visibility 0.2s ease,
            transform 0.2s ease;
    }

    .mobile-back-to-top span {
        display: block;
        transform: translateY(-2px);
    }

    .mobile-back-to-top.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-back-to-top:active {
        background: rgba(118, 87, 217, 0.65);
        transform: translateY(0) scale(0.94);
    }

    .mobile-back-to-top:hover,
    .mobile-back-to-top:focus,
    .mobile-back-to-top:focus-visible {
        background: rgba(118, 87, 217, 0.65);
    }

}

/* =========================================
   ANALYTICS CONSENT BANNER
========================================= */

#nl-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;

    width: calc(100% - 40px);
    max-width: 440px;
    box-sizing: border-box;

    padding: 24px;
    background: #ffffff;
    color: #222222;
    border: 1px solid #dddddd;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);

    font-family: inherit;
}

#nl-consent-banner[hidden] {
    display: none;
}

#nl-consent-banner h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

#nl-consent-banner p {
    margin: 0 0 20px;
    line-height: 1.6;
    font-size: 0.95rem;
}

#nl-consent-banner a {
    color: #1769aa;
    text-decoration: underline;
}

.nl-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nl-consent-buttons button {
    flex: 1 1 140px;
    padding: 11px 14px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    background: #f5f5f5;
    color: #222222;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nl-consent-buttons button:hover {
    background: #e8e8e8;
}

.nl-consent-buttons button:focus-visible,
#nl-consent-banner a:focus-visible {
    outline: 3px solid #1769aa;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    #nl-consent-banner {
        left: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
        padding: 18px;
    }
}

/* ACCESSIBILITY: KEYBOARD FOCUS */

:where(button,
    input,
    textarea,
    select,
    a,
    [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 3px solid #7657d9;
    outline-offset: 3px;
}