/* =====================================================================
   Interritoriando - stile comune del sito (header)
   Colori del marchio: blu #4A86E8, rosso #EB0000
   ===================================================================== */
:root {
    --blu: #4A86E8;
    --blu-scuro: #2b5fc9;
    --rosso: #EB0000;
    --notte: #0b1020;
    --hd-h: 84px;
    --hd-h-small: 68px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

.sito-main { padding-top: var(--hd-h); }
body:has(.hx) .sito-main, body:has(.pg-hero) .sito-main, body.con-hero .sito-main { padding-top: 0; }

/* ===================== HEADER ===================== */
.hd {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1040;
    font-family: 'Poppins', system-ui, sans-serif;
    transition: transform .45s var(--ease);
}
.hd::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(11, 16, 32, .82);
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    transition: opacity .45s var(--ease);
}
/* sopra lo slideshow: trasparente con sfumatura, diventa vetro scorrendo */
.hd.is-over::before { opacity: 0; }
.hd.is-over::after {
    content: ""; position: absolute; inset: 0 0 -60px; z-index: -2; pointer-events: none;
    background: linear-gradient(180deg, rgba(5,8,18,.65) 0%, rgba(5,8,18,0) 100%);
    transition: opacity .45s var(--ease);
}
.hd.is-scrolled::before { opacity: 1; }
.hd.is-scrolled::after { opacity: 0; }
.hd.is-hidden { transform: translateY(-100%); }

.hd-bar {
    max-width: 1320px; margin: 0 auto; padding: 0 28px;
    height: var(--hd-h); display: flex; align-items: center; gap: 28px;
    transition: height .4s var(--ease);
}
.hd.is-scrolled .hd-bar { height: var(--hd-h-small); }

.hd-logo { display: flex; align-items: center; flex-shrink: 0; }
.hd-logo img { height: 42px; width: auto; transition: height .4s var(--ease), transform .4s var(--ease); filter: drop-shadow(0 2px 8px rgba(0,0,0,.25)); }
.hd.is-scrolled .hd-logo img { height: 34px; }
.hd-logo:hover img { transform: scale(1.04); }

