@charset "UTF-8";

:root {
  --bg-base: #640037;
  --text-light: #f7f1d9;
  --footer-bg: #f7f1d9;
  --footer-text: #333333;
  --glass-bg: rgba(247, 241, 217, 0.08);
  --glass-border: rgba(247, 241, 217, 0.15);
}

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700&family=Montserrat:wght@400;500;600;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem; 
    font-weight: 400; 
    line-height: 1.6; 
    color: #444444; 
    background-color: #ffffff; 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 1440px) {
    .sppb-row, .row { margin-left: 0 !important; margin-right: 0 !important; }
    .sppb-row > div[class*="sppb-col-"], .row > div[class*="col-"] { padding-left: 0 !important; padding-right: 0 !important; }
    p, a, span, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word !important; word-wrap: break-word !important; max-width: 100%; }
    img, video, iframe, canvas { max-width: 100% !important; height: auto; }
}

b, strong { font-weight: 600; }
a { color: #640037; text-decoration: none; transition: color 0.3s ease; }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Merriweather', Georgia, serif !important;
    font-weight: 500; line-height: 1.2; color: #222222; margin-top: 1.5rem; margin-bottom: 0.5rem;
}

h1:first-child, h2:first-child, h3:first-child, 
h4:first-child, h5:first-child, h6:first-child { margin-top: 0; }

h1, .h1 { font-size: 2.5rem; } h2, .h2 { font-size: 2rem; } h3, .h3 { font-size: 1.75rem; }  
h4, .h4 { font-size: 1.5rem; } h5, .h5 { font-size: 1.25rem; } h6, .h6 { font-size: 1rem; }     

@media (max-width: 767px) {
    h1, .h1 { font-size: 2rem; } h2, .h2 { font-size: 1.75rem; } h3, .h3 { font-size: 1.5rem; }   
    h4, .h4 { font-size: 1.25rem; } h5, .h5 { font-size: 1.125rem; } h6, .h6 { font-size: 1rem; }     
    h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { margin-top: 1.2rem; margin-bottom: 0.4rem; }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

h1, h2, h3, .h1, .h2, .h3 {
    opacity: 0; animation-name: fadeInUp; animation-duration: 0.8s; 
    animation-timing-function: ease-out; animation-fill-mode: forwards; 
}
h1, .h1 { animation-delay: 0.2s; } h2, .h2 { animation-delay: 0.4s; } h3, .h3 { animation-delay: 0.6s; }

/* ========================================================================
   HEADER HOMEPAGE: Overlay Ondulato e Sfondo
   ======================================================================== */
.yasargil-home-header > .sppb-row-overlay {
    background-color: var(--sppb-color-primary) !important;
    opacity: 1 !important;
}

.yasargil-home-header > .sppb-row-overlay,
#network-canvas-desktop,
#network-canvas-mobile {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L35,0 C50,30 30,70 40,100 L0,100 Z'/%3E%3C/svg%3E") !important;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L35,0 C50,30 30,70 40,100 L0,100 Z'/%3E%3C/svg%3E") !important;
    -webkit-mask-size: 100% 100% !important; mask-size: 100% 100% !important;
    -webkit-mask-repeat: no-repeat !important; mask-repeat: no-repeat !important;
    -webkit-mask-position: left top !important; mask-position: left top !important;
}

@media (max-width: 767px) {
    .yasargil-home-header > .sppb-row-overlay,
    #network-canvas-desktop,
    #network-canvas-mobile {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 L100,100 L100,30 C75,25 25,35 0,30 Z'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 L100,100 L100,30 C75,25 25,35 0,30 Z'/%3E%3C/svg%3E") !important;
    }
    
    .yasargil-home-header { 
        background-position: center top !important; 
        /* 110% di larghezza e altezza automatica proporzionata = zoom del +10% rispetto al contain */
        background-size: 110% auto !important; 
        background-repeat: no-repeat !important; 
    }
}

