/* =============================================================================
   TM Widgets — Combined Styles
   ============================================================================= */

/* =============================================
   WPForms — Compatibility Fixes
   ============================================= */

/* Fix: Flatsome section bg must not block clicks on form elements */
.section .section-bg,
.section .bg,
.banner .bg {
    pointer-events: none !important;
}

/* Ensure form wrapper is above section bg */
.wpforms-container {
    position: relative;
    z-index: 1;
}

/* Fix: ensure form inputs are clickable / editable */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="number"],
.wpforms-container input[type="password"],
.wpforms-container input[type="url"],
.wpforms-container input[type="date"],
.wpforms-container select,
.wpforms-container textarea {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Fix: intlTelInput phone flag must not block phone input */
.wpforms-container .iti {
    width: 100%;
}

.wpforms-container .iti__flag-container {
    z-index: 0;
}

.wpforms-container .iti input[type="tel"] {
    padding-left: 52px !important;
}

/* Fix: WPForms modern dropdown (Styler) inside Flatsome */
.wpforms-container .choices {
    z-index: 2;
}

.wpforms-container .choices__inner {
    min-height: 42px;
    border-radius: 6px;
}

/* Fix: WPForms date/time picker popup */
.wpforms-container .flatpickr-calendar {
    z-index: 1000000 !important;
}

/* Fix: WPForms submit button spacing */
.wpforms-container button[type="submit"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Fix: Smooth focus style for WPForms fields */
.wpforms-container input:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
    outline: 2px solid var(--color-primary, #007cba);
    outline-offset: 1px;
}

/* =============================================
   TM: Image Box Gallery
   ============================================= */
.tm-image-box-gallery__actions {
    margin-top: 1em;
}

.tm-image-box-gallery__actions .button {
    margin-bottom: 0;
}

.tm-image-box-gallery__hidden-link {
    display: none !important;
}

/* =============================================
   TM: Logo Marquee — Infinite CSS Marquee
   ============================================= */

/* ----- Wrapper ----- */
.tm-logo-marquee {
    --tm-marquee-speed: 30s;
    --tm-marquee-gap: 60px;
    --tm-marquee-logo-h: 50px;
    --tm-marquee-fade-w: 80px;
    --tm-marquee-opacity: 1;
    --tm-marquee-hover-opacity: 1;
    --tm-marquee-sep-color: rgba(0, 0, 0, 0.12);

    position: relative;
    overflow: hidden;
    width: 100%;
}

/* ----- Track: flex container holding two clones ----- */
.tm-marquee-track {
    display: flex;
    width: max-content;
}

/* ----- Each inner (one copy of the logos) ----- */
.tm-marquee-inner {
    display: flex;
    align-items: center;
    gap: var(--tm-marquee-gap);
    flex-shrink: 0;
    padding-right: var(--tm-marquee-gap); /* gap between clones */
}

/* ----- Scroll Animation ----- */
/* Left-to-right (default) */
.tm-marquee-ltr .tm-marquee-track {
    animation: tm-marquee-scroll-ltr var(--tm-marquee-speed) linear infinite;
}

/* Right-to-left */
.tm-marquee-rtl .tm-marquee-track {
    animation: tm-marquee-scroll-rtl var(--tm-marquee-speed) linear infinite;
}

@keyframes tm-marquee-scroll-ltr {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes tm-marquee-scroll-rtl {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* ----- Pause on Hover ----- */
.tm-marquee-pause-hover:hover .tm-marquee-track {
    animation-play-state: paused;
}

/* ----- Logo Item ----- */
.tm-marquee-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: var(--tm-marquee-opacity);
    transition:
        opacity 0.3s ease,
        filter 0.4s ease,
        transform 0.3s ease;
    will-change: opacity, filter;
}

.tm-marquee-item img {
    display: block;
    height: var(--tm-marquee-logo-h);
    width: auto;
    max-width: none;
    object-fit: contain;
    pointer-events: none;
}

.tm-marquee-item:hover {
    opacity: var(--tm-marquee-hover-opacity);
}

/* ----- Grayscale Filter ----- */
.tm-marquee-grayscale .tm-marquee-item {
    filter: grayscale(100%);
}

.tm-marquee-grayscale.tm-marquee-hover-color .tm-marquee-item:hover {
    filter: grayscale(0%);
}

/* ----- Separators ----- */
.tm-marquee-sep {
    flex-shrink: 0;
    display: block;
}

.tm-marquee-sep-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--tm-marquee-sep-color);
}

.tm-marquee-sep-line {
    width: 1px;
    height: calc(var(--tm-marquee-logo-h) * 0.6);
    background-color: var(--tm-marquee-sep-color);
}

/* ----- Fade Edges (gradient mask) ----- */
.tm-marquee-fade::before,
.tm-marquee-fade::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--tm-marquee-fade-w);
    z-index: 2;
    pointer-events: none;
}

