/* ==========================================================
   Header & Footer
   ========================================================== */
:root {
    --brand-green: #1a5632;
    --brand-green-dark: #134427;
    --brand-lime: #d8e45a;
    --text-body: #4d5b52;
    --white-80: rgba(255, 255, 255, 0.8);
    --white-10: rgba(255, 255, 255, 0.1);
    --font-body: "Figtree", sans-serif;
    --font-heading: "Cal Sans", "Figtree", sans-serif;
}

/* Bootstrap turns on CSS smooth scrolling for the whole page, but Lenis (animations.js) already smooths
   the mouse wheel. With both on they fight and scrolling can stick. (:root, to outrank Bootstrap's own
   :root rule.) */
:root {
    scroll-behavior: auto;
}

body {
    font-family: var(--font-body);
    color: var(--text-body);
    margin-bottom: 0;
}

/* One size for all body text and section labels inside page content (header and footer are outside
   <main>). Each page's stylesheet sets its own sizes, so !important is what keeps them all at 18px.
   Not included: hero taglines and big quotes, which are meant to stand out. */
main p:not(.page-hero-tagline):not(.bd-quote p):not(.story-card p) {
    font-size: 18px !important;
    line-height: 1.6 !important;
}

/* Every paragraph is justified, flush with both edges. */
p {
    text-align: justify;
}

/* Inside centred (or right-aligned) blocks the lines are still justified, but the last line - and a
   one-line paragraph - keeps the block's alignment. text-align-last is inherited, so setting it on the
   block reaches its paragraphs. */
.page-hero-wave,
.page-hero-center,
.footer-bottom,
.about-exp-box,
.services-heading,
.au-features,
.au-center-head,
.au-steps,
.story-center-head,
.story-cta,
.why-stat,
.needs-box,
.uy-cta-ways,
.ct-info-card,
.rd-missing {
    text-align-last: center;
}

.story-diff-list.is-left li {
    text-align-last: right;
}

@media (max-width: 991.98px) {
    .story-diff-list.is-left li {
        text-align-last: auto;
    }
}

/* The scroll animation (animations.js, .text-effect) splits a paragraph into one block per line, and a
   browser never justifies a block's last line - so every split line would stay ragged. Justify each
   split line except the paragraph's real last line. */
p.text-effect .split-line {
    text-align-last: justify;
}

p.text-effect .split-line:last-child {
    text-align-last: inherit;
}

main .section-subtitle,
main .pill-subtitle,
main .leaf-subtitle,
main .cta-pill {
    font-size: 18px !important;
    line-height: 1.2 !important;
}

/* ---------- Shared ---------- */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-green);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.5px;
}

.site-logo:hover {
    color: var(--brand-green);
}

.site-logo .logo-mark {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

/* Logo image (wwwroot/Images/ArnivaLogo-web.png, a trimmed web copy of ArnivaLogo.png). */
.site-logo img {
    display: block;
    width: auto;
    height: 58px;
}

/* Footer: the dark green logo sits on a light panel so it stays readable on the green background. */
.site-logo-light {
    padding: 12px 20px;
    border-radius: 14px;
    background: #fff;
}

.site-logo-light img {
    height: 62px;
}

.btn-lime {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    background: var(--brand-lime);
    color: var(--brand-green);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    border: 1px solid var(--brand-green);
    border-radius: 200px;
    box-shadow: 2px 2px 0 var(--brand-green);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.btn-lime:hover {
    background: var(--brand-green);
    color: #fff;
    box-shadow: 0 0 0 var(--brand-green);
    transform: translate(2px, 2px);
}

.social-list {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.social-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white-10);
    border: 1px solid var(--white-10);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.social-list a:hover {
    background: var(--brand-lime);
    color: var(--brand-green);
}

/* ---------- Top bar ---------- */
.header-topbar {
    background: var(--brand-green);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
}

.topbar-text {
    margin: 0;
}

.topbar-text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.topbar-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.topbar-info li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-info i {
    font-size: 18px;
}

.topbar-info a {
    color: #fff;
    text-decoration: none;
}

.topbar-info a:hover {
    color: var(--brand-lime);
}

.topbar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
}

/* ---------- Main header ---------- */
.header-main {
    position: relative;
    z-index: 100;
    background: #fff;
    transition: box-shadow 0.3s;
}

.header-main.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    animation: headerSlideDown 0.5s ease;
}

@keyframes headerSlideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 85px;
    gap: 24px;
}

.main-nav > ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 30px 8px;
    color: var(--brand-green);
    font-size: 17px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.3s;
}

.main-nav > ul > li > a i {
    font-size: 13px;
    -webkit-text-stroke: 0.6px;
    transition: transform 0.3s;
}

.main-nav > ul > li:hover > a i {
    transform: rotate(180deg);
}

.main-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    margin: 0;
    padding: 12px 20px 24px;
    list-style: none;
    background: #fff;
    border-radius: 4px;
    border-top: 2px solid var(--brand-lime);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .sub-menu a {
    display: block;
    padding-top: 12px;
    color: var(--brand-green);
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    transition: padding 0.3s, color 0.3s;
}

.main-nav .sub-menu a:hover {
    padding-left: 8px;
    color: #4f8a2b;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-cart {
    position: relative;
    color: var(--brand-green);
    font-size: 26px;
    line-height: 1;
    text-decoration: none;
}

.header-cart:hover {
    color: var(--brand-green);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -9px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-lime);
    color: var(--brand-green);
    font-size: 11px;
    font-weight: 700;
}

.header-divider {
    width: 1px;
    height: 30px;
    background: #d9dfdb;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--brand-green);
    border-radius: 4px;
    background: transparent;
    color: var(--brand-green);
    font-size: 26px;
}

