/*
    JP Travel & Services - responsive refinement
    Questo file sovrascrive in modo progressivo le regole storiche senza rimuovere
    il layout desktop originale basato su immagini di sfondo e posizionamento JS.
*/

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    overflow-x: hidden;
    line-height: 1.45;
    color: #202020;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.standardWidth {
    width: min(1180px, calc(100% - 48px));
    min-width: 0;
}

#header {
    min-width: 0;
    height: auto;
    background: rgba(244,244,244,.96);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    position: relative;
    z-index: 200;
}

#headerContent {
    min-height: 85px;
    display: flex;
    align-items: center;
    gap: 22px;
    position: relative;
}

#headerLogo,
#headerMenu {
    float: none;
}

#headerLogo {
    flex: 0 0 auto;
}

#logoImg {
    display: block;
    height: 64px;
    margin-top: 0;
}

#headerMenu {
    flex: 1 1 auto;
    min-width: 0;
}

#mainNav {
    width: 100%;
}

.siteMenuList {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.siteMenuItem {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mnuCnt_2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    max-width: none;
    padding: 8px 12px;
    margin: 0;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.2;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.mnuCnt_2:hover,
.mnuCnt_2:focus {
    transform: translateY(-1px);
    outline: none;
}

.mnuCntSel_2,
.mnuCntSel_2:hover,
.mnuCntSel_2:focus {
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(51,51,51,.20);
}

#content {
    min-height: calc(100vh - 135px);
    background-size: cover;
    background-position: center center;
    /* Rete di sicurezza: se il contenuto reale (es. form di contatto) supera
       l'altezza calcolata via JS in base al viewport, scorre internamente
       invece di sovrapporsi visivamente al footer sottostante. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#innerContent {
    position: relative;
    height: 100%;
}

.TitleContent {
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.TitleContent h1 {
    letter-spacing: .02em;
}

.DettContent {
    min-width: 0;
    box-shadow: 0 18px 34px rgba(0,0,0,.16);
    backdrop-filter: blur(2px);
}

#ContenutiHome {
    display: flex;
    gap: 16px;
}

.homeContent {
    flex: 1 1 0;
    max-width: none;
    padding: 14px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,.74);
}

.specHomeContentTitle h3 {
    margin: 10px 0 4px 0;
    font-size: 15px;
    letter-spacing: .03em;
}

.specHomeContentTxt {
    line-height: 1.55;
}

#footer {
    min-width: 0;
}

#footerContent {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#footerContent > table {
    height: auto;
}

#darker {
    position: fixed;
}

#darkerContent > * {
    max-width: min(1100px, calc(100vw - 32px));
    margin-left: auto;
    margin-right: auto;
}

.tbClass,
.tbClassRed,
.tbClass2,
.tbClass2Red {
    max-width: 100%;
}

/* Contatti (telefono/email): il CSS storico metteva 20px di margine prima
   dell'icona e altri 40px prima del testo, creando un distacco eccessivo.
   Li riportiamo vicini, con un piccolo spazio regolare tra icona e testo. */
table.tbInfoContact > tbody > tr > td:first-child {
    width: 28px;
    padding-right: 0;
}

.contactIco {
    margin: 0;
}

table.tbInfoContact > tbody > tr > td > strong {
    margin-left: 10px;
}

/* REA CO / P.IVA: la tabella aveva una larghezza fissa (450px) con l'ultima
   cella allineata a destra, che sulle larghezze reali del box produceva un
   grande vuoto tra i due valori. Li teniamo vicini, uno via dall'altro. */
.tbFormal_2 {
    width: auto;
    max-width: 100%;
}

table.tbFormal_2 > tbody > tr:first-child {
    display: flex;
    flex-wrap: wrap;
    column-gap: 32px;
    row-gap: 4px;
}

table.tbFormal_2 > tbody > tr:first-child > td {
    text-align: left !important;
    white-space: nowrap;
}

@media only screen and (max-width: 1100px) {
    .standardWidth {
        width: calc(100% - 32px);
    }

    #headerContent {
        gap: 14px;
    }

    .mnuCnt_2 {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 12px;
    }
}

@media only screen and (max-width: 985px) {
    html {
        overflow-y: auto;
    }

    body {
        overflow-y: auto;
        overflow-x: hidden;
        font-size: 16px;
        background: #292929;
    }

    .standardWidth {
        width: 100%;
        min-width: 0;
    }

    #header {
        min-width: 0;
        height: auto;
        position: sticky;
        top: 0;
    }

    #headerContent {
        width: 100%;
        min-height: 78px;
        padding: 10px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #logoImg {
        height: 58px;
    }

    #mnuButton {
        display: block;
        width: 48px;
        height: 48px;
        margin: 0;
        float: none;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        border-radius: 10px;
    }

    #headerMenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 300;
        background: rgba(255,255,255,.98);
        box-shadow: 0 18px 34px rgba(0,0,0,.20);
    }

    #mainNav {
        width: 100%;
    }

    .siteMenuList {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        padding: 6px 0;
        margin: 0;
    }

    .mnuCnt_2,
    .mnuCntSel_2 {
        display: flex;
        width: 100%;
        min-height: 48px;
        padding: 14px 24px;
        border-radius: 0;
        border-bottom: 1px solid rgba(0,0,0,.08);
        text-align: right;
        justify-content: flex-end;
        font-size: 17px;
        line-height: 1.2;
        box-shadow: none;
        transform: none;
    }

    .mnuCntSel_2,
    .mnuCntSel_2:hover,
    .mnuCntSel_2:focus {
        border-radius: 0;
        box-shadow: inset 5px 0 0 rgb(110,77,121);
    }

    #NYC,
    #fbLike {
        display: none !important;
        visibility: hidden !important;
    }

    #content {
        display: block;
        width: 100% !important;
        height: auto !important;
        min-height: calc(100vh - 128px);
        overflow: visible !important;
        padding: 28px 0 92px 0;
        background-attachment: scroll;
        background-size: cover;
        background-position: center top !important;
    }

    #innerContent {
        height: auto;
        width: 100%;
        padding: 0 16px;
        visibility: visible;
    }

    .TitleContent {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: auto !important;
        max-width: 720px;
        margin: 0 auto 16px auto !important;
        padding: 12px 16px !important;
        text-align: left !important;
        border-radius: 12px;
        background: rgba(0,0,0,.78) !important;
    }

    .TitleContent h1 {
        font-size: clamp(25px, 7vw, 38px);
        line-height: 1.06;
        padding: 0;
    }

    .TitleContent h2 {
        font-size: clamp(16px, 4.8vw, 22px);
        line-height: 1.25;
        padding: 4px 0 0 0;
    }

    .DettContent,
    #AboutContent,
    #LeisureContent,
    #LeisureContentT,
    #IncentiveContent,
    #YouthContent,
    #YouthContentT,
    #MeetingContent,
    #MeetingContentL,
    #MissionContent,
    #ContactContent {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 720px;
        margin: 0 auto 16px auto !important;
        padding: 18px !important;
        border-radius: 14px;
        background: rgba(255,255,255,.88) !important;
        color: #202020 !important;
        font-size: clamp(16px, 4.4vw, 19px) !important;
        line-height: 1.55 !important;
        text-align: left !important;
    }

    #MeetingContentL,
    #LeisureContentT {
        background: rgba(74,74,74,.88) !important;
        color: #ffffff !important;
    }

    #ContenutiHome {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .homeContent {
        display: block;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 18px !important;
        background: rgba(255,255,255,.88);
        border-radius: 14px;
    }

    .specHomeContentIco img {
        width: 44px;
        height: auto;
    }

    .specHomeContentTitle h3 {
        font-size: 18px;
    }

    .specHomeContentTxt {
        margin: 8px 0 0 0;
        font-size: 16px !important;
        line-height: 1.55 !important;
    }

    #usaImg,
    #HomeContentFlag,
    #LeisureContentFlag,
    #IncentiveContentFlag,
    #YouthContentFlag,
    #MeetingContentFlag,
    #MissionContentFlag,
    #ContactContentFlag {
        visibility: hidden !important;
        display: none !important;
    }

    #tabLeisureContent,
    #tableIncentives,
    #tableYouth,
    #tableMission {
        display: none !important;
    }

    #divLeisureContent,
    #divIncentives,
    #divYouth,
    #divMission {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        color: inherit !important;
        font-size: inherit !important;
        line-height: inherit !important;
    }

    #divLeisureContent > div,
    #divYouth > div {
        margin: 0 0 10px 0 !important;
        padding: 12px 14px !important;
        border-radius: 10px !important;
        background: rgba(255,255,255,.16) !important;
        color: inherit !important;
        font-size: inherit !important;
        line-height: inherit !important;
    }

    #divLeisureContent > div:last-child,
    #divYouth > div:last-child {
        background: rgba(255,255,255,.88) !important;
        color: #202020 !important;
        font-style: italic;
        font-weight: 700;
    }

    #MeetingContentL ul {
        margin: 0;
        padding-left: 22px;
    }

    #ContactContent > table,
    .tbInfoContact,
    .tbFormal,
    .tbFormal_2,
    .tbForm {
        width: 100% !important;
    }

    #ContactContent table,
    #ContactContent tbody,
    #ContactContent tr,
    #ContactContent td {
        max-width: 100%;
    }

    #ContactContent > table > tbody > tr > td > h1 {
        font-size: clamp(25px, 7vw, 35px);
    }

    #ContactContent > table > tbody > tr > td > h2,
    #olta {
        font-size: clamp(18px, 5vw, 26px);
    }

    #divisione,
    .contenuti,
    table.tbFormal > tbody > tr > td,
    table.tbFormal_2 > tbody > tr > td {
        font-size: 16px;
    }

    table.tbInfoContact > tbody > tr > td:first-child {
        width: 54px;
    }

    table.tbInfoContact > tbody > tr > td > strong {
        margin-left: 0;
        font-size: clamp(16px, 4.5vw, 20px);
        overflow-wrap: anywhere;
    }

    .contactIco {
        width: 34px;
        height: 34px;
        margin: 8px 12px 8px 0;
    }

    .tbClass,
    .tbClassRed,
    .tbClass2,
    .tbClass2Red {
        width: 100% !important;
        min-height: 44px;
        font-size: 16px;
        border-radius: 8px;
    }

    .tbClass2,
    .tbClass2Red {
        min-height: 120px !important;
    }

    #frmMsg {
        display: block !important;
    }

    .privacyContainer {
        padding: 14px !important;
    }

    .privacyLabel {
        align-items: flex-start !important;
        gap: 8px;
    }

    .privacyLabel input {
        margin-top: 4px;
        flex: 0 0 auto;
    }

    #recaptContainer,
    #cntSend,
    #confermaMail {
        display: block !important;
        float: none !important;
        margin-top: 12px;
    }

    #recaptcha1 {
        max-width: 100%;
        transform-origin: left top;
    }

    #sendBtn {
        margin-left: auto;
        background-repeat: no-repeat;
        background-size: contain;
    }

    #footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: auto;
        min-height: 58px;
        padding: 8px 14px;
        width: 100%;
    }

    #footerContent,
    #footerContent > table,
    #footerContent > table > tbody,
    #footerContent > table > tbody > tr,
    #footerContent > table > tbody > tr > td {
        display: block;
        width: 100%;
        text-align: center !important;
    }

    #footerContent > table > tbody > tr > td {
        font-size: 13px;
        line-height: 1.35;
        padding: 0;
    }

    #footCX,
    #footDX,
    #testimonials {
        display: none !important;
    }

    #cookieChoiceInfo {
        height: auto !important;
        min-height: 0 !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
        padding: 14px !important;
    }

    #cookieChoiceInfo > span {
        display: block;
        margin: 0 0 10px 0 !important;
    }

    #cookieChoiceInfo > a {
        display: inline-block !important;
        float: none !important;
        margin: 4px 8px 0 0 !important;
        padding: 9px 12px !important;
    }
}

@media only screen and (max-width: 420px) {
    #headerContent {
        padding-left: 12px;
        padding-right: 12px;
    }

    #logoImg {
        height: 50px;
    }

    #mnuButton {
        width: 44px;
        height: 44px;
    }

    #innerContent {
        padding-left: 10px;
        padding-right: 10px;
    }

    .DettContent,
    .TitleContent {
        border-radius: 12px;
    }

    #recaptcha1 {
        transform: scale(.88);
        margin-bottom: -8px;
    }
}