/* menu */
.hd-nav { margin-left: auto; display: flex; align-items: center; }
.hd-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.hd-item { position: relative; }
.hd-link {
    position: relative; display: flex; align-items: center; gap: 6px;
    padding: 10px 14px; border-radius: 10px;
    color: rgba(255,255,255,.86) !important; text-decoration: none !important;
    font-size: .9rem; font-weight: 500; letter-spacing: .1px; white-space: nowrap;
    transition: color .25s ease, background .25s ease;
}
.hd-link::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--rosso), var(--blu));
    transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.hd-item:hover > .hd-link, .hd-item:focus-within > .hd-link { color: #fff !important; }
.hd-item:hover > .hd-link::after, .hd-item:focus-within > .hd-link::after, .hd-item.is-active > .hd-link::after { transform: scaleX(1); }
.hd-item.is-active > .hd-link { color: #fff !important; }
.hd-caret { font-size: .6rem; opacity: .7; transition: transform .3s var(--ease); }
.hd-item:hover .hd-caret { transform: rotate(180deg); }
.hd-item-soci > .hd-link { color: #ffd76a !important; }
.hd-item-soci > .hd-link i.fa-star { font-size: .75rem; }
.hd-sub-toggle { display: none; }

/* tendine */
.hd-sub {
    position: absolute; top: calc(100% + 10px); left: 50%; min-width: 260px; max-width: 340px;
    transform: translate(-50%, 10px); opacity: 0; visibility: hidden;
    transition: opacity .25s ease, transform .3s var(--ease), visibility 0s linear .3s;
}
.hd-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } /* ponte per il mouse */
.hd-sub ul {
    list-style: none; margin: 0; padding: 8px;
    background: rgba(255,255,255,.98); border-radius: 16px;
    box-shadow: 0 24px 60px rgba(8,12,30,.28), 0 0 0 1px rgba(15,23,42,.05);
    max-height: 70vh; overflow-y: auto;
}
.hd-sub::after {
    content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px;
    background: #fff; transform: rotate(45deg); border-radius: 2px;
}
.hd-item:hover > .hd-sub, .hd-item:focus-within > .hd-sub {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
    transition: opacity .25s ease, transform .3s var(--ease), visibility 0s;
}
.hd-sub li a {
    display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px;
    color: #1e293b !important; text-decoration: none !important; font-size: .86rem; font-weight: 500; line-height: 1.35;
    transition: background .2s ease, color .2s ease, padding .25s var(--ease);
}
.hd-sub li a:hover { background: #eef4ff; color: var(--blu-scuro) !important; padding-left: 16px; }
.hd-sub li.hd-sub-all a { margin-top: 4px; border-top: 1px solid #eef1f6; border-radius: 0 0 10px 10px; color: var(--blu-scuro) !important; font-weight: 600; font-size: .8rem; }
.hd-sub li.hd-sub-all a i { font-size: .7rem; transition: transform .25s ease; }
.hd-sub li.hd-sub-all a:hover i { transform: translateX(4px); }

/* azioni a destra */
.hd-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hd-login {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 40px;
    color: #fff !important; text-decoration: none !important; font-size: .86rem; font-weight: 500;
    border: 1px solid rgba(255,255,255,.28); transition: background .25s ease, border-color .25s ease;
}
.hd-login:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); }

.hd-cta {
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 40px;
    color: #fff !important; text-decoration: none !important; font-size: .86rem; font-weight: 600; white-space: nowrap;
    background: linear-gradient(135deg, #5b95f0 0%, var(--blu) 45%, var(--blu-scuro) 100%);
    box-shadow: 0 8px 22px rgba(74,134,232,.42), inset 0 1px 0 rgba(255,255,255,.25);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.hd-cta::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 50%; z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg); animation: hdShine 4.5s ease-in-out infinite 2s;
}
.hd-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(74,134,232,.55), inset 0 1px 0 rgba(255,255,255,.25); }
@keyframes hdShine { 0% { left: -60%; } 22%, 100% { left: 130%; } }

.hd-user { position: relative; }
.hd-user-btn {
    display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px 0 4px; border-radius: 40px; cursor: pointer;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; font-family: inherit; font-size: .86rem; font-weight: 500;
    transition: background .25s ease;
}
.hd-user-btn:hover { background: rgba(255,255,255,.16); }
.hd-avatar {
    width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--rosso), var(--blu)); font-size: .74rem; font-weight: 700; letter-spacing: .5px;
}
.hd-user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-user-menu {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 8px; border-radius: 16px;
    background: #fff; box-shadow: 0 24px 60px rgba(8,12,30,.28);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .25s ease, transform .3s var(--ease), visibility 0s linear .3s;
}
.hd-user-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.hd-user:hover .hd-user-menu, .hd-user:focus-within .hd-user-menu, .hd-user.is-open .hd-user-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .3s var(--ease), visibility 0s; }
.hd-user-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #1e293b !important; text-decoration: none !important; font-size: .86rem; font-weight: 500; }
.hd-user-menu a i { width: 16px; color: var(--blu); }
.hd-user-menu a:hover { background: #eef4ff; }

.hd-progress {
    position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--rosso), var(--blu));
    transform: scaleX(0); transform-origin: left; opacity: 0; transition: opacity .3s ease;
}
.hd.is-scrolled .hd-progress { opacity: 1; }

/* burger */
.hd-burger {
    display: none; position: relative; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
}
.hd-burger span {
    position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: #fff;
    transition: transform .35s var(--ease), opacity .2s ease, top .35s var(--ease);
}
.hd-burger span:nth-child(1) { top: 14px; }
.hd-burger span:nth-child(2) { top: 21px; right: 18px; }
.hd-burger span:nth-child(3) { top: 28px; }
.hd.menu-open .hd-burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hd.menu-open .hd-burger span:nth-child(2) { opacity: 0; }
.hd.menu-open .hd-burger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.hd-mobile-extra { display: none; }
.hd-backdrop {
    position: fixed; inset: 0; z-index: 1039; background: rgba(5,8,18,.55);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
}
.hd-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }

