/* ==========================================================================
   Industry Expertise slider (index.html #industry-expertise) - image polish
   Gives all six photos one consistent, premium navy & gold colour grade,
   a cinematic overlay for text legibility, and matching thumbnails.
   Loads after style.css; the slider's movement/animation rules are untouched.
   ========================================================================== */

#industry-expertise {
    --ind-navy: #07111F;
    --ind-gold: #C5A039;
    background: var(--ind-navy);
}

/* Each slide keeps its overlays and text to itself (otherwise hidden slides show through) */
#industry-expertise .lundev-list .lundev-item {
    isolation: isolate;
}

/* ---------- Main slide images: one shared colour grade ---------- */
#industry-expertise .lundev-list .lundev-item img {
    /* original 640px industry images: fill the slide edge to edge (cover, centred), and keep
       them natural; the overlays below do the darkening */
    object-fit: cover;
    object-position: center;
    filter: brightness(0.94) contrast(1.06) saturate(0.95);
    /* slow cinematic settle: every slide waits slightly zoomed in, and the visible one eases back
       (kept small, 1.03, so the smaller originals aren't enlarged any further than needed) */
    scale: 1.03;
    transition: scale 12s cubic-bezier(0.22, 1, 0.36, 1), filter 1s ease;
}

#industry-expertise .lundev-list .lundev-item:nth-child(1) img {
    scale: 1;
}

/* Layer 1 - colour harmoniser: a light navy/gold grade so the six photos feel like one set
   (was 0.9, which flattened detail) */
#industry-expertise .lundev-list .lundev-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(125deg, #0A1A33 0%, #13284A 40%, #6B5420 75%, var(--ind-gold) 100%);
    mix-blend-mode: soft-light;
    opacity: 0.5;
}

/* Layer 2 - cinematic shading: dark on the text side, open on the right, fade at top and
   bottom for the header and thumbnails, soft vignette. (The film grain that hid the old
   upscaled photos is gone: the new photos are sharp.) */
#industry-expertise .lundev-list .lundev-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 90% at 70% 45%, transparent 45%, rgba(4, 10, 20, 0.5) 100%),
        linear-gradient(90deg, rgba(5, 12, 24, 0.9) 0%, rgba(5, 12, 24, 0.72) 30%, rgba(5, 12, 24, 0.25) 58%, rgba(5, 12, 24, 0) 75%),
        linear-gradient(0deg, rgba(5, 12, 24, 0.85) 0%, rgba(5, 12, 24, 0) 38%),
        linear-gradient(180deg, rgba(5, 12, 24, 0.55) 0%, rgba(5, 12, 24, 0) 22%);
}

/* Text sits above both layers */
#industry-expertise .lundev-list .lundev-item .lundev-content {
    z-index: 2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* ---------- Slide typography refresh (cleaner now the overlay gives contrast) ---------- */
#industry-expertise .lundev-author {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 18px;
    font-size: clamp(0.8rem, 0.95vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--ind-gold);
    text-shadow: none;
    -webkit-text-stroke: 0;
}

#industry-expertise .lundev-author::before {
    content: '';
    width: 42px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--ind-gold), rgba(197, 160, 57, 0.2));
    flex: 0 0 auto;
}

#industry-expertise .lundev-title,
#industry-expertise .lundev-topic {
    -webkit-text-stroke: 0;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    letter-spacing: 0.01em;
}

#industry-expertise .lundev-topic {
    background: linear-gradient(100deg, #E9D39A 0%, var(--ind-gold) 45%, #9C7A22 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.4));
}

#industry-expertise .lundev-des {
    max-width: 560px;
    margin-top: 28px;
    padding: 1.1rem 1.4rem 0.6rem;
    border-left: 2px solid rgba(197, 160, 57, 0.7);
    border-radius: 0 14px 14px 0;
    background: linear-gradient(90deg, rgba(7, 17, 31, 0.55), rgba(7, 17, 31, 0.15));
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 1.05rem;
    text-shadow: none;
    color: rgba(255, 255, 255, 0.92);
}

