/* ========================================================================
   Custom Header Layout - Aprigliano Theme
 ========================================================================== */

 .playfair{
    font-family: 'Playfair Display', serif !important;
}
/* Header generale */
.tm-logo-container{
    max-width: 200px;
}
.tm-custom-header .tm-header-top {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tm-custom-header .tm-header-top .tm-check-button-container .tm-check-eleggibilita-btn {
    padding-top: 1px !important;
}
.tm-custom-header .tm-header-top .tm-check-button-container .tm-check-eleggibilita-btn {
    background: linear-gradient(0deg,rgba(172, 172, 172, 1) 0%, rgba(255, 255, 255, 1) 100%);
    border: 0px solid rgba(255,255,255,0.3) !important;
    box-shadow: 0px 5px 10px rgba(0,0,0,0.25);
    color: #701C33 !important;
    /* padding: 10px 0px !important; */
    font-weight: 600 !important;
    height: 40px;
    width: 180px;
    padding: 0px; 
    border-radius: 25px !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}
.uk-navbar-nav > li + li{
    margin-left: 0px !important;
    margin-right: 40px !important;
}

.tm-custom-header .tm-header-top .tm-check-button-container .tm-check-eleggibilita-btn:hover {
    opacity: 0.7;
}

.tm-custom-header .tm-header-top .tm-check-button-container .tm-check-eleggibilita-btn:active {
    transform: translateY(0);
}

/* Seconda riga dell'header - Menu + Controlli */
.tm-custom-header .tm-header-bottom {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    transition: all 0.3s ease !important;
}



#modal-menu-offcanvas .uk-modal-dialog{
    margin-top: 67px !important
}



/* #modal-menu-offcanvas .uk-modal-dialog{
    margin-top: 120px !important;
} */

/* Header fisso durante lo scroll */
.tm-header-bottom.fixed-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 30px 0px !important; 
    z-index: 9999 !important;
    background: #701b33 !important; /* Sfondo più opaco */
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(0) !important;
    animation: slideDown 0.3s ease-out !important;
}


/* Animazione per l'entrata dell'header fisso */
@keyframes slideDown {
    from {
        /* transform: translateY(-100%); */
        /* opacity: 0; */
    }
    to {
        /* transform: translateY(0); */
        /* opacity: 1; */
    }
}
#wpadminbar{
    display:none;
}
html{
    margin-top: 0px !important; 
}

/* Controlli per header normale e fisso */
.tm-normal-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tm-fixed-controls {
    display: none;
    align-items: center;
    gap: 5px;
}

/* Quando header è fisso, scambia i controlli */
.tm-header-bottom.fixed-header .tm-normal-controls {
    display: none !important;
}


/* Stili per il bottone CHECK ELEGGIBILITÀ nell'header fisso */
.tm-check-eleggibilita-btn-fixed a {
    padding-top: 0px !important;
}
.tm-check-eleggibilita-btn-fixed {
    background: linear-gradient(0deg,rgba(172, 172, 172, 1) 0%, rgba(255, 255, 255, 1) 100%) !important;
    border: 0px solid rgba(255,255,255,0.3) !important;
    box-shadow: 0px 5px 10px rgba(0,0,0,0.25) !important;
    color: #701C33 !important;
    height: 40px !important; 
    font-weight: 600 !important;
    line-height: 11px !important;;
    width: 180px !important;
    padding: 0px 0px 0px 0px !important; 
    border-radius: 20px !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tm-check-eleggibilita-btn-fixed:hover {
    opacity: 0.8 !important;
}

.tm-check-eleggibilita-btn-fixed:active {
    transform: translateY(0) !important;
}

/* Compensazione per evitare salti di contenuto */
.header-spacer {
    height: 0;
    transition: height 0.3s ease;
}

.header-spacer.active {
    height: 70px; /* Altezza approssimativa del menu fisso */
}

/* Header Controls */
.tm-custom-header .tm-header-bottom .tm-header-controls {
    gap: 15px;
}

.tm-custom-header .tm-header-bottom .tm-header-controls .tm-search-icon a,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-search-icon span,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-language-selector a,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-language-selector span,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-mobile-menu a,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-mobile-menu span {
    color: white !important;
    transition: all 0.3s ease !important;
}

.tm-custom-header .tm-header-bottom .tm-header-controls .tm-search-icon a:hover,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-search-icon span:hover,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-language-selector a:hover,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-language-selector span:hover,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-mobile-menu a:hover,
.tm-custom-header .tm-header-bottom .tm-header-controls .tm-mobile-menu span:hover {
    opacity: 0.8;
}

/* Dropdown lingua personalizzato */
.tm-language-dropdown {
    position: relative;
    display: inline-block;
}
.tm-current-language{
    font-family: 'Montserrat', sans-serif;
}

.tm-language-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: white;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.tm-language-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tm-language-arrow {
    transition: transform 0.3s ease;
    color: white;
}

.tm-language-dropdown.active .tm-language-arrow {
    transform: rotate(180deg);
}

.tm-language-menu {
    position: absolute;
    top: 100%;
    font-family: 'Montserrat', sans-serif;
    right: 0;
    min-width: 130px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    margin-top: 15px;
}

.tm-language-dropdown.active .tm-language-menu {
    opacity: 1;
    font-family: 'Montserrat', sans-serif !important;
    visibility: visible;
    transform: translateY(0);
}

.tm-language-options {
    text-align: center;
    padding: 16px 0;
}

.tm-language-option {
    display: block;
    padding: 16px 24px;
    color: #A0A3A3 !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease;
    border: none;
    background: none;
}

.tm-language-option:hover {
    background: #f8f9fa !important;
    color: #701C33 !important;
}

.tm-language-option.active {
    color: #701C33 !important;
    font-weight: 600 !important;
    position: relative;
}

/* Overlay per chiudere il dropdown */
.tm-language-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    display: none;
}

