.ehn-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    aspect-ratio: var(--ehn-aspect-d, 16/9);
    min-height: var(--ehn-min-h-d, 0px);
    padding: var(--ehn-pad-d, 28px);
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    text-decoration: none !important;
    border: var(--ehn-border-w, 0px) var(--ehn-border-style, solid) var(--ehn-border-color, transparent);
    border-radius: var(--ehn-radius, 14px);
    box-shadow: var(--ehn-shadow, none);
    background: var(--ehn-bg-color, #1f2328);
    transform: translateY(0);
    transition: transform var(--ehn-transition, 350ms) ease, box-shadow var(--ehn-transition, 350ms) ease;
    color: inherit;
}

a.ehn-tile { cursor: pointer; }

.ehn-tile:focus-visible {
    outline: 3px solid var(--ehn-focus-color, #3452ff);
    outline-offset: 3px;
}

.ehn-tile__background,
.ehn-tile__overlay {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
}

.ehn-tile__background {
    z-index: -3;
    background-color: var(--ehn-bg-color, #1f2328);
    background-image: var(--ehn-bg-image, none);
    background-size: cover;
    background-position: var(--ehn-bg-position, center center);
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform var(--ehn-transition, 350ms) ease;
}

.ehn-tile__overlay {
    z-index: -2;
    background: var(--ehn-overlay, rgba(5,6,7,.42));
    transition: background var(--ehn-transition, 350ms) ease, opacity var(--ehn-transition, 350ms) ease;
}

.ehn-tile:hover {
    transform: translateY(calc(var(--ehn-hover-lift, 0px) * -1));
}

.ehn-tile:hover .ehn-tile__background {
    transform: scale(var(--ehn-hover-zoom, 1.05));
}

.ehn-tile:hover .ehn-tile__overlay {
    background: var(--ehn-overlay-hover, rgba(5,6,7,.52));
}

.ehn-tile__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.ehn-tile__title,
.ehn-tile__subtitle {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.ehn-tile__title {
    margin: 0;
    font-family: var(--ehn-title-font, inherit);
    font-size: var(--ehn-title-size-d, 34px);
    font-weight: var(--ehn-title-weight, 700);
    line-height: var(--ehn-title-lh, 1.1);
    letter-spacing: var(--ehn-title-ls, 0px);
    color: var(--ehn-title-color, #fff);
}

.ehn-tile__subtitle {
    margin-top: var(--ehn-subtitle-mt, 10px);
    font-family: var(--ehn-subtitle-font, inherit);
    font-size: var(--ehn-subtitle-size-d, 18px);
    font-weight: var(--ehn-subtitle-weight, 400);
    line-height: var(--ehn-subtitle-lh, 1.35);
    color: var(--ehn-subtitle-color, #fff);
}

.ehn-tile__badges {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: var(--ehn-badge-gap, 6px);
    max-width: calc(50% - var(--ehn-badge-offset, 14px) - 6px);
    pointer-events: none;
}

.ehn-tile__badges--tl { top: var(--ehn-badge-offset, 14px); left: var(--ehn-badge-offset, 14px); align-items: flex-start; }
.ehn-tile__badges--tr { top: var(--ehn-badge-offset, 14px); right: var(--ehn-badge-offset, 14px); align-items: flex-end; }
.ehn-tile__badges--bl { bottom: var(--ehn-badge-offset, 14px); left: var(--ehn-badge-offset, 14px); align-items: flex-start; }
.ehn-tile__badges--br { bottom: var(--ehn-badge-offset, 14px); right: var(--ehn-badge-offset, 14px); align-items: flex-end; }

.ehn-tile__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    padding: var(--ehn-badge-py, 6px) var(--ehn-badge-px, 10px);
    border: var(--ehn-badge-border-w, 0px) solid var(--ehn-badge-border-color, #fff);
    border-radius: var(--ehn-badge-radius, 999px);
    background: var(--ehn-badge-bg, #fff);
    color: var(--ehn-badge-color, #050607);
    font-family: var(--ehn-badge-font, inherit);
    font-size: var(--ehn-badge-size-d, 12px);
    font-weight: var(--ehn-badge-weight, 700);
    line-height: 1.1;
    white-space: normal;
    text-align: left;
    box-sizing: border-box;
}

.ehn-tile__badge-icon {
    display: block;
    width: var(--ehn-badge-icon-size, 16px);
    height: var(--ehn-badge-icon-size, 16px);
    max-width: none;
    flex: 0 0 auto;
    object-fit: contain;
}

.ehn-tile__badge-text { min-width: 0; }

.ehn-tiles-grid {
    display: grid;
    grid-template-columns: repeat(var(--ehn-cols-d, 3), minmax(0, 1fr));
    gap: var(--ehn-group-gap-d, 20px);
    width: 100%;
    min-width: 0;
}

.ehn-tiles-carousel {
    position: relative;
    width: 100%;
    min-width: 0;
}

.ehn-tiles-carousel__viewport {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ehn-tiles-carousel__viewport::-webkit-scrollbar { display: none; }

.ehn-tiles-carousel__track {
    display: flex;
    align-items: stretch;
    gap: var(--ehn-group-gap-d, 20px);
    width: 100%;
}

.ehn-tiles-carousel__slide {
    flex: 0 0 calc((100% - (var(--ehn-visible-d, 3) - 1) * var(--ehn-group-gap-d, 20px)) / var(--ehn-visible-d, 3));
    min-width: 0;
    scroll-snap-align: start;
}

.ehn-tiles-carousel__slide > .ehn-tile { height: 100%; }

.ehn-tiles-carousel__arrow {
    position: absolute;
    z-index: 8;
    top: 50%;
    width: var(--ehn-arrow-size, 42px);
    height: var(--ehn-arrow-size, 42px);
    margin: 0;
    padding: 0;
    border: var(--ehn-arrow-border-w, 0px) solid var(--ehn-arrow-border-color, #fff);
    border-radius: var(--ehn-arrow-radius, 999px);
    background: var(--ehn-arrow-bg, #fff);
    color: var(--ehn-arrow-color, #050607);
    font: inherit;
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 6px 22px rgba(0,0,0,.14);
    transform: translateY(-50%);
    cursor: pointer;
}

.ehn-tiles-carousel__arrow--prev { left: 12px; }
.ehn-tiles-carousel__arrow--next { right: 12px; }
.ehn-tiles-carousel__arrow[disabled] { opacity: .35; cursor: default; }

.ehn-tiles-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
}

.ehn-tiles-carousel__dot {
    width: var(--ehn-dot-size, 8px);
    height: var(--ehn-dot-size, 8px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ehn-dot-color, currentColor);
    opacity: .28;
    cursor: pointer;
}

.ehn-tiles-carousel__dot.is-active { background: var(--ehn-dot-active-color, var(--ehn-dot-color, currentColor)); opacity: .9; transform: scale(1.15); }

@media (max-width: 1000px) {
    .ehn-tile {
        aspect-ratio: var(--ehn-aspect-t, 4/3);
        min-height: var(--ehn-min-h-t, 0px);
        padding: var(--ehn-pad-t, 24px);
    }
    .ehn-tile__title { font-size: var(--ehn-title-size-t, 30px); }
    .ehn-tile__subtitle { font-size: var(--ehn-subtitle-size-t, 17px); }
    .ehn-tile__badge { font-size: var(--ehn-badge-size-t, 12px); }
    .ehn-tiles-grid { grid-template-columns: repeat(var(--ehn-cols-t, 2), minmax(0, 1fr)); gap: var(--ehn-group-gap-t, 16px); }
    .ehn-tiles-carousel__track { gap: var(--ehn-group-gap-t, 16px); }
    .ehn-tiles-carousel__slide {
        flex-basis: calc((100% - (var(--ehn-visible-t, 2) - 1) * var(--ehn-group-gap-t, 16px)) / var(--ehn-visible-t, 2));
    }
}

@media (max-width: 690px) {
    .ehn-tile {
        aspect-ratio: var(--ehn-aspect-m, 1/1);
        min-height: var(--ehn-min-h-m, 0px);
        padding: var(--ehn-pad-m, 20px);
    }
    .ehn-tile__title { font-size: var(--ehn-title-size-m, 26px); }
    .ehn-tile__subtitle { font-size: var(--ehn-subtitle-size-m, 16px); }
    .ehn-tile__badge { font-size: var(--ehn-badge-size-m, 11px); }
    .ehn-tiles-grid { grid-template-columns: repeat(var(--ehn-cols-m, 1), minmax(0, 1fr)); gap: var(--ehn-group-gap-m, 12px); }
    .ehn-tiles-carousel__track { gap: var(--ehn-group-gap-m, 12px); }
    .ehn-tiles-carousel__slide {
        flex-basis: calc((100% - (var(--ehn-visible-m, 1) - 1) * var(--ehn-group-gap-m, 12px)) / var(--ehn-visible-m, 1));
    }
    .ehn-tiles-carousel__arrow { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
    .ehn-tile,
    .ehn-tile__background,
    .ehn-tile__overlay { transition: none !important; }
    .ehn-tile:hover { transform: none; }
    .ehn-tile:hover .ehn-tile__background { transform: none; }
    .ehn-tiles-carousel__viewport { scroll-behavior: auto; }
}