#industry-expertise .lundev-des ul {
    margin-top: 0;
}

#industry-expertise .lundev-des li::before {
    content: '';
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: var(--ind-gold);
    box-shadow: 0 0 10px rgba(197, 160, 57, 0.7);
}

/* ---------- Thumbnails: same grade, framed like premium cards ---------- */
#industry-expertise .lundev-thumb-item {
    border: 1px solid rgba(197, 160, 57, 0.35);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    isolation: isolate;
}

#industry-expertise .lundev-thumb-item img {
    filter: brightness(0.82) contrast(1.12) saturate(0.72);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

#industry-expertise .lundev-thumb-item:hover img {
    filter: brightness(0.95) contrast(1.12) saturate(0.95);
}

#industry-expertise .lundev-thumb-item::before,
#industry-expertise .lundev-thumb-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
}

/* same navy/gold harmoniser as the main slides */
#industry-expertise .lundev-thumb-item::before {
    background: linear-gradient(125deg, #0A1A33 0%, #13284A 40%, #6B5420 75%, var(--ind-gold) 100%);
    mix-blend-mode: soft-light;
    opacity: 0.9;
}

/* legibility fade for the label + a gold sheen line at the top */
#industry-expertise .lundev-thumb-item::after {
    background:
        linear-gradient(90deg, transparent, rgba(233, 211, 154, 0.85), transparent) top / 100% 2px no-repeat,
        linear-gradient(0deg, rgba(5, 12, 24, 0.92) 0%, rgba(5, 12, 24, 0.35) 45%, rgba(5, 12, 24, 0) 70%);
    opacity: 0.95;
    transition: opacity 0.4s ease;
}

#industry-expertise .lundev-thumb-content {
    z-index: 2;
    bottom: 16px;
    left: 16px;
    right: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

#industry-expertise .lundev-thumb-title {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

#industry-expertise .lundev-thumb-description {
    margin-top: 2px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #E9D39A;
    opacity: 1;
}

#industry-expertise .lundev-thumb-item:hover {
    border-color: rgba(233, 211, 154, 0.8);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(197, 160, 57, 0.35), 0 0 30px rgba(197, 160, 57, 0.25);
}

/* ---------- Fit the screen exactly ----------
   The section used a 100vw "full-bleed" trick; with a desktop scrollbar 100vw is wider than
   the page, so the whole slider sat 8px to the left (cut on the left edge). Its parent is
   already full width, so plain 100% is exact. On phones, size to the visible screen
   (svh ignores the address bar) so the controls at the bottom aren't hidden. */
.industry-expertise-section.lundev-carousel#industry-expertise {
    width: 100%;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
}

/* Every screen: exactly the space under the fixed header, so the whole slider (heading, text,
   buttons, arrows and cards) is on screen at once. lundev-slider.js measures the header on
   each device into --nasr-header-h (105px is the desktop header, used until then); svh is
   the visible height on phones, without the address bar. The old fixed 800px minimum made
   the slider taller than most laptop and tablet screens. */
.industry-expertise-section.lundev-carousel#industry-expertise {
    height: calc(100vh - var(--nasr-header-h, 105px));
    min-height: 420px;
}

@supports (height: 100svh) {
    .industry-expertise-section.lundev-carousel#industry-expertise {
        height: calc(100svh - var(--nasr-header-h, 105px));
    }
}

@media (min-width: 769px) {
    /* arrows + dots: a little higher than before, scaling with the screen height */
    #industry-expertise.lundev-carousel .lundev-pager {
        bottom: clamp(28px, 8vh, 90px);
    }

    #industry-expertise.lundev-carousel .lundev-thumbnail {
        bottom: clamp(28px, 8vh, 90px);
    }
}

