/*
    Header menù desktop
*/
:root {
    --lsx-nav-text: #ffffff;
    --lsx-nav-accent: #e67d22;
    --lsx-nav-dropdown-bg: #010D15;
    --lsx-nav-dropdown-border: rgba(255,255,255,0.85);
    --lsx-nav-dropdown-hover: #273138;
    --lsx-nav-height: 56px;
    --lsx-nav-px: 1rem;
    --lsx-t: 0.18s ease;
    --lsx-r: 8px;
}

/* ---- Reset base ---- */
.lsx .lsx-nav,
.lsx .lsx-nav ul,
.lsx .lsx-nav li,
.lsx .lsx-nav a {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

/* ---- Contenitore navbar ---- */
.lsx .lsx-nav {
    display: flex;
    align-items: center;
    height: var(--lsx-nav-height);
    position: relative;
}

/* ============================================================
   LIVELLO 1 — orizzontale
   ============================================================ */
.lsx .lsx-nav > ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;
}

.lsx .lsx-nav > ul > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.lsx .lsx-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 var(--lsx-nav-px);
    color: var(--lsx-nav-text);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: color var(--lsx-t);
}

.lsx .lsx-nav > ul > li > a:hover {
    color: var(--lsx-nav-text);
}

.lsx .lsx-nav > ul > li:hover > a span,
.lsx .lsx-nav > ul > li:hover > a .lsx-arrow-down {
    color: var(--lsx-nav-accent);
}

.lsx .lsx-nav > ul > li:hover > a {
    border-bottom: 2px solid var(--lsx-nav-accent);
    margin-bottom: -2px;
}

/* Voce attiva */
.lsx .lsx-nav > ul > li.active > a,
.lsx .lsx-nav > ul > li.current-menu-item > a,
.lsx .lsx-nav > ul > li.current-menu-ancestor > a {
    color: var(--lsx-nav-accent);
}

/* Freccia giù — livello 1 */
.lsx .lsx-nav .lsx-arrow-down {
    font-size: 0.6rem;
    display: inline-block;
    transition: transform var(--lsx-t);
    pointer-events: none;
}

.lsx .lsx-nav > ul > li:hover > a .lsx-arrow-down {
    transform: rotate(180deg);
}

/* Icona link esterno */
.lsx .lsx-nav .lsx-external {
    font-size: 0.65rem;
    opacity: 0.65;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 0.5rem;
}

/* ============================================================
   DROPDOWN — livello 2 (unico livello)
   ============================================================ */
.lsx .lsx-nav ul ul {
    display: none;
    position: absolute;
    background: var(--lsx-nav-dropdown-bg);
    border: 1px solid var(--lsx-nav-dropdown-border);
    border-radius: var(--lsx-r);
    padding: 8px;
    min-width: 256px;
    z-index: 9999;
}

/* Posizione dropdown dal livello 1 */
.lsx .lsx-nav > ul > li > ul {
    top: calc(var(--lsx-nav-height) - 1px);
    left: 0;
}

/* Apri al hover — livello 1 */
.lsx .lsx-nav > ul > li:hover > ul {
    display: block;
}

/* ---- Voci dropdown ---- */
.lsx .lsx-nav ul ul li {
    position: relative;
}

.lsx .lsx-nav ul ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 10px 8px;
    color: var(--lsx-nav-text);
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
    transition: background var(--lsx-t);
    border-radius: 8px;
}

.lsx .lsx-nav ul ul li a:hover {
    background: var(--lsx-nav-dropdown-hover);
}

/* Voce attiva nel dropdown */
.lsx .lsx-nav ul ul li.active > a,
.lsx .lsx-nav ul ul li.current-menu-item > a,
.lsx .lsx-nav ul ul li.current-menu-ancestor > a {
    color: var(--lsx-nav-accent);
}

.lsx .lsx-nav ul ul li.active > a:hover,
.lsx .lsx-nav ul ul li.current-menu-item > a:hover,
.lsx .lsx-nav ul ul li.current-menu-ancestor > a:hover {
    color: var(--lsx-nav-text);
}

