/* DreamTeam Slider — Frontend */

/* ── Swiper core (fallback se il CSS CDN non carica) ─────────────────── */
.dt-slider {
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.dt-slider .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    box-sizing: content-box;
    transition-property: transform;
    transition-timing-function: ease;
}
.dt-slider .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
}
/* Fade effect */
.dt-slider.swiper-fade .swiper-wrapper {
    transform: none !important;
}
.dt-slider.swiper-fade .swiper-slide {
    position: absolute !important;
    top: 0; left: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--swiper-fade-transition-duration, 800ms) ease;
}
.dt-slider.swiper-fade .swiper-slide-active {
    opacity: 1 !important;
    pointer-events: auto;
    z-index: 1;
}

/* ── Wrapper ─────────────────────────────────────────────────────────── */
.dt-slider-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: var(--dt-slider-height, calc(100vh - 153px));
}
.dt-slider {
    width: 100%;
    height: 100%;
}

.dt-slide {
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* ── Background image ────────────────────────────────────────────────── */
.dt-slide__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.dt-slide__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 8s ease;
}

/* Ken-Burns subtle zoom on active slide */
.swiper-slide-active .dt-slide__img {
    transform: scale(1.06);
}

/* Mobile/desktop image swap */
.dt-slide__img--mobile  { display: none; }
.dt-slide__img--desktop { display: block; }

@media (max-width: 640px) {
    .dt-slide__img--mobile  { display: block; }
    .dt-slide__img--desktop { display: none; }
}

/* ── Overlay ─────────────────────────────────────────────────────────── */
.dt-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ── Inner content — specchia la classe .container del tema ──────────── */
.dt-slide__inner {
    pointer-events: none; /* non intercetta click destinati ai bottoni nav */
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;   /* centratura verticale garantita */
    width: 100%;
    max-width: 120rem;         /* max-w-480 in Tailwind v4 */
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 1.75rem;        /* pad-x: px-7 */
    box-sizing: border-box;
    font-family: var(--font-sans, var(--font-monument, inherit));
}

@media (min-width: 768px) {
    .dt-slide__inner { padding: 0 2.5rem; } /* pad-x: md:px-10 */
}

/* Alignment variants */
.dt-slide--left   .dt-slide__inner { align-items: flex-start; text-align: left; }
.dt-slide--center .dt-slide__inner { align-items: center;     text-align: center; }
.dt-slide--right  .dt-slide__inner { align-items: flex-end;   text-align: right; }

/* ── Badge ───────────────────────────────────────────────────────────── */
.dt-slide__badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* White text variant */
.dt-slide--white .dt-slide__badge {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
}
/* Dark text variant */
.dt-slide--dark .dt-slide__badge {
    background: rgba(0,0,0,.10);
    color: #111;
    border: 1px solid rgba(0,0,0,.18);
}

/* ── Title clip wrapper — overflow hidden per reveal ─────────────────── */
.dt-slide__title-clip {
    overflow: hidden;
    display: block;
    margin: 0 0 12px;
}

