/* =========================================================================
   Project showcase — premium demo product gallery
   Per-card branding is driven by --brand / --brand-dark / --brand-light
   custom properties set inline in the Blade partial.
   ========================================================================= */

.tm-section-showcase {
    position: relative;
}

.showcase-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* ------------------------------- Filters ------------------------------- */
.showcase-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.showcase-filter {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.showcase-filter:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.showcase-filter.is-active {
    background: #fff;
    color: #1d220f;
    border-color: #fff;
}

/* -------------------------------- Grid --------------------------------- */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: stretch;
}

/* ------------------------------- Cards --------------------------------- */
.showcase-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
    will-change: transform;
}

/* Brand accent bar along the top */
.showcase-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light));
    z-index: 3;
}

.showcase-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
}

/* --------------------------- Card media -------------------------------- */
.showcase-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}

.showcase-card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
}

.showcase-card:hover .showcase-card-cover {
    transform: scale(1.12);
    filter: saturate(1.05);
}

/* Brand-tinted gradient sitting over the cover for legibility */
.showcase-card-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, color-mix(in srgb, var(--brand-dark) 78%, transparent) 100%);
}

.showcase-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: color-mix(in srgb, var(--brand) 88%, black 12%);
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.showcase-card-logo {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease;
}

.showcase-card-logo img {
    height: 26px;
    width: auto;
    display: block;
}

.showcase-card:hover .showcase-card-logo {
    transform: translateY(-2px);
}

/* Hover overlay with CTA */
.showcase-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    background: color-mix(in srgb, var(--brand-dark) 55%, transparent);
    transition: opacity 0.35s ease;
}

.showcase-card:hover .showcase-card-overlay {
    opacity: 1;
}

.showcase-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 24px;
    border-radius: 999px;
    transform: translateY(10px);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.showcase-card:hover .showcase-overlay-btn {
    transform: translateY(0);
}

.showcase-overlay-btn:hover {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

/* ---------------------------- Card body -------------------------------- */
.showcase-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 26px 26px 28px;
}

.showcase-card-titlerow {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 12px;
}

.showcase-card-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1f2430;
    margin: 0;
    line-height: 1.1;
}

.showcase-card-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand);
}

.showcase-card-desc {
    color: #5b6270;
    font-size: 0.96rem;
    line-height: 1.65;
    margin: 0 0 18px;
}

/* Feature list */
.showcase-features {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 9px;
}

.showcase-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #3c4250;
    line-height: 1.5;
}

.showcase-features .fa {
    color: var(--brand);
    margin-top: 2px;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* Tech chips */
.showcase-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.showcase-chip {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-dark);
    background: color-mix(in srgb, var(--brand) 12%, white);
    border: 1px solid color-mix(in srgb, var(--brand) 26%, white);
    padding: 5px 11px;
    border-radius: 7px;
    white-space: nowrap;
}

/* Actions */
.showcase-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.showcase-btn-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 20px;
    border-radius: 11px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 40%, transparent);
}

.showcase-btn-primary:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--brand) 50%, transparent);
}

.showcase-btn-primary .fa {
    transition: transform 0.25s ease;
}

.showcase-btn-primary:hover .fa {
    transform: translateX(4px);
}

.showcase-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    border: 1.5px solid color-mix(in srgb, var(--brand) 35%, white);
    color: var(--brand);
    border-radius: 11px;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.showcase-btn-ghost:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    text-decoration: none;
}

/* --------------------- Filter hide / reveal animations ----------------- */
.showcase-card.is-hidden {
    display: none;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.showcase-card[data-reveal]:nth-child(2) {
    transition-delay: 0.1s;
}

/* ------------------------------ Responsive ----------------------------- */
@media (max-width: 767px) {
    .showcase-wrap {
        padding: 64px 0;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .showcase-card-title {
        font-size: 1.45rem;
    }

    /* On touch devices, surface the overlay CTA without hover */
    .showcase-card-overlay {
        position: static;
        opacity: 1;
        background: none;
        padding: 0;
        margin-top: 14px;
    }
}

/* Fallback for browsers without color-mix() support */
@supports not (background: color-mix(in srgb, red 50%, white)) {
    .showcase-chip {
        background: #f2f4ea;
        border-color: #dfe4cf;
    }
    .showcase-card-badge {
        background: var(--brand);
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .showcase-card,
    .showcase-card-cover,
    .showcase-overlay-btn,
    [data-reveal] {
        transition: none !important;
    }
    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
