/* =========================================================
   HERO CAROUSEL - AVVISO PREVENTIVO ONLINE
   Desktop, Tablet e Mobile
   ========================================================= */

.hero-online-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    width: 100%;
    max-width: 650px;

    margin: 28px auto 0;
    padding: 15px 20px;

    background: rgba(18, 59, 112, 0.94);
    border: 2px solid #FF8000;
    border-radius: 14px;

    color: #fff;
    text-align: left;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.20),
        0 0 12px rgba(255, 128, 0, 0.30);
}

/* CONTENUTO TESTUALE */

.hero-online-cta-text {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 0;
    flex: 1;
}

.hero-online-cta-text > i {
    flex-shrink: 0;

    font-size: 27px;
    color: #ffd166;
}

.hero-online-cta-text div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hero-online-cta-text strong {
    display: block;

    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.hero-online-cta-text span {
    display: block;

    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    line-height: 1.4;
}

/* PULSANTE */

.hero-online-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    flex-shrink: 0;

    padding: 10px 15px;

    background: #fff;
    color: #123b70;

    border: 1px solid #fff;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.hero-online-cta-btn:hover {
    background: #ffd166;
    border-color: #ffd166;
    color: #123b70;

    transform: translateY(-2px);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .hero-online-cta {
        max-width: 580px;
        gap: 12px;
        padding: 13px 16px;
        margin-top: 22px;
    }

    .hero-online-cta-text > i {
        font-size: 24px;
    }

    .hero-online-cta-text strong {
        font-size: 14px;
    }

    .hero-online-cta-text span {
        font-size: 12px;
    }

    .hero-online-cta-btn {
        padding: 9px 12px;
        font-size: 12px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 576px) {

    .hero-online-cta {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;

        width: calc(100% - 20px);
        max-width: 380px;

        gap: 11px;

        margin: 18px auto 0;
        padding: 12px 14px;

        border: 3px solid #ff8000;
    }

    .hero-online-cta-text {
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
    }

    .hero-online-cta-text > i {
        font-size: 23px;
    }

    .hero-online-cta-text strong {
        font-size: 13px;
        line-height: 1.35;
    }

    .hero-online-cta-text span {
        font-size: 11px;
        line-height: 1.4;
    }

    .hero-online-cta-btn {
        width: 100%;

        justify-content: center;

        padding: 10px 12px;

        font-size: 13px;
        white-space: normal;
    }
}

/* =========================================================
   SMARTPHONE PICCOLI
   ========================================================= */

@media (max-width: 360px) {

    .hero-online-cta {
        width: calc(100% - 16px);
        padding: 10px;
        margin-top: 13px;
        gap: 9px;
    }

    .hero-online-cta-text {
        gap: 8px;
    }

    .hero-online-cta-text > i {
        font-size: 21px;
    }

    .hero-online-cta-text strong {
        font-size: 12px;
    }

    .hero-online-cta-text span {
        font-size: 10px;
    }

    .hero-online-cta-btn {
        padding: 9px;
        font-size: 12px;
    }
}

/* LOGO COPYCOLOR NELL'AVVISO */

.hero-online-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;

    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 3px;
}

/* TABLET */
@media (max-width: 991px) {
    .hero-online-logo {
        width: 43px;
        height: 43px;
    }
}

/* MOBILE */
@media (max-width: 576px) {
    .hero-online-logo {
        width: 40px;
        height: 40px;
    }
}

/* SMARTPHONE PICCOLI */
@media (max-width: 360px) {
    .hero-online-logo {
        width: 36px;
        height: 36px;
    }
}

/* =========================================================
   COPYCOLOR - ONLINE CTA PREMIUM EFFECTS
   ========================================================= */

.hero-online-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    border: 2px solid #ff8c00;

    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;

    animation: onlineCtaGlow 3s ease-in-out infinite;
}

/* LUCE ARANCIONE CHE ATTRAVERSA IL CONTENITORE */

.hero-online-cta::before {
    content: "";
    position: absolute;
    z-index: -1;

    top: -100%;
    left: -60%;

    width: 35%;
    height: 300%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 190, 90, .15),
        transparent
    );

    transform: rotate(25deg);
    animation: onlineCtaShine 6s ease-in-out infinite;

    pointer-events: none;
}

/* ALONE LUMINOSO */

@keyframes onlineCtaGlow {
    0%, 100% {
        box-shadow:
            0 8px 25px rgba(0, 0, 0, .20),
            0 0 8px rgba(255, 140, 0, .20);
    }

    50% {
        box-shadow:
            0 10px 30px rgba(0, 0, 0, .25),
            0 0 19px rgba(255, 140, 0, .48);
    }
}

/* ANIMAZIONE DELLA LUCE */

@keyframes onlineCtaShine {
    0%, 65% {
        left: -60%;
    }

    100% {
        left: 130%;
    }
}

/* LOGO */

.hero-online-logo {
    transition:
        transform .35s ease,
        filter .35s ease;

    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .15));
}

.hero-online-cta:hover .hero-online-logo {
    transform: scale(1.10) rotate(-3deg);
    filter: drop-shadow(0 0 7px rgba(255, 190, 90, .65));
}

/* TITOLO */

.hero-online-cta-text strong {
    transition: color .3s ease;
}

.hero-online-cta:hover .hero-online-cta-text strong {
    color: #ffd166;
}

/* PULSANTE */

.hero-online-cta-btn {
    position: relative;
    overflow: hidden;

    transition:
        transform .3s ease,
        background .3s ease,
        box-shadow .3s ease;
}

.hero-online-cta-btn i {
    transition: transform .3s ease;
}

.hero-online-cta-btn:hover {
    transform: translateY(-3px);
    background: #ffad33;
    border-color: #ffad33;

    box-shadow: 0 5px 16px rgba(255, 140, 0, .35);
}

.hero-online-cta-btn:hover i {
    transform: translateX(5px);
}

/* ACCESSIBILITÀ: RIDUZIONE ANIMAZIONI */

@media (prefers-reduced-motion: reduce) {
    .hero-online-cta,
    .hero-online-cta::before {
        animation: none;
    }

    .hero-online-cta *,
    .hero-online-cta {
        transition: none !important;
    }
}

/* MOBILE: EFFETTI PIÙ DISCRETI */

@media (max-width: 576px) {
    .hero-online-cta {
        animation-duration: 4s;
    }

    .hero-online-cta:hover .hero-online-logo {
        transform: none;
    }
}

/* Smartphone */
@media (max-width: 576px) {
    #heroCarousel .carousel-inner > .carousel-item:first-child .hero-online-cta {
        transform: translateX(25px);
    }
}