/* ── Title ───────────────────────────────────────────────────────────── */
.dt-slide__title {
    margin: 0;
    font-size: clamp(1.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 760px;
    display: block;
}
.dt-slide--white .dt-slide__title { color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.dt-slide--dark  .dt-slide__title { color: #111; }

/* ── Subtitle ────────────────────────────────────────────────────────── */
.dt-slide__subtitle {
    margin: 0 0 10px;
    font-size: clamp(.9rem, 3vw, 1.4rem);
    font-weight: 300;
    line-height: 1.5;
    max-width: 600px;
}
.dt-slide--white .dt-slide__subtitle { color: rgba(255,255,255,.85); }
.dt-slide--dark  .dt-slide__subtitle { color: #444; }

/* ── Description ─────────────────────────────────────────────────────── */
.dt-slide__description {
    margin: 0 0 24px;
    font-size: clamp(.8rem, 2.5vw, 1.05rem);
    font-weight: 300;
    line-height: 1.65;
    max-width: 560px;
}
.dt-slide--white .dt-slide__description { color: rgba(255,255,255,.95); }
.dt-slide--dark  .dt-slide__description { color: #222; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.dt-slide__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.dt-slide__btn {
    pointer-events: auto; /* ripristina click sui CTA dentro l'inner */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    white-space: nowrap;
    cursor: pointer;
}

/* ── Mobile overrides ────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .dt-slide__badge       { font-size: 9px; margin-bottom: 12px; padding: 3px 10px; }
    .dt-slide__title       { font-size: clamp(1.25rem, 8vw, 1.75rem); margin-bottom: 8px; line-height: 1.15; }
    .dt-slide__subtitle    { font-size: .875rem; margin-bottom: 8px; }
    .dt-slide__description { font-size: .8rem; margin-bottom: 20px; line-height: 1.55; }
    .dt-slide__btn         { padding: 10px 20px; font-size: 11px; }
    .dt-slide__buttons     { gap: 8px; }

    /* Forza centratura su mobile indipendentemente dall'allineamento scelto */
    .dt-slide__inner,
    .dt-slide--left  .dt-slide__inner,
    .dt-slide--right .dt-slide__inner {
        align-items: center;
        text-align: center;
    }
    .dt-slide__buttons { justify-content: center; }
}
.dt-slide__btn:hover { transform: translateY(-2px); }

/* Primary */
.dt-slide__btn--primary {
    background: #fff;
    color: #111;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.dt-slide__btn--primary:hover {
    background: #f0f0f0;
    box-shadow: 0 8px 28px rgba(0,0,0,.22);
}
.dt-slide--dark .dt-slide__btn--primary {
    background: #111;
    color: #fff;
}

/* Outline */
.dt-slide__btn--outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,.7);
    color: #fff;
}
.dt-slide__btn--outline:hover {
    background: rgba(255,255,255,.12);
    border-color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.dt-slide--dark .dt-slide__btn--outline {
    border-color: rgba(0,0,0,.5);
    color: #111;
}
.dt-slide--dark .dt-slide__btn--outline:hover {
    background: rgba(0,0,0,.06);
}

/* Ghost */
.dt-slide__btn--ghost {
    background: transparent;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding-left: 4px;
    padding-right: 4px;
}
.dt-slide--dark .dt-slide__btn--ghost { color: #111; }


/* ── Navigation buttons ──────────────────────────────────────────────── */
.dt-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    transition: color .25s ease, transform .25s ease;
    padding: 0;
}
.dt-nav-btn::after { display: none; }
.dt-nav-btn:hover  { color: #fff; transform: translateY(-50%) scale(1.15); }

.swiper-button-prev.dt-nav-btn { left: 16px; }
.swiper-button-next.dt-nav-btn { right: 16px; }

@media (min-width: 768px) {
    .swiper-button-prev.dt-nav-btn { left: 28px; }
    .swiper-button-next.dt-nav-btn { right: 28px; }
}

@media (max-width: 640px) {
    .dt-nav-btn { display: none; }
}

/* ── Pagination ──────────────────────────────────────────────────────── */
.dt-pagination {
    bottom: 24px !important;
}

/* Bullets */
.dt-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,.5);
    opacity: 1;
    transition: width .3s ease, background .3s ease;
    border-radius: 100px;
}
.dt-pagination .swiper-pagination-bullet-active {
    width: 28px;
    background: #fff;
}

/* Progressbar */
.swiper-pagination-progressbar.dt-pagination {
    height: 3px;
    top: 0;
    bottom: auto !important;
    background: rgba(255,255,255,.2);
}
.swiper-pagination-progressbar.dt-pagination .swiper-pagination-progressbar-fill {
    background: #fff;
}

/* Fraction */
.swiper-pagination-fraction.dt-pagination {
    color: rgba(255,255,255,.9);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.06em;
}

/* ── Admin notice (no slides) ────────────────────────────────────────── */
.dt-slider-notice {
    padding: 16px 20px;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    margin: 16px 0;
}