.tm-marquee-fade::before {
    left: 0;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0) 100%
    );
}

.tm-marquee-fade::after {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0) 100%
    );
}

/* When wrapper has a bg_color, the fade adapts via mix-blend-mode */
.tm-marquee-fade[style*="background-color"]::before,
.tm-marquee-fade[style*="background-color"]::after {
    /* Inherit bg from parent for a clean fade */
    background: inherit;
    -webkit-mask-image: linear-gradient(
        to var(--_dir, right),
        black 0%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to var(--_dir, right),
        black 0%,
        transparent 100%
    );
}

.tm-marquee-fade[style*="background-color"]::before {
    --_dir: right;
}

.tm-marquee-fade[style*="background-color"]::after {
    --_dir: left;
}

/* ----- Reduce Motion ----- */
@media (prefers-reduced-motion: reduce) {
    .tm-marquee-track {
        animation-duration: 0s !important;
    }
}

/* =============================================
   TM: Timeline Slider
   ============================================= */

/* --- Wrapper --- */
.tm-timeline-slider {
    position: relative;
    overflow: visible;
}

.tm-timeline-slider .slider {
    overflow: visible;
}

/* --- Slide cell --- */
.tm-tl-slide {
    padding: 0;
    box-sizing: border-box;
    align-self: stretch;
}

.tm-tl-slide-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

/* --- Milestone label --- */
.tm-tl-milestone {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--tm-tl-milestone-color, #fff);
    text-align: center;
    padding-bottom: 16px;
}

