:root {
    --pzvr-bg: #ffffff;
    --pzvr-text: #171717;
    --pzvr-muted: #6f6f6f;
    --pzvr-border: #e8e3dc;
    --pzvr-accent: #9a6a3a;
    --pzvr-accent-dark: #6f4824;
    --pzvr-light: #f8f4ef;
    --pzvr-cream: #fef9ed;
    --pzvr-radius: 18px;
    --pzvr-container: 1200px;
    --pzvr-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--pzvr-bg);
    color: var(--pzvr-text);
    font-family: var(--pzvr-font);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--pzvr-accent); }
h1, h2, h3, h4, h5, h6 { line-height: 1.15; margin-top: 0; color: var(--pzvr-text); }
h1 { font-size: clamp(2.2rem, 5vw, 4.8rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.4rem, 2vw, 2rem); }
p { margin-top: 0; }

.pzvr-container { width: min(100% - 40px, var(--pzvr-container)); margin-inline: auto; }
.site-main { min-height: 60vh; }
.pzvr-content { padding-block: 72px; }

/* Elementor-ready page wrapper */
.pzvr-page-main,
.pzvr-page-content { width: 100%; margin: 0; padding: 0; }

body:not(.elementor-page):not(.pzvr-transparent-header) .pzvr-page-content,
body:not(.elementor-page):not(.pzvr-transparent-header) .pzvr-content {
    width: min(100% - 40px, var(--pzvr-container));
    margin-inline: auto;
    padding-block: 72px;
}

body.elementor-page .site-main { overflow: visible; }

/* Leaflet map */

#pzvr-map {
    width: 100%;
    min-height: 620px;
    height: 620px;
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: none;
    z-index: 1;
}

/* Mappa grigia, marker invariati */
#pzvr-map .leaflet-tile-pane {
    filter: grayscale(1) saturate(0) contrast(1.05) brightness(1.02);
}

#pzvr-map .leaflet-marker-pane,
#pzvr-map .leaflet-overlay-pane,
#pzvr-map .leaflet-popup-pane {
    filter: none !important;
}

#pzvr-map .leaflet-pane,
#pzvr-map .leaflet-top,
#pzvr-map .leaflet-bottom {
    z-index: 2;
}

@media (max-width: 767px) {
    #pzvr-map {
        min-height: 460px;
        height: 460px;
        border-radius: 0 !important;
    }
}

.leaflet-container {
    font-family: Inter, sans-serif;
}

.pzvr-map-popup {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pzvr-map-popup strong {
    font-size: 15px;
    line-height: 1.3;
    color: #131313;
}

.pzvr-map-popup span {
    font-size: 13px;
    color: #6f6f6f;
}

.pzvr-map-popup a {
    margin-top: 4px;
    color: #9a6a3a;
    font-weight: 600;
    text-decoration: none;
}

.leaflet-popup-content-wrapper {
    border-radius: 18px;
    padding: 6px;
}

.leaflet-popup-tip {
    box-shadow: none;
}

@media (max-width: 767px) {
    #pzvr-map {
        height: 460px;
        border-radius: 20px;
    }
}

/* Header standard del tema, usato solo se non c'è Header Elementor Pro */
.pzvr-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--pzvr-border);
}
.pzvr-header__inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.pzvr-header__logo a { font-size: 18px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.pzvr-header__logo img, .custom-logo { max-height: 58px; width: auto; }
.pzvr-nav { display: flex; align-items: center; }
.pzvr-menu, .pzvr-footer-menu { list-style: none; display: flex; align-items: center; gap: 28px; padding: 0; margin: 0; }
.pzvr-menu a, .pzvr-footer-menu a { text-decoration: none; color: var(--pzvr-text); font-size: 15px; font-weight: 600; }
.pzvr-menu a:hover, .pzvr-footer-menu a:hover { color: var(--pzvr-accent); }
.pzvr-menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--pzvr-border); border-radius: 999px; background: #fff; padding: 9px; cursor: pointer; }
.pzvr-menu-toggle span { display: block; height: 2px; width: 100%; background: var(--pzvr-text); margin: 5px 0; border-radius: 99px; }

.pzvr-feature-icon,
.pzvr-feature-icon .elementor-icon,
.pzvr-feature-icon svg {
    background: transparent !important;
    fill: none !important;
}

