/*
 * slider.css
 * Carousel Bootstrap, full-slider, caption, indicatori, news ticker.
 */

/* ── Full slider wrapper ────────────────────────────── */
.full-slider {
    position: relative;
    z-index: 1;
}
div.full-slider .carousel .item {
    height: 70vh; /* ALtezza Carousel*/
    min-height: 70vh; /* ALtezza Carousel*/
    width: 100%;
}
.full-slider div.item {
    background-size: cover;
    background-position: center center;
}
div.full-slider .carousel-indicators {
    bottom: 45px;
    margin-bottom: 0;
}

/* ── Carousel controls ──────────────────────────────── */
.carousel-control.right,
.carousel-control.left {
    background-image: none;
}
.carousel-control {
    width: 30px;
    height: 30px;
    top: -35px;
    z-index: 25;
}
.left.carousel-control {
    right: 30px;
    left: inherit;
}
.carousel-control .glyphicon-chevron-left,
.carousel-control .glyphicon-chevron-right {
    font-size: 12px;
    background-color: #fff;
    line-height: 30px;
    text-shadow: none;
    color: #333;
    border: none;
}

/* ── Carousel indicators ────────────────────────────── */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}
.carousel-indicators li {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: rgba(255,255,255,.5);
    border: 1px solid rgba(0,0,0,.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}
.carousel-indicators .active {
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-color: #000;
    transform: scale(1.2);
}
.carousel-indicators li:hover {
    background-color: #f91d1d;
    opacity: .9;
}

/* ── Carousel icon & caption ────────────────────────── */
.carousel .icon-container {
    display: inline-block;
    font-size: 25px;
    line-height: 25px;
    padding: 1em;
    text-align: center;
    border-radius: 50%;
}
.carousel-caption button {
    border-color: #00bfff;
    margin-top: 1em;
    animation-delay: 3s;
}
.carousel-caption h3:first-child    { animation-delay: 1s; }
.carousel-caption h3:nth-child(2)   { animation-delay: 2s; }
#carousel-example-generic .carousel-caption {
    position: absolute;
    right: 5%;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding: 0;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: none;
}
#carousel-example-generic .carousel-caption .slider-contant {
    pointer-events: auto;
}

/* ── Slider content ─────────────────────────────────── */
.slider-contant h3 {
    font-size: 58px;
    font-weight: 700;
    color: white; /*Colore del testo nello spazio HOVER nella slide del CAROUSEL*/
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 15px;
    background-color: rgba(17,25,121,.55);
    padding: 18px 22px;
    border-radius: 14px;
    display: inline-block;
}
.carousel-caption p {
    font-size: 16px;
    color: #fff;
    line-height: 1.5;
    background-color: rgba(17,25,121,.45);
    padding: 14px 18px;
    border-radius: 14px;
    display: inline-block;
    max-width: 650px;
}

/* ── Testimonial carousel ───────────────────────────── */
#quote-carousel {
    padding: 0;
    margin-top: 0;
}
#quote-carousel .carousel-control {
    background: none;
    color: #CACACA;
    font-size: 2.3em;
    text-shadow: none;
    margin-top: 30px;
}
#quote-carousel .carousel-indicators {
    position: relative;
    right: 50%;
    top: auto;
    bottom: 0;
    margin-top: 0;
    margin-right: -19px;
    margin-bottom: 20px;
}
#quote-carousel .carousel-indicators li {
    width: 50px;
    height: 50px;
    cursor: pointer;
    border: 1px solid #ccc;
    box-shadow: 0 0 5px rgba(0,0,0,.1);
    border-radius: 50%;
    opacity: .4;
    overflow: hidden;
    transition: all .4s ease-in;
    vertical-align: middle;
}
#quote-carousel .carousel-indicators .active {
    opacity: 1;
    border: none;
}
#quote-carousel p                    { font-size: 15px; }
#quote-carousel .item blockquote p::before {
    content: "\f10d";
    font-family: 'Fontawesome';
    float: left;
    margin-right: 5px;
    font-size: 48px;
    position: relative;
    top: -10px;
}
.item blockquote {
    border-left: none;
    margin: 0;
}
.item blockquote p:before {
    content: "\f10d";
    font-family: 'Fontawesome';
    float: left;
    margin-right: 10px;
}
.testimonial img { max-width: 100%; }
.testimonial-slider {
    float: left;
    width: 80%;
    background: #fff;
    margin: 40px 10% 0 10%;
    padding: 40px 0;
}
.testimonial-slider p              { text-align: center !important; }
.testimonial-slider a.carousel-control { display: none; }