/* Shorter laptop screens: tighten the slide so text, buttons and controls all fit */
@media (min-width: 769px) and (max-height: 900px) {
    #industry-expertise.lundev-carousel .lundev-list .lundev-item .lundev-content {
        top: clamp(14px, 2.5vh, 60px);
    }

    #industry-expertise.lundev-carousel .lundev-author {
        margin-bottom: 6px;
    }

    #industry-expertise.lundev-carousel .lundev-title,
    #industry-expertise.lundev-carousel .lundev-topic {
        font-size: clamp(30px, min(3.6vw, 6.8vh), 66px);
    }

    #industry-expertise.lundev-carousel .lundev-des {
        margin-top: clamp(10px, 1.6vh, 28px);
        padding-top: 0.75rem;
        font-size: clamp(14px, 2.1vh, 17px);
    }

    #industry-expertise.lundev-carousel .lundev-des li {
        margin-bottom: 2px;
        line-height: 1.5;
    }

    #industry-expertise.lundev-carousel .lundev-buttons {
        margin-top: clamp(14px, 2.6vh, 30px);
    }

    #industry-expertise.lundev-carousel .lundev-thumb-item {
        height: clamp(150px, 34vh, 240px);
        width: clamp(110px, 22vh, 160px);
    }

    #industry-expertise.lundev-carousel .lundev-thumb-title {
        font-size: clamp(11px, 1.8vh, 16px);
    }
}

/* thumbnail names: the root font grows on big screens, which pushed long words
   ("Manufacturing") out of the card */
#industry-expertise .lundev-thumb-title {
    font-size: clamp(13px, 0.95rem, 16px);
    overflow-wrap: anywhere;
}

/* ---------- Arrows: gold-ringed glass with chevrons, sitting right beside the dots ---------- */
#industry-expertise .lundev-pager .lundev-arrows {
    position: static;
    transform: none;
    width: auto;
    padding: 0;
    margin-left: 6px;
    display: flex;
    gap: 10px;
    pointer-events: auto;
    z-index: auto;
}

#industry-expertise .lundev-arrows button {
    position: relative;
    width: 48px;
    height: 48px;
    padding: 0;
    background-color: rgba(7, 17, 31, 0.55);
    border: 1px solid rgba(197, 160, 57, 0.6);
    color: #F8FAFC;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

#industry-expertise .lundev-arrows button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* "next" is the main action: solid gold so it stands out */
#industry-expertise #lundev-next {
    background: linear-gradient(135deg, #E9D39A, var(--ind-gold));
    border-color: var(--ind-gold);
    color: var(--ind-navy);
    box-shadow: 0 10px 24px -10px rgba(197, 160, 57, 0.9);
}

#industry-expertise .lundev-arrows button:hover {
    transform: translateY(-3px) scale(1.06);
    background-color: var(--ind-gold);
    border-color: var(--ind-gold);
    color: var(--ind-navy);
    box-shadow: 0 14px 30px -10px rgba(197, 160, 57, 0.95), 0 0 0 6px rgba(197, 160, 57, 0.18);
}

#industry-expertise #lundev-prev:hover svg { transform: translateX(-3px); }
#industry-expertise #lundev-next:hover svg:not(.lundev-ring) { transform: translateX(3px); }

#industry-expertise .lundev-arrows button:active {
    transform: scale(0.92);
    transition-duration: 0.1s;
}

/* countdown ring around "next": fills up until the slide changes on its own */
#industry-expertise .lundev-arrows svg.lundev-ring {
    position: absolute;
    inset: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    transform: rotate(-90deg);
    pointer-events: none;
    stroke-width: 2;
    stroke: #E9D39A;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#industry-expertise .lundev-ring circle {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

#industry-expertise.is-autoplay .lundev-arrows svg.lundev-ring {
    opacity: 1;
}

#industry-expertise.is-autoplay .lundev-ring circle {
    animation: lundevRing var(--lundev-auto, 6000ms) linear forwards;
}