@media (min-width: 992px) {
    .yasargil-home-header { background-position: calc(100% + 200px) 0 !important; }
}

@media (min-width: 1200px) {
    .congress-title { max-width: 600px !important; }
    .yasargil-home-header > .sppb-row-overlay,
    #network-canvas-desktop,
    #network-canvas-mobile {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L35,0 C50,30 30,70 40,100 L0,100 Z'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L35,0 C50,30 30,70 40,100 L0,100 Z'/%3E%3C/svg%3E") !important;
    }
    .yasargil-home-header { background-position: calc(100% + 200px) center !important; background-size: cover !important; }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .congress-title { max-width: 420px !important; }
    .yasargil-home-header > .sppb-row-overlay,
    #network-canvas-desktop,
    #network-canvas-mobile {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L50,0 C60,30 40,70 50,100 L0,100 Z'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L50,0 C60,30 40,70 50,100 L0,100 Z'/%3E%3C/svg%3E") !important;
    }
    .yasargil-home-header { background-position: calc(100% + 150px) center !important; background-size: cover !important; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .congress-title { max-width: 420px !important; }
    .yasargil-home-header > .sppb-row-overlay,
    #network-canvas-desktop,
    #network-canvas-mobile {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L50,0 C60,30 40,70 50,100 L0,100 Z'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L50,0 C60,30 40,70 50,100 L0,100 Z'/%3E%3C/svg%3E") !important;
    }
    .yasargil-home-header { background-position: calc(100% + 600px) center !important; background-size: cover !important; }
}

.congress-title h1 { color: var(--text-light); text-shadow: 0 2px 15px rgba(0,0,0,0.3); }
.congress-title h3 { padding: 8px 20px; margin: 10px 20px; background-color: var(--text-light); border-radius: 10px; color: var(--bg-base); }
.congress-date { padding: 8px 0px; margin: 10px 20px; border-radius: 10px; color:var(--text-light); font-size: 1.4rem; font-weight:540; }
.congress-date span { font-size: 1.5rem; opacity:70%; }

.yasargil-title h1 { margin: 10px 20px;}
.congress-date-header { display: flex !important; align-items: flex-start !important; }
@media (min-width: 992px) {
    .congress-date-header { flex-direction: row !important; gap: 40px !important; }
    .congress-date-header > .sppb-addon-wrapper:first-child { border-right: 1px solid var(--text-light) !important; padding-right: 40px !important; flex: 1 !important; }
    .congress-date-header > .sppb-addon-wrapper:last-child { flex: 1 !important; }
}
@media (max-width: 991px) {
    .congress-date-header { flex-direction: column !important; gap: 25px !important; }
    .congress-date-header > .sppb-addon-wrapper:first-child { border-right: none !important; padding-right: 0 !important; width: 100% !important; }
    .congress-date-header > .sppb-addon-wrapper:last-child { width: 100% !important; }
}
@media (max-width: 767px) {
.yasargil-title h1, .congress-title h3, .congress-date {margin: 10px 0px !important;}
}
#sp-header {background-color: var(--bg-base) !important;}
.scroll-sequence .addon-root-raw-html::after { background: linear-gradient(0deg, var(--bg-base), rgba(255, 255, 255, 0) 100%) !important; }
.home-creative #sp-header.header-sticky, .sticky-header-placeholder, #sp-header.header-sticky, .sticky-header-placeholder, .com-users.view-login #sp-header {background-color: var(--bg-base) !important;}
.logo-image { filter: inherit !important; }
.home-creative #sp-header {background-color: rgba(0,0,0,0) !important;}
#sp-header #sp-menu { flex-grow: 1 !important; }
#sp-header #sp-menu .sp-column, #sp-header #sp-menu .menu-with-offcanvas { width: 100% !important; justify-content: center !important; }

/* ========================================================================
   CANVAS RETE NEURALE
   ======================================================================== */
#network-canvas-desktop, 
#network-canvas-mobile {
    position: absolute !important;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2 !important; 
    pointer-events: none !important;
    background-color: transparent !important; 
}
.yasargil-home-header > .sppb-container-inner { position: relative !important; z-index: 10 !important; }

