:root {
    --ink: #10243d;
    --muted: #6f7886;
    --paper: #fffaf4;
    --soft: #f6efe8;
    --line: rgba(16, 36, 61, .12);
    --gold: #c99a3d;
    --terracotta: #bf5436;
    --blue: #062b4d;
    --green: #257c55;
    --shadow: 0 24px 70px rgba(16, 36, 61, .12);
    --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(201, 154, 61, .20), transparent 34rem),
        radial-gradient(circle at 85% 12%, rgba(191, 84, 54, .16), transparent 28rem),
        linear-gradient(180deg, #fff 0%, var(--paper) 42%, #f8f1ea 100%);
    min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--terracotta); }
img { max-width: 100%; display: block; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(255,255,255,.86);
    border-bottom: 1px solid var(--line);
}
.top-notice {
    background: linear-gradient(90deg, var(--blue), #164a77);
    color: #fff;
    font-size: .82rem;
    line-height: 1.45;
    padding: .65rem 1.5rem;
    text-align: center;
}
.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    justify-content: space-between;
}
.brand img { width: min(440px, 58vw); height: auto; object-fit: contain; }
.main-nav { display: flex; align-items: center; gap: .45rem; }
.main-nav a {
    font-weight: 700;
    padding: .75rem 1rem;
    border-radius: 999px;
    color: var(--ink);
}
.main-nav a.active, .main-nav a:hover { background: var(--soft); color: var(--terracotta); }
.nav-toggle { display: none; border: 0; background: var(--soft); border-radius: 14px; padding: .65rem .85rem; font-size: 1.25rem; }

