/* Widget RSN Hero (widgets/class-rsn-hero-widget.php) */

.rsn-hero {
    position: relative;
    height: 85vh;
    min-height: 420px;
    overflow: hidden;
    background: #000;
    color: #fff;
    isolation: isolate;
}
.rsn-hero__slides,
.rsn-hero__slide,
.rsn-hero__media,
.rsn-hero__overlay {
    position: absolute;
    inset: 0;
}

/* --- Slide e transizioni --- */
.rsn-hero__slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility 0s linear .9s, transform .9s ease;
}
.rsn-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity .9s ease, visibility 0s, transform .9s ease;
    z-index: 1;
}
.rsn-hero--slide .rsn-hero__slide { opacity: 1; transform: translateX(100%); }
.rsn-hero--slide .rsn-hero__slide.is-prev { transform: translateX(-100%); visibility: visible; }
.rsn-hero--slide .rsn-hero__slide.is-active { transform: none; }
.rsn-hero--zoom .rsn-hero__slide.is-active .rsn-hero__media { animation: rsn-hero-kenburns 12s ease-out both; }
@keyframes rsn-hero-kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}

.rsn-hero__media {
    background-color: #111;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.rsn-hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Video YouTube "a tutto schermo" (copre l'area come object-fit: cover) */
.rsn-hero__media--youtube iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100%;
    min-width: 177.78vh;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
}
.rsn-hero__overlay { background-color: rgba(0, 0, 0, .45); }
.rsn-hero-gradient-yes .rsn-hero__overlay {
    background-image: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, .75));
}

/* --- Testi della slide --- */
.rsn-hero__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 64px 150px;
}
.rsn-hero__content-inner {
    max-width: 860px;
    display: flex;
    flex-direction: column;
    align-items: inherit;
}
.rsn-hero__title {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(32px, 5.5vw, 68px);
    line-height: 1.05;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.rsn-hero__text {
    margin: 0 0 26px;
    color: rgba(255, 255, 255, .9);
    font-size: clamp(16px, 1.6vw, 21px);
    line-height: 1.5;
}
.rsn-hero__button {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 40px;
    background: var(--rsn-studio-button-bg, #e10600);
    color: var(--rsn-studio-button-text, #fff);
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, filter .2s ease, background-color .2s ease;
}
.rsn-hero__button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.rsn-hero__button--nolink { cursor: default; }
.rsn-hero__slide .rsn-hero__content-inner > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s ease;
}
.rsn-hero__slide.is-active .rsn-hero__content-inner > * { opacity: 1; transform: none; }
.rsn-hero__slide.is-active .rsn-hero__content-inner > :nth-child(2) { transition-delay: .15s; }
.rsn-hero__slide.is-active .rsn-hero__content-inner > :nth-child(3) { transition-delay: .3s; }

/* --- Frecce e pallini --- */
.rsn-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: background-color .2s ease;
}
.rsn-hero__arrow:hover { background: rgba(255, 255, 255, .3); }
.rsn-hero__arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}
.rsn-hero__arrow--prev { left: 20px; }
.rsn-hero__arrow--next { right: 20px; }
.rsn-hero__arrow--prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.rsn-hero__arrow--next::before { transform: translate(-70%, -50%) rotate(45deg); }
.rsn-hero__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 118px;
    z-index: 4;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.rsn-hero__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: width .3s ease, background-color .3s ease;
}
.rsn-hero__dot.is-active { width: 28px; background: #fff; }

/* --- Barra radio --- */
.rsn-hero__radio {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 20px 32px 26px;
    flex-wrap: wrap;
}
.rsn-hero__play {
    --rsn-hero-play-bg: var(--rsn-studio-button-bg, #e10600);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px 10px 10px;
    border: 0;
    border-radius: 60px;
    background: var(--rsn-hero-play-bg);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: transform .2s ease, filter .2s ease;
    flex-shrink: 0;
}
.rsn-hero__play:hover { transform: scale(1.03); filter: brightness(1.08); }
.rsn-hero__play-icon {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    flex-shrink: 0;
}
.rsn-hero__play-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent currentColor;
}
/* Effetto "onda" attorno al Play mentre e' fermo, per invitare al clic */
.rsn-hero__play:not(.is-playing) .rsn-hero__play-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .7);
    animation: rsn-hero-pulse 1.8s ease-out infinite;
}
@keyframes rsn-hero-pulse {
    from { transform: scale(1); opacity: .9; }
    to   { transform: scale(1.7); opacity: 0; }
}
.rsn-hero__play.is-playing .rsn-hero__play-icon::before {
    left: 50%;
    width: 16px;
    height: 18px;
    border: 0;
    border-left: 5px solid currentColor;
    border-right: 5px solid currentColor;
}
.rsn-hero__play.is-loading .rsn-hero__play-icon::before {
    width: 22px;
    height: 22px;
    left: 50%;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: rsn-hero-spin .8s linear infinite;
}
@keyframes rsn-hero-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.rsn-hero__eq {
    display: none;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}
.rsn-hero__play.is-playing .rsn-hero__eq { display: inline-flex; }
.rsn-hero__eq i {
    width: 3px;
    height: 100%;
    background: currentColor;
    border-radius: 2px;
    animation: rsn-hero-eq 1s ease-in-out infinite;
}
.rsn-hero__eq i:nth-child(2) { animation-delay: .2s; }
.rsn-hero__eq i:nth-child(3) { animation-delay: .4s; }
.rsn-hero__eq i:nth-child(4) { animation-delay: .1s; }
@keyframes rsn-hero-eq {
    0%, 100% { transform: scaleY(.3); }
    50%      { transform: scaleY(1); }
}
.rsn-hero__eq i { transform-origin: bottom; }
.rsn-hero__play-message {
    align-self: center;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .6);
}

.rsn-hero__info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 18px 10px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex: 0 1 340px;
}
.rsn-hero__info-image,
.rsn-hero__info-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.rsn-hero__info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, .14);
}
.rsn-hero__info-image[hidden] { display: none; }
.rsn-hero__info-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}
.rsn-hero__info-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rsn-studio-menu-hover-color, #ff5a5a);
}
.rsn-hero__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3b3b;
    box-shadow: 0 0 0 0 rgba(255, 59, 59, .7);
    animation: rsn-hero-live 1.6s infinite;
}
@keyframes rsn-hero-live {
    0%   { box-shadow: 0 0 0 0 rgba(255, 59, 59, .7); }
    70%  { box-shadow: 0 0 0 8px rgba(255, 59, 59, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); }
}
.rsn-hero__info-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rsn-hero__info-meta,
.rsn-hero__info-next {
    font-size: 12px;
    opacity: .8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rsn-hero__track.is-changing { animation: rsn-hero-fadein .6s ease; }
@keyframes rsn-hero-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* --- Telefono --- */
@media (max-width: 767px) {
    .rsn-hero { min-height: 520px; }
    .rsn-hero__content { padding: 60px 24px 230px; }
    .rsn-hero__arrow { display: none; }
    .rsn-hero__dots { bottom: 210px; }
    .rsn-hero__radio { padding: 14px 16px 18px; gap: 10px; }
    .rsn-hero__play { width: 100%; justify-content: center; }
    .rsn-hero__info { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .rsn-hero *,
    .rsn-hero *::before,
    .rsn-hero *::after { animation: none !important; transition: none !important; }
}
