/*
 * Services Carousel — frontend styles.
 * Tokens lifted from the Figma section: navy #002D5D for text, accent blue
 * #4A7DB5 for description + nav, square nav buttons (43px, no radius), and
 * a thin top hairline #A8C3DC matching the section divider.
 */

.tlux-services {
    --tlux-gap: 16px;
    --tlux-ink: #002D5D;
    --tlux-accent: #4A7DB5;
    --tlux-hairline: #A8C3DC;
    position: relative;
    width: 100%;
    padding: 0; /* control inset via Elementor's section/widget padding or the Header style controls */
}

.tlux-services *,
.tlux-services *::before,
.tlux-services *::after {
    box-sizing: border-box;
}

/* Header: heading on the left, nav arrows pinned to the right. */
.tlux-services__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 56px; /* matches the ~56px Figma gap between header bottom and the first card */
}

.tlux-services__header-inner {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
}

.tlux-services__heading {
    margin: 0;
    color: var(--tlux-ink);
    font-family: Georgia, "Times New Roman", "Playfair Display", serif;
    font-size: 2rem; /* ~32px to match the Figma headline scale */
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0;
}

.tlux-services__heading-mobile {
    display: none;
}

/* Navigation arrows — square outlined buttons matching the Figma rectangles. */
.tlux-services__nav-wrap {
    display: inline-flex;
    gap: 8px;
    flex-shrink: 0;
}

/* High specificity so the default state can't be overridden by stray theme
   button styles (and so prev/next look identical when at rest). */
.tlux-services .tlux-services__nav,
.tlux-services button.tlux-services__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: transparent;
    color: var(--tlux-accent);
    border: 1px solid var(--tlux-accent);
    border-radius: 0; /* Figma uses sharp corners */
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1;
    box-shadow: none;
}

.tlux-services__nav:focus-visible {
    outline: 2px solid var(--tlux-ink);
    outline-offset: 2px;
}

.tlux-services .tlux-services__nav:hover,
.tlux-services button.tlux-services__nav:hover {
    background-color: var(--tlux-ink);
    color: #ffffff;
    border-color: var(--tlux-ink);
}

.tlux-services__nav[disabled],
.tlux-services__nav.swiper-button-disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

.tlux-services__nav svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* Swiper viewport. Width:100% just makes sure the swiper fills the column. */
.tlux-services__swiper {
    width: 100%;
    overflow: hidden;
}

.tlux-services__slide {
    height: auto;
}

/* Card */
.tlux-services__card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 0; /* Figma cards are flat-cornered */
    overflow: hidden;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, box-shadow .25s ease;
}

a.tlux-services__card:hover,
a.tlux-services__card:focus-visible {
    transform: translateY(-2px);
}

.tlux-services__media {
    position: relative;
    height: 240px; /* tracks the Figma image aspect (340 x 420 -> ~70%) */
    overflow: hidden;
    border-radius: 0;
    background-color: #f4f6f8;
}

.tlux-services__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

a.tlux-services__card:hover .tlux-services__media img,
a.tlux-services__card:focus-visible .tlux-services__media img {
    transform: scale(1.03);
}

.tlux-services__card-body {
    padding: 18px 0 8px;
}

.tlux-services__title {
    margin: 0 0 6px;
    color: var(--tlux-ink);
    font-size: 1.0625rem;
    line-height: 1.3;
    font-weight: 600;
}

.tlux-services__description {
    margin: 0;
    color: var(--tlux-accent);
    font-size: 0.875rem;
    line-height: 1.45;
}

/* Responsive tweaks. */
@media (max-width: 1024px) {
    .tlux-services__heading { font-size: 1.75rem; }
    .tlux-services__header { margin-bottom: 40px; }
    .tlux-services__media { height: 220px; }
}

@media (max-width: 767px) {
    .tlux-services__header { margin-bottom: 28px; }
    .tlux-services__heading { font-size: 1.5rem; }
    .tlux-services__media { height: 220px; }
    .tlux-services .tlux-services__nav,
    .tlux-services button.tlux-services__nav {
        width: 40px;
        height: 40px;
    }

    .tlux-services {
        display: flex;
        flex-direction: column;
    }

    .tlux-services__header {
        order: 2;
    }

    .tlux-services__heading {
        display: none;
    }

    .tlux-services__heading-mobile {
        display: block;
        text-align: center;
        padding: 0 20px;
    }

    .tlux-services__nav-wrap {
        justify-content: space-between;
        width: 100%;
    }
}

/* Honour reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    .tlux-services__card,
    .tlux-services__media img,
    .tlux-services__nav {
        transition: none !important;
    }
}