/* ===================== HEADER MOBILE ===================== */
@media (max-width: 1199px) {
    :root { --hd-h: 72px; --hd-h-small: 64px; }
    .hd-bar { padding: 0 18px; gap: 14px; }
    .hd-logo img { height: 36px; }
    .hd-burger { display: block; }
    .hd-cta-desk span { display: none; }
    .hd-cta-desk { width: 44px; padding: 0; }
    .hd-user-name, .hd-user .hd-caret { display: none; }
    .hd-user-btn { padding: 0 4px; }
    .hd-login span { display: none; }
    .hd-login { width: 44px; padding: 0; justify-content: center; }
    .hd-actions { margin-left: auto; }

    .hd-nav {
        position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); z-index: 1041;
        flex-direction: column; align-items: stretch; margin: 0; padding: 90px 18px 24px;
        background: linear-gradient(180deg, #0f1730 0%, #0b1020 100%);
        box-shadow: -30px 0 60px rgba(0,0,0,.35); overflow-y: auto;
        transform: translateX(105%); transition: transform .45s var(--ease);
    }
    .hd.menu-open .hd-nav { transform: none; }
    .hd-menu { flex-direction: column; align-items: stretch; gap: 2px; }
    .hd-item { opacity: 0; transform: translateX(24px); transition: opacity .35s ease, transform .45s var(--ease); }
    .hd.menu-open .hd-item { opacity: 1; transform: none; }
    .hd.menu-open .hd-item:nth-child(1) { transition-delay: .08s; } .hd.menu-open .hd-item:nth-child(2) { transition-delay: .12s; }
    .hd.menu-open .hd-item:nth-child(3) { transition-delay: .16s; } .hd.menu-open .hd-item:nth-child(4) { transition-delay: .2s; }
    .hd.menu-open .hd-item:nth-child(5) { transition-delay: .24s; } .hd.menu-open .hd-item:nth-child(6) { transition-delay: .28s; }
    .hd.menu-open .hd-item:nth-child(7) { transition-delay: .32s; } .hd.menu-open .hd-item:nth-child(n+8) { transition-delay: .36s; }
    .hd-link { padding: 14px 52px 14px 14px; font-size: 1.02rem; border-radius: 12px; }
    .hd-link::after { display: none; }
    .hd-item.is-active > .hd-link { background: rgba(74,134,232,.16); }
    .hd-link .hd-caret { display: none; }
    .hd-sub-toggle {
        display: flex; align-items: center; justify-content: center; position: absolute; right: 4px; top: 5px; width: 42px; height: 42px;
        border: 0; border-radius: 10px; background: rgba(255,255,255,.06); color: #fff; cursor: pointer;
    }
    .hd-sub-toggle i { font-size: .75rem; transition: transform .3s var(--ease); }
    .hd-item.sub-open .hd-sub-toggle i { transform: rotate(180deg); }
    .hd-sub, .hd-item:hover > .hd-sub, .hd-item:focus-within > .hd-sub {
        position: static; transform: none; opacity: 1; visibility: visible; min-width: 0; max-width: none;
        display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease);
    }
    .hd-sub::before, .hd-sub::after { display: none; }
    .hd-item.sub-open > .hd-sub { grid-template-rows: 1fr; }
    .hd-sub ul { overflow: hidden; min-height: 0; max-height: none; background: transparent; box-shadow: none; padding: 0 0 0 12px; border-radius: 0; }
    .hd-item.sub-open > .hd-sub ul { padding-bottom: 8px; }
    .hd-sub li a { color: rgba(255,255,255,.72) !important; font-size: .92rem; border-left: 1px solid rgba(255,255,255,.12); border-radius: 0 10px 10px 0; }
    .hd-sub li a:hover { background: rgba(255,255,255,.06); color: #fff !important; }
    .hd-sub li.hd-sub-all a { border-top: 0; color: #8db4f5 !important; }
    .hd-mobile-extra { display: block; margin-top: auto; padding-top: 24px; }
    .hd-mobile-extra .hd-cta { width: 100%; height: 50px; }
    .hd-burger { z-index: 1042; }
}
@media (max-width: 420px) {
    .hd-cta-desk { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hd, .hd *, .hd::before { transition: none !important; animation: none !important; }
}

/* ===================== FOOTER ===================== */
.ft {
    position: relative; overflow: hidden; isolation: isolate; margin-top: 80px;
    background: #0b1020; color: rgba(255,255,255,.72); font-family: 'Poppins', system-ui, sans-serif;
    padding: 0 20px;
}
.ft::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); }
.ft-glow span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; z-index: -1; pointer-events: none; }
.ft-glow span:nth-child(1) { width: 520px; height: 520px; left: -180px; top: 60px; background: rgba(74,134,232,.4); animation: ftBlob 18s ease-in-out infinite alternate; }
.ft-glow span:nth-child(2) { width: 460px; height: 460px; right: -160px; bottom: -200px; background: rgba(235,0,0,.25); animation: ftBlob 22s ease-in-out infinite alternate-reverse; }
@keyframes ftBlob { from { transform: translate(0, 0); } to { transform: translate(60px, -40px) scale(1.12); } }
.ft-wrap { max-width: 1264px; margin: 0 auto; }