/* Freccia destra visibile all'hover sulla sottovoce */
.lsx .lsx-nav ul ul li a::after {
    content: '\f054'; /* fa-chevron-right */
    font-family: 'FontAwesome';
    font-size: 0.55rem;
    opacity: 0;
    transition: opacity var(--lsx-t);
    flex-shrink: 0;
}

.lsx .lsx-nav ul ul li a:hover::after {
    opacity: 1;
}

/*
* Selettore lingua
*/
.lsx .form-switch {
    margin: 0px;
}
.lsx .form-switch {
    padding-left: 0px;
}
.lsx .form-check-input,
.lsx #switchlang.form-switch .form-check-input:checked {
    background-color: #14262e;
    border: 1px solid #ffffff;
}

.lsx #switchlang.form-switch .form-check-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23c24700'/%3e%3c/svg%3e");
}

.lsx #switchlang.form-switch .labels::before,
.lsx #switchlang.form-switch .labels::after {
    color: #ffffff;
    cursor: pointer;
}

/*
* Barra divisoria
*/
.lsx .vdivider {
    position: relative;
}
.lsx .vdivider::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 24px;
    background-color: #fff;
    margin-right: 16px;
    vertical-align: middle;
}

/*
* Sidebar laterale per versione mobile
*/
#offcanvasMenuMobile{
    background: linear-gradient(0deg, #010D15 0%, #010D15 100%), #091526;
    border: 1px solid #ffffff !important;
    border-radius: 32px !important;
    background-image: none;
    top: 14px !important;
    right: 14px !important;
    bottom: 14px !important;
}

#offcanvasMenuMobile .offcanvas_wrap {
    margin: 0px;
}

#offcanvasMenuMobile .offcanvas-header .btn-close {
    padding: 4px !important;
    border: none !important;
    opacity: 1 !important;
}

@media (max-width: 480px) {
    #offcanvasMenuMobile {
        --bs-offcanvas-width: 100%;
    }
    #offcanvasMenuMobile.offcanvas.offcanvas-end {
        top: 14px !important;
        right: 14px !important;
        bottom: 14px !important;
        left: 14px !important;
        height: auto !important;
        width: auto !important;
    }
}

#offcanvasMenuMobile .offcanvas_widget ul {
    line-height: inherit;
}

#offcanvasMenuMobile .offcanvas_widget ul li {
    padding: 8px 0px 0px 0px;
}

#offcanvasMenuMobile .offcanvas_widget ul a {
    font-size: 0.875rem;
}

#offcanvasMenuMobile .widget_text {
    margin-top: auto !important;
}

/*
    Sidebar menù mobile
*/
.lsx-mobile-menu,
.lsx-mobile-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lsx-mobile-sub {
    display: none;
}

.lsx-mobile-sub.is-open {
    display: block;
}

.lsx-mobile-menu > .lsx-mobile-item {
    border-bottom: 1px solid #ffffff;
}

/* Link base */
.lsx-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.18s ease;
}

.lsx-mobile-link:hover { color: #e67d22; }

/* Voce attiva — solo se WordPress aggiunge la classe active */
.lsx-mobile-item.active > .lsx-mobile-link,
.lsx-mobile-item.active > a.lsx-mobile-toggle {
    color: #e67d22;
}

/* Hover su voce attiva — torna bianco */
.lsx-mobile-item.active > .lsx-mobile-link:hover,
.lsx-mobile-item.active > a.lsx-mobile-toggle:hover {
    color: #ffffff;
}

/* Freccia */
.lsx-mobile-arrow {
    font-size: 0.65rem;
    transition: transform 0.22s ease;
    pointer-events: none;
    flex-shrink: 0;
}

.lsx-mobile-link.is-open .lsx-mobile-arrow {
    transform: rotate(180deg);
}

/* Indentazione livello annidato */
.lsx-mobile-sub .lsx-mobile-link {
    padding-left: 16px;
    font-weight: 400;
    font-size: 0.875rem;
}

/*
* Stili generici per allineamento grafici
*/
.lsx .pointer {
    cursor: pointer;
}

.lsx .btn {
    background-color: #c24700 !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    text-transform: capitalize;
}

.top_header_widget_area li a {
    margin-left: 16px;
}

/*
* Stili per menù mobile
*/
#offcanvasMenuMobile .search-form {
    padding: 12px 0px;
    border-bottom: 1px solid #ffffff;
}

