/* Hard isolation from theme layout, same strategy used on optin. */
.page-template-page-template-funnel-vsl header.container,
.page-template-page-template-funnel-vsl .site-footer,
.page-template-page-template-funnel-vsl .global-bottom-menu,
.page-template-page-template-funnel-vsl .global-desktop-menu {
    display: none !important;
}

.page-template-page-template-funnel-vsl #main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    float: none !important;
    display: block !important;
}

html.page-template-page-template-funnel-vsl,
body.page-template-page-template-funnel-vsl {
    margin: 0 !important;
    overflow-x: hidden;
    background: #0b0d12 !important;
}

/* In VSL template #main is internal content container; keep it transparent
   so the page gradient remains visible across the whole hero. */
.page-template-page-template-funnel-vsl #main {
    background: transparent !important;
}

body.vn-funnel-standalone.vn-funnel-vsl {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    float: none !important;
}

body.vn-funnel-standalone.vn-funnel-vsl > * {
    float: none !important;
}

.vn-funnel-page-vsl {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    min-height: 100vh;
    display: block !important;
    float: none !important;
    background: #101010;
}

body.vn-funnel-vsl #wpadminbar {
    display: none !important;
}

html body.admin-bar.vn-funnel-vsl {
    margin-top: 0 !important;
}

html body.vn-funnel-vsl {
    margin: 0;
    min-height: 100%;
    background: #101010;
    color: #f3f3f3;
    font-family: inherit;
}

.vn-vsl-page {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    padding-top: 78px;
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 18%, rgba(224, 78, 57, 0.4), rgba(16, 16, 16, 0.94) 62%),
        radial-gradient(circle at 78% 34%, rgba(224, 78, 57, 0.13), rgba(16, 16, 16, 0) 64%),
        #101010;
}

.vn-vsl-main {
    min-height: 100vh;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
    padding: clamp(22px, 2.8vw, 42px) 16px 64px;
    box-sizing: border-box;
}

.vn-vsl-wrap {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 0 clamp(18px, 4.5vw, 72px);
    box-sizing: border-box;
}

.vn-optin-floating-header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    padding: 10px clamp(14px, 3vw, 28px);
    background: rgba(7, 9, 13, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform .25s ease, opacity .25s ease;
}

.vn-optin-floating-header.is-hidden {
    transform: translateY(-110%);
    opacity: 0;
}