/* MAINBODY */
#sp-main-body { position: relative !important; z-index: 1 !important; }
#sp-main-body::after {
    content: '' !important; position: absolute !important; bottom: 0 !important; left: 0 !important;
    width: 100% !important; height: 150px !important; 
    background: linear-gradient(to bottom, rgba(247, 241, 217, 0) 0%, var(--text-light) 100%) !important;
    z-index: -1 !important; pointer-events: none !important; 
}

/* OFF-CANVAS */
.offcanvas-menu .offcanvas-inner ul.menu-child { display: block !important; visibility: visible !important; opacity: 1 !important; height: auto !important; padding-left: 15px; }
.offcanvas-menu .offcanvas-inner .menu-toggler { display: none !important; }
.offcanvas-menu .offcanvas-inner li.menu-parent > span.menu-separator { font-weight: bold !important; border-bottom: 1px solid var(--bg-base) !important; margin-bottom: 5px !important; display: block !important; padding-bottom: 5px !important; }
.offcanvas-menu .logo-image { content: url('../../../images/grafica/logo/yasargil-logo-p.svg') !important; }
.offcanvas-menu {display: inherit !important;}

/* MENU PRINCIPALE */
#sp-header #sp-menu .sp-megamenu-wrapper .sp-megamenu-parent .sp-menu-item.active > a, #sp-header #sp-menu .sp-megamenu-wrapper .sp-megamenu-parent .sp-menu-item:hover > a, #sp-header #sp-menu .sp-megamenu-wrapper .sp-megamenu-parent .sp-menu-item:focus > a { color: var(--text-light) !important; }
.sp-megamenu-parent > li.sp-menu-item > a, .sp-megamenu-parent > li.sp-menu-item > span.sp-menu-separator { color: var(--text-light) !important; }
.sp-megamenu-parent > li.sp-menu-item > a > span.fas, .sp-megamenu-parent > li.sp-menu-item > span.sp-menu-separator > span.fas { color: var(--text-light) !important; }
.sp-megamenu-parent .sp-dropdown .sp-dropdown-items > li.sp-menu-item > a { color: var(--bg-base) !important; }
.sp-menu-badge.sp-menu-badge-right { display: table !important; margin-left: 18px !important; position: absolute; margin-top: -25px; }
.home-creative .sp-megamenu-parent > li .sp-menu-badge { background-color: var(--bg-base) !important; color: var(--text-light) !important; }
.sp-megamenu-parent > li .sp-menu-badge { background-color:  var(--text-light) !important; color: var(--bg-base) !important; }
#sp-header.header-sticky .sp-megamenu-parent > li .sp-menu-badge { background-color:  var(--text-light) !important; color: var(--bg-base) !important; }
#sp-header #sp-menu .sp-megamenu-wrapper .sp-megamenu-parent .sp-menu-item .fas, .home-creative #sp-header #sp-menu .sp-megamenu-wrapper .sp-megamenu-parent .sp-menu-item > span .fas { color: var(--text-light) !important; }
.home-creative .offcanvas-menu .burger-icon > span, .burger-icon > span { background-color: var(--bg-base) !important; }
.home-creative .burger-icon > span, .burger-icon > span, .burger-icon > span, .burger-icon > span { background-color: var(--text-light) !important; }

/* HOMEPAGE */
.scroll-header2 .sppb-addon-title { display: flex; flex-direction: column; align-items: center; }
.scroll-header2 .sppb-addon-title span { animation: none !important; display: inline-flex; align-items: center; justify-content: center; gap: 15px; }
.scroll-header2 .sppb-addon-title span::before { content: '\f100' !important; font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free' !important; font-weight: 900 !important; display: inline-block; font-size: 1.1em; animation: swipe-left 1.5s ease-in-out infinite; }
.scroll-header2 .sppb-addon-title span::after { content: '\f101' !important; font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free' !important; font-weight: 900 !important; display: inline-block; font-size: 1.1em; animation: swipe-right 1.5s ease-in-out infinite; }
@keyframes swipe-left { 0% { transform: translateX(5px); opacity: 0; } 30% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-15px); opacity: 0; } }
@keyframes swipe-right { 0% { transform: translateX(-5px); opacity: 0; } 30% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(15px); opacity: 0; } }