.site-shell {
    width: min(1540px, calc(100% - 2rem));
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 180px;
    gap: 1.2rem;
    align-items: start;
}
.main-content { display: grid; gap: 1.35rem; min-width: 0; }
.soft-card, .ad-card, .page-notice {
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(16, 36, 61, .10);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.page-notice {
    padding: 1rem 1.2rem;
    color: #3c4a5b;
    font-size: .95rem;
    line-height: 1.55;
}

.side-column { display: grid; gap: 1rem; position: sticky; top: 150px; }
.ad-card {
    padding: .85rem;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 16px 44px rgba(16, 36, 61, .10);
}
.ad-card img { border-radius: 18px; margin: 0 auto; width: 100%; height: auto; }
.ad-card.empty { min-height: 190px; display: grid; place-items: center; gap: .35rem; }
.ad-card p { margin: .35rem 0 0; font-size: .85rem; color: var(--muted); }
.ad-label {
    display: inline-block;
    margin-bottom: .6rem;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 800;
}
.top-ads {
    width: min(1120px, calc(100% - 2rem));
    margin: 1rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.hero {
    padding: clamp(1.2rem, 3vw, 2.2rem);
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(320px, .97fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
    overflow: hidden;
}
.eyebrow {
    margin: 0 0 .5rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-weight: 800;
    font-size: .76rem;
}
h1, h2, h3 {
    font-family: "Playfair Display", Georgia, serif;
    color: var(--blue);
    line-height: 1.06;
    margin: 0 0 .85rem;
}
h1 { font-size: clamp(2.2rem, 5vw, 4.7rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); }
h3 { font-size: 1.45rem; }
p { line-height: 1.7; }
.lead { color: #4b596b; font-size: clamp(1.05rem, 1.5vw, 1.24rem); margin: 0 0 1.3rem; }
.hero-actions, .event-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; margin-top: 1.5rem; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .85rem 1.25rem;
    border-radius: 999px;
    border: 0;
    font-weight: 900;
    letter-spacing: .025em;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(16, 36, 61, .16);
}
.btn-primary { background: linear-gradient(135deg, var(--terracotta), #d98b54); color: #fff; }
.btn-primary:hover { color: #fff; transform: translateY(-1px); }
.btn-secondary { background: #fff; color: var(--blue); border: 1px solid var(--line); }
.ticket-note { color: var(--muted); font-size: .95rem; font-weight: 700; }

.slideshow {
    position: relative;
    min-height: clamp(320px, 44vw, 560px);
    border-radius: 34px;
    overflow: hidden;
    background: #0b0b0b;
    box-shadow: 0 26px 70px rgba(6,43,77,.25);
}
.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity .8s ease;
    background: #fff;
}
.slide.active { opacity: 1; }

.intro-grid {
    padding: clamp(1.25rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: .65fr 1fr;
    gap: 2rem;
    align-items: center;
}
.section-head { padding: .35rem .35rem 0; }
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.event-card {
    overflow: hidden;
    background: #fff;
    border-radius: 26px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(16, 36, 61, .10);
}
.event-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f1eee8; }
.event-card-body { padding: 1.1rem; }
.event-meta { color: var(--terracotta); font-weight: 900; margin: 0 0 .45rem; font-size: .9rem; }
.event-card h3 a { color: var(--blue); }
.event-card p { color: var(--muted); margin-bottom: 0; }

.archive-page-link { width: fit-content; margin-top: .4rem; }
.archived-event-card { opacity: .92; }
.archived-event-card img { filter: saturate(.85); }
.archived-badge { background: #eef2f6; color: #536072; margin: 0 0 .55rem; }
.archive-alert {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: #fff7df;
    border: 1px solid rgba(201, 154, 61, .28);
    color: #6b5320;
}
.empty-archive-card { padding: clamp(1.25rem, 3vw, 2rem); }

.cta-band {
    padding: clamp(1.25rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.page-hero.compact { padding: clamp(1.4rem, 4vw, 3rem); }
.content-stack { display: grid; gap: 1rem; }
.content-stack .soft-card { padding: clamp(1.25rem, 3vw, 2rem); }
.event-detail { padding: clamp(1.25rem, 3vw, 2rem); }
.event-cover { width: 100%; max-height: 540px; object-fit: contain; background: #fff; border-radius: 24px; margin-bottom: 1.2rem; }
.rich-text { color: #354458; line-height: 1.75; }
.official-repeat { padding: 1.1rem 1.25rem; background: rgba(255, 250, 244, .9); }
.official-repeat h2 { font-size: 1.35rem; margin-bottom: .3rem; }

.site-footer {
    background: var(--blue);
    color: #fff;
    padding: 2.2rem 1rem;
    margin-top: 3rem;
}
.footer-grid {
    width: min(1240px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer p { color: rgba(255,255,255,.78); margin-bottom: 0; }

/* Admin */
.admin-body, .login-body { background: #f6f1eb; }
.admin-header {
    min-height: 72px;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.admin-brand { font-weight: 900; color: var(--blue); }
.admin-header nav { display: flex; gap: .45rem; flex-wrap: wrap; }
.admin-header nav a { padding: .65rem .85rem; border-radius: 999px; font-weight: 800; }
.admin-header nav a:hover { background: var(--soft); }
.admin-main { width: min(1180px, calc(100% - 2rem)); margin: 2rem auto; display: grid; gap: 1.2rem; }
.admin-page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-page-head h1 { font-size: clamp(2rem, 3vw, 3rem); }
.admin-card, .stats-grid article, .login-card {
    background: rgba(255,255,255,.9);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 55px rgba(16, 36, 61, .10);
    padding: 1.2rem;
}
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.stats-grid article { display: grid; gap: .3rem; }
.stats-grid span { color: var(--muted); font-size: .85rem; font-weight: 800; }
.stats-grid strong { font-size: 2rem; color: var(--blue); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.danger-link { color: #a81f1f; }
.badge, .status { display: inline-flex; border-radius: 999px; padding: .25rem .55rem; font-size: .75rem; font-weight: 900; }
.badge { background: #efe4cf; color: #8b661c; }
.status.on { background: #e1f4ea; color: #176342; }
.status.off { background: #f8e3e0; color: #8e2a20; }
.admin-form { display: grid; gap: 1rem; }
.admin-form label { display: grid; gap: .4rem; font-weight: 800; color: #2d3a4d; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .85rem 1rem;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.check { display: flex !important; grid-template-columns: auto 1fr !important; align-items: center; gap: .6rem !important; }
.check input { width: auto; }
.alert { padding: .85rem 1rem; border-radius: 18px; font-weight: 800; }
.alert.danger { background: #fde9e7; color: #912619; }
.alert.warning { background: #fff3cd; color: #73520d; }
.current-image img { max-width: 180px; border-radius: 18px; border: 1px solid var(--line); }
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login-card { width: min(440px, 100%); display: grid; gap: 1rem; }
.login-card img { width: 280px; margin: 0 auto; }
.login-card h1 { font-size: 2rem; margin-bottom: 0; }
.login-card form { display: grid; gap: 1rem; }

@media (max-width: 1180px) {
    .site-shell { grid-template-columns: minmax(0, 1fr); }
    .side-column { position: static; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .hero { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .header-inner { align-items: center; }
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; left: 1rem; right: 1rem; top: calc(100% + .5rem); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: .75rem; box-shadow: var(--shadow); }
    .main-nav.open { display: grid; }
    .brand img { width: min(330px, 70vw); }
    .site-shell { width: min(100% - 1rem, 1540px); margin: 1rem auto; }
    .hero, .intro-grid, .cta-band { grid-template-columns: 1fr; display: grid; }
    .slideshow { min-height: 360px; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid, .form-row { grid-template-columns: 1fr; }
    .admin-page-head { align-items: flex-start; flex-direction: column; }
}
.bottom-ads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

/* Home slideshow grande */
.home-wide-slider {
    position: relative;
    width: 100%;
    min-height: clamp(440px, 54vw, 760px);
    margin: 0 auto 2rem;
    overflow: hidden;
    background: #061c32;
    box-shadow: 0 30px 90px rgba(6, 43, 77, .24);
}
.home-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    color: #fff;
    transition: opacity .9s ease, transform 6s ease;
    transform: scale(1.015);
}
.home-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}
.home-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
}
.home-slide-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(6, 28, 50, .78), rgba(6, 28, 50, .30) 46%, rgba(6, 28, 50, .12));
}
.home-slide-copy {
    position: absolute;
    left: clamp(1.2rem, 6vw, 7rem);
    bottom: clamp(2.8rem, 7vw, 7rem);
    width: min(760px, calc(100% - 2.4rem));
    display: grid;
    gap: .75rem;
    z-index: 3;
}
.home-slide-copy strong {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.2rem, 6vw, 5.8rem);
    line-height: .98;
    letter-spacing: -.045em;
    text-shadow: 0 10px 34px rgba(0,0,0,.26);
}
.home-slide-copy em {
    font-style: normal;
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.45;
    color: rgba(255,255,255,.92);
    max-width: 620px;
    text-shadow: 0 8px 26px rgba(0,0,0,.26);
}
.home-slide-copy b {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: .9rem 1.25rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--terracotta), #d98b54);
    color: #fff;
    font-size: .92rem;
    letter-spacing: .035em;
    text-transform: uppercase;
    box-shadow: 0 16px 34px rgba(0,0,0,.22);
}
.home-slider-dots {
    position: absolute;
    right: clamp(1rem, 4vw, 4rem);
    bottom: 2rem;
    z-index: 4;
    display: flex;
    gap: .55rem;
}
.home-slider-dots span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.55);
    transition: width .3s ease, background .3s ease;
}
.home-slider-dots span.active {
    width: 34px;
    background: #fff;
}
.home-intro { grid-template-columns: 1fr; }

.admin-form small {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}
.thumb {
    width: 110px;
    max-height: 74px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
}
.current-image.wide img { max-width: 420px; width: 100%; }
.sponsor-body .admin-main { width: min(1240px, calc(100% - 2rem)); }
.sponsor-stats { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1180px) {
    .sponsor-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .home-wide-slider { min-height: 520px; }
    .home-slide-shade { background: linear-gradient(180deg, rgba(6, 28, 50, .18), rgba(6, 28, 50, .86)); }
    .home-slide-copy { left: 1rem; right: 1rem; bottom: 4rem; width: auto; }
    .home-slider-dots { left: 1rem; right: auto; }
    .sponsor-stats { grid-template-columns: 1fr; }
}

/* Eventi gestibili in più aree del sito */
.site-event-highlights {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.2rem;
}
.site-event-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid rgba(191, 111, 70, .25);
    background: linear-gradient(135deg, rgba(255, 248, 238, .96), rgba(238, 226, 208, .74));
    box-shadow: 0 16px 45px rgba(16, 36, 61, .08);
}
.site-event-highlight h2 { font-size: clamp(1.35rem, 2.4vw, 2rem); margin: .15rem 0; }
.site-event-highlight h2 a { color: var(--blue); }
.site-event-highlight p { margin: 0; color: var(--muted); font-weight: 700; }
.side-events {
    display: grid;
    gap: .8rem;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1rem;
    box-shadow: 0 16px 45px rgba(16, 36, 61, .08);
}
.side-events > strong { color: var(--blue); font-size: 1.2rem; }
.side-event-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: .75rem;
    align-items: center;
    color: var(--ink);
    padding: .65rem;
    border-radius: 18px;
    background: var(--soft);
}
.side-event-item img { width: 64px; height: 58px; object-fit: cover; border-radius: 14px; }
.side-event-item em { display: block; font-style: normal; font-size: .76rem; color: var(--terracotta); font-weight: 900; }
.side-event-item b { display: block; font-size: .92rem; line-height: 1.2; color: var(--blue); }
.placement-box {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1rem;
    display: grid;
    gap: .8rem;
    background: rgba(255, 250, 244, .68);
}
.placement-box legend { padding: 0 .5rem; font-weight: 900; color: var(--blue); }
.placement-box p { margin: 0; color: var(--muted); font-weight: 700; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
.badge-list { display: flex; flex-wrap: wrap; gap: .35rem; }
@media (max-width: 760px) {
    .site-event-highlight { align-items: flex-start; flex-direction: column; }
    .check-grid { grid-template-columns: 1fr; }
}

/* Booking multi evento */
.booking-box {
    margin-top: 2rem;
    padding: clamp(1.1rem, 3vw, 2rem);
    border-radius: 28px;
    border: 1px solid rgba(37, 124, 85, .22);
    background: linear-gradient(135deg, rgba(239, 249, 243, .96), rgba(255, 250, 244, .9));
    box-shadow: 0 18px 50px rgba(16, 36, 61, .08);
}
.booking-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}
.booking-head h2 { margin-bottom: 0; }
.booking-availability {
    min-width: 150px;
    border-radius: 24px;
    padding: 1rem;
    text-align: center;
    color: #176342;
    background: #e1f4ea;
    border: 1px solid rgba(37, 124, 85, .20);
}
.booking-availability strong { display: block; font-size: 2rem; line-height: 1; }
.booking-availability span { display: block; font-size: .82rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.booking-form { display: grid; gap: 1rem; }
.form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.privacy-check { font-weight: 700; color: #4b596b; line-height: 1.45; }
.booking-disclaimer {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
    color: #4b596b;
    font-size: .92rem;
}
.booking-mini { margin: .5rem 0; color: var(--green) !important; font-weight: 800; }
.compact-actions { margin-top: 1rem; }
.ticket-card { padding: clamp(1.25rem, 3vw, 2rem); }
.ticket-logo-wrap {
    display: flex;
    justify-content: center;
    padding: .35rem .5rem 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.ticket-logo {
    width: min(680px, 100%);
    height: auto;
    object-fit: contain;
}
.ticket-cover { width: 100%; max-height: 360px; object-fit: cover; border-radius: 24px; margin-bottom: 1.2rem; }
.ticket-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ticket-grid p { padding: 1rem; border-radius: 18px; background: var(--soft); margin: 0; }
.qr-box { width: 260px; min-height: 260px; display: grid; place-items: center; margin: 1rem 0; padding: 10px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.ticket-code { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.alert.success { background: #e2f5ea; color: #176342; }
.status.warn { background: #fff1ce; color: #8b661c; }
.booking-stats { grid-template-columns: repeat(6, 1fr); }
.inline-form { grid-template-columns: minmax(260px, 1fr) auto; align-items: end; }
.inline-action-form { display: inline; }
.link-button { border: 0; background: transparent; padding: 0; color: var(--blue); font: inherit; font-weight: 800; cursor: pointer; }
.link-button:hover { color: var(--terracotta); }
.checkin-card { display: grid; gap: 1rem; }
.checkin-result { border-radius: 24px; padding: 1.2rem; border: 1px solid var(--line); }
.checkin-result.ok { background: #e2f5ea; color: #176342; }
.checkin-result.warn { background: #fff1ce; color: #8b661c; }
.checkin-result.bad { background: #fde9e7; color: #912619; }
.checkin-result h2 { color: inherit; }
@media print {
    .site-header, .site-footer, .side-column, .top-ads, .bottom-ads, .no-print, .page-notice { display: none !important; }
    body { background: #fff; }
    .site-shell { display: block; width: 100%; margin: 0; }
    .soft-card { box-shadow: none; border: 0; }
    .ticket-logo-wrap { border-bottom: 1px solid #ddd; }
}
@media (max-width: 1180px) {
    .booking-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .booking-head { align-items: stretch; flex-direction: column; }
    .form-row.two, .ticket-grid, .inline-form { grid-template-columns: 1fr; }
    .booking-stats { grid-template-columns: 1fr; }
}


/* Responsive pubblico 100% - non modifica admin e sponsor panel */
.public-body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}
.public-body .site-header,
.public-body .site-footer,
.public-body .home-wide-slider,
.public-body .top-ads,
.public-body .site-shell {
    max-width: 100vw;
}
.public-body .header-inner,
.public-body .site-shell,
.public-body .footer-grid,
.public-body .top-ads,
.public-body .bottom-ads {
    min-width: 0;
}
.public-body .main-content,
.public-body .soft-card,
.public-body .event-card,
.public-body .booking-box,
.public-body .ticket-card,
.public-body .site-event-highlight,
.public-body .ad-card,
.public-body .side-events {
    min-width: 0;
}
.public-body h1,
.public-body h2,
.public-body h3,
.public-body p,
.public-body a,
.public-body span,
.public-body strong,
.public-body em,
.public-body b,
.public-body td,
.public-body th {
    overflow-wrap: anywhere;
}
.public-body img,
.public-body video,
.public-body iframe,
.public-body canvas,
.public-body svg {
    max-width: 100%;
}
.public-body .home-wide-slider {
    height: clamp(420px, 52vw, 760px);
    min-height: 0;
}
.public-body .home-slide img,
.public-body .event-card img,
.public-body .event-cover,
.public-body .ticket-cover,
.public-body .ad-card img,
.public-body .side-event-item img {
    image-rendering: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
}
.public-body .event-actions,
.public-body .hero-actions {
    width: 100%;
}
.public-body .btn {
    text-align: center;
    white-space: normal;
}
.public-body .qr-box img,
.public-body .qr-box svg {
    width: 100%;
    height: auto;
}

@media (max-width: 1280px) {
    .public-body .site-shell {
        grid-template-columns: 150px minmax(0, 1fr) 150px;
        gap: .9rem;
    }
    .public-body .header-inner {
        padding-inline: 1rem;
    }
    .public-body .brand img {
        width: min(390px, 50vw);
    }
    .public-body .main-nav a {
        padding: .7rem .82rem;
    }
}

@media (max-width: 1024px) {
    .public-body .site-shell {
        width: min(100% - 1.25rem, 1540px);
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        margin-top: 1rem;
    }
    .public-body .main-content { order: 1; }
    .public-body .side-column-left { order: 2; }
    .public-body .side-column-right { order: 3; }
    .public-body .side-column {
        position: static;
        top: auto;
        grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
        align-items: stretch;
    }
    .public-body .ad-card.empty {
        min-height: 150px;
    }
    .public-body .hero,
    .public-body .intro-grid {
        grid-template-columns: 1fr;
    }
    .public-body .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .public-body .site-header {
        position: sticky;
    }
    .public-body .header-inner {
        gap: .75rem;
        padding: .75rem .9rem;
    }
    .public-body .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }
    .public-body .main-nav {
        display: none;
        position: absolute;
        left: .75rem;
        right: .75rem;
        top: calc(100% + .5rem);
        grid-template-columns: 1fr;
        background: rgba(255,255,255,.98);
        border: 1px solid var(--line);
        border-radius: 22px;
        padding: .75rem;
        box-shadow: var(--shadow);
    }
    .public-body .main-nav.open {
        display: grid;
    }
    .public-body .main-nav a {
        width: 100%;
        padding: .85rem 1rem;
    }
    .public-body .brand img {
        width: min(330px, calc(100vw - 6.5rem));
    }
    .public-body .top-notice {
        padding: .6rem .85rem;
        font-size: .78rem;
    }
    .public-body .home-wide-slider {
        height: clamp(380px, 78vw, 580px);
    }
    .public-body .home-slide-shade {
        background: linear-gradient(180deg, rgba(6, 28, 50, .10), rgba(6, 28, 50, .88));
    }
    .public-body .home-slide-copy {
        left: 1rem;
        right: 1rem;
        bottom: 3.8rem;
        width: auto;
    }
    .public-body .home-slide-copy strong {
        font-size: clamp(2rem, 10vw, 4rem);
    }
    .public-body .home-slide-copy b,
    .public-body .btn {
        width: 100%;
    }
    .public-body .home-slider-dots {
        left: 1rem;
        right: auto;
        bottom: 1.35rem;
    }
    .public-body .cta-band,
    .public-body .site-event-highlight,
    .public-body .booking-head {
        flex-direction: column;
        align-items: stretch;
    }
    .public-body .form-row,
    .public-body .form-row.two,
    .public-body .ticket-grid,
    .public-body .inline-form {
        grid-template-columns: 1fr;
    }
    .public-body .qr-box {
        width: min(260px, 100%);
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .public-body .site-shell,
    .public-body .top-ads,
    .public-body .bottom-ads {
        width: min(100% - .75rem, 1540px);
    }
    .public-body .site-shell {
        margin: .75rem auto;
    }
    .public-body .home-wide-slider {
        height: min(560px, 92vh);
        min-height: 420px;
        margin-bottom: .85rem;
    }
    .public-body .home-slide img {
        object-fit: cover;
    }
    .public-body .soft-card,
    .public-body .ad-card,
    .public-body .side-events,
    .public-body .booking-box,
    .public-body .ticket-card,
    .public-body .event-card {
        border-radius: 20px;
    }
    .public-body .hero,
    .public-body .intro-grid,
    .public-body .page-hero.compact,
    .public-body .content-stack .soft-card,
    .public-body .event-detail,
    .public-body .cta-band,
    .public-body .ticket-card {
        padding: 1rem;
    }
    .public-body .page-notice {
        padding: .9rem 1rem;
        font-size: .88rem;
    }
    .public-body h1 {
        font-size: clamp(2rem, 12vw, 3.1rem);
    }
    .public-body h2 {
        font-size: clamp(1.45rem, 8vw, 2.25rem);
    }
    .public-body .lead {
        font-size: 1rem;
    }
    .public-body .cards-grid,
    .public-body .top-ads,
    .public-body .bottom-ads,
    .public-body .side-column {
        grid-template-columns: 1fr;
    }
    .public-body .side-event-item {
        grid-template-columns: 58px 1fr;
    }
    .public-body .side-event-item img {
        width: 58px;
        height: 54px;
    }
    .public-body .event-cover {
        max-height: none;
        object-fit: contain;
    }
    .public-body .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .public-body input,
    .public-body select,
    .public-body textarea {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .public-body .brand img {
        width: calc(100vw - 5.8rem);
    }
    .public-body .home-slide-copy {
        bottom: 3.4rem;
    }
    .public-body .home-slide-copy strong {
        font-size: 1.85rem;
    }
    .public-body .home-slide-copy em {
        font-size: .95rem;
    }
    .public-body .btn {
        min-height: 46px;
        padding-inline: .85rem;
    }
}

/* Inserzioni video tipo reel */
.ad-clickable { display: block; color: inherit; text-decoration: none; }
.ad-video-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #061c32;
    aspect-ratio: 9 / 16;
    width: 100%;
}
.ad-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #061c32;
}
.ad-card-video { padding: .72rem; }
.ad-video-badge {
    position: absolute;
    left: .65rem;
    bottom: .65rem;
    border-radius: 999px;
    background: rgba(6, 28, 50, .74);
    color: #fff;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .28rem .52rem;
    backdrop-filter: blur(8px);
}
.current-video { display: grid; gap: .35rem; }
.current-video video,
.thumb-video {
    width: 160px;
    max-width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #061c32;
}
.public-body .top-ads .ad-video-wrap,
.public-body .bottom-ads .ad-video-wrap { aspect-ratio: 16 / 9; max-height: 360px; }
@media (max-width: 760px) {
    .public-body .side-column .ad-video-wrap { max-height: 520px; }
    .public-body .top-ads .ad-video-wrap,
    .public-body .bottom-ads .ad-video-wrap { aspect-ratio: 9 / 16; max-height: 620px; }
}


/* Inserzioni nei biglietti: supporta più posizioni e stampa */
.ticket-ads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .85rem;
    margin: 1rem 0;
}
.ticket-ad-card {
    padding: .7rem;
    box-shadow: 0 10px 30px rgba(16, 36, 61, .08);
    break-inside: avoid;
    page-break-inside: avoid;
}
.ticket-ad-card img {
    max-height: 180px;
    object-fit: contain;
    background: #fff;
}
.ticket-ads-ticket_top { margin-top: 0; margin-bottom: 1.2rem; }
.ticket-ads-ticket_middle { margin: 1.2rem 0; }
.ticket-ads-ticket_bottom { margin: 1.2rem 0 1rem; }
@media print {
    .ticket-ads {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
        margin: .65rem 0;
    }
    .ticket-ad-card {
        box-shadow: none;
        border: 1px solid #ddd;
        border-radius: 14px;
        padding: .45rem;
    }
    .ticket-ad-card img { max-height: 90px; }
    .ticket-ad-card .ad-label { margin-bottom: .25rem; font-size: .6rem; }
}

/* Inserzione modale su selezione evento */
.event-ad-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.event-ad-modal.open { display: flex; }
.event-ad-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 18, 35, .68);
    backdrop-filter: blur(8px);
}
.event-ad-modal-panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(92vh, 780px);
    overflow: auto;
    background: rgba(255, 252, 246, .98);
    border: 1px solid rgba(255, 255, 255, .72);
    box-shadow: 0 28px 80px rgba(2, 14, 33, .34);
    border-radius: 30px;
    padding: clamp(1.1rem, 3vw, 1.8rem);
    text-align: center;
}
.event-ad-modal-panel h2 {
    margin: .15rem 2rem 1rem;
    color: var(--blue);
    font-size: clamp(1.35rem, 3vw, 2rem);
}
.event-ad-modal-close {
    position: absolute;
    top: .85rem;
    right: .85rem;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(6, 43, 77, .1);
    color: var(--blue);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}
.event-ad-modal-close:hover { background: rgba(6, 43, 77, .18); }
.event-ad-modal-slot .ad-card {
    margin: 0 auto 1.1rem;
    border-radius: 24px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(6, 43, 77, .06);
}
.event-ad-modal-slot .ad-card img {
    max-height: 58vh;
    object-fit: contain;
}
.event-ad-modal-slot .ad-video-wrap {
    border-radius: 20px;
    overflow: hidden;
    background: #06182b;
}
.event-ad-modal-slot .ad-video {
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
    display: block;
}
.event-ad-loading {
    min-height: 220px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: rgba(6, 43, 77, .06);
    border-radius: 22px;
    margin-bottom: 1rem;
}
.event-ad-modal-continue { width: 100%; justify-content: center; }
.event-ad-modal-open { overflow: hidden; }
@media (max-width: 640px) {
    .event-ad-modal { padding: .75rem; align-items: flex-end; }
    .event-ad-modal-panel { border-radius: 26px 26px 18px 18px; max-height: 88vh; }
    .event-ad-modal-slot .ad-card img,
    .event-ad-modal-slot .ad-video { max-height: 52vh; }
}

/* Diagnostica upload / salvataggio inserzioni */
.alert.soft {
    background: #eef6ff;
    color: #0a3c63;
    border: 1px solid rgba(10, 60, 99, .12);
    line-height: 1.55;
}
.alert.soft a { color: #0a3c63; font-weight: 900; text-decoration: underline; }
.code-block {
    display: block;
    white-space: pre-wrap;
    background: #07182d;
    color: #f7fbff;
    border-radius: 18px;
    padding: 1rem;
    overflow-x: auto;
    line-height: 1.55;
    font-size: .95rem;
}
.admin-form button[disabled] {
    opacity: .65;
    cursor: wait;
}

/* Footer modificabile da pannello admin */
.footer-bottom-text {
    width: min(1240px, 100%);
    margin: 1.5rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.16);
    color: rgba(255,255,255,.72);
    font-size: .95rem;
    line-height: 1.6;
    text-align: center;
}
.footer-bottom-text a { color: #fff; font-weight: 700; }
.footer-official-notice {
    width: min(1240px, 100%);
    margin: 1rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.16);
    color: rgba(255,255,255,.76);
    font-size: .9rem;
    line-height: 1.55;
    text-align: center;
}
.footer-official-notice strong { color: #fff; }

/* Eventi: mappa e calendario */
.event-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin: 1rem 0 1.2rem;
}
.event-quick-actions .btn {
    min-height: 44px;
    padding: .72rem 1rem;
    font-size: .92rem;
}
.event-map-section,
.event-calendar-section {
    margin-top: 1.35rem;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 250, 244, .72);
}
.event-section-head,
.event-calendar-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.event-section-head p,
.event-calendar-section p { margin: .25rem 0 0; color: var(--muted); }
.event-map-frame {
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(16, 36, 61, .14);
    box-shadow: 0 18px 46px rgba(16, 36, 61, .10);
    background: #eef2f6;
}
.event-map-frame iframe {
    display: block;
    width: 100%;
    height: clamp(300px, 48vw, 460px);
    border: 0;
}
.event-calendar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    justify-content: flex-end;
}
@media (max-width: 760px) {
    .event-section-head,
    .event-calendar-section {
        align-items: stretch;
        flex-direction: column;
    }
    .event-section-head .btn,
    .event-calendar-actions .btn,
    .event-quick-actions .btn {
        width: 100%;
    }
    .event-calendar-actions { justify-content: stretch; }
}


/* Newsletter header */
.header-newsletter {
    max-width: 1440px;
    margin: 0 auto;
    padding: .75rem clamp(1rem, 3vw, 2rem) 1rem;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 520px);
    gap: 1rem;
    align-items: center;
}
.header-newsletter-copy {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .55rem;
    align-items: baseline;
    color: var(--blue);
}
.header-newsletter-copy strong { font-weight: 900; }
.header-newsletter-copy span { color: var(--muted); font-weight: 800; }
.header-newsletter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem;
    align-items: center;
}
.header-newsletter-form input {
    border-radius: 999px;
    padding: .78rem 1rem;
}
.header-newsletter-form button {
    border: 0;
    border-radius: 999px;
    padding: .78rem 1rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--terracotta), #d98b54);
    cursor: pointer;
}
.newsletter-message {
    width: min(1440px, calc(100% - 2rem));
    margin: 0 auto 1rem;
    padding: .8rem 1rem;
    border-radius: 18px;
    font-weight: 800;
    text-align: center;
}
.newsletter-message.success { background: #e2f5ea; color: #176342; }
.newsletter-message.danger { background: #fde9e7; color: #912619; }
.newsletter-check {
    padding: .85rem 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(37, 124, 85, .18);
    font-weight: 800;
    color: #345243;
    line-height: 1.45;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.newsletter-stats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) {
    .header-newsletter { grid-template-columns: 1fr; padding-top: .35rem; }
}
@media (max-width: 560px) {
    .header-newsletter-form { grid-template-columns: 1fr; }
    .header-newsletter-form button { width: 100%; }
    .newsletter-stats { grid-template-columns: 1fr; }
}

/* Slideshow home più contenuto: immagini intere e non tagliate */
.home-wide-slider,
.public-body .home-wide-slider {
    width: min(1120px, calc(100% - 2rem));
    height: clamp(260px, 34vw, 440px);
    min-height: 0;
    margin: 1rem auto 1.5rem;
    border-radius: 28px;
    background: #0b1826;
    box-shadow: 0 18px 56px rgba(6, 43, 77, .18);
}
.home-slide img,
.public-body .home-slide img {
    object-fit: contain;
    object-position: center;
    background: #0b1826;
}
.home-slide-shade,
.public-body .home-slide-shade {
    background: linear-gradient(180deg, rgba(6, 28, 50, .04), rgba(6, 28, 50, .72));
}
.home-slide-copy,
.public-body .home-slide-copy {
    left: clamp(1rem, 3vw, 2rem);
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1.4rem, 3vw, 2.4rem);
    width: auto;
    gap: .45rem;
}
.home-slide-copy strong,
.public-body .home-slide-copy strong {
    font-size: clamp(1.5rem, 3.2vw, 3.1rem);
    line-height: 1.04;
}
.home-slide-copy em,
.public-body .home-slide-copy em {
    font-size: clamp(.88rem, 1.2vw, 1.05rem);
    max-width: 560px;
}
.home-slide-copy b,
.public-body .home-slide-copy b {
    min-height: 42px;
    padding: .65rem 1rem;
    font-size: .8rem;
}
.home-slider-dots,
.public-body .home-slider-dots {
    right: clamp(1rem, 3vw, 2rem);
    bottom: .9rem;
}
.slideshow,
.public-body .slideshow {
    min-height: clamp(240px, 30vw, 400px);
}
.slide,
.public-body .slide {
    object-fit: contain;
}
@media (max-width: 900px) {
    .home-wide-slider,
    .public-body .home-wide-slider {
        width: min(100% - 1rem, 1120px);
        height: clamp(240px, 58vw, 380px);
        border-radius: 22px;
    }
    .home-slide-copy,
    .public-body .home-slide-copy {
        bottom: 2.5rem;
    }
    .home-slide-copy strong,
    .public-body .home-slide-copy strong {
        font-size: clamp(1.35rem, 6vw, 2.4rem);
    }
    .home-slide-copy b,
    .public-body .home-slide-copy b {
        width: fit-content;
        max-width: 100%;
    }
}
@media (max-width: 560px) {
    .home-wide-slider,
    .public-body .home-wide-slider {
        height: clamp(220px, 72vw, 340px);
        margin-top: .75rem;
        margin-bottom: 1rem;
        border-radius: 18px;
    }
    .home-slide-copy em,
    .public-body .home-slide-copy em {
        display: none;
    }
}

/* Header più compatto */
.site-header {
    backdrop-filter: blur(14px);
}
.header-inner,
.public-body .header-inner {
    padding-top: .45rem;
    padding-bottom: .45rem;
    gap: .85rem;
}
.brand img,
.public-body .brand img {
    width: min(300px, 40vw);
    max-height: 64px;
    object-fit: contain;
}
.main-nav,
.public-body .main-nav {
    gap: .25rem;
}
.main-nav a,
.public-body .main-nav a {
    padding: .48rem .72rem;
    font-size: .92rem;
    line-height: 1.1;
}
.nav-toggle,
.public-body .nav-toggle {
    padding: .45rem .65rem;
    min-width: 40px;
    min-height: 40px;
    font-size: 1.05rem;
}
.header-newsletter {
    padding: .22rem clamp(1rem, 3vw, 2rem) .45rem;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 420px);
    gap: .65rem;
    font-size: .86rem;
    line-height: 1.2;
}
.header-newsletter-copy {
    gap: .2rem .4rem;
}
.header-newsletter-form {
    gap: .4rem;
}
.header-newsletter-form input {
    padding: .48rem .75rem;
    min-height: 36px;
    font-size: .88rem;
}
.header-newsletter-form button {
    padding: .48rem .8rem;
    min-height: 36px;
    font-size: .86rem;
}
.newsletter-message {
    margin-bottom: .45rem;
    padding: .55rem .8rem;
    font-size: .88rem;
}
.side-column {
    top: 110px;
}
@media (max-width: 1280px) {
    .brand img,
    .public-body .brand img {
        width: min(270px, 36vw);
        max-height: 58px;
    }
    .main-nav a,
    .public-body .main-nav a {
        padding: .44rem .58rem;
        font-size: .88rem;
    }
}
@media (max-width: 960px) {
    .header-newsletter {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
        padding-top: .15rem;
        padding-bottom: .35rem;
        gap: .45rem;
        font-size: .8rem;
    }
}
@media (max-width: 900px) {
    .header-inner,
    .public-body .header-inner {
        padding: .42rem .75rem;
    }
    .brand img,
    .public-body .brand img {
        width: min(230px, calc(100vw - 5.8rem));
        max-height: 52px;
    }
    .public-body .nav-toggle,
    .nav-toggle {
        min-width: 38px;
        min-height: 38px;
        padding: .38rem .58rem;
    }
    .public-body .main-nav {
        top: calc(100% + .35rem);
    }
}
@media (max-width: 720px) {
    .header-newsletter {
        grid-template-columns: 1fr;
        padding: .1rem .75rem .35rem;
        gap: .25rem;
    }
    .header-newsletter-copy {
        font-size: .76rem;
    }
    .header-newsletter-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}
@media (max-width: 420px) {
    .brand img,
    .public-body .brand img {
        width: min(190px, calc(100vw - 5.4rem));
        max-height: 46px;
    }
    .header-newsletter-copy span {
        display: none;
    }
    .header-newsletter-form button {
        padding-left: .65rem;
        padding-right: .65rem;
    }
}