.tm-language-overlay.active {
    display: block;
}

/* Animazione del menu */
@keyframes dropdownSlide {
    from {
        /* opacity: 0; */
        /* transform: translateY(-10px); */
    }
    to {
        /* opacity: 1; */
        /* transform: translateY(0); */
    }
}

.tm-main-menu-container .uk-navbar-nav{
    /* display:flex;
    align-items: center;
    justify-content: space-between; */
}
.tm-language-dropdown.active .tm-language-menu {
    animation: dropdownSlide 0.3s ease-out;
}

/* ========================================================================
   Responsive Media Queries
 ========================================================================== */

/* Tablet e dispositivi medi (max 960px) */
@media (max-width: 960px) {
    .tm-custom-header .tm-header-top .tm-check-button-container .tm-check-eleggibilita-btn {
        font-size: 12px !important;
    }
    


.header-fixed #modal-menu-offcanvas .uk-modal-dialog{
    margin-top: 100px !important;
}



    .tm-custom-header .tm-header-bottom .tm-main-menu-container {
        display: none; /* Nasconde il menu su tablet e mobile */
    }
    .fixed-header .tm-mobile-menu-fixed img{
        min-width: 17px !important;
    }
    .fixed-header .tm-mobile-logo-fixed {                                            
        margin-right: 10px !important;
        display: block !important;
        align-items: center !important;
    }   
    .tm-mobile-logo-fixed{
        display: block !important;
        margin-right: 10px !important;
        align-items: center !important;
    } 
    
}


/* Mobile (max 640px) */
@media (max-width: 640px) {
    .tm-custom-header .tm-header-top .tm-check-button-container .tm-check-eleggibilita-btn {
        font-size: 11px !important;
    }
    .tm-header-top{
        display:none;
    }

    .header-fixed #modal-menu-offcanvas .uk-modal-dialog{
        margin-top: 90px !important
    }
    .tm-mobile-logo-fixed{
        display: block !important;
        margin-right: 10px !important;
        align-items: center !important;
    } 

    .fixed-header .tm-mobile-menu-fixed img{
        min-width: 17px !important;
    }
    .fixed-header .tm-mobile-logo-fixed {                                            
        margin-right: 10px !important;
        display: block !important;
        align-items: center !important;
    }      
    .tm-check-eleggibilita-btn-mobile{
        display: none !important;
    }       
}

.tm-check-eleggibilita-btn-mobile {
    line-height: 12px !important
}

/* Miglioramenti aggiuntivi per mobile */
@media (max-width: 767px) {
    .tm-header-top{
        display: none !important;
    }
}

@media (max-width: 480px) {
    .tm-header-top{
        display:none;
    }
    
    .tm-custom-header .tm-header-top .tm-check-button-container .tm-check-eleggibilita-btn {
        font-size: 11px !important;
        line-height: 12px !important;
        padding: 7px 5px !important;
        width: 127px !important;
        border-radius: 20px !important;
    }
    
    /* Stili responsive per bottone mobile normale */
    .tm-check-eleggibilita-btn-mobile {
        font-size: 11px !important;
        line-height: 12px !important;
        padding: 7px 5px !important;
        width: 127px !important;
        border-radius: 20px !important;
        height: 35px !important;
    }

    .header-spacer.active{
        display:none !important;
    }

    .fixed-header .tm-mobile-menu-fixed img{
        min-width: 17px;
    }
    .fixed-header .tm-mobile-logo-fixed {                                            
        margin-right: 10px;                                        
        display: block;                                             
        align-items: center;                                       
    }                                                              

    .tm-check-eleggibilita-btn-fixed{
        font-size: 11px !important;
        line-height: 12px !important;
        padding: 7px 5px !important;
        width: 127px !important;
        border-radius: 20px !important;
    }


    .header-fixed #modal-menu-offcanvas .uk-modal-dialog{
        margin-top: 55px !important
    }
    
    .tm-custom-header .tm-header-bottom {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
}



/* Logo mobile nell'header fisso */                                    
.tm-mobile-logo-fixed {                                            
     margin-right: 10px;                                        
     display: none;                                             
     align-items: center;                                       
 }                                                              
                                                                
 .tm-mobile-logo-img {
    width: 174px !important;
 }

/* Bottone CHECK ELEGGIBILITÀ per mobile normale (sempre visibile) */
.tm-check-eleggibilita-btn-mobile {
    background: linear-gradient(0deg,rgba(172, 172, 172, 1) 0%, rgba(255, 255, 255, 1) 100%) !important;
    border: 0px solid rgba(255,255,255,0.3) !important;
    box-shadow: 0px 5px 10px rgba(0,0,0,0.25) !important;
    color: #701C33 !important;
    height: 40px !important; 
    font-weight: 600 !important;
    width: 127px !important;

    border-radius: 20px !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tm-check-eleggibilita-btn-mobile:hover {
    opacity: 0.8 !important;
}

/* Nascondere il bottone mobile quando header è fisso */
.tm-header-bottom.fixed-header .tm-check-button-mobile {
    display: none !important;
}                                                              
                                                                
 /* Solo su mobile quando header è fisso */                     
 @media (max-width: 959px) {                                    
     /* .tm-header-bottom.fixed-header .tm-mobile-logo-fixed {     
         display: flex !important;                              
     }                                                           */
 }           