/* ---------- Mobile menu ---------- */
.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 999;
    width: min(360px, 100%);
    height: 100%;
    overflow-y: auto;
    padding: 24px;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.4s ease;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open .mobile-overlay {
    opacity: 1;
    visibility: visible;
}

body.menu-open .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.mobile-menu-head .site-logo {
    font-size: 26px;
}

.mobile-menu-head .site-logo img {
    height: 46px;
}

.mobile-menu-head .site-logo .logo-mark {
    width: 36px;
    height: 36px;
}

.menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--brand-green);
    color: #fff;
    font-size: 16px;
}

.mobile-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-nav > ul > li {
    border-bottom: 1px solid #e6ebe8;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    color: var(--brand-green);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
}

.mobile-nav a i {
    transition: transform 0.3s;
}

.mobile-nav li.open > a i {
    transform: rotate(180deg);
}

.mobile-nav .sub-menu {
    display: none;
    padding: 0 0 10px 14px;
}

.mobile-nav li.open > .sub-menu {
    display: block;
}

.mobile-nav .sub-menu a {
    padding: 8px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-body);
}

.mobile-contact {
    margin-top: 32px;
}

.mobile-contact h4 {
    margin-bottom: 16px;
    font-family: var(--font-heading);
    color: var(--brand-green);
    font-size: 22px;
}

.mobile-contact p {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.mobile-contact i {
    color: var(--brand-green);
}

.mobile-contact a {
    color: inherit;
    text-decoration: none;
}

.mobile-menu .social-list {
    margin-top: 24px;
}

.mobile-menu .social-list a {
    background: var(--brand-green);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--brand-green);
    color: var(--white-80);
    padding: 100px 0 32px;
}

.site-footer a {
    color: var(--white-80);
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: var(--brand-lime);
}

.site-footer .btn-lime {
    color: var(--brand-green);
}

.site-footer .btn-lime:hover {
    color: #fff;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: 48px;
    border-bottom: 1px solid var(--white-10);
}

.footer-top-item {
    padding: 0 24px;
    border-left: 1px solid var(--white-10);
}

.footer-top-item:first-child {
    padding-left: 0;
    border-left: none;
}

.footer-top-item h5 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--white-80);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
}

.footer-top-item h5 i {
    font-size: 20px;
}

.footer-top-item p {
    margin: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.5;
}

.footer-top-item p a {
    color: #fff;
}

.footer-top-cta {
    display: flex;
    align-items: center;
}

.footer-main {
    padding: 60px 0;
}

.footer-about p {
    margin: 24px 0 0;
    font-size: 18px;
    line-height: 1.55;
}

.footer-widget {
    padding-left: 40px;
}

/* Body font at semi-bold: Cal Sans has a single (heavy) weight, so it can't be made lighter. */
.footer-widget h3 {
    margin-bottom: 28px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.footer-widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-widget > ul:not(.social-list) li + li {
    margin-top: 16px;
}

.footer-widget > ul:not(.social-list) a {
    font-size: 18px;
    font-weight: 500;
}

.footer-hours li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--white-10);
    font-size: 18px;
    white-space: nowrap;
}

.footer-hours li + li {
    margin-top: 16px;
}

.footer-hours strong {
    color: #fff;
    font-weight: 700;
}

.footer-widget .social-list {
    margin-top: 32px;
}

/* Copyright + credit on the left, legal links on the right. Below 992px the two groups stack, centred. */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 30px;
    padding-top: 24px;
    border-top: 1px solid var(--white-10);
}

/* Text grows with the screen: 15px on phones up to 18px on large screens. */
.footer-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 0;
    color: #fff;
    font-size: clamp(15px, 0.6vw + 10px, 18px);
    font-weight: 500;
}

.footer-group > * {
    white-space: nowrap;
}

.footer-sep {
    opacity: 0.5;
}

@media (max-width: 991.98px) {
    .footer-bottom {
        flex-direction: column;
        justify-content: center;
    }

    .footer-group {
        justify-content: center;
    }
}

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--brand-green);
    color: #fff;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

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

.back-to-top svg {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}

.back-to-top circle {
    fill: none;
    stroke: var(--brand-lime);
    stroke-width: 3;
    stroke-dasharray: 150.8;
    stroke-dashoffset: 150.8;
}

/* ---------- Responsive ---------- */
@media (min-width: 1400px) {
    .main-nav > ul > li > a {
        padding: 30px 12px;
        font-size: 19px;
    }
}

@media (max-width: 1199.98px) {
    .main-nav > ul > li > a {
        padding: 30px 6px;
        font-size: 16px;
    }

    .footer-widget {
        padding-left: 12px;
    }
}

@media (max-width: 991.98px) {
    .header-main-inner {
        min-height: 72px;
    }

    .site-logo {
        font-size: 28px;
    }

    .site-logo .logo-mark {
        width: 38px;
        height: 38px;
    }

    .site-logo img {
        height: 50px;
    }

    .site-footer {
        padding-top: 70px;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 32px;
    }

    .footer-top-item:nth-child(3) {
        padding-left: 0;
        border-left: none;
    }

    .footer-widget {
        margin-top: 40px;
    }
}

@media (max-width: 575.98px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-top-item {
        padding-left: 0;
        border-left: none;
    }

    .footer-widget {
        padding-left: 12px;
    }

    /* Tighter link lists on phones. */
    .footer-widget > ul:not(.social-list) li + li {
        margin-top: 6px;
    }

    /* Too narrow for one row: stack each item on its own line instead. */
    .footer-group {
        flex-direction: column;
    }

    .footer-sep {
        display: none;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
    }
}