@keyframes lundevRing {
    to { stroke-dashoffset: 0; }
}

/* hover label: which industry the arrow leads to */
#industry-expertise .lundev-tip {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(7, 17, 31, 0.92);
    border: 1px solid rgba(197, 160, 57, 0.5);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.8);
}

#industry-expertise .lundev-tip b {
    color: #E9D39A;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: none;
}

#industry-expertise .lundev-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: rgba(197, 160, 57, 0.5);
}

@media (hover: hover) {
    #industry-expertise .lundev-arrows button:hover .lundev-tip,
    #industry-expertise .lundev-arrows button:focus-visible .lundev-tip {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* one-time "look here" pulse when the slider first comes into view */
#industry-expertise .lundev-arrows.is-nudging button {
    animation: lundevNudge 1.1s ease-in-out 3;
}

#industry-expertise .lundev-arrows.is-nudging #lundev-next svg:not(.lundev-ring) {
    animation: lundevNudgeArrow 1.1s ease-in-out 3;
}

#industry-expertise .lundev-arrows.is-nudging #lundev-prev {
    animation-delay: 0.12s;
}

@keyframes lundevNudge {
    0%, 100% { box-shadow: 0 10px 24px -10px rgba(197, 160, 57, 0.9), 0 0 0 0 rgba(233, 211, 154, 0.55); }
    50% { box-shadow: 0 10px 24px -10px rgba(197, 160, 57, 0.9), 0 0 0 12px rgba(233, 211, 154, 0); }
}

@keyframes lundevNudgeArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

#industry-expertise .lundev-arrows button:focus-visible,
#industry-expertise .lundev-dot:focus-visible,
#industry-expertise .lundev-buttons a:focus-visible {
    outline: 2px solid #E9D39A;
    outline-offset: 3px;
}

/* ---------- Screen-reader heading for the section ---------- */
#industry-expertise .lundev-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Calls to action ---------- */
#industry-expertise .lundev-buttons {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
    text-shadow: none;
}

#industry-expertise .lundev-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 13px 26px;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    -webkit-text-stroke: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

#industry-expertise .lundev-cta {
    background: linear-gradient(135deg, #E3C46F, var(--ind-gold));
    border: 1px solid var(--ind-gold);
    color: var(--ind-navy);
    box-shadow: 0 12px 26px -12px rgba(197, 160, 57, 0.75);
}

#industry-expertise .lundev-cta span {
    transition: transform 0.3s ease;
}

#industry-expertise .lundev-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -12px rgba(197, 160, 57, 0.9);
}

#industry-expertise .lundev-cta:hover span {
    transform: translateX(4px);
}

#industry-expertise .lundev-cta-ghost {
    background: rgba(7, 17, 31, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #FFFFFF;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

#industry-expertise .lundev-cta-ghost:hover {
    border-color: #E9D39A;
    color: #E9D39A;
    transform: translateY(-2px);
}

/* dark mode recolours links/buttons site-wide; keep these exact */
html.dark-mode body.dark-mode #industry-expertise .lundev-cta,
html.dark-mode body.dark-mode #industry-expertise .lundev-cta span {
    color: var(--ind-navy) !important;
}

html.dark-mode body.dark-mode #industry-expertise .lundev-cta-ghost {
    color: #FFFFFF !important;
}

html.dark-mode body.dark-mode #industry-expertise .lundev-cta-ghost:hover {
    color: #E9D39A !important;
}

/* ---------- Pagination: counter + dots, bottom-left under the text ---------- */
#industry-expertise .lundev-pager {
    position: absolute;
    left: calc(5% + 20px);
    bottom: 60px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 18px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
}

#industry-expertise .lundev-count b {
    color: #E9D39A;
    font-size: 1.15rem;
    font-weight: 700;
}

#industry-expertise .lundev-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

#industry-expertise .lundev-dot {
    position: relative;
    width: 10px;
    height: 10px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease, border-color 0.3s ease;
}

