/*------------------------------------*\
    BUTTON HOVER ANIMATION
\*------------------------------------*/

a.gdlr-core-button.gdlr-core-button-solid {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    transition: color 0.5s ease !important;
}

/* Animated overlay */
a.gdlr-core-button.gdlr-core-button-solid::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;

    background: var(--black);

    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
    pointer-events: none;
}

/* Keep content above the overlay */
a.gdlr-core-button .gdlr-core-content {
    position: relative;
    z-index: 1;
}

/* Hover animation */
a.gdlr-core-button.gdlr-core-button-solid:hover::before,
a.gdlr-core-button.gdlr-core-button-solid:focus-visible::before {
    transform: scaleX(1);
}

/* White text and icons on hover only */
a.gdlr-core-button.gdlr-core-button-solid:hover,
a.gdlr-core-button.gdlr-core-button-solid:focus-visible,
a.gdlr-core-button.gdlr-core-button-solid:hover .gdlr-core-content,
a.gdlr-core-button.gdlr-core-button-solid:focus-visible .gdlr-core-content,
a.gdlr-core-button.gdlr-core-button-solid:hover i,
a.gdlr-core-button.gdlr-core-button-solid:focus-visible i {
    color: #fff !important;
}

/* Default animated fill */
a.gdlr-core-button.gdlr-core-button-solid::before {
    background: var(--black);
}

/* Use moss green when the original background is black */
a.gdlr-core-button.gdlr-core-button-solid.is-black-bg::before {
    background: var(--moss-green);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    a.gdlr-core-button,
    a.gdlr-core-button::before {
        transition: none !important;
    }
}

/*------------------------------------*\
    TESTIMONIAL BUTTON ANIMATION
\*------------------------------------*/

a.jbc-testimonials__button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.5s ease !important;
}

/* Animated background */
a.jbc-testimonials__button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--black);

    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
    pointer-events: none;
}

/* Alternate fill for black buttons */
a.jbc-testimonials__button.is-black-bg::before {
    background: var(--moss-green);
}

/* Keep text and SVG above animated background */
a.jbc-testimonials__button > span,
a.jbc-testimonials__button > svg {
    position: relative;
    z-index: 1;
}

/* SVG inherits button text colour */
a.jbc-testimonials__button svg {
    color: inherit;
}

a.jbc-testimonials__button svg path {
    stroke: currentColor;
}

/* Hover animation */
a.jbc-testimonials__button:hover::before,
a.jbc-testimonials__button:focus-visible::before {
    transform: scaleX(1);
}

/* White text and arrow on hover */
a.jbc-testimonials__button:hover,
a.jbc-testimonials__button:focus-visible,
a.jbc-testimonials__button:hover > span,
a.jbc-testimonials__button:focus-visible > span {
    color: #fff !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    a.jbc-testimonials__button,
    a.jbc-testimonials__button::before {
        transition: none !important;
    }
}

/*------------------------------------*\
    SOCIAL ICONS
\*------------------------------------*/

.jbc-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Circular buttons */
.jbc-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    flex-shrink: 0;

    background: #fff;
    color: var(--black);
    border: none;
    border-radius: 50%;
    box-shadow: none;
    text-decoration: none;

    transition:
        background-color 0.4s ease,
        color 0.5s ease;
}

/* Icons */
.jbc-socials a i {
    font-size: 20px;
    line-height: 1;
    color: inherit;
}

/* Remove previous animated overlay */
.jbc-socials a::before {
    content: none !important;
}

/* Hover */
.jbc-socials a:hover,
.jbc-socials a:focus-visible {
    background: var(--moss-green);
    color: #fff;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .jbc-socials a {
        transition: none;
    }
}

/* Dark Version */
.dark.jbc-socials a {
    background: var(--charcoal);
    color: #fff;
}

.dark.jbc-socials a:hover,
.dark.jbc-socials a:focus-visible {
    background: var(--moss-green);
}

/*------------------------------------*\
    POPUP CLOSE BUTTON
\*------------------------------------*/

button.pum-close.popmake-close {
    position: relative;
    box-sizing: border-box;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;

    border: 1.5px solid var(--black) !important;
    border-radius: 50% !important;
    background: transparent !important;
    background-image: none !important;
    color: var(--black) !important;

    font-size: 0 !important;
    line-height: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer;

    transition:
        background-color 0.4s ease,
        border-color 0.4s ease,
        color 0.4s ease !important;
}

/* X icon */
button.pum-close.popmake-close::before,
button.pum-close.popmake-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.4s ease;
}

button.pum-close.popmake-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

button.pum-close.popmake-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Hover */
button.pum-close.popmake-close:hover,
button.pum-close.popmake-close:focus-visible {
    background: var(--moss-green) !important;
    border-color: var(--moss-green) !important;
    color: #fff !important;
}

button.pum-close.popmake-close:hover::before,
button.pum-close.popmake-close:focus-visible::before {
    transform: translate(-50%, -50%) rotate(135deg);
}

button.pum-close.popmake-close:hover::after,
button.pum-close.popmake-close:focus-visible::after {
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Mobile */
@media (max-width: 767px) {
    button.pum-close.popmake-close {
        width: 35px !important;
        height: 35px !important;
    }

    button.pum-close.popmake-close::before,
    button.pum-close.popmake-close::after {
        width: 16px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    button.pum-close.popmake-close,
    button.pum-close.popmake-close::before,
    button.pum-close.popmake-close::after {
        transition: none !important;
    }
}

/*------------------------------------*\
    ANIMATIONS
\*------------------------------------*/

.animated {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animated.fadeInLeft {
    transform: translateX(-100px);
}

.animated.fadeInRight {
    transform: translateX(100px);
}

.animated.fadeInUp {
    transform: translateY(50px);
}

.animated.fadeInDown {
    transform: translateY(-50px);
}

.animated.reveal {
    opacity: 1;
    transform: translate(0,0);
}

/* Manual Delays */
.delay-1 {transition-delay: 0.1s;}
.delay-2 {transition-delay: 0.2s;}
.delay-3 {transition-delay: 0.3s;}
.delay-4 {transition-delay: 0.4s;}
.delay-5 {transition-delay: 0.5s;}
.delay-6 {transition-delay: 0.6s;}
.delay-7 {transition-delay: 0.7s;}
.delay-8 {transition-delay: 0.8s;}
.delay-9 {transition-delay: 0.9s;}

/* Cascade In-Line Animations on Desktop */
@media (min-width: 999px) {
    .gdlr-core-column-first.gdlr-core-pbf-column + .gdlr-core-pbf-column:not(.gdlr-core-column-first) .animated {transition-delay: 0.3s;}
    .gdlr-core-column-first.gdlr-core-pbf-column + .gdlr-core-pbf-column:not(.gdlr-core-column-first) + .gdlr-core-pbf-column:not(.gdlr-core-column-first) .animated {transition-delay: 0.6s;}
    .gdlr-core-column-first.gdlr-core-pbf-column + .gdlr-core-pbf-column:not(.gdlr-core-column-first) + .gdlr-core-pbf-column:not(.gdlr-core-column-first) + .gdlr-core-pbf-column:not(.gdlr-core-column-first) .animated {transition-delay: 0.9s;}
}

/*------------------------------------*\
    LENIS
\*------------------------------------*/

html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}