.vn-optin-floating-header-inner {
    width: min(1320px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vn-optin-floating-header img {
    width: clamp(96px, 10vw, 146px);
    height: auto;
    display: block;
}

.vn-optin-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(100deg, #f16a56 0%, #e04e39 44%, #d14533 72%, #c53a2a 100%);
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s ease, transform .15s ease;
    box-shadow: inset 16px 0 18px rgba(255, 220, 160, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 14px rgba(224, 78, 57, 0.34);
}

.vn-optin-header-cta:hover {
    background: #cc402c;
    transform: translateY(-1px);
}

.vn-vsl-hero {
    padding: 6px 0 0;
    text-align: center;
}

.vn-vsl-intro {
    margin: 0 auto 20px;
    font-size: clamp(1.4rem, 2.8vw, 2.45rem);
    line-height: 1.18;
    font-weight: 800;
    max-width: 52ch;
    color: #111111;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.vn-vsl-eyebrow {
    margin: 0 0 10px;
    color: #f08e7e;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.vn-vsl-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.65rem, 3.2vw, 2.95rem);
    line-height: 1.12;
    max-width: none;
    width: 100%;
    text-shadow: 0 10px 18px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.08), 0 0 6px rgba(255, 214, 170, 0.06);
}

.vn-vsl-subtitle {
    font-size: clamp(1.08rem, 1.45vw, 1.36rem);
    color: #e6e6e6;
    margin: 12px 0 14px;
    max-width: 65ch;
    text-shadow: 0 7px 14px rgba(0, 0, 0, 0.34), 0 0 1px rgba(255, 255, 255, 0.08), 0 0 4px rgba(255, 214, 170, 0.05);
}

.vn-vsl-hero-cta {
    display: inline-block;
    position: relative;
    border-radius: 999px;
    background: #e04e39;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 20px;
    font-size: 0.94rem;
    transition: background .2s ease, transform .15s ease;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 10px rgba(224, 78, 57, 0.22);
}

.vn-vsl-hero-cta:hover {
    background: #cc402c;
    transform: translateY(-1px);
}

.vn-vsl-video-card {
    display: block;
    margin-top: 10px;
    position: relative;
}

.vn-vsl-video-card::before {
    content: "";
    position: absolute;
    inset: -14px -14px auto;
    height: 55%;
    border-radius: 20px;
    background: radial-gradient(circle at 20% 30%, rgba(224, 78, 57, 0.25), rgba(224, 78, 57, 0) 72%);
    pointer-events: none;
    z-index: 0;
}

@media (min-width: 769px) {
    .vn-vsl-video-card::before {
        left: 50%;
        right: auto;
        top: -10px;
        bottom: auto;
        transform: translateX(-50%);
        width: min(460px, 92%);
        height: 92%;
        border-radius: 22px;
        background: radial-gradient(circle at 50% 22%, rgba(224, 78, 57, 0.24), rgba(224, 78, 57, 0) 74%);
    }
}

.vn-vsl-video {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: #0d1017;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
}

.vn-vsl-video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: 0;
}

.vn-vsl-video .vn-vsl-placeholder {
    min-height: clamp(220px, 50vw, 640px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 769px) {
    .vn-vsl-video {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
        max-height: 740px;
        overflow: hidden;
    }

    #vidalytics_embed_6n5ZeWH3vEGDUnTv {
        max-height: 740px;
        overflow: hidden;
    }
}

.vn-vsl-points {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    max-width: 860px;
    text-align: left;
}

.vn-vsl-points li {
    border-left: 3px solid #e04e39;
    padding-left: 12px;
    color: #e6e6e6;
    font-size: 1.03rem;
    line-height: 1.45;
}

.vn-vsl-copy {
    margin-top: 22px;
    color: #1f2937;
    font-size: 1.04rem;
    text-align: left;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(180deg, #ffffff 0%, #fff6f4 100%);
    border: 1px solid #f1d2cc;
    border-radius: 16px;
    padding: clamp(16px, 2.2vw, 28px);
    box-shadow: 0 10px 28px rgba(146, 22, 5, 0.08);
    position: relative;
    overflow: hidden;
}

.vn-vsl-hero-cta {
    margin-top: 16px;
}

.vn-vsl-copy p {
    margin: 0;
    line-height: 1.55;
    position: relative;
    z-index: 1;
}

.vn-vsl-copy p + p {
    margin-top: 10px;
}

.vn-vsl-copy::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 78, 57, 0.16) 0%, rgba(224, 78, 57, 0) 70%);
    pointer-events: none;
}

.vn-vsl-calendar {
    margin-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 22px;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.vn-vsl-calendar-head {
    text-align: center;
}

.vn-vsl-calendar-head h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.2;
}

.vn-vsl-calendar-head p {
    margin: 8px 0 0;
    color: #d9dce2;
    font-size: 0.98rem;
}

.vn-vsl-calendar-body {
    margin-top: 16px;
}