/* bigger invisible tap area */
#industry-expertise .lundev-dot::after {
    content: '';
    position: absolute;
    inset: -10px -4px;
}

#industry-expertise .lundev-dot:hover {
    border-color: #E9D39A;
    background: rgba(233, 211, 154, 0.35);
}

#industry-expertise .lundev-dot[aria-current="true"] {
    width: 34px;
    border-color: var(--ind-gold);
    background: linear-gradient(90deg, #E9D39A, var(--ind-gold));
}

@media (prefers-reduced-motion: reduce) {
    #industry-expertise .lundev-list .lundev-item img {
        scale: 1;
        transition: none;
    }

    #industry-expertise .lundev-dot,
    #industry-expertise .lundev-buttons .btn {
        transition: none;
    }

    #industry-expertise .lundev-arrows.is-nudging button,
    #industry-expertise .lundev-arrows.is-nudging svg {
        animation: none !important;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    /* text spans the full width on phones, so shade top-to-bottom instead of left-to-right */
    #industry-expertise .lundev-list .lundev-item::after {
        background:
            linear-gradient(180deg, rgba(5, 12, 24, 0.75) 0%, rgba(5, 12, 24, 0.55) 45%, rgba(5, 12, 24, 0.85) 100%);
    }

    /* keep the text block inside the screen (it used to start 5% in yet be full width) */
    #industry-expertise .lundev-list .lundev-item .lundev-content {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
    }

    #industry-expertise .lundev-author {
        font-size: 0.68rem;
        letter-spacing: 0.22em;
    }

    #industry-expertise .lundev-author::before {
        width: 26px;
    }

    #industry-expertise .lundev-des {
        font-size: 0.95rem;
        padding: 0.9rem 1rem 0.4rem;
    }
}

/* ---------- Laptops & desktops: keep the text column clear of the thumbnail strip
   (the strip starts at the horizontal centre) ---------- */
@media (min-width: 1025px) {
    #industry-expertise .lundev-list .lundev-item .lundev-content {
        top: 12%;
        width: min(660px, 44vw);
    }

    /* px caps: the site's root font grows to 22px on big screens, which pushed the
       longest slide's buttons into the pager */
    #industry-expertise .lundev-title,
    #industry-expertise .lundev-topic {
        font-size: clamp(42px, 3.7vw, 66px);
    }

    #industry-expertise .lundev-des {
        font-size: clamp(15px, 1.05vw, 18px);
        line-height: 1.6;
    }

    #industry-expertise .lundev-des li {
        margin-bottom: 9px;
    }
}

/* ---------- Phones & tablets: one tidy control bar at the bottom ----------
   The dots replace the thumbnails here, and the arrows move down beside them,
   so nothing sits on top of the slide text. */
@media (max-width: 1024px) {
    #industry-expertise .lundev-thumbnail {
        display: none;
    }

    #industry-expertise .lundev-pager {
        left: 20px;
        bottom: 34px;
        gap: 12px;
    }

    #industry-expertise .lundev-arrows button {
        width: 44px;
        height: 44px;
    }

    #industry-expertise .lundev-buttons {
        margin-top: 22px;
        gap: 10px;
    }

    #industry-expertise .lundev-buttons .btn {
        padding: 11px 18px;
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }
}

/* Short phone screens (e.g. 360 x 640): the slider is only the space under the header, so start
   the text near the top and lower the control bar, keeping the buttons clear of the arrows */
@media (max-width: 768px) and (max-height: 740px) {
    #industry-expertise.lundev-carousel .lundev-list .lundev-item .lundev-content {
        top: 3%;
    }

    #industry-expertise.lundev-carousel .lundev-author {
        margin-bottom: 8px;
    }

    #industry-expertise.lundev-carousel .lundev-buttons {
        margin-top: 14px;
    }

    #industry-expertise .lundev-pager {
        bottom: 16px;
    }
}