/* ========================================================================
   EFFETTO "MAC DOCK" DEFINITIVO
   ======================================================================== */
.mac-dock, .mac-dock .sppb-row, .mac-dock .sppb-column, .mac-dock .sppb-column-addons, .mac-dock .sppb-addon-wrapper, .mac-dock .clearfix, .mac-dock .sppb-div-addon { overflow: visible !important; }
.mac-dock .sppb-dynamic-content-collection { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; overflow-x: auto !important; overflow-y: hidden !important; padding: 220px 20px 40px 20px !important; margin-top: -190px !important; position: relative !important; z-index: 500 !important; gap: 15px !important; align-items: flex-end !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mac-dock .sppb-dynamic-content-collection::-webkit-scrollbar { display: none; }
.mac-dock .sppb-dynamic-content-collection__item { position: relative !important; display: flex !important; flex-direction: column !important; align-items: center !important; flex: 0 0 auto !important; width: 200px !important; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; cursor: pointer !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
.mac-dock .addon-root-dynamic-content-image { width: 100% !important; margin: 0 !important; }
.mac-dock .sppb-dynamic-content-collection__item img { width: 100% !important; height: auto !important; border-radius: 12px !important; box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important; transition: all 0.3s ease !important; }
.mac-dock .sppb-dynamic-content-collection__item:hover { transform: scale(1.4) !important; z-index: 99 !important; margin: 0 15px !important; }
.mac-dock .sppb-dynamic-content-collection__item:hover img { box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important; }
.mac-dock .addon-root-dynamic-content-text { position: absolute !important; bottom: 115% !important; left: 50% !important; transform: translateX(-50%) translateY(0) !important; background-color: var(--sppb-bg-card-secondary, #f7f1d9) !important; border-radius: 8px !important; padding: 8px 12px !important; width: max-content !important; max-width: 180px !important; text-align: center !important; pointer-events: none !important; z-index: 100 !important; opacity: 1 !important; visibility: visible !important; }
.mac-dock .addon-root-dynamic-content-text::after { content: '' !important; position: absolute !important; top: 100% !important; left: 50% !important; transform: translateX(-50%) !important; border-width: 6px !important; border-style: solid !important; border-color: var(--sppb-bg-card-secondary, #f7f1d9) transparent transparent transparent !important; }
.mac-dock p.sppb-dynamic-content-text { margin: 0 !important; color: var(--bg-base) !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1.3 !important; white-space: normal !important; }
@media (max-width: 991px) { .mac-dock .sppb-dynamic-content-collection__item { width: 160px !important; } .mac-dock .sppb-dynamic-content-collection__item:hover { transform: scale(1.3) !important; margin: 0 10px !important; } .mac-dock .addon-root-dynamic-content-text { max-width: 145px !important; } }
@media (max-width: 767px) { .mac-dock .sppb-dynamic-content-collection { padding: 150px 10px 20px 10px !important; margin-top: -120px !important; gap: 15px !important; } .mac-dock .sppb-dynamic-content-collection__item { width: 130px !important; } .mac-dock .sppb-dynamic-content-collection__item:hover { transform: scale(1.2) !important; margin: 0 5px !important; } .mac-dock .addon-root-dynamic-content-text { max-width: 120px !important; padding: 6px 8px !important; } .mac-dock p.sppb-dynamic-content-text { font-size: 11px !important; } }

/* FOOTER */
.quick-links ul.menu, .legal-info ul.menu { list-style: none !important; padding: 0 !important; margin: 0 !important; display: flex !important; flex-direction: column !important; }
.quick-links ul.menu li, .legal-info ul.menu li { display: block !important; width: 100% !important; }
.quick-links ul.menu .menu-child, .legal-info ul.menu .menu-child { list-style: none !important; padding-left: 20px !important; margin-top: 8px !important; margin-bottom: 5px !important; display: flex !important; flex-direction: column !important; gap: 8px !important; }
.quick-links ul.menu a, .legal-info ul.menu a, .quick-links ul.menu span.menu-separator, .legal-info ul.menu span.menu-separator { display: inline-block !important; text-decoration: none !important; line-height: 1.4 !important; }
.quick-links ul.menu > li.menu-parent > span.menu-separator { font-weight: 600 !important; color: var(--bg-base) !important; }
#sp-footer, #sp-footer .sppb-row, #sp-footer .sppb-column, #sp-footer .sppb-addon, #sp-footer:active, #sp-footer *:active { transform: none !important; }

/* ANTI-GLITCH FOOTER */
.quick-links ul.menu .menu-child, .legal-info ul.menu .menu-child { display: flex !important; height: auto !important; max-height: none !important; opacity: 1 !important; visibility: visible !important; overflow: visible !important; transform: none !important; transition: none !important; animation: none !important; }
.quick-links ul.menu > li.menu-parent > span.menu-separator, .legal-info ul.menu > li.menu-parent > span.menu-separator { pointer-events: none !important; cursor: default !important; }
.quick-links ul.menu > li.menu-parent, .legal-info ul.menu > li.menu-parent { height: auto !important; transition: none !important; }

/* ========================================================================
   STILE E ONDA ROVESCIATA PER IL PAGE TITLE (#sp-page-title)
   ======================================================================== */

#sp-page-title {
    position: relative !important;
    background-color: transparent !important;
    overflow: hidden !important;
}

/* Padding Desktop (tutto spinto in alto) */
#sp-page-title.has-title {
    padding: 0px 0 120px 0 !important; 
}

/* Pseudo-elemento per lo sfondo bordeaux e il canvas */
#sp-page-title::before,
.network-canvas-title {
    content: '';
    position: absolute !important;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0 !important;
    
    /* ONDA AI 3/4 (75%) */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L100,0 L100,75 C75,90 25,60 0,75 Z'/%3E%3C/svg%3E") !important;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L100,0 L100,75 C75,90 25,60 0,75 Z'/%3E%3C/svg%3E") !important;
    
    -webkit-mask-size: 100% 100% !important; mask-size: 100% 100% !important;
    -webkit-mask-repeat: no-repeat !important; mask-repeat: no-repeat !important;
    -webkit-mask-position: left top !important; mask-position: left top !important;
}

#sp-page-title::before {
    background-color: var(--bg-base) !important;
    display: none; 
}

#sp-page-title.has-title::before {
    display: block;
}

.network-canvas-title {
    background-color: transparent !important;
    z-index: 1 !important; 
    pointer-events: none !important;
}

/* ========================================================================
   FIX PRESET1.CSS: Neutralizza lo sfondo bianco del div interno
   ======================================================================== */
#sp-page-title .sp-page-title {
    background-color: transparent !important;
    position: relative !important;
    z-index: 10 !important;
}

#sp-page-title .row,
#sp-page-title .container {
    position: relative !important;
    z-index: 10 !important;
}

#sp-page-title .sp-page-title-heading {
    color: var(--text-light) !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    margin: 0 !important;
}

/* ========================================================================
   VERSIONE MOBILE: Padding proporzionato
   ======================================================================== */
@media (max-width: 767px) {
    /* Padding Mobile proporzionato (zero sopra, 80px sotto) */
    #sp-page-title.has-title {
        padding: 0px 0 80px 0 !important; 
    }
    
    #sp-page-title::before,
    .network-canvas-title {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L100,0 L100,75 C75,85 25,65 0,75 Z'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L100,0 L100,75 C75,85 25,65 0,75 Z'/%3E%3C/svg%3E") !important;
    }
}