.vn-vsl-booking-form {
    display: grid;
    gap: 16px;
    width: min(760px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.vn-vsl-booking-shell {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    background: #f3f4f7;
    border: 1px solid #d9dde6;
    border-radius: 12px;
    padding: 20px;
    min-height: 560px;
    align-items: start;
}

.vn-vsl-field {
    display: grid;
    gap: 8px;
    align-content: start;
}

.vn-vsl-field-calendar {
    grid-template-rows: auto auto 1fr auto auto;
}

.vn-vsl-field-full {
    grid-column: 1 / -1;
}

.vn-vsl-booking-email-input {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #c5cad6;
    font-size: 1rem;
    background: #ffffff;
    color: #111827;
}

.vn-vsl-booking-email-input:focus {
    outline: none;
    border-color: #e04e39;
    box-shadow: 0 0 0 3px rgba(224, 78, 57, 0.2);
}

.vn-vsl-field-hint {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: #6b7280;
    max-width: 520px;
}

.vn-vsl-field label {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1f2937;
}

.vn-vsl-booking-title {
    margin: 0 0 8px;
    font-size: 2rem;
    line-height: 1.1;
    color: #111827;
}

.vn-vsl-time-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: 440px;
    overflow-y: auto;
    padding-right: 6px;
}

.vn-vsl-calendar-widget {
    display: grid;
    gap: 10px;
}

.vn-vsl-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vn-cal-label {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    text-transform: capitalize;
}

.vn-cal-nav {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.vn-cal-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vn-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.vn-cal-weekdays span {
    text-align: center;
    font-size: 0.74rem;
    color: #6b7280;
    font-weight: 700;
}

.vn-vsl-day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    grid-auto-rows: 36px;
    min-height: 246px;
}

.vn-vsl-day-empty {
    display: block;
    min-height: 36px;
}

.vn-vsl-selected-date {
    margin: 10px 0 0;
    color: #1f2937;
    font-size: 0.9rem;
    text-transform: capitalize;
}

.vn-vsl-timezone {
    margin: 10px 0 0;
    color: #4b5563;
    font-size: 0.9rem;
}

.vn-vsl-time-btn {
    border: 1px solid #e04e39;
    border-radius: 8px;
    background: #fff;
    color: #e04e39;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.vn-vsl-time-btn {
    min-height: 46px;
    font-size: 1rem;
    font-weight: 700;
    padding: 9px 10px;
}

.vn-vsl-time-btn:hover {
    transform: translateY(-1px);
    border-color: #cc402c;
    background: #fff1ef;
}

.vn-vsl-time-btn.is-active {
    border-color: #cc402c;
    background: #e04e39;
    color: #fff;
    box-shadow: 0 6px 14px rgba(224, 78, 57, 0.24);
}

.vn-vsl-booking-error {
    margin: 0 0 12px;
    color: #ffd0c8;
    background: rgba(224, 78, 57, 0.2);
    border: 1px solid rgba(224, 78, 57, 0.48);
    border-radius: 10px;
    padding: 10px 12px;
}

.vn-vsl-calendar-btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 12px 19px;
    background: linear-gradient(135deg, #d64b35 0%, #ef7659 100%);
    color: #fff;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(214, 75, 53, 0.32);
    cursor: pointer;
}

.vn-vsl-day-btn {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    min-height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
}

.vn-vsl-day-btn:hover {
    border-color: #e04e39;
    color: #e04e39;
}

.vn-vsl-day-btn.is-disabled {
    opacity: 0.34;
    cursor: not-allowed;
}

.vn-vsl-day-btn.is-active {
    background: #e04e39;
    color: #fff;
    border-color: #cc402c;
}

.vn-vsl-calendar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.vn-vsl-calendar-embed {
    border-radius: 10px;
    overflow: hidden;
    background: #0e121b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vn-vsl-placeholder {
    background: #1b2030;
    border: 1px dashed rgba(255, 255, 255, 0.26);
    border-radius: 10px;
    color: #d5d5d5;
    padding: 14px;
}

.vn-vsl-placeholder code {
    color: #fff;
}

.vn-optin-footer {
    width: 100vw;
    margin: 40px calc(50% - 50vw) 0;
    border-radius: 0;
    background: #e04e39;
    color: #ffffff;
    text-align: center;
    box-sizing: border-box;
    padding: clamp(18px, 2.4vw, 26px) clamp(16px, 3.4vw, 42px);
}

.vn-optin-footer-logo {
    width: clamp(104px, 10vw, 146px);
    height: auto;
    margin: 0 auto 8px;
    display: block;
}

.vn-optin-footer-lines {
    width: min(1200px, 100%);
    margin: 0 auto;
}

.vn-optin-footer-lines p {
    margin: 0 0 5px;
    font-size: clamp(0.8rem, 0.85vw, 0.92rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
}

.vn-optin-footer-social {
    margin-top: 10px;
    display: inline-flex;
    gap: 9px;
    align-items: center;
}

.vn-optin-footer-social a {
    color: #ffffff;
    display: inline-flex;
    opacity: 0.95;
}

.vn-optin-footer-links {
    margin-top: 9px;
    display: inline-flex;
    gap: 7px;
    align-items: center;
    font-size: 0.76rem;
}

.vn-optin-footer-links a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .vn-vsl-page {
        padding-top: calc(var(--vn-floating-header-offset, 64px) - 14px) !important;
    }

    .vn-vsl-main {
        padding: 6px 10px 44px;
    }

    .vn-vsl-wrap {
        padding: 0 8px;
    }

    .vn-vsl-intro {
        font-size: clamp(1.12rem, 5.4vw, 1.52rem);
        line-height: 1.22;
        max-width: 100%;
        margin-bottom: 24px;
    }

    .vn-vsl-video-card {
        margin-top: 0;
    }

    .vn-vsl-booking-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .vn-vsl-time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }

    .vn-optin-floating-header {
        padding: 6px 10px;
    }

    .vn-optin-floating-header-inner {
        min-height: 42px;
    }

    .vn-optin-header-cta {
        font-size: 0.74rem;
        padding: 8px 12px;
    }

    .vn-vsl-hero h1 {
        font-size: clamp(1.4rem, 7vw, 2.15rem);
    }

    .vn-optin-footer {
        margin-top: 28px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .vn-optin-footer-lines p {
        font-size: 0.74rem;
        line-height: 1.3;
        white-space: normal;
    }
}

/* ===== Light Theme Override (VSL + shared) ===== */
html.page-template-page-template-funnel-vsl,
body.page-template-page-template-funnel-vsl,
.vn-funnel-page-vsl,
.vn-vsl-page,
body.vn-funnel-vsl {
    background:
        radial-gradient(circle at 16% 20%, rgba(224, 78, 57, 0.34), rgba(255, 255, 255, 0.95) 46%),
        radial-gradient(circle at 80% 46%, rgba(224, 78, 57, 0.18), rgba(255, 255, 255, 0) 62%),
        #ffffff !important;
    color: #111111 !important;
}

.vn-optin-floating-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.vn-vsl-eyebrow,
.vn-vsl-hero h1,
.vn-vsl-subtitle,
.vn-vsl-points li,
.vn-vsl-copy,
.vn-vsl-calendar-head h2,
.vn-vsl-calendar-head p {
    color: #111111 !important;
    text-shadow: none !important;
}

.vn-vsl-calendar {
    border-top: 1px solid #e5e7eb !important;
}

.vn-vsl-video {
    border: 1px solid #e5e7eb !important;
    background: #f8fafc !important;
}

.vn-optin-footer {
    background: #ffffff !important;
    color: #111111 !important;
    border-top: 1px solid #e5e7eb;
}

.vn-optin-footer-social a,
.vn-optin-footer-links,
.vn-optin-footer-links a,
.vn-optin-footer-lines p {
    color: #111111 !important;
}

.vn-optin-footer-links a {
    border-bottom: 1px solid rgba(17, 17, 17, 0.35) !important;
}

/* Funnel only: abbassa il pulsante cookie rispetto al sito istituzionale */
body.vn-funnel-standalone .cky-btn-revisit-wrapper.cky-revisit-bottom-left,
body.vn-funnel-standalone .cky-revisit-bottom-left {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
}