/* invito */
.ft-cta {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
    margin: 70px 0 64px; padding: clamp(28px, 4vw, 48px); border-radius: 28px;
    background: linear-gradient(120deg, #2b5fc9 0%, #4A86E8 55%, #6b8ff0 100%);
    box-shadow: 0 30px 70px rgba(43,95,201,.35);
}
.ft-cta::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 90% 20%, rgba(255,255,255,.28), transparent 40%), radial-gradient(circle at 0% 120%, rgba(235,0,0,.45), transparent 45%);
}
.ft-cta::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-20deg);
    animation: ftSweep 7s ease-in-out infinite 1s;
}
@keyframes ftSweep { 0% { left: -40%; } 30%, 100% { left: 130%; } }
.ft-cta-text { position: relative; max-width: 640px; }
.ft-cta-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 10px; }
.ft-cta-eyebrow i { color: #ffd76a; }
.ft-cta h2 { color: #fff !important; font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.2rem); letter-spacing: -.8px; line-height: 1.15; margin: 0 0 10px; }
.ft-cta h2 .brand { background: #fff; padding: 0 .35em; border-radius: 7px; }
.ft-cta p { color: rgba(255,255,255,.88); margin: 0; font-size: 1rem; }
.ft-cta-actions { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }
.ft-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 60px;
    font-weight: 600; font-size: .95rem; text-decoration: none !important; white-space: nowrap;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s ease;
}
.ft-btn:hover { transform: translateY(-3px); }
.ft-btn-light { background: #fff; color: #0b1020 !important; box-shadow: 0 14px 30px rgba(0,0,0,.2); }
.ft-btn-light i { color: var(--rosso); }
.ft-btn-line { color: #fff !important; border: 1.5px solid rgba(255,255,255,.6); }
.ft-btn-line:hover { background: rgba(255,255,255,.12); }

/* colonne */
.ft-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: clamp(28px, 4vw, 56px); padding-bottom: 56px; }
.ft-logo img { height: 46px; width: auto; margin-bottom: 18px; }
.ft-claim { font-size: .92rem; line-height: 1.75; margin: 0 0 22px; max-width: 340px; }
.ft-social { display: flex; gap: 10px; }
.ft-social a {
    width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #fff !important; text-decoration: none !important;
    transition: transform .3s var(--ease), background .3s ease, border-color .3s ease;
}
.ft-social a:hover { transform: translateY(-4px); background: linear-gradient(135deg, var(--rosso), var(--blu)); border-color: transparent; }
.ft-col h3 { color: #fff !important; font-size: .82rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin: 6px 0 20px; }
.ft-col ul { list-style: none; margin: 0; padding: 0; }
.ft-col li { margin-bottom: 10px; }
.ft-col li a {
    position: relative; color: rgba(255,255,255,.72) !important; text-decoration: none !important; font-size: .92rem;
    display: inline-flex; align-items: center; transition: color .25s ease, transform .3s var(--ease);
}
.ft-col li a::before { content: ""; width: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--rosso), var(--blu)); margin-right: 0; transition: width .3s var(--ease), margin .3s var(--ease); }
.ft-col li a:hover { color: #fff !important; }
.ft-col li a:hover::before { width: 14px; margin-right: 8px; }
.ft-contact {
    display: flex; align-items: flex-start; gap: 14px; padding: 12px; margin: 0 -12px 4px; border-radius: 14px;
    color: rgba(255,255,255,.85) !important; text-decoration: none !important; transition: background .25s ease;
}
.ft-contact:hover { background: rgba(255,255,255,.06); }
.ft-contact > i { flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(74,134,232,.16); color: #8db4f5; transition: transform .3s var(--ease); }
.ft-contact:hover > i { transform: scale(1.08) rotate(-6deg); }
.ft-contact small { display: block; font-size: .68rem; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 2px; }
.ft-contact span span { font-size: .92rem; word-break: break-word; }

.ft-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 14px 30px; flex-wrap: wrap;
    padding: 26px 0 32px; border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; color: rgba(255,255,255,.5);
}
.ft-bottom p { margin: 0; }
.ft-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.ft-bottom a { color: rgba(255,255,255,.75) !important; text-decoration: none !important; transition: color .25s ease; }
.ft-bottom a:hover { color: #fff !important; }

/* torna su */
.ft-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 1030; width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
    background: #0b1020; color: #fff; box-shadow: 0 12px 30px rgba(11,16,32,.35);
    opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9);
    transition: opacity .35s ease, transform .35s var(--ease), visibility 0s linear .35s;
}
.ft-top.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .35s var(--ease), visibility 0s; }
.ft-top:hover { transform: translateY(-3px); }
.ft-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ft-top circle { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 3; }
.ft-top .ft-top-ring { stroke: var(--blu); stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 138.2; }
.ft-top i { position: relative; font-size: .9rem; transition: transform .3s var(--ease); }
.ft-top:hover i { transform: translateY(-3px); }

/* avviso cookie */
.ck {
    position: fixed; left: 24px; bottom: 24px; z-index: 1035; max-width: 460px; display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: start;
    padding: 20px 22px; border-radius: 22px; background: rgba(255,255,255,.97); color: #1e293b;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px rgba(11,16,32,.3), 0 0 0 1px rgba(15,23,42,.06);
    animation: ckIn .7s var(--ease) 1s both;
}
@keyframes ckIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.ck-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: #fff4e5; color: #b45309; font-size: 1.2rem; }
.ck-text strong { display: block; color: #0b1020; font-size: .98rem; margin-bottom: 4px; }
.ck-text p { margin: 0; font-size: .82rem; line-height: 1.55; color: #64748b; }
.ck-text a { color: var(--blu-scuro); font-weight: 600; }
.ck-btn {
    grid-column: 1 / -1; justify-self: end; height: 44px; padding: 0 22px; border: 0; border-radius: 40px; cursor: pointer;
    background: #0b1020; color: #fff; font-family: inherit; font-weight: 600; font-size: .88rem; transition: transform .3s var(--ease);
}
.ck-btn:hover { transform: translateY(-2px); }

@media (max-width: 991px) {
    .ft-grid { grid-template-columns: 1fr 1fr; }
    .ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
    .ft { padding: 0 14px; }
    .ft-cta { margin-top: 50px; border-radius: 22px; }
    .ft-cta-actions, .ft-cta-actions .ft-btn { width: 100%; }
    .ft-grid { grid-template-columns: 1fr; }
    .ft-bottom { flex-direction: column; align-items: flex-start; }
    .ft-top { right: 16px; bottom: 16px; }
    .ck { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ft *, .ft *::before, .ft *::after, .ck { animation: none !important; transition: none !important; }
}

/* il pulsante "torna su" del tema Porto non serve più */
.scroll-to-top { display: none !important; }

/* ===================== MEGA MENU DEL BLOG ===================== */
@media (min-width: 1200px) {
    .hd-item.hd-mega { position: static; }
    .hd-mega > .hd-mega-panel {
        left: 50%; top: 100%; width: min(1180px, calc(100vw - 40px)); max-width: none; min-width: 0;
        transform: translate(-50%, 14px);
    }
    .hd-mega:hover > .hd-mega-panel, .hd-mega:focus-within > .hd-mega-panel { transform: translate(-50%, 0); }
    .hd-mega > .hd-mega-panel::after { display: none; }
    .hd-mega > .hd-mega-panel::before { top: -24px; height: 24px; }
}
.mg {
    display: grid; grid-template-columns: 300px minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px;
    padding: 22px; border-radius: 24px; background: rgba(255,255,255,.98);
    box-shadow: 0 40px 90px rgba(8,12,30,.32), 0 0 0 1px rgba(15,23,42,.05);
    font-family: 'Poppins', system-ui, sans-serif;
}
.mg-label { display: block; margin: 2px 0 12px; font-size: .7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #94a3b8; }

/* categorie */
.mg-side { display: flex; flex-direction: column; }
.mg-cats { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.mg-cat { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; text-decoration: none !important; color: #0b1020 !important; transition: background .25s ease; }
.mg-cat:hover { background: #f4f2ff; }
.mg-cat-img { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7c3aed, var(--blu)); color: #fff; }
.mg-cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.mg-cat:hover .mg-cat-img img { transform: scale(1.12); }
.mg-cat-t { flex: 1; min-width: 0; font-size: .9rem; font-weight: 600; line-height: 1.25; }
.mg-cat-t small { display: block; font-size: .72rem; font-weight: 500; color: #94a3b8; }
.mg-go { font-size: .7rem; color: #cbd5e1; opacity: 0; transform: translateX(-6px); transition: all .3s var(--ease); }
.mg-cat:hover .mg-go { opacity: 1; transform: none; color: #7c3aed; }
.mg-all {
    margin-top: auto; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 14px;
    background: #0b1020; color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: .86rem; transition: transform .3s var(--ease);
}
.mg-all i:last-child { margin-left: auto; transition: transform .3s var(--ease); }
.mg-all:hover i:last-child { transform: translateX(4px); }
.mg-all i:first-child { color: #c4b5fd; }

/* articolo in evidenza */
.mg-feat { position: relative; display: flex; min-height: 340px; border-radius: 20px; overflow: hidden; isolation: isolate; text-decoration: none !important; background: linear-gradient(135deg, #7c3aed, var(--blu)); }
.mg-feat-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.mg-feat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(6,10,24,.92) 0%, rgba(6,10,24,.2) 60%, rgba(6,10,24,0) 100%); }
.mg-feat:hover .mg-feat-img img { transform: scale(1.07); }
.mg-feat-body { margin-top: auto; padding: 22px; color: #fff; display: flex; flex-direction: column; gap: 8px; }
.mg-badge { align-self: flex-start; padding: 4px 12px; border-radius: 20px; background: rgba(255,255,255,.95); color: #6d28d9; font-size: .68rem; font-weight: 700; letter-spacing: .5px; }
.mg-feat-body strong { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.mg-feat-body small { font-size: .8rem; line-height: 1.5; color: rgba(255,255,255,.8); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* altri articoli */
.mg-list { display: flex; flex-direction: column; }
.mg-post { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; text-decoration: none !important; transition: background .25s ease; }
.mg-post:hover { background: #f4f7fd; }
.mg-post-img { flex-shrink: 0; width: 74px; height: 58px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7c3aed, var(--blu)); color: #fff; }
.mg-post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.mg-post:hover .mg-post-img img { transform: scale(1.1); }
.mg-post-t { min-width: 0; }
.mg-post-t strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #0b1020; font-size: .86rem; font-weight: 600; line-height: 1.3; transition: color .25s ease; }
.mg-post:hover .mg-post-t strong { color: var(--blu-scuro); }
.mg-post-t small { display: block; font-size: .72rem; color: #94a3b8; margin-top: 2px; }

/* comparsa a cascata all'apertura */
@media (min-width: 1200px) {
    .mg-side, .mg-feat, .mg-list { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .5s var(--ease); }
    .hd-mega:hover .mg-side, .hd-mega:focus-within .mg-side { opacity: 1; transform: none; transition-delay: .05s; }
    .hd-mega:hover .mg-feat, .hd-mega:focus-within .mg-feat { opacity: 1; transform: none; transition-delay: .12s; }
    .hd-mega:hover .mg-list, .hd-mega:focus-within .mg-list { opacity: 1; transform: none; transition-delay: .19s; }
}

/* su schermi medi via l'articolo in evidenza */
@media (min-width: 1200px) and (max-width: 1299px) {
    .mg { grid-template-columns: 280px minmax(0, 1fr) minmax(0, 1fr); }
}

/* mobile: dentro il pannello laterale diventa un elenco semplice */
@media (max-width: 1199px) {
    .hd-mega-panel > .mg { display: block; overflow: hidden; min-height: 0; padding: 0 0 8px 12px; background: transparent; box-shadow: none; border-radius: 0; }
    .mg-label { color: rgba(255,255,255,.4); margin: 10px 0 6px; }
    .mg-cats { max-height: none; }
    .mg-cat, .mg-post { color: #fff !important; padding: 6px; }
    .mg-cat:hover, .mg-post:hover { background: rgba(255,255,255,.06); }
    .mg-cat-img { width: 36px; height: 36px; border-radius: 10px; }
    .mg-cat-t small { color: rgba(255,255,255,.45); }
    .mg-go { display: none; }
    .mg-feat { display: none; }
    .mg-post-img { width: 52px; height: 40px; border-radius: 10px; }
    .mg-post-t strong { color: rgba(255,255,255,.85); font-weight: 500; }
    .mg-post-t small { color: rgba(255,255,255,.45); }
    .mg-all { margin-top: 10px; height: 44px; background: rgba(124,58,237,.25); }
}

/* ===================== VOCE E MEGA MENU URBAN BUY CARD ===================== */
.hd-ubc > .hd-link {
    position: relative; margin: 0 6px; padding: 9px 16px 9px 12px; border-radius: 40px;
    background: rgba(255,255,255,.96); color: #0b1020 !important; font-weight: 600;
    box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 8px 24px rgba(74,134,232,.35);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.hd-ubc > .hd-link::before {
    content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit;
    background: conic-gradient(from var(--ubc-a, 0deg), var(--rosso), var(--blu), #a78bfa, var(--rosso));
    animation: ubcGira 4s linear infinite; filter: blur(6px); opacity: .7;
}
@property --ubc-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes ubcGira { to { --ubc-a: 360deg; } }
.hd-ubc > .hd-link::after { display: none; }
.hd-ubc:hover > .hd-link { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 12px 30px rgba(74,134,232,.5); }
.hd-ubc-ico { font-size: .85rem; background: linear-gradient(135deg, var(--rosso), var(--blu)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hd-ubc-t .brand { font-weight: 700; }
.hd-ubc-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; animation: lvPulse 1.8s infinite; }
.hd-ubc > .hd-link .hd-caret { color: #64748b; }
.hd-item.hd-ubc { isolation: isolate; }

.mg-ubc { grid-template-columns: 330px minmax(0, 1fr) minmax(0, 1fr); }
.ub-hero {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 20px; color: #fff;
    background: radial-gradient(circle at 100% 0%, rgba(74,134,232,.55), transparent 50%), radial-gradient(circle at 0% 100%, rgba(235,0,0,.4), transparent 50%), #0b1020;
}
.ub-card {
    position: relative; overflow: hidden; display: flex; flex-direction: column; aspect-ratio: 1.586; border-radius: 16px; padding: 14px 16px; margin-bottom: 6px;
    background: radial-gradient(circle at 85% 15%, rgba(74,134,232,.75), transparent 45%), radial-gradient(circle at 10% 100%, rgba(235,0,0,.55), transparent 45%), linear-gradient(135deg, #1a2550, #0b1020);
    box-shadow: 0 20px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.18);
    transform: rotate(-4deg) translateY(6px); transition: transform .6s var(--ease);
}
.hd-ubc:hover .ub-card { transform: rotate(0) translateY(0); }
.ub-card-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.25) 45%, transparent 60%); background-size: 250% 100%; animation: itSheen 5s ease-in-out infinite; pointer-events: none; }
.ub-card-top { display: flex; justify-content: space-between; align-items: center; }
.ub-card-top .brand { background: #fff; padding: 1px 8px; border-radius: 6px; font-weight: 700; font-size: .78rem; }
.ub-card-top i { transform: rotate(90deg); opacity: .7; font-size: .8rem; }
.ub-card-chip { margin-top: auto; width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #f6d98b, #c9a24a); }
.ub-card-bottom { display: flex; justify-content: space-between; margin-top: 10px; font-size: .62rem; letter-spacing: 1.5px; text-transform: uppercase; opacity: .7; }
.ub-claim { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.ub-price { font-size: .82rem; color: rgba(255,255,255,.75); }
.ub-price b { font-size: 1.4rem; color: #fff; margin-right: 4px; }
.ub-cta {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 14px;
    background: #fff; color: #0b1020 !important; text-decoration: none !important; font-weight: 700; font-size: .9rem; transition: transform .3s var(--ease);
}
.ub-cta i { color: var(--rosso); }
.ub-cta:hover { transform: translateY(-2px); }
.ub-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; background: linear-gradient(100deg, transparent, rgba(74,134,232,.25), transparent); transform: skewX(-20deg); animation: hdShine 4s ease-in-out infinite 1s; }

.ub-link { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; text-decoration: none !important; transition: background .25s ease; }
.ub-link:hover { background: #f4f7fd; }
.ub-ico { flex-shrink: 0; width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--rosso), var(--blu)); box-shadow: 0 8px 18px rgba(74,134,232,.3); transition: transform .3s var(--ease); }
.ub-link:hover .ub-ico { transform: scale(1.08) rotate(-6deg); }
.ub-link strong { display: block; color: #0b1020; font-size: .92rem; font-weight: 600; }
.ub-link small { display: block; color: #94a3b8; font-size: .76rem; }
.ub-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.ub-stats div { padding: 12px 14px; border-radius: 14px; background: #f4f7fd; }
.ub-stats b { display: block; font-size: 1.5rem; font-weight: 800; color: #0b1020; letter-spacing: -.5px; line-height: 1.1; }
.ub-stats small { color: #64748b; font-size: .74rem; }

@media (min-width: 1200px) {
    .mg-ubc .ub-hero { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .5s var(--ease); }
    .hd-ubc:hover .ub-hero, .hd-ubc:focus-within .ub-hero { opacity: 1; transform: none; transition-delay: .05s; }
    .mg-ubc .mg-list:nth-child(2) { transition-delay: .12s; }
}
@media (max-width: 1199px) {
    .hd-ubc > .hd-link { margin: 6px 0; padding: 14px 52px 14px 14px; border-radius: 14px; }
    .hd-ubc > .hd-sub-toggle { top: 11px; background: rgba(11,16,32,.08); color: #0b1020; }
    .ub-hero { display: none; }
    .ub-link strong { color: #fff; font-weight: 500; }
    .ub-link small { color: rgba(255,255,255,.45); }
    .ub-link:hover { background: rgba(255,255,255,.06); }
    .ub-ico { width: 34px; height: 34px; border-radius: 10px; font-size: .8rem; }
    .ub-stats b { color: #fff; } .ub-stats div { background: rgba(255,255,255,.06); } .ub-stats small { color: rgba(255,255,255,.5); }
}