/* --- Timeline track (line + dot) --- */
.tm-tl-track {
    position: relative;
    width: 100%;
    height: var(--tm-tl-dot-size, 18px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* Horizontal line — extends beyond slide to connect with neighbors */
.tm-tl-line {
    position: absolute;
    top: 50%;
    left: -50%;
    right: -50%;
    height: 3px;
    background-color: var(--tm-tl-line-color, #fff);
    transform: translateY(-50%);
}

/* Dot */
.tm-tl-dot {
    position: relative;
    z-index: 2;
    width: var(--tm-tl-dot-size, 18px);
    height: var(--tm-tl-dot-size, 18px);
    border-radius: 50%;
    background-color: var(--tm-tl-dot-color, #fff);
    border: 3px solid var(--tm-tl-dot-border, #fff);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    flex-shrink: 0;
}

/* Active/selected slide dot glow */
.tm-tl-slide.is-selected .tm-tl-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.3);
}

/* --- Content Card --- */
.tm-tl-card {
    background-color: var(--tm-tl-card-bg, #fff);
    border-radius: var(--tm-tl-card-radius, 12px);
    overflow: hidden;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.tm-tl-card-body {
    flex: 1;
}

.tm-tl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Card image */
.tm-tl-card-img {
    width: 100%;
    overflow: hidden;
}

.tm-tl-card-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.tm-tl-card:hover .tm-tl-card-img img {
    transform: scale(1.03);
}

/* Card body */
.tm-tl-card-body {
    padding: 20px 24px 24px;
}

.tm-tl-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--tm-tl-title-color, #008fd5);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.tm-tl-card-desc {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--tm-tl-text-color, #333);
    margin: 0;
}

.tm-tl-card-desc p {
    margin: 0 0 8px;
}

.tm-tl-card-desc p:last-child {
    margin-bottom: 0;
}

/* --- Flickity nav arrows — outside container --- */
.tm-timeline-slider .flickity-prev-next-button {
    width: 32px;
    height: 32px;
    background: transparent;
    color: var(--tm-tl-line-color, #fff);
    top: 50%;
    transform: translateY(-50%);
}

.tm-timeline-slider .flickity-prev-next-button svg .arrow {
    fill: var(--tm-tl-line-color, #fff);
}

.tm-timeline-slider .flickity-prev-next-button.previous {
    left: -48px;
}

.tm-timeline-slider .flickity-prev-next-button.next {
    right: -48px;
}

/* --- Responsive --- */
@media (max-width: 849px) {
    .tm-tl-card-img img {
        height: 150px;
    }
    .tm-tl-card-body {
        padding: 16px 20px 20px;
    }
    .tm-tl-card-title {
        font-size: 16px;
    }
    .tm-tl-card-desc {
        font-size: 14px;
    }
}

@media (max-width: 549px) {
    .tm-tl-milestone {
        font-size: 13px;
        padding-bottom: 12px;
    }
    .tm-tl-track {
        margin-bottom: 16px;
    }
    .tm-tl-card-img img {
        height: 140px;
    }
}

/* =============================================
   TM: Image Group
   ============================================= */

.tm-image-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--tm-img-group-gap, 12px);
    width: 100%;
    /* alignment: left=flex-start, center=center, right=flex-end */
    justify-content: var(--tm-img-group-align, flex-start);
}

.tm-image-group__item {
    flex: 0 0 auto; /* do NOT force equal widths — keep natural size */
    overflow: hidden;
    border-radius: var(--tm-img-group-radius, 0px);
    line-height: 0;
}

.tm-image-group__item a {
    display: block;
    line-height: 0;
}

/* Images keep natural/auto width — height is optional */
.tm-image-group__img {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: var(--tm-img-group-height, auto) !important;
    object-fit: var(--tm-img-group-fit, contain);
    object-position: center center;
}

/* Responsive: stack on very small screens */
@media (max-width: 480px) {
    .tm-image-group {
        flex-wrap: wrap;
        justify-content: var(--tm-img-group-align, flex-start);
    }
    .tm-image-group__item {
        flex: 0 0 auto;
    }
}

/* =============================================
   TM: Menu Marquee
   ============================================= */

/* ----- Wrapper ----- */
.tm-menu-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* ----- Track: flex container holding 2 clones for infinite loop ----- */
.tm-mm-track {
    display: flex;
    width: max-content;
}

/* ----- Inner (one set of items) ----- */
.tm-mm-inner {
    display: flex;
    align-items: center;
    gap: var(--tm-mm-gap, 40px);
    flex-shrink: 0;
    padding-right: var(--tm-mm-gap, 40px);
}

/* ----- Scroll animations ----- */
.tm-mm-ltr .tm-mm-track {
    animation: tm-mm-scroll-ltr var(--tm-mm-speed, 35s) linear infinite;
}
.tm-mm-rtl .tm-mm-track {
    animation: tm-mm-scroll-rtl var(--tm-mm-speed, 35s) linear infinite;
}

@keyframes tm-mm-scroll-ltr {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
@keyframes tm-mm-scroll-rtl {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Pause on hover */
.tm-mm-pause-hover:hover .tm-mm-track {
    animation-play-state: paused;
}

/* ----- Each menu item ----- */
.tm-menu-mi {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
    cursor: default;
}

.tm-menu-mi__link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

/* Image: circle by default */
.tm-menu-mi__img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--tm-mm-img-size, 52px);
    height: var(--tm-mm-img-size, 52px);
    border-radius: var(--tm-mm-img-radius, 50%);
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.35);
}

.tm-menu-mi__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Label text */
.tm-menu-mi__label {
    font-size: var(--tm-mm-font-size, 15px);
    font-weight: var(--tm-mm-font-weight, 700);
    color: var(--tm-mm-text-color, #1a1f4b);
    letter-spacing: var(--tm-mm-ls, 0.08em);
    line-height: 1;
}

/* ----- Separator ----- */
.tm-mm-sep {
    font-size: 1.2em;
    font-weight: 900;
    color: var(--tm-mm-sep-color, #1a1f4b);
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.6;
    user-select: none;
}

/* ----- Reduce motion ----- */
@media (prefers-reduced-motion: reduce) {
    .tm-mm-track {
        animation-duration: 0s !important;
    }
}

/* =============================================
   TM: Statics
   ============================================= */

.tm-stat {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Circle */
.tm-stat__circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: solid;
    border-radius: 50%;
    padding: 24px;
    box-sizing: border-box;
    /* Default: fully visible (works without JS / in Builder preview) */
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

/* JS adds this class BEFORE observing — sets initial hidden state */
.tm-stat--js-ready .tm-stat__circle {
    opacity: 0;
    transform: scale(0.92);
}

/* JS adds is-visible when element enters viewport */
.tm-stat--js-ready .tm-stat__circle.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Number row: prefix + counter + suffix inline */
.tm-stat__number-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    line-height: 1;
    margin-bottom: 12px;
}

.tm-stat__prefix,
.tm-stat__suffix {
    font-size: 0.6em; /* relative to number size */
    font-weight: inherit;
    line-height: 1;
}

.tm-stat__counter {
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Label */
.tm-stat__label {
    margin: 0;
    line-height: 1.4;
    text-align: center;
    max-width: 80%;
}

/* Reduced motion: skip scale animation, still fade */
@media (prefers-reduced-motion: reduce) {
    .tm-stat__circle {
        transform: none;
        transition: opacity 0.4s ease;
    }
}

/* =============================================
   TM: Photo Marquee (Vertical 3-column)
   ============================================= */

/* Wrapper — height set by JS from parent section, or CSS var fallback */
.tm-photo-marquee {
    display: flex;
    flex-direction: row;
    gap: var(--tm-pm-col-gap, 20px);
    overflow: hidden;
    width: 100%;
    height: var(
        --tm-pm-height,
        600px
    ); /* fallback; JS overrides with section height */
    align-items: stretch;
}

/* Column — clips the scrolling track */
.tm-pm-col {
    flex: 1;
    overflow: hidden;
    min-width: 0;
    position: relative;
    /* Isolate stacking context — prevents external scroll/parallax plugins
     from overriding the track's animation transform */
    isolation: isolate;
    transform: translateZ(0);
}

/* Track — animates up or down, contains 2 identical inner blocks */
.tm-pm-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

/* Each inner block: one full set of images */
.tm-pm-inner {
    display: flex;
    flex-direction: column;
    gap: var(--tm-pm-img-gap, 20px);
    flex-shrink: 0;
    /* padding-bottom = gap so the seam between inner1 & inner2 matches */
    padding-bottom: var(--tm-pm-img-gap, 20px);
}

/* ── Scroll animations: JS injects pixel-based keyframes per track ── */
/* Keyframes below are fallback only; JS overrides with exact px values */
@keyframes tm-pm-up {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-50%);
    }
}

@keyframes tm-pm-down {
    from {
        transform: translateY(-50%);
    }
    to {
        transform: translateY(0);
    }
}

/* CSS fallback for no-JS environments */
.no-js .tm-pm-track--up {
    animation: tm-pm-up var(--tm-pm-speed, 20s) linear infinite;
}
.no-js .tm-pm-track--down {
    animation: tm-pm-down var(--tm-pm-speed, 25s) linear infinite;
}

/* Pause all tracks on hover */
.tm-photo-marquee.tm-pm-pause:hover .tm-pm-track {
    animation-play-state: paused;
}

/* ── Image wrapper (circle by default) ── */
.tm-pm-img-wrap {
    width: var(--tm-pm-img-size, 200px);
    height: var(--tm-pm-img-size, 200px);
    border-radius: var(--tm-pm-img-radius, 50%);
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 auto;
}

.tm-pm-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.tm-pm-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    .tm-pm-track--up,
    .tm-pm-track--down {
        animation: none;
    }
}

/* ── Mobile: responsive image sizes ── */
@media (max-width: 768px) {
    .tm-pm-img-wrap {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* =============================================
   TM: Text Marquee — Infinite CSS Text Scroll
   ============================================= */

/* ----- Wrapper ----- */
.tm-text-marquee {
    --tm-tm-speed: 30s;
    --tm-tm-gap: 60px;
    --tm-tm-font-size: 24px;
    --tm-tm-font-weight: 700;
    --tm-tm-text-transform: uppercase;
    --tm-tm-letter-spacing: 0.05em;
    --tm-tm-line-height: 1.2;
    --tm-tm-fade-w: 80px;
    --tm-tm-color: inherit;
    --tm-tm-hover-color: inherit;
    --tm-tm-sep-color: currentColor;
    --tm-tm-sep-size: 8px;
    --tm-tm-stroke-w: 1px;

    position: relative;
    overflow: hidden;
    width: 100%;
    color: var(--tm-tm-color);
}

/* ----- Track: holds two clones side by side ----- */
.tm-tm-track {
    display: flex;
    width: max-content;
}

/* ----- Each inner (one copy of the items) ----- */
.tm-tm-inner {
    display: flex;
    align-items: center;
    gap: var(--tm-tm-gap);
    flex-shrink: 0;
    padding-right: var(--tm-tm-gap);
}

/* ----- Scroll Animation ----- */
.tm-tm-ltr .tm-tm-track {
    animation: tm-tm-scroll-ltr var(--tm-tm-speed) linear infinite;
}

.tm-tm-rtl .tm-tm-track {
    animation: tm-tm-scroll-rtl var(--tm-tm-speed) linear infinite;
}

@keyframes tm-tm-scroll-ltr {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes tm-tm-scroll-rtl {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* ----- Pause on Hover ----- */
.tm-tm-pause-hover:hover .tm-tm-track {
    animation-play-state: paused;
}

/* ----- Text Item ----- */
.tm-tm-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: var(--tm-tm-font-size);
    font-weight: var(--tm-tm-font-weight);
    text-transform: var(--tm-tm-text-transform);
    letter-spacing: var(--tm-tm-letter-spacing);
    line-height: var(--tm-tm-line-height);
    font-family: var(--tm-tm-font-family, inherit);
    transition:
        color 0.3s ease,
        opacity 0.3s ease;
}

.tm-tm-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tm-tm-item a:hover {
    color: var(--tm-tm-hover-color);
}

/* ----- Stroke / Outline Text ----- */
.tm-tm-stroke .tm-tm-item {
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: var(--tm-tm-stroke-w) var(--tm-tm-color);
}

.tm-tm-stroke .tm-tm-item a:hover {
    -webkit-text-fill-color: var(--tm-tm-hover-color);
    -webkit-text-stroke-color: var(--tm-tm-hover-color);
}

/* ----- Separators ----- */
.tm-tm-sep {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tm-tm-sep-color);
    opacity: 0.6;
}

.tm-tm-sep-dot {
    width: var(--tm-tm-sep-size);
    height: var(--tm-tm-sep-size);
    border-radius: 50%;
    background-color: var(--tm-tm-sep-color);
}

.tm-tm-sep-line {
    width: 1.5px;
    height: calc(var(--tm-tm-font-size) * 0.8);
    background-color: var(--tm-tm-sep-color);
}

.tm-tm-sep-star,
.tm-tm-sep-dash,
.tm-tm-sep-custom {
    font-size: var(--tm-tm-sep-size);
    line-height: 1;
}

/* ----- Fade Edges ----- */
.tm-tm-fade::before,
.tm-tm-fade::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--tm-tm-fade-w);
    z-index: 2;
    pointer-events: none;
}

.tm-tm-fade::before {
    left: 0;
    background: linear-gradient(to right, currentColor, transparent);
    /* Use the bg color for the fade; fallback to a dark blend */
}

.tm-tm-fade::after {
    right: 0;
    background: linear-gradient(to left, currentColor, transparent);
}

/* If bg_color is set, the fade should use it. Override with mask instead. */
.tm-tm-fade {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black var(--tm-tm-fade-w),
        black calc(100% - var(--tm-tm-fade-w)),
        transparent
    );
    mask-image: linear-gradient(
        to right,
        transparent,
        black var(--tm-tm-fade-w),
        black calc(100% - var(--tm-tm-fade-w)),
        transparent
    );
}

/* When using mask, we don't need pseudo elements */
.tm-tm-fade::before,
.tm-tm-fade::after {
    display: none;
}

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
    .tm-tm-track {
        animation: none;
    }
}

/* =============================================
   TM: Floating Parallax Elements
   Usage in UX Builder:
     CSS Class: "float-el"
     Custom Attr: data-parallax-speed="0.15"  (positive=up, negative=down)
     Custom Attr: data-parallax-rotate="20"   (degrees on scroll)
   Animation triggers ONLY on scroll via GSAP ScrollTrigger.
   ============================================= */

/* Outer wrapper — GSAP targets this for scroll-driven Y + rotation */

.tm-franchise-sites {
    --tm-fs-gap: 24px;
    --tm-fs-card-bg: #f5f5f5;
    --tm-fs-card-border: #161138;
    --tm-fs-card-border-w: 5px;
    --tm-fs-card-radius: 36px;
    --tm-fs-card-padding: 42px;
    --tm-fs-min-h: 460px;
    --tm-fs-state-color: #161138;
    --tm-fs-city-color: #161138;
    --tm-fs-meta-color: #008fd5;
    --tm-fs-state-size: 34px;
    --tm-fs-city-size: 34px;
    --tm-fs-meta-size: 16px;
    --tm-fs-state-weight: 600;
    --tm-fs-city-weight: 600;
    --tm-fs-meta-weight: 400;
    --tm-fs-icon-gap: 16px;
    --tm-fs-state-margin: 0px;
    --tm-fs-city-margin: 22px;
    --tm-fs-btn-bg: #008fd5;
    --tm-fs-btn-color: #ffffff;
    --tm-fs-btn-bg-hover: #161138;
    --tm-fs-btn-size: 16px;
    --tm-fs-btn-weight: 600;
    --tm-fs-btn-radius: 999px;
    --tm-fs-btn-pad-y: 14px;
    --tm-fs-btn-pad-x: 36px;
    --tm-fs-btn-min-h: 58px;
}

.tm-franchise-sites .tm-fs-col {
    padding-bottom: var(--tm-fs-gap);
}

.tm-franchise-sites .tm-fs-card {
    background: var(--tm-fs-card-bg);
    border: var(--tm-fs-card-border-w) solid var(--tm-fs-card-border);
    border-radius: var(--tm-fs-card-radius);
    padding: var(--tm-fs-card-padding);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.tm-franchise-sites.tm-fs-has-shadow .tm-fs-card {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
}

.tm-franchise-sites .tm-fs-state {
    margin: var(--tm-fs-state-margin) 0 0;
    color: var(--tm-fs-state-color);
    font-size: clamp(20px, 3.6vw, var(--tm-fs-state-size));
    font-weight: var(--tm-fs-state-weight);
    line-height: 1.15;
}

.tm-franchise-sites .tm-fs-city-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--tm-fs-icon-gap);
    margin: 0;
}

