/**
 * Travelnet Showcase – scoped styles
 * Prefix: .tn-showcase
 */
.tn-showcase {
    --tn-primary: #0b3c6d;
    --tn-secondary: #00c6d5;
    --tn-bg: #f5f7fa;
    --tn-max-width: 1200px;
    --tn-padding: 32px;
    --tn-hero-max: 420px;
    --tn-hero-ratio: 56.25%;
    --tn-radius: 16px;
    --tn-shadow: 0.35;
    --tn-duration: 550ms;
    --tn-text: #1a2b3c;
    --tn-text-muted: #5a6b7c;
    --tn-surface: #ffffff;
    --tn-border: rgba(11, 60, 109, 0.08);
    box-sizing: border-box;
    width: 100%;
    max-width: var(--tn-max-width);
    margin: 0 auto;
    padding: var(--tn-padding);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--tn-text);
    background: linear-gradient(145deg, var(--tn-bg) 0%, #ffffff 55%, var(--tn-bg) 100%);
    border-radius: calc(var(--tn-radius) + 4px);
    transition: background 600ms ease, box-shadow 600ms ease;
    box-shadow: 0 20px 60px rgba(11, 60, 109, calc(var(--tn-shadow) * 0.12));
    position: relative;
    overflow: hidden;
}

.tn-showcase *,
.tn-showcase *::before,
.tn-showcase *::after {
    box-sizing: border-box;
}

.tn-showcase--theme-dark {
    --tn-text: #eef3f8;
    --tn-text-muted: #a8b8c8;
    --tn-surface: rgba(255, 255, 255, 0.06);
    --tn-border: rgba(255, 255, 255, 0.1);
}

.tn-showcase__inner {
    position: relative;
    z-index: 1;
}

.tn-showcase__header {
    text-align: center;
    margin-bottom: 2rem;
}

.tn-showcase__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--tn-text);
}

.tn-showcase__subtitle {
    margin: 0 auto;
    max-width: 52ch;
    font-size: clamp(0.95rem, 1.8vw, 1.125rem);
    line-height: 1.6;
    color: var(--tn-text-muted);
}

.tn-showcase__layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 2rem;
    align-items: start;
}

.tn-showcase__layout--single {
    grid-template-columns: 1fr;
}

/* Radio tabs – navigation native sans JavaScript */
.tn-showcase__radio {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tn-showcase--js .tn-showcase__panel {
    display: none !important;
}

.tn-showcase--js .tn-showcase__panel.is-active.is-visible,
.tn-showcase--js .tn-showcase__panel.is-active.is-entering,
.tn-showcase--js .tn-showcase__panel.is-active.is-leaving {
    display: block !important;
}

/* Navigation */
.tn-showcase__nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tn-showcase__nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--tn-border);
    border-left: 3px solid transparent;
    border-radius: var(--tn-radius);
    background: var(--tn-surface);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--tn-text);
    margin: 0;
    transition: transform 280ms ease, background 350ms ease, border-color 350ms ease, box-shadow 350ms ease;
    position: relative;
    overflow: hidden;
}

.tn-showcase__nav-item:hover,
.tn-showcase__nav-item:focus {
    outline: none;
    transform: translateX(4px);
    background: color-mix(in srgb, var(--tn-primary) 8%, var(--tn-surface));
    border-left-color: var(--tn-primary);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--tn-primary) 18%, transparent);
}

.tn-showcase__nav-item:focus-visible {
    outline: 2px solid var(--tn-primary);
    outline-offset: 2px;
}

.tn-showcase__nav-item.is-active {
    background: color-mix(in srgb, var(--tn-primary) 12%, var(--tn-surface));
    border-left-color: var(--tn-primary);
    box-shadow: 0 6px 24px color-mix(in srgb, var(--tn-primary) 22%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--tn-primary) 15%, transparent);
}

.tn-showcase__nav-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--tn-primary) 10%, #fff);
    overflow: hidden;
    transition: transform 300ms ease;
}

.tn-showcase__nav-item:hover .tn-showcase__nav-logo,
.tn-showcase__nav-item.is-active .tn-showcase__nav-logo {
    transform: scale(1.06);
}

.tn-showcase__nav-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tn-showcase__nav-logo-fallback {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--tn-primary);
}

.tn-showcase__nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.tn-showcase__nav-name {
    font-weight: 600;
    line-height: 1.3;
}

.tn-showcase__nav-category {
    font-size: 0.8125rem;
    color: var(--tn-text-muted);
    line-height: 1.3;
}