#offcanvasMenuMobile .search-form .input-group-text {
    padding: 0px;
}

#offcanvasMenuMobile .search-form input::placeholder {
    color: #ffffff;
}

/*
* Stili per modale ricerca
*/
#offcanvasSearch {
    width: 672px;
    height: 333px;
    background-color: #010d14 !important;
    border: 1px solid #ffffff !important;
    border-radius: 16px !important;
    background-image: none;
}

#offcanvasSearch .offcanvas-header .btn-close {
    padding: 4px !important;
    border: none !important;
    opacity: 1 !important;
}

#offcanvasSearch .offcanvas-header {
    border-bottom: 1px solid #fff;
}

#offcanvasSearch .search-form input::placeholder {
    color: #6A7282;
}

#offcanvasSearch .input-group-text {
    padding: 0px;
}

#offcanvasSearch .input-group-text.text-dark {
    color: #99A1AF !important;
}

#offcanvasSearch .btn-close.btn-close-white {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2399A1AF'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E");
    background-size: 0.6em;
}

#offcanvasSearch .btn-search {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #1a1f2e;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#offcanvasSearch .btn-search i,
#offcanvasSearch .btn-search svg {
    color: #f97316;
    font-size: 2rem;
}

#offcanvasSearch .btn-search .input-group-text {
    color: #E67E22 !important;
    font-size: 2rem;
}

#offcanvasSearch .menu-modale-ricerca {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

#offcanvasSearch .menu-modale-ricerca .menu-item a {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    white-space: nowrap;
    background-color: #0e1921;
    border: 1px solid #1c272e;
}

#offcanvasSearch .menu-modale-ricerca .menu-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

/*
* Stili per card pagine
*/
.socio-card,
.corsi-card {
    max-width: 590px;
    min-height: 360px;
    height: 100%;
}

.socio-card-body,
.corsi-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 1.25rem;
}

.socio-header,
.corsi-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.socio-logo-wrap,
.corsi-logo-wrap {
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.socio-logo-wrap {
    width: 96px;
    height: 96px;
}

.corsi-logo-wrap {
    width: 170px;
    height: 170px;
}

.socio-logo-img,
.corsi-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.socio-logo-initials,
.corsi-logo-initials {
    font-size: 32px;
    font-weight: 500;
    color: #2a2c2d;
}

.socio-header-info,
.corsi-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.socio-title,
.corsi-title {
    margin: 0;
    font-weight: 600;
    font-size: 1.4rem;
}

.socio-badges,
.corsi-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-socio,
.badge-corsi {
    font-size: 12px;
    font-weight: 400;
    padding: 3px 12px;
    color: #ffffff;
    background-color: #4a4b4d;
}

.socio-description,
.corsi-description {
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.socio-meta,
.corsi-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.socio-meta-row,
.corsi-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255);
}

.socio-meta-icon,
.corsi-meta-icon {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.socio-footer,
.corsi-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.corsi-card-thumbnail {
    display: none;
}

.corsi-card-thumbnail-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 28px 28px 0 0;
    display: block;
}

@media (max-width: 767px) {
    .corsi-card-thumbnail {
        display: block;
    }

    .corsi-logo-wrap {
        display: none;
    }
}

.categoria-corsi-card {
    flex: 1 1 calc(33.333% - 16px);
    min-width: 240px;
    min-height: 320px;
    border-radius: 25px;
    background-size: cover;
    background-position: top right;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.categoria-corsi-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    border-radius: 0 0 25px 25px;
    min-height: 180px;
}

.categoria-corsi-title {
    font-size: 24px;
    color: #fff;
    margin: 0 0 6px 0;
}

.categoria-corsi-desc {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

@media (max-width: 767px) {
    .categoria-corsi-card {
        flex: 1 1 100%;
    }
}