.tm-franchise-sites .tm-fs-icon {
    object-fit: contain;
    flex-shrink: 0;
}

.tm-franchise-sites .tm-fs-city {
    margin: 0;
    color: var(--tm-fs-city-color);
    font-size: clamp(20px, 3.6vw, var(--tm-fs-city-size));
    font-weight: var(--tm-fs-city-weight);
    line-height: 1.06;
}

.tm-franchise-sites .tm-fs-meta {
    margin-top: 0;
    color: var(--tm-fs-meta-color);
    font-size: var(--tm-fs-meta-size);
    font-weight: var(--tm-fs-meta-weight);
    line-height: 1.45;
}

.tm-franchise-sites .tm-fs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 8px 24px;
    min-height: 42px;
    border-radius: 6px;
    text-decoration: none;
    background: var(--tm-fs-btn-bg);
    color: var(--tm-fs-btn-color) !important;
    font-size: var(--tm-fs-btn-size);
    font-weight: var(--tm-fs-btn-weight);
    line-height: 1;
    white-space: nowrap;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background-color 0.2s ease;
}

.tm-franchise-sites .tm-fs-btn:hover {
    opacity: 0.96;
    transform: translateY(-1px);
    background: var(--tm-fs-btn-bg-hover);
}

.tm-franchise-sites .tm-fs-arrow {
    font-size: 1.15em;
    line-height: 1;
    transform: translateY(-1px);
}

@media (max-width: 849px) {
    .tm-franchise-sites .tm-fs-card {
        padding: 28px;
    }

    .tm-franchise-sites .tm-fs-btn {
        margin-top: 12px;
        padding: 12px 26px;
    }
}

@media (max-width: 549px) {
    .tm-franchise-sites .tm-fs-card {
        padding: 22px;
    }

    .tm-franchise-sites .tm-fs-city-wrap {
        gap: 10px;
        margin-top: 12px;
    }

    .tm-franchise-sites .tm-fs-btn {
        margin-top: 12px;
        font-size: 16px;
        min-height: 50px;
        padding: 10px 20px;
    }
}

.float-el {
    display: inline-block;
    will-change: transform;
}