.pzvr-feature-icon svg {
    color: #131313;
    stroke: currentColor;
}

/* ===============================
   PZVR SMART HEADER RESET
=============================== */

body.pzvr-transparent-header .elementor-location-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    transition: transform .35s ease, background .28s ease, box-shadow .28s ease !important;
}

body.admin-bar.pzvr-transparent-header .elementor-location-header {
    top: 32px !important;
}

body.pzvr-transparent-header .site-main,
body.pzvr-transparent-header .pzvr-page-main,
body.pzvr-transparent-header .pzvr-page-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Stato iniziale anche prima che parta JS */
body.pzvr-transparent-header:not(.pzvr-header-show):not(.pzvr-header-hide) .elementor-location-header,
body.pzvr-transparent-header.pzvr-header-top .elementor-location-header {
    transform: translateY(0) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Scroll giù */
body.pzvr-transparent-header.pzvr-header-hide .elementor-location-header {
    transform: translateY(-120%) !important;
}

/* Scroll su */
body.pzvr-transparent-header.pzvr-header-show .elementor-location-header {
    transform: translateY(0) !important;
    background: #ffffff !important;
    box-shadow: 0 12px 35px rgba(0,0,0,.08) !important;
}

body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header {
    background: #ffffff !important;
}

/* LOGHI */
body.pzvr-transparent-header .logo-light,
body.pzvr-transparent-header .logo-dark {
    display: none !important;
}

body.pzvr-transparent-header:not(.pzvr-header-show):not(.pzvr-header-hide) .logo-light,
body.pzvr-transparent-header.pzvr-header-top .logo-light {
    display: block !important;
}

body.pzvr-transparent-header.pzvr-header-show .logo-dark,
body.pzvr-transparent-header.pzvr-header-hide .logo-dark {
    display: block !important;
}

/* MENU - reset totale Elementor */
.pzvr-smart-header .e-n-menu-title,
.pzvr-smart-header .e-n-menu-title-container,
.pzvr-smart-header .e-n-menu-title-text,
.pzvr-smart-header a {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border-color: transparent !important;
    text-decoration: none !important;
    transform: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Rimuove celeste hover/current Elementor */
.pzvr-smart-header .e-n-menu-title:hover,
.pzvr-smart-header .e-n-menu-title:focus,
.pzvr-smart-header .e-n-menu-title:active,
.pzvr-smart-header .e-current,
.pzvr-smart-header .e-current .e-n-menu-title,
.pzvr-smart-header .e-current .e-n-menu-title-container {
    background: transparent !important;
    color: inherit !important;
}

/* Colori menu stato trasparente */
body.pzvr-transparent-header:not(.pzvr-header-show):not(.pzvr-header-hide) .pzvr-smart-header a,
body.pzvr-transparent-header:not(.pzvr-header-show):not(.pzvr-header-hide) .pzvr-smart-header .e-n-menu-title-text,
body.pzvr-transparent-header.pzvr-header-top .pzvr-smart-header a,
body.pzvr-transparent-header.pzvr-header-top .pzvr-smart-header .e-n-menu-title-text {
    color: #fef9ed !important;
}

/* Colori menu stato bianco */
body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header a,
body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header .e-n-menu-title-text {
    color: #131313 !important;
}

/* Voce attiva */
body.pzvr-transparent-header .pzvr-smart-header .e-current .e-n-menu-title-text {
    color: inherit !important;
}

/* Pulsante in header trasparente */
body.pzvr-transparent-header:not(.pzvr-header-show):not(.pzvr-header-hide) .pzvr-smart-header .elementor-button,
body.pzvr-transparent-header.pzvr-header-top .pzvr-smart-header .elementor-button {
    background: #fef9ed !important;
    border-color: #fef9ed !important;
}

body.pzvr-transparent-header:not(.pzvr-header-show):not(.pzvr-header-hide) .pzvr-smart-header .elementor-button-text,
body.pzvr-transparent-header.pzvr-header-top .pzvr-smart-header .elementor-button-text {
    color: #131313 !important;
}

/* Pulsante in header bianco */
body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header .elementor-button {
    background: transparent !important;
    border: 1px solid rgba(19,19,19,.18) !important;
}

body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header .elementor-button-text {
    color: #131313 !important;
}

@media (max-width: 782px) {
    body.admin-bar.pzvr-transparent-header .elementor-location-header {
        top: 46px !important;
    }
}

/* FIX riga bianca / divider dentro header Elementor */
.pzvr-smart-header,
.pzvr-smart-header > .e-con-inner,
.pzvr-smart-header .e-con,
.pzvr-smart-header .elementor-element {
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.pzvr-smart-header::before,
.pzvr-smart-header::after,
.pzvr-smart-header > .e-con-inner::before,
.pzvr-smart-header > .e-con-inner::after {
    display: none !important;
    content: none !important;
}

/* FIX overflow orizzontale mobile */
html,
body {
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    position: relative;
}

/* Header Elementor non deve mai superare la viewport */
.elementor-location-header,
.pzvr-smart-header,
.pzvr-smart-header > .e-con-inner {
    max-width: 100vw !important;
    overflow-x: clip !important;
}

/* Fix container Elementor mobile */
@media (max-width: 767px) {
    .elementor-section,
    .elementor-container,
    .elementor-widget-wrap,
    .e-con,
    .e-con-inner {
        max-width: 100% !important;
    }

    body.pzvr-transparent-header .elementor-location-header {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow: hidden !important;
    }

    .pzvr-smart-header {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}
@media (max-width: 767px) {
    #page,
    .site,
    .site-main,
    .pzvr-page-main,
    .pzvr-page-content {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

/* =====================================================
   FINAL FIX HEADER ELEMENTOR - VATICAN HOLIDAYS
===================================================== */

/* 1. Evita overflow orizzontale globale */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    position: relative;
}

/* 2. Header Elementor sempre dentro la viewport */
body.pzvr-transparent-header .elementor-location-header {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* 3. Container header: nessuna riga extra, nessun bordo, altezza coerente */
body.pzvr-transparent-header .pzvr-smart-header,
body.pzvr-transparent-header .pzvr-smart-header > .e-con-inner {
    min-height: 96px !important;
    height: 96px !important;
    max-height: 96px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
}

/* elimina pseudo-righe Elementor */
body.pzvr-transparent-header .pzvr-smart-header::before,
body.pzvr-transparent-header .pzvr-smart-header::after,
body.pzvr-transparent-header .pzvr-smart-header > .e-con-inner::before,
body.pzvr-transparent-header .pzvr-smart-header > .e-con-inner::after {
    display: none !important;
    content: none !important;
}

/* 4. Header bianco quando riappare */
body.pzvr-transparent-header.pzvr-header-show .elementor-location-header,
body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header,
body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header > .e-con-inner {
    background: #ffffff !important;
}

/* 5. Nessun bordo inferiore extra */
body.pzvr-transparent-header.pzvr-header-show .elementor-location-header {
    border: 0 !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.06) !important;
}

/* 6. Mobile: header più compatto e nessun overflow */
@media (max-width: 767px) {
    body.pzvr-transparent-header .elementor-location-header {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    body.pzvr-transparent-header .pzvr-smart-header,
    body.pzvr-transparent-header .pzvr-smart-header > .e-con-inner {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 88px !important;
        height: 88px !important;
        max-height: 88px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        overflow: hidden !important;
    }

    .elementor-location-header *,
    .pzvr-smart-header * {
        max-width: 100% !important;
    }
}

/* 7. Hamburger chiaro su header trasparente */
body.pzvr-transparent-header.pzvr-header-top .pzvr-smart-header .e-n-menu-toggle,
body.pzvr-transparent-header:not(.pzvr-header-show):not(.pzvr-header-hide) .pzvr-smart-header .e-n-menu-toggle {
    color: #fef9ed !important;
    fill: #fef9ed !important;
}

body.pzvr-transparent-header.pzvr-header-top .pzvr-smart-header .e-n-menu-toggle svg,
body.pzvr-transparent-header:not(.pzvr-header-show):not(.pzvr-header-hide) .pzvr-smart-header .e-n-menu-toggle svg {
    color: #fef9ed !important;
    fill: #fef9ed !important;
}

/* 8. Hamburger scuro su header bianco */
body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header .e-n-menu-toggle,
body.pzvr-transparent-header.pzvr-header-show .pzvr-smart-header .e-n-menu-toggle svg {
    color: #131313 !important;
    fill: #131313 !important;
}