.tn-showcase__nav-arrow {
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--tn-primary);
    border-right: 2px solid var(--tn-primary);
    transform: rotate(45deg) translateX(-4px);
    opacity: 0;
    transition: opacity 280ms ease, transform 280ms ease;
}

.tn-showcase__nav-item:hover .tn-showcase__nav-arrow,
.tn-showcase__nav-item.is-active .tn-showcase__nav-arrow {
    opacity: 1;
    transform: rotate(45deg) translateX(0);
}

/* Stage & panels */
.tn-showcase__stage {
    position: relative;
    min-height: 320px;
}

.tn-showcase__panel {
    display: none;
    opacity: 0;
}

.tn-showcase__panel--hidden {
    display: none !important;
}

.tn-showcase__panel.is-active {
    display: block;
}

.tn-showcase__panel.is-active.is-visible {
    opacity: 1;
}

.tn-showcase__panel.is-leaving {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    pointer-events: none;
    z-index: 1;
}

.tn-showcase__panel.is-entering {
    position: relative;
    z-index: 2;
    display: block;
}

/* Hero */
.tn-showcase__hero {
    margin-bottom: 1.5rem;
}

.tn-showcase__hero-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--tn-radius);
    box-shadow: 0 16px 48px rgba(11, 60, 109, calc(var(--tn-shadow) * 0.2));
    background: linear-gradient(135deg, var(--tn-primary), var(--tn-secondary));
}

.tn-showcase__hero-frame::before {
    content: "";
    display: block;
    padding-top: var(--tn-hero-ratio);
}

@supports (aspect-ratio: 16 / 9) {
    .tn-showcase__hero-frame {
        aspect-ratio: 16 / 9;
        max-height: var(--tn-hero-max);
    }

    .tn-showcase__hero-frame::before {
        display: none;
    }
}

.tn-showcase__hero-img,
.tn-showcase__hero-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    will-change: transform, opacity;
}

.tn-showcase__hero-fallback {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--tn-primary) 70%, #000) 0%,
        color-mix(in srgb, var(--tn-secondary) 60%, #000) 100%);
}

.tn-showcase__panel.is-active.is-visible:not(.is-entering):not(.is-leaving) .tn-showcase__hero-img,
.tn-showcase__panel.is-active.is-visible:not(.is-entering):not(.is-leaving) .tn-showcase__hero-fallback {
    opacity: 1;
    transform: none;
}

.tn-showcase__panel.is-active.is-visible:not(.is-entering):not(.is-leaving) .tn-showcase__content > * {
    opacity: 1;
    transform: none;
}

.tn-showcase__panel.is-leaving .tn-showcase__hero-img,
.tn-showcase__panel.is-leaving .tn-showcase__hero-fallback {
    transform: scale(0.96) translateX(-12px);
    opacity: 0;
    transition: transform var(--tn-duration) ease, opacity var(--tn-duration) ease;
}

.tn-showcase__panel.is-entering .tn-showcase__hero-img,
.tn-showcase__panel.is-entering .tn-showcase__hero-fallback {
    transform: scale(1.04) translateX(16px);
    opacity: 0;
}

.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__hero-img,
.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__hero-fallback {
    transform: scale(1) translateX(0);
    opacity: 1;
    transition: transform var(--tn-duration) cubic-bezier(0.22, 1, 0.36, 1), opacity var(--tn-duration) ease;
}

/* Content */
.tn-showcase__content > * {
    will-change: transform, opacity;
}

.tn-showcase__panel.is-leaving .tn-showcase__content > * {
    transform: translateY(8px);
    opacity: 0;
    transition: transform calc(var(--tn-duration) * 0.8) ease, opacity calc(var(--tn-duration) * 0.7) ease;
}

.tn-showcase__panel.is-entering .tn-showcase__content > * {
    transform: translateY(18px);
    opacity: 0;
}

.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__product-head {
    transition-delay: calc(var(--tn-duration) * 0.15);
}

.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__slogan {
    transition-delay: calc(var(--tn-duration) * 0.25);
}

.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__description {
    transition-delay: calc(var(--tn-duration) * 0.35);
}

.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__features {
    transition-delay: calc(var(--tn-duration) * 0.45);
}

.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__actions {
    transition-delay: calc(var(--tn-duration) * 0.55);
}

.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__content > * {
    transform: translateY(0);
    opacity: 1;
    transition: transform var(--tn-duration) cubic-bezier(0.22, 1, 0.36, 1), opacity var(--tn-duration) ease;
}

.tn-showcase__product-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
}

.tn-showcase__product-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--tn-primary) 10%, #fff);
    overflow: hidden;
}