/* ── News ticker ────────────────────────────────────── */
.news {
    width: 100%;
    position: relative;
    z-index: 10;
    padding: 6px 0;
    background: #04612a;
    color: #fff;
    overflow: hidden;
}
.heading-slider {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 38px;
    flex-wrap: nowrap;
    float: left;
    width: 100%;
    padding: 6px 0 0;
}
.heading-slider .headline {
    float: left;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
    color: #fff;
    white-space: nowrap;
}
.headline i { color: #ffcb05; }
.heading-slider b {
    height: 25px;
    margin: 3px 0 0 15px;
    font-weight: 400;
}
.heading-slider h1 {
    float: left;
    margin: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

/* ── Typewriter ─────────────────────────────────────── */
.typewrite {
    display: inline-block;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    line-height: 1.2;
    text-decoration: none;
    font-size: 14px;
    float: left;
}
.typewrite:hover { color: #ffd54f; }
.typewrite .wrap {
    display: inline-block;
    border-right: 2px solid #0af;
    padding-right: 3px;
    white-space: nowrap;
    animation: blink 0.8s infinite;
}
@keyframes blink {
    0%, 100% { border-color: transparent; }
    50%       { border-color: #0af; }
}
.news-box {
    white-space: nowrap;
    overflow: hidden;
}
#newsOutput {
    display: inline-block;
    white-space: nowrap;
}

/* ── Ticker scrolling ───────────────────────────────── */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}
.ticker {
    display: inline-block;
    padding-left: 100%;
    white-space: nowrap;
    animation-name: tickerMove;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
@keyframes tickerMove {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ── Responsive slider ──────────────────────────────── */
@media (max-width: 768px) {
    .slider-contant h3 { font-size: 25px; text-align: left; }
    .slider-contant    { display: none; }
    #carousel-example-generic .carousel-caption { right: 0; display: block; }
    .carousel-indicators {
        position: absolute; bottom: 10px; left: 0; z-index: 15;
        width: 100%; padding-left: 0; margin-left: 0;
        text-align: center; margin: 0;
    }
    .news { display: block !important; padding: 8px 12px !important; overflow: visible !important; height: auto !important; }
    .news .container, .news .heading-slider, .news h1, .news .typewrite, .news .wrap {
        display: block !important; width: 100% !important; max-width: 100% !important;
        overflow: visible !important; visibility: visible !important; opacity: 1 !important;
    }
    .heading-slider { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; }
    .headline       { font-size: 15px !important; white-space: nowrap !important; }
    .heading-slider h1 { font-size: 15px !important; line-height: 1.4 !important; white-space: normal !important; }
    .typewrite      { font-size: 15px !important; line-height: 1.4 !important; white-space: normal !important; pointer-events: none !important; }
    .typewrite .wrap { border-right: none !important; white-space: normal !important; overflow: visible !important; }
    .heading-slider h1, .typewrite, .typewrite .wrap { overflow: visible !important; text-overflow: unset !important; }
    .news { overflow: visible !important; }
    .heading-slider h1 { max-width: 95%; font-size: 14px; overflow: visible; }
    .typewrite { max-width: 100%; }
    .typewrite .wrap { white-space: normal !important; word-break: break-word; }
    .testimonial-slider { float: left; width: 100%; margin: 40px 0 0 0; padding: 40px 0; }
}



/* ── Altezza carousel responsive ───────────────────── */
@media (max-width: 991px) {
    div.full-slider .carousel .item {
        height: 60vh;
        min-height: 60vh;
    }
}
@media (max-width: 768px) {
    div.full-slider .carousel .item {
        height: 40vh;
        min-height: 40vh;
    }
}

/* ── Scritta slider visibile su mobile ──────────────── */
@media (max-width: 992px) {
    .slider-contant {
        display: block !important;  /* sovrascrive display:none */
    }
    .slider-contant h3 {
        font-size: 20px !important;
        padding: 10px 14px !important;
        border-radius: 8px !important;
        margin-bottom: 8px !important;
        letter-spacing: 0 !important;
    }
    .carousel-caption p {
        font-size: 13px !important;
        padding: 8px 12px !important;
        max-width: 100% !important;
    }
}
