/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.0
*/



.wpml-ls-menu-item .wpml-ls-flag {
    display: inline;
    height: 20px !important;
    vertical-align: middle;
    margin-bottom: 1px !important;
}

.sub-menu .wpml-ls-menu-item .wpml-ls-flag {
    display:none!important;
}
.nectar_hook_global_section_footer .wpml-ls-item {
    display:none!important;
}

.container-wrap input[type=text], .container-wrap input[type=email], .container-wrap input[type=password], .container-wrap input[type=tel], .container-wrap input[type=url], .container-wrap input[type=search], .container-wrap input[type=date], .container-wrap input[type=number], .container-wrap textarea, .container-wrap select, body > #review_form_wrapper.modal input[type=text], body > #review_form_wrapper.modal textarea, body > #review_form_wrapper.modal select, body > #review_form_wrapper.modal input[type=email], .select2-container--default .select2-selection--single, body[data-fancy-form-rcs="1"] .select2-container--default .select2-selection--single, .woocommerce input#coupon_code, .material.woocommerce-page[data-form-style="default"] input#coupon_code, body[data-form-style="minimal"] input[type="text"], body[data-form-style="minimal"] textarea, body[data-form-style="minimal"] input[type="email"], body[data-form-style="minimal"] input[type=password], body[data-form-style="minimal"] input[type=tel], body[data-form-style="minimal"] input[type=url], body[data-form-style="minimal"] input[type=search], body[data-form-style="minimal"] input[type=date], body[data-form-style="minimal"] input[type=number], body[data-form-style="minimal"] select {

    border-radius: 20px;
}

.row .col.section-title {
    margin-bottom: 20px;
}

p[data-key="btn_red"].nectar-post-grid-item__custom-field{
    background: #dc0813;
    border-radius: 10px;
    padding: 5px 20px!important;
    color: #fff!important;
    font-weight: 600;
    width: fit-content;
    margin-top: 10px;
 }


 /* Nasconde l'input originale ma lo mantiene cliccabile */
.nectar-file-upload input[type="file"] {
    display: none;
}

/* Stilizza il finto pulsante */
.custom-file-upload {
    display: inline-block;
    padding: 12px 25px;
    cursor: pointer;
    background-color: transparent;
    border: 2px solid #fff; 
    color: #fff;
    border-radius: 100px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 12px;
    line-height: 0.2;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
}

/* Effetto Hover */
.custom-file-upload:hover {
    background-color: #fff;
    color: #000;
}
.nectar-file-upload p {
    padding-bottom: 0;
}
/* Messaggio di errore CF7 sotto il pulsante */
.wpcf7-not-valid-tip {
    display: block;
    margin-top: 10px;
    font-size: 12px;
}

.rich-snippet-hidden {
    display: none;
}



/* Container principale */
.mag-custom-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 30px;
}

/* Singolo Articolo */
.mag-post-item {
    display: flex;
    gap: 30px;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 40px;
}

/* Immagine */
.mag-post-thumb {
    flex: 0 0 35%; /* L'immagine occupa il 35% */
}

.mag-post-thumb img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    transition: transform 0.3s ease;
}

/* Contenuto */
.mag-post-details {
    flex: 1;
}

.mag-post-cat a {
    color: #dd3333;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
}

.mag-post-title {
    margin: 10px 0;
    font-size: 24px;
    line-height: 1.3;
}

.mag-post-title a {
    color: #333;
    text-decoration: none;
}

.mag-post-excerpt {
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

.mag-post-date {
    font-size: 12px;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .mag-post-item {
        flex-direction: column;
    }
    .mag-post-thumb {
        flex: 0 0 100%;
    }
}

/* --- ANIMAZIONI HOVER --- */
.mag-post-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

/* Effetto sull'immagine */
.mag-post-thumb {
    overflow: hidden; /* Taglia l'immagine che esce durante lo zoom */
    border-radius: 8px;
}

.mag-post-thumb img {
    transition: transform 0.6s ease;
}

.mag-post-item:hover .mag-post-thumb img {
    transform: scale(1.08); /* Zoom leggero */
}

/* Effetto sul titolo */
.mag-post-title a {
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.mag-post-item:hover .mag-post-title a {
    color: #333; /* Colore Salient */
    padding-left: 10px; /* Il titolo si sposta leggermente */
}

/* Ombra morbida su tutto l'articolo al passaggio */
.mag-post-item:hover {
    background: rgba(249, 249, 249, 0.5);
    padding-left: 15px;
    margin-left: -15px;
    border-radius: 12px;
}

/* --- STILE INFINITE SCROLL --- */
.mag-scroll-loader {
    text-align: center;
    padding: 30px 0;
    display: none;
    font-size: 13px;
    color: #333;
}

/* Sistema il contenitore per non far ballare i post durante l'append */
.mag-custom-grid {
    min-height: 600px;
}

/* --- STILE FILTRI A BOTTONE --- */
.mag-custom-filters {
    margin-bottom: 50px;
    padding: 20px 0;
}

#mag-ajax-list {
    list-style: none!important;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#mag-ajax-list li {
    margin: 0;
    list-style: none!important;
}

#mag-ajax-list a {
    display: inline-block;
    padding: 5px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 50px; /* O 50px se li vuoi tondi */
    transition: all 0.3s ease;
    
    /* Stato di Default: Outline */
    background: transparent;
    color: #333;
    border: 2px solid #333;
}

/* Hover sugli inattivi */
#mag-ajax-list a:hover:not(.active) {
    border-color: #dd3333;
    color: #dd3333;
}

/* Stato Attivo: Background Rosso */
#mag-ajax-list a.active {
    background: #dd3333; /* Rosso */
    color: #fff;
    border-color: #dd3333;

}

/* --- RE-STYLE DETTAGLI POST (Senza Data) --- */
.mag-post-cat a {
    color: #dd3333; /* Coerenza con i bottoni */
}

.mag-post-item:hover .mag-post-title a {
    color: #dd3333;
}

/* --- GESTIONE VISIBILITÀ --- */

.mag-mobile-only { display: none; }

/* STILE SELECT MOBILE */
#mag-mobile-select {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid #ff0000; /* Bordo rosso coerente */
    background: #fff;
    border-radius: 4px;
    font-size: 16px; /* Evita lo zoom automatico su iPhone */
    font-weight: 600;
    color: #333;
    appearance: none; /* Rimuove stile nativo per personalizzare */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff0000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

/* --- MEDIA QUERY (Sotto i 768px) --- */
@media (max-width: 768px) {
    .mag-desktop-only {
        display: none!important;
    }
    .mag-mobile-only {
        display: block;
        padding: 0 20px;
        text-align: center;
    }
    
    /* Regoliamo anche il post-item per mobile */
    .mag-post-item {
        flex-direction: column;
        gap: 15px;
    }
    .mag-post-thumb {
        flex: 0 0 100%;
    }
}

/* Effetto fade-in quando i post vengono aggiunti alla griglia */
.mag-post-item {
    animation: fadeInMag 0.5s ease forwards;
}

@keyframes fadeInMag {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}