/* ==========================================================================
   Newman Core — Showcase & Feature Slider
   Custom property: --nmc-accent (Newman coral, can be overridden by theme)
   ========================================================================== */

:root {
    --nmc-accent: #c8674f;
    --nmc-accent-dark: #a8523c;
    --nmc-accent-light: #f2ebe8;
    --nmc-radius: 6px;
    --nmc-card-aspect: 5 / 3;
    --nmc-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    --nmc-shadow-hover: 0 8px 28px rgba(0, 0, 0, .14);
    --nmc-trans: 220ms ease;
}

/* --------------------------------------------------------------------------
   Showcase — card carousel
   -------------------------------------------------------------------------- */

.nmc-showcase {
    margin: 2.5rem 0;
}

.nmc-showcase-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin: 0 0 1.25rem;
    color: inherit;
}

/* Viewport: positions arrows absolutely over the track */
.nmc-showcase-viewport {
    position: relative;
}

/* Horizontal scrolling track */
.nmc-showcase-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    padding-bottom: 4px;            /* allow box-shadow to show */
}

.nmc-showcase-track::-webkit-scrollbar {
    display: none;
}

/* Cards — responsive widths via clamp so 3/2/1 per viewport */
.nmc-showcase-card {
    flex: 0 0 clamp(240px, 30%, 360px);
    scroll-snap-align: start;
    border-radius: var(--nmc-radius);
    overflow: hidden;
    box-shadow: var(--nmc-shadow);
    transition: box-shadow var(--nmc-trans), transform var(--nmc-trans);
    background: #fff;
}

@media (max-width: 700px) {
    .nmc-showcase-card {
        flex: 0 0 clamp(200px, 80vw, 320px);
    }
}

@media (min-width: 701px) and (max-width: 1024px) {
    .nmc-showcase-card {
        flex: 0 0 clamp(220px, 46%, 340px);
    }
}

.nmc-showcase-card:hover {
    box-shadow: var(--nmc-shadow-hover);
    transform: translateY(-3px);
}

.nmc-showcase-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.nmc-showcase-card-media {
    aspect-ratio: var(--nmc-card-aspect);
    overflow: hidden;
    background: #f0eded;
}

.nmc-showcase-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--nmc-trans);
}

.nmc-showcase-card:hover .nmc-showcase-card-img {
    transform: scale(1.03);
}

.nmc-showcase-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e2e0 0%, #d4c8c4 100%);
}

.nmc-showcase-card-body {
    padding: .65rem .9rem .8rem;
}

.nmc-showcase-card-case {
    margin: 0 0 .2rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--nmc-accent);
}

.nmc-showcase-card-proc {
    margin: 0;
    font-size: .85rem;
    color: inherit;
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Prev / Next arrows */
.nmc-showcase-prev,
.nmc-showcase-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--nmc-accent);
    box-shadow: var(--nmc-shadow);
    transition: background var(--nmc-trans), color var(--nmc-trans), opacity var(--nmc-trans);
    padding: 0;
}

.nmc-showcase-prev { left: -.75rem; }
.nmc-showcase-next { right: -.75rem; }

.nmc-showcase-prev:hover,
.nmc-showcase-next:hover {
    background: var(--nmc-accent);
    color: #fff;
    border-color: var(--nmc-accent);
}

.nmc-showcase-prev:disabled,
.nmc-showcase-next:disabled {
    opacity: .35;
    cursor: default;
}

/* "View Full Gallery" footer */
.nmc-showcase-footer {
    margin-top: 1.25rem;
    text-align: center;
}

/* Match the case-page primary CTA: navy bg #363e4e, white text, square. */
.nmc-showcase-gallery-link,
.nmc-showcase-gallery-link:link,
.nmc-showcase-gallery-link:visited,
.nmc-showcase-gallery-link:hover,
.nmc-showcase-gallery-link:focus,
.nmc-showcase-gallery-link:active {
    display: inline-block;
    padding: 10px 18px;
    background-color: #363e4e !important;
    color: #ffffff !important;
    border: 1px solid #363e4e !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background-color .15s, border-color .15s;
}

.nmc-showcase-gallery-link:hover,
.nmc-showcase-gallery-link:focus {
    background-color: #272d39 !important;
    border-color: #272d39 !important;
    color: #ffffff !important;
}

/* Span wrapper bypasses theme's `a:link/:visited { color: blue }` rules
 * that paint visited anchors. Span has no link semantics so theme can't
 * touch it; we set white directly. */
.nmc-showcase-gallery-link .nmc-showcase-gallery-link__label,
.nmc-showcase-gallery-link:link .nmc-showcase-gallery-link__label,
.nmc-showcase-gallery-link:visited .nmc-showcase-gallery-link__label {
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Feature Slider — [eii-gallery-images]
   -------------------------------------------------------------------------- */

.nmc-feature-slider {
    position: relative;
    margin: 1.5rem 0;
    border-radius: var(--nmc-radius);
    overflow: hidden;
    background: #f0eded;
}

.nmc-feature-slider-track {
    position: relative;
    width: 100%;
}

/* Each slide: absolute stack, fades in/out */
.nmc-feature-slider-slide {
    display: none;
    margin: 0;
}

.nmc-feature-slider-slide.nmc-active {
    display: block;
}

.nmc-feature-slider-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.nmc-feature-slider-slide a {
    display: block;
    text-decoration: none;
}

/* Caption */
.nmc-feature-slider-caption {
    padding: .6rem 1rem;
    font-size: .85rem;
    font-style: italic;
    color: inherit;
    opacity: .8;
    text-align: center;
    background: rgba(255, 255, 255, .9);
    margin: 0;
}

/* Single-slide: static, no nav chrome */
.nmc-feature-slider--single figure {
    display: block;
}

/* Navigation arrows */
.nmc-feature-slider-prev,
.nmc-feature-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, .85);
    border: none;
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--nmc-accent);
    box-shadow: var(--nmc-shadow);
    padding: 0;
    transition: background var(--nmc-trans), color var(--nmc-trans);
}

.nmc-feature-slider-prev { left: .5rem; }
.nmc-feature-slider-next { right: .5rem; }

.nmc-feature-slider-prev:hover,
.nmc-feature-slider-next:hover {
    background: var(--nmc-accent);
    color: #fff;
}

/* Dot pager */
.nmc-feature-slider-pager {
    display: flex;
    justify-content: center;
    gap: .4rem;
    padding: .6rem 0;
    background: #fff;
}

.nmc-feature-slider-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    border: 2px solid var(--nmc-accent);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background var(--nmc-trans);
}

.nmc-feature-slider-dot.nmc-active {
    background: var(--nmc-accent);
}