.tn-showcase__product-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tn-showcase__product-logo-fallback {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--tn-primary);
}

.tn-showcase__product-name {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tn-text);
}

.tn-showcase__slogan {
    margin: 0 0 0.75rem;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 500;
    line-height: 1.45;
    color: var(--tn-primary);
}

.tn-showcase__description {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--tn-text-muted);
    max-width: 60ch;
}

/* Features */
.tn-showcase__features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    max-height: 140px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.tn-showcase__feature {
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--tn-text);
    background: color-mix(in srgb, var(--tn-primary) 8%, var(--tn-surface));
    border: 1px solid color-mix(in srgb, var(--tn-primary) 18%, transparent);
    border-radius: 999px;
    opacity: 0;
    transform: translateY(6px);
}

.tn-showcase__panel.is-active.is-visible .tn-showcase__feature,
.tn-showcase__panel.is-entering.is-anim-in .tn-showcase__feature {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 320ms ease, transform 320ms ease;
    transition-delay: var(--tn-feature-delay, 0ms);
}

/* Buttons */
.tn-showcase__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tn-showcase__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border-radius: calc(var(--tn-radius) - 4px);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease, color 220ms ease;
}

.tn-showcase__btn:hover,
.tn-showcase__btn:focus {
    transform: translateY(-2px);
    text-decoration: none;
}

.tn-showcase__btn:focus-visible {
    outline: 2px solid var(--tn-primary);
    outline-offset: 2px;
}

.tn-showcase__btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--tn-primary), color-mix(in srgb, var(--tn-secondary) 60%, var(--tn-primary)));
    box-shadow: 0 8px 24px color-mix(in srgb, var(--tn-primary) 35%, transparent);
}

.tn-showcase__btn--primary:hover,
.tn-showcase__btn--primary:focus {
    color: #fff;
    box-shadow: 0 12px 32px color-mix(in srgb, var(--tn-primary) 45%, transparent);
}

.tn-showcase__btn--secondary {
    color: var(--tn-primary);
    background: transparent;
    border-color: color-mix(in srgb, var(--tn-primary) 40%, transparent);
}

.tn-showcase__btn--secondary:hover,
.tn-showcase__btn--secondary:focus {
    color: var(--tn-primary);
    background: color-mix(in srgb, var(--tn-primary) 8%, transparent);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tn-showcase,
    .tn-showcase__nav-item,
    .tn-showcase__hero-img,
    .tn-showcase__hero-fallback,
    .tn-showcase__content > *,
    .tn-showcase__feature,
    .tn-showcase__btn {
        transition-duration: 120ms !important;
        transition-delay: 0ms !important;
    }

    .tn-showcase__panel.is-leaving .tn-showcase__hero-img,
    .tn-showcase__panel.is-leaving .tn-showcase__hero-fallback {
        transform: none;
    }

    .tn-showcase__panel.is-entering .tn-showcase__hero-img,
    .tn-showcase__panel.is-entering .tn-showcase__hero-fallback {
        transform: none;
    }

    .tn-showcase__nav-item:hover {
        transform: none;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .tn-showcase__layout {
        grid-template-columns: minmax(180px, 220px) 1fr;
        gap: 1.25rem;
    }

    .tn-showcase__nav-item {
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .tn-showcase__nav-logo {
        width: 34px;
        height: 34px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .tn-showcase {
        padding: calc(var(--tn-padding) * 0.75);
        border-radius: var(--tn-radius);
    }

    .tn-showcase__layout {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .tn-showcase__nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tn-showcase__nav::-webkit-scrollbar {
        display: none;
    }

    .tn-showcase__nav-item {
        flex: 0 0 auto;
        min-width: 160px;
        max-width: 200px;
        transform: none !important;
    }

    .tn-showcase__nav-item:hover {
        transform: none;
    }

    .tn-showcase__nav-arrow {
        display: none;
    }

    .tn-showcase__hero-frame {
        max-height: none;
    }

    .tn-showcase__features {
        max-height: none;
    }

    .tn-showcase__actions {
        flex-direction: column;
    }

    .tn-showcase__btn {
        width: 100%;
    }
}

@media (max-width: 359px) {
    .tn-showcase__nav-item {
        min-width: 140px;
    }
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .tn-showcase__nav-item:hover,
    .tn-showcase__nav-item.is-active {
        background: rgba(11, 60, 109, 0.06);
    }

    .tn-showcase__feature {
        background: rgba(11, 60, 109, 0.08);
        border-color: rgba(11, 60, 109, 0.15);
    }
}
