.ew360-videos,
.ew360-videos *,
.ew360-videos-widget,
.ew360-videos-widget *,
.ew360-videos-modal,
.ew360-videos-modal * {
    box-sizing: border-box;
}

.ew360-videos {
    display: grid;
    grid-template-columns: repeat(var(--ew360-videos-columns, 3), minmax(0, 1fr));
    gap: clamp(14px, 2vw, 24px);
    width: 100%;
}

.ew360-videos__item {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.ew360-videos__button,
.ew360-videos-widget__button {
    appearance: none;
    position: relative;
    display: block;
    width: 100%;
    border: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
    background: transparent;
    font: inherit;
    text-align: left;
}

.ew360-videos__button:focus-visible,
.ew360-videos-widget__button:focus-visible,
.ew360-videos-modal__close:focus-visible,
.ew360-videos-widget__view-all:focus-visible {
    outline: 3px solid rgba(33, 117, 255, 0.55);
    outline-offset: 3px;
}

.ew360-videos__image,
.ew360-videos-widget__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.3s ease;
}

.ew360-videos__button:hover .ew360-videos__image {
    transform: scale(1.055);
}

.ew360-videos__overlay {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    min-height: 56%;
    padding: 20px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.76) 100%);
}

.ew360-videos__title {
    display: block;
    min-width: 0;
    font-size: clamp(16px, 1.4vw, 20px);
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.32);
}

.ew360-videos__play,
.ew360-videos-widget__play {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #161616;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, background 0.25s ease;
}

.ew360-videos__play {
    width: 46px;
    height: 46px;
}

.ew360-videos__button:hover .ew360-videos__play {
    transform: translateY(-2px) scale(1.04);
    background: #ffffff;
}

.ew360-videos__play-icon {
    display: block;
    width: 20px;
    height: 20px;
    margin-left: 2px;
}

.ew360-videos-empty {
    padding: 18px;
    border: 1px dashed rgba(0, 0, 0, 0.16);
    border-radius: 14px;
    color: #666;
    background: #fafafa;
}

.ew360-videos__placeholder,
.ew360-videos-widget__image.ew360-videos__placeholder {
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 38%), linear-gradient(135deg, #111827, #020617);
    color: rgba(255, 255, 255, 0.94);
}

.ew360-videos__placeholder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 22px;
    line-height: 1;
}

.ew360-videos-widget {
    width: 100%;
}

.ew360-videos-widget__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ew360-videos-widget__button {
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.ew360-videos-widget__button:hover .ew360-videos-widget__image {
    transform: scale(1.06);
    opacity: 0.9;
}

.ew360-videos-widget__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
}

.ew360-videos-widget__button:hover .ew360-videos-widget__play {
    transform: translate(-50%, -50%) scale(1.05);
}

.ew360-videos-widget__play-icon {
    display: block;
    width: 15px;
    height: 15px;
    margin-left: 2px;
}

.ew360-videos-widget__view-all {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: auto;
    min-height: 0;
    margin-top: 12px;
    padding: 0 0 3px;
    border-radius: 0;
    border-bottom: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ew360-videos-widget__view-all::after {
    content: "→";
    font-size: 14px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.ew360-videos-widget__view-all:hover {
    color: inherit;
    opacity: 0.78;
    transform: translateY(-1px);
}

.ew360-videos-widget__view-all:hover::after {
    transform: translateX(2px);
}

.ew360-videos-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 3vw, 34px);
}

.ew360-videos-modal.is-open {
    display: flex;
}

.ew360-videos-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 9, 18, 0.84);
    backdrop-filter: blur(8px);
}

.ew360-videos-modal__dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(280px, 0.62fr);
    width: min(1180px, 100%);
    max-height: min(86vh, 860px);
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.ew360-videos-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.ew360-videos-modal__media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    background: #05070d;
}

.ew360-videos-modal__media iframe,
.ew360-videos-modal__media video,
.ew360-videos-modal__embed,
.ew360-videos-modal__embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
}

.ew360-videos-modal__media video {
    max-height: 86vh;
    object-fit: contain;
    background: #05070d;
}

.ew360-videos-modal__external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    font-weight: 800;
    text-decoration: none !important;
}

.ew360-videos-modal__content {
    overflow: auto;
    padding: clamp(24px, 3vw, 42px);
    color: #1f2937;
}

.ew360-videos-modal__title {
    margin: 0 0 14px;
    color: #111827;
    font-size: clamp(22px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.15;
}

.ew360-videos-modal__description {
    color: #374151;
    font-size: 16px;
    line-height: 1.72;
}

.ew360-videos-modal__description p {
    margin: 0 0 1em;
}

.ew360-videos-modal__description p:last-child {
    margin-bottom: 0;
}

.ew360-videos-modal__description a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.ew360-videos-modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .ew360-videos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ew360-videos-modal__dialog {
        grid-template-columns: 1fr;
        max-height: 90vh;
    }

    .ew360-videos-modal__media,
    .ew360-videos-modal__media iframe,
    .ew360-videos-modal__media video,
    .ew360-videos-modal__embed,
    .ew360-videos-modal__embed iframe {
        min-height: 240px;
        max-height: 52vh;
    }

    .ew360-videos-modal__content {
        max-height: 38vh;
    }
}

@media (max-width: 560px) {
    .ew360-videos {
        grid-template-columns: 1fr;
    }

    .ew360-videos__overlay {
        padding: 16px;
    }

    .ew360-videos-modal {
        padding: 10px;
    }

    .ew360-videos-modal__dialog {
        border-radius: 18px;
    }

    .ew360-videos-modal__close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
}
