﻿/* =====================================================================
   TalentoGo - layout 2026 (header, footer, homepage)
   Caricato dopo style.css / responsive.css: le regole qui hanno priorita'.
   Namespace: tg-*
   ===================================================================== */

:root {
    --tg-yellow: #e6a800;
    --tg-yellow-soft: #d9a93a;
    --tg-black: #111111;
    --tg-text: #222222;
    --tg-muted: #6b6b6b;
    --tg-gray: #ececec;
    --tg-gray-dark: #c9c9c9;
    --tg-purple: #4b2a6b;
    --tg-white: #ffffff;
    --tg-header-h: 76px;
    --tg-container: 1200px;
    --tg-font: "Lexend Deca", "Helvetica Neue", Arial, sans-serif;
}

.tg-container {
    width: 100%;
    max-width: var(--tg-container);
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ---------------------------------------------------------------------
   HEADER
   --------------------------------------------------------------------- */
.tg-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--tg-white);
    font-family: var(--tg-font);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    transition: box-shadow .2s ease;
}

.tg-header.is-scrolled {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}

.tg-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: var(--tg-header-h);
}

/* logo */
.tg-header .logo {
    flex: 0 0 auto;
    float: none;
    margin: 0;
    padding: 0;
    width: auto;
}

.tg-header .logo a {
    display: block;
}

.tg-header .logo img {
    height: 44px;
    width: auto;
    max-width: none;
}

.tg-header .logo img.bianco {
    display: none;
}

.tg-header .logo img.nero {
    display: block;
}

/* menu principale (generato da ucMenuTop) */
.tg-nav {
    flex: 0 1 auto;
    min-width: 0;
}

.tg-nav .content-menu,
.tg-nav .navbar,
.tg-nav .navbar-default,
.tg-nav .navbar-collapse,
.tg-nav .container-fluid {
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0;
    min-height: 0;
    box-shadow: none;
    float: none;
}

.tg-nav .navbar-collapse.collapse {
    display: block !important;
    height: auto !important;
}

.tg-nav ul.nav.navbar-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 22px;
    float: none;
    margin: 0;
    padding: 0;
}

.tg-nav ul.nav.navbar-nav > li {
    float: none;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

.tg-nav ul.nav.navbar-nav > li > a {
    position: relative;
    display: block;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--tg-black);
    background: transparent !important;
    text-transform: none;
    white-space: nowrap;
}

.tg-nav ul.nav.navbar-nav > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--tg-yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.tg-nav ul.nav.navbar-nav > li > a:hover,
.tg-nav ul.nav.navbar-nav > li > a:focus,
.tg-nav ul.nav.navbar-nav > li.on > a,
.tg-nav ul.nav.navbar-nav > li.active > a {
    color: var(--tg-black);
}

.tg-nav ul.nav.navbar-nav > li > a:hover::after,
.tg-nav ul.nav.navbar-nav > li > a:focus::after,
.tg-nav ul.nav.navbar-nav > li.on > a::after,
.tg-nav ul.nav.navbar-nav > li.active > a::after {
    transform: scaleX(1);
}

.tg-nav .dropdown-menu {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: 8px 0;
}

.tg-nav .dropdown-menu > li > a {
    font-size: 14px;
    padding: 8px 18px;
}

/* ricerca */
.tg-search {
    flex: 0 1 220px;
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
}

.tg-search input[type="search"] {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 40px;
    border: 0;
    border-radius: 2px;
    background: var(--tg-gray-dark);
    background: #d5d5d5;
    font-family: var(--tg-font);
    font-size: 14px;
    color: var(--tg-black);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: background .2s ease, box-shadow .2s ease;
}

.tg-search input[type="search"]::placeholder {
    color: #6f6f6f;
}

.tg-search input[type="search"]:focus {
    background: var(--tg-white);
    box-shadow: 0 0 0 2px var(--tg-black);
}

.tg-search #tg-search-btn {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-search #tg-search-btn svg {
    width: 18px;
    height: 18px;
}

/* area utente: accedi / utente loggato */
.tg-user {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.tg-header .wrapper-login {
    position: relative;
    float: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
    background: transparent;
}

.tg-header .wrapper-login .icon-user,
.tg-header .wrapper-login .user-name,
.tg-header .wrapper-login .user-name .content-scritta,
.tg-header .wrapper-login .user-name .content-arrow {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    position: static;
}

.tg-header .wrapper-login .user-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* non loggato: solo bottone nero "Accedi" */
.tg-header .wrapper-login.loggato-off .icon-user {
    display: none;
}

.tg-header .wrapper-login.loggato-off .user-name a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 22px;
    background: var(--tg-black);
    color: var(--tg-white) !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    border-radius: 2px;
    white-space: nowrap;
    transition: background .2s ease;
}

.tg-header .wrapper-login.loggato-off .user-name a:hover {
    background: #333;
}

/* loggato: avatar + nome + freccia */
.tg-header .wrapper-login.loggato-on .icon-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tg-yellow);
}

.tg-header .wrapper-login.loggato-on .user-name a {
    color: var(--tg-black);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.tg-header .wrapper-login .content-arrow img {
    width: 12px;
    height: auto;
}

/* menu a tendina utente loggato */
.tg-header ul.pnl-loggato-menu {
    display: none;
    position: absolute;
    top: calc(100% + 18px);
    right: 0;
    width: 280px;
    max-height: calc(100vh - var(--tg-header-h) - 30px);
    overflow-y: auto;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: var(--tg-white);
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
    z-index: 950;
}

.tg-header ul.pnl-loggato-menu > li {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-header ul.pnl-loggato-menu > li:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--tg-gray);
}

.tg-header ul.pnl-loggato-menu .icon-profilo img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.tg-header ul.pnl-loggato-menu .nome-profilo {
    font-size: 14px;
    line-height: 1.35;
    color: var(--tg-black);
    font-weight: 500;
}

.tg-header ul.pnl-loggato-menu > li > a.btn {
    display: block;
    float: none;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--tg-text);
    font-size: 14px;
    text-align: left;
    white-space: normal;
    box-shadow: none;
}

.tg-header ul.pnl-loggato-menu > li > a.btn:hover {
    background: var(--tg-gray);
    color: var(--tg-black);
}

/* notifiche e messaggi */
.tg-header ul.submenu-dx {
    display: flex;
    align-items: center;
    gap: 6px;
    float: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-header ul.submenu-dx > li {
    position: relative;
    float: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-header ul.submenu-dx > li .icona a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: background .2s ease;
}

.tg-header ul.submenu-dx > li .icona a:hover {
    background: var(--tg-gray);
}

.tg-header ul.submenu-dx img {
    width: 22px;
    height: auto;
}

.tg-header ul.submenu-dx img.icona-mobile {
    display: none;
}

.tg-header ul.submenu-dx img.icona-desktop {
    display: block;
    filter: brightness(0);
}

.tg-header .dept-notifica {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--tg-yellow);
    color: var(--tg-black);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* i popup sono posizionati rispetto all'intero header (sticky) */
.tg-header .pop-hover-notifiche-messaggi {
    position: absolute;
    top: 100%;
    right: max(24px, calc((100vw - var(--tg-container)) / 2 + 24px));
    left: auto !important;
    margin: 0;
    width: 360px;
    max-height: 70vh;
    background: var(--tg-white);
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
    z-index: 950;
}

/* motore di ricerca esteso (pagine video, formazione, storie...) sotto l'header */
.tg-header .row-3 {
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid rgba(0, 0, 0, .06);
    background: #fafafa;
}

.tg-header .row-3 > .container {
    max-width: var(--tg-container);
    width: 100%;
    padding: 0 24px;
}

.tg-header ul.motore-ricerca {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-header ul.motore-ricerca > li {
    float: none;
    width: auto;
    flex: 1 1 170px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-header ul.motore-ricerca > li:empty {
    display: none;
}

.tg-header ul.motore-ricerca input[type="text"],
.tg-header ul.motore-ricerca select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d0d0d0;
    border-radius: 2px;
    background-color: var(--tg-white);
    font-family: var(--tg-font);
    font-size: 14px;
    color: var(--tg-black);
}

.tg-header ul.motore-ricerca input[type="submit"],
.tg-header ul.motore-ricerca a.btn,
.tg-header ul.motore-ricerca button {
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 2px;
    background: var(--tg-black);
    color: var(--tg-white);
    font-family: var(--tg-font);
    font-size: 13px;
}

@media (max-width: 991px) {
    .tg-header .row-3 {
        display: none;
    }
}

/* barra secondaria del vecchio header: non piu' visibile */
.tg-legacy-submenu {
    display: none !important;
}

/* bottone menu mobile */
ul#icon-menu-mobile {
    top: calc((var(--tg-header-h) - 36px) / 2);
    left: auto;
    right: 16px;
    margin: 0;
    z-index: 1000;
}

ul#icon-menu-mobile li {
    height: 2px;
    background-color: var(--tg-black);
    margin-bottom: 7px;
}

@media (min-width: 992px) {
    ul#icon-menu-mobile {
        display: none !important;
    }

    /* il pannello mobile e' nascosto con left:-1000px ma largo 75%:
       su schermi > ~1333px ne spuntava un pezzo a sinistra */
    #wrapper-nav-menu-mobile {
        display: none !important;
    }
}

/* ---------------------------------------------------------------------
   HEADER responsive
   --------------------------------------------------------------------- */
@media (max-width: 1199px) {
    .tg-header__inner {
        gap: 20px;
    }

    .tg-nav ul.nav.navbar-nav {
        gap: 4px 18px;
    }

    .tg-search {
        flex-basis: 180px;
    }
}

@media (max-width: 991px) {
    :root {
        --tg-header-h: 64px;
    }

    .tg-header {
        position: sticky;
    }

    .tg-header .tg-header__inner {
        padding-right: 64px; /* spazio per il bottone menu mobile */
        gap: 12px;
    }

    .tg-header .logo img {
        height: 36px;
    }

    .tg-nav,
    .tg-search {
        display: none;
    }

    .tg-user {
        margin-left: auto;
    }

    .tg-header .wrapper-login.loggato-on .user-name {
        display: none;
    }

    .tg-header .wrapper-login.loggato-off .user-name a {
        height: 36px;
        padding: 0 16px;
    }

    .tg-header ul.submenu-dx img.icona-desktop {
        display: block;
    }

    .tg-header .pop-hover-notifiche-messaggi {
        position: fixed;
        top: var(--tg-header-h) !important;
        right: 0;
        width: 100% !important;
        max-height: calc(100vh - var(--tg-header-h));
        border-radius: 0;
    }
}

/* ---------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------- */
.tg-footer {
    background: var(--tg-gray);
    font-family: var(--tg-font);
    color: var(--tg-muted);
    padding: 40px 0;
    font-size: 12px;
    line-height: 1.5;
}

.tg-footer__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.tg-footer__logo img {
    height: 34px;
    width: auto;
    display: block;
}

.tg-footer__links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tg-footer__links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-footer__links ul.top {
    padding-bottom: 10px;
    border-bottom: 1px solid #bdbdbd;
}

.tg-footer__links li {
    padding: 0 12px;
    border-left: 1px solid #bdbdbd;
    list-style: none;
}

.tg-footer__links li:first-child {
    border-left: 0;
}

.tg-footer__links li.hidden {
    display: none;
}

.tg-footer__links a {
    color: var(--tg-muted);
    text-decoration: none;
}

.tg-footer__links a:hover {
    color: var(--tg-black);
}

.tg-footer__social {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-footer__social li {
    list-style: none;
}

.tg-footer__social img {
    width: 22px;
    height: 22px;
    display: block;
}

@media (max-width: 767px) {
    .tg-footer__inner {
        flex-direction: column;
        gap: 22px;
    }

    .tg-footer__links li {
        padding: 4px 10px;
    }
}

/* ---------------------------------------------------------------------
   HOMEPAGE
   --------------------------------------------------------------------- */
.tg-home {
    font-family: var(--tg-font);
    color: var(--tg-text);
    overflow: hidden;
}

.tg-home h1,
.tg-home h2 {
    font-family: var(--tg-font);
    color: var(--tg-black);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 24px;
}

.tg-home h2 {
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.1;
}

.tg-home h2 .tg-accent {
    color: var(--tg-yellow);
}

.tg-home p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 14px;
}

/* bottone nero con freccia */
.tg-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding: 12px 18px;
    background: var(--tg-black);
    color: var(--tg-white) !important;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 2px;
    transition: background .2s ease, gap .2s ease;
}

.tg-btn svg {
    width: 22px;
    height: 14px;
    flex: 0 0 auto;
}

.tg-btn:hover {
    background: #2b2b2b;
    gap: 20px;
}

.tg-btn--light {
    background: var(--tg-white);
    color: var(--tg-black) !important;
}

.tg-btn--light:hover {
    background: var(--tg-gray);
}

/* ---- HERO video ---- */
.tg-hero {
    position: relative;
    height: min(78vh, 720px);
    min-height: 420px;
    background: #222 center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--tg-white);
}

.tg-hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tg-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .05) 45%, rgba(0, 0, 0, .45) 100%);
}

.tg-hero__content {
    position: relative;
    z-index: 2;
    padding: 0 24px;
}

.tg-hero__logo {
    width: 200px;
    max-width: 50vw;
    height: auto;
    margin: 0 auto 18px;
    display: block;
}

.tg-hero__title {
    font-size: clamp(34px, 5.4vw, 72px);
    line-height: 1.05;
    font-weight: 800;
    color: var(--tg-white) !important;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
    margin: 0;
}

.tg-hero__subtitle {
    font-size: clamp(15px, 1.4vw, 19px);
    margin: 14px auto 0;
    max-width: 640px;
    color: rgba(255, 255, 255, .92);
}

.tg-hero__scroll {
    position: absolute;
    bottom: 22px;
    left: 50%;
    z-index: 2;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 14px;
}

.tg-hero__scroll::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--tg-white);
    animation: tg-scroll 1.6s infinite;
}

@keyframes tg-scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(14px); }
}

/* ---- sezioni ---- */
.tg-section {
    position: relative;
    padding: 110px 0;
}

.tg-section__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 60px;
    align-items: center;
}

.tg-section__media {
    position: relative;
    min-height: 460px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 4px;
}

.tg-section__text {
    max-width: 560px;
}

/* Cos'e' TalentoGo: bianco, testo a sinistra, immagine a destra */
.tg-intro {
    background: var(--tg-white);
}

.tg-intro .tg-section__media {
    min-height: 560px;
    background-color: #f6eccf;
    background-size: contain;
    background-position: center bottom;
}

/* WinnerGo: viola con immagine a tutta larghezza sfumata */
.tg-winnergo {
    background-color: var(--tg-purple);
    background-position: right center;
    background-size: cover;
    color: var(--tg-white);
}

.tg-winnergo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(75, 42, 107, .97) 0%, rgba(75, 42, 107, .88) 45%, rgba(75, 42, 107, .55) 100%);
}

.tg-winnergo .tg-container {
    position: relative;
    z-index: 1;
}

.tg-winnergo h2,
.tg-winnergo p {
    color: var(--tg-white);
}

.tg-winnergo .tg-section__text {
    max-width: 720px;
}

/* Formazione: bianco, immagine a destra che "esce" dalla sezione */
.tg-formazione {
    background: var(--tg-white);
}

.tg-formazione .tg-section__media {
    background-color: #f3d6d0;
}

/* Scuderia: giallo sopra la foto */
.tg-scuderia {
    background-color: var(--tg-yellow-soft);
    background-position: right center;
    background-size: cover;
}

.tg-scuderia::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(217, 169, 58, .97) 0%, rgba(217, 169, 58, .9) 50%, rgba(217, 169, 58, .6) 100%);
}

.tg-scuderia .tg-container {
    position: relative;
    z-index: 1;
}

.tg-scuderia .tg-section__text {
    max-width: 720px;
}

/* animazione di entrata */
.tg-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.tg-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .tg-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .tg-hero__scroll::before {
        animation: none;
    }
}

/* ---- homepage responsive ---- */
@media (max-width: 991px) {
    .tg-section {
        padding: 72px 0;
    }

    .tg-section__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .tg-section__text {
        max-width: none;
    }

    .tg-section__media,
    .tg-intro .tg-section__media {
        min-height: 320px;
    }

    .tg-hero {
        height: 62vh;
        min-height: 360px;
    }
}

@media (max-width: 767px) {
    .tg-container {
        padding: 0 16px;
    }

    .tg-section {
        padding: 56px 0;
    }

    .tg-home p {
        font-size: 15px;
    }
}

/* =====================================================================
   RICERCA TALENTI - barra espandibile + pannello filtri (header)
   ===================================================================== */
.tg-nav {
    transition: opacity .2s ease;
}

.tg-search {
    transition: flex-basis .3s ease;
}

.tg-search__close {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.tg-search__close svg {
    width: 18px;
    height: 18px;
}

/* il bottone lente nell'header serve solo su mobile */
.tg-search-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tg-black);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.tg-search-toggle svg {
    width: 22px;
    height: 22px;
}

/* --- stato aperto (desktop): la barra copre le voci di menu --- */
.tg-header.is-search-open .tg-nav {
    opacity: 0;
    pointer-events: none;
    flex: 0 0 0;
    width: 0;
    overflow: hidden;
}

.tg-header.is-search-open .tg-search {
    flex: 1 1 auto;
}

.tg-header.is-search-open .tg-search input[type="search"] {
    background: var(--tg-white);
    box-shadow: 0 0 0 2px var(--tg-black);
    padding-right: 44px;
}

.tg-header.is-search-open .tg-search__close {
    display: flex;
}

/* --- pannello filtri --- */
.tg-search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--tg-header-h) - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--tg-white);
    border-top: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .14);
    font-family: var(--tg-font);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease;
    z-index: 920;
}

.tg-header.is-search-open .tg-search-panel {
    opacity: 1;
    transform: none;
}

.tg-search-panel > .tg-container {
    padding-top: 26px;
}

.tg-search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 850;
    opacity: 0;
    transition: opacity .22s ease;
}

html.tg-search-active .tg-search-backdrop {
    opacity: 1;
}

.tg-link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--tg-muted);
    font-family: var(--tg-font);
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.tg-link-btn:hover {
    color: var(--tg-black);
}

/* --- mobile: lente nell'header, ricerca a tutto schermo --- */
@media (max-width: 991px) {
    .tg-search-toggle {
        display: inline-flex;
    }

    .tg-header.is-search-open .tg-search {
        display: flex;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
    }

    .tg-header.is-search-open .tg-search-toggle,
    html.tg-search-active ul#icon-menu-mobile {
        visibility: hidden;
    }

    .tg-search-panel {
        position: fixed;
        top: var(--tg-header-h);
        bottom: 0;
        max-height: none;
        box-shadow: none;
    }

    html.tg-search-active,
    html.tg-search-active body {
        overflow: hidden;
    }
}

/* =====================================================================
   PAGINA RISULTATI - cerca_talenti.aspx
   ===================================================================== */
.tg-results {
    font-family: var(--tg-font);
    color: var(--tg-text);
    padding: 48px 0 80px;
    background: #fafafa;
    min-height: 60vh;
}

.tg-results__head {
    margin-bottom: 28px;
}

.tg-results__head h1 {
    margin: 0 0 6px;
    font-family: var(--tg-font);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    color: var(--tg-black);
    line-height: 1.15;
}

.tg-results__count {
    margin: 0;
    color: var(--tg-muted);
    font-size: 15px;
}

.tg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tg-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px 0 14px;
    border-radius: 999px;
    background: var(--tg-black);
    color: var(--tg-white) !important;
    font-size: 13px;
    text-decoration: none !important;
}

.tg-chip span {
    font-size: 16px;
    line-height: 1;
    opacity: .7;
}

.tg-chip:hover span {
    opacity: 1;
    color: var(--tg-yellow);
}

.tg-chip--reset {
    background: transparent;
    color: var(--tg-muted) !important;
    text-decoration: underline !important;
    padding: 0 6px;
}

.tg-chip--reset:hover {
    color: var(--tg-black) !important;
}

.tg-talent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-talent {
    list-style: none;
}

.tg-talent__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: var(--tg-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    color: var(--tg-text) !important;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

.tg-talent__link:hover,
.tg-talent__link:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.tg-talent__photo {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: #f1e6c6;
    overflow: hidden;
}

.tg-talent__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tg-talent__initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: var(--tg-yellow);
    letter-spacing: .02em;
}

.tg-talent__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px 16px;
}

.tg-talent__name {
    font-size: 17px;
    font-weight: 700;
    color: var(--tg-black);
    line-height: 1.25;
    word-break: break-word;
}

.tg-talent__sub {
    font-size: 13px;
    color: var(--tg-muted);
}

.tg-talent__cats {
    font-size: 13px;
    font-weight: 500;
    color: #9a7000;
    line-height: 1.35;
}

.tg-talent__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--tg-muted);
}

.tg-results__empty {
    padding: 48px 24px;
    border-radius: 10px;
    background: var(--tg-white);
    text-align: center;
}

.tg-results__empty-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--tg-black);
}

.tg-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
}

.tg-pager a,
.tg-pager span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
}

.tg-pager a {
    background: var(--tg-white);
    color: var(--tg-black);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.tg-pager a:hover {
    background: var(--tg-black);
    color: var(--tg-white);
}

.tg-pager__current {
    background: var(--tg-black);
    color: var(--tg-white);
    font-weight: 700;
}

.tg-pager__gap {
    color: var(--tg-muted);
}

@media (max-width: 767px) {
    .tg-results {
        padding: 28px 0 56px;
    }

    .tg-talent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tg-talent__body {
        padding: 10px 12px 12px;
    }

    .tg-talent__name {
        font-size: 15px;
    }

    .tg-pager__prev,
    .tg-pager__next {
        flex-basis: 100%;
    }
}

/* mobile: lente a destra, vicino al bottone Accedi */
@media (max-width: 991px) {
    .tg-header .tg-search-toggle {
        margin-left: auto;
    }

    .tg-header .tg-user {
        margin-left: 0;
    }
}

/* =====================================================================
   RICERCA TALENTI v2 - pannello a gruppi (reference grafica)
   ===================================================================== */
:root {
    --tg-sp-bg: #e8e6e4;
    --tg-sp-tab: #9d9d9d;
    --tg-sp-h: 36px;
    --tg-sp-gap: 10px;
}

/* header in stato "ricerca aperta": stesso grigio del pannello, solo l'elefante come logo */
.tg-header.is-search-open {
    background: var(--tg-sp-bg);
    border-bottom-color: transparent;
}

.tg-header.is-search-open .logo img {
    display: none !important;
}

.tg-header.is-search-open .logo a {
    display: block;
    width: 44px;
    height: 32px;
    background: url("../images/testa-elefante.png") center / contain no-repeat;
}

.tg-header.is-search-open .tg-search input[type="search"] {
    background: var(--tg-white);
    box-shadow: none;
    border-radius: 0;
    font-size: 16px;
}

.tg-search-panel {
    background: var(--tg-sp-bg);
    border-top: 0;
    box-shadow: 0 24px 40px rgba(0, 0, 0, .12);
}

.tg-search-panel > .tg-container {
    padding-top: 6px;
    padding-bottom: 30px;
}

/* allineato alla barra di ricerca: parte dopo il logo */
.tg-sp,
.tg-sp__bottom {
    margin-left: 72px;
    max-width: 914px;
}

/* --- icona tonda a destra dei bottoni --- */
.tg-ico-wrap {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--tg-white);
    color: var(--tg-black);
}

.tg-ico {
    width: 15px;
    height: 15px;
    display: block;
}

.tg-ico--logo {
    width: 16px;
    height: 12px;
    background: currentColor;
    -webkit-mask: url("../images/testa-elefante.png") center / contain no-repeat;
    mask: url("../images/testa-elefante.png") center / contain no-repeat;
}

.tg-ico-wrap--badge {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

/* --- struttura: gruppi a sinistra, voci a destra --- */
.tg-sp {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.tg-sp__groups {
    display: flex;
    flex-direction: column;
    gap: var(--tg-sp-gap);
}

.tg-sp__tab,
.tg-opt,
.tg-sort,
.tg-sp__go {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: var(--tg-sp-h);
    padding: 0 6px 0 10px;
    border: 0;
    border-radius: 0;
    font-family: var(--tg-font);
    font-size: 16px;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.tg-opt__label,
.tg-sp__label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-sp__tab:focus-visible,
.tg-opt:focus-visible,
.tg-sort:focus-visible,
.tg-sp__go:focus-visible {
    outline: 2px solid var(--tg-black);
    outline-offset: 2px;
}

/* schede dei gruppi */
.tg-sp__tab {
    position: relative;
    width: 100%;
    background: var(--tg-sp-tab);
    color: var(--tg-white);
}

.tg-sp__tab .tg-ico-wrap {
    background: rgba(255, 255, 255, .85);
    color: var(--tg-sp-tab);
}

.tg-sp__tab:hover {
    background: #8a8a8a;
}

.tg-sp__tab[aria-selected="true"] {
    background: var(--tg-yellow);
    color: var(--tg-black);
}

.tg-sp__tab[aria-selected="true"] .tg-ico-wrap {
    background: var(--tg-black);
    color: var(--tg-yellow);
}

/* pallino: il gruppo ha voci selezionate ma non e' quello aperto */
.tg-sp__tab.has-selection::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--tg-yellow);
    box-shadow: 0 0 0 2px var(--tg-sp-bg);
}

.tg-sp__tab[aria-selected="true"].has-selection::after {
    background: var(--tg-black);
}

/* voci */
.tg-sp__panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--tg-sp-gap);
}

.tg-sp__panel[hidden] {
    display: none;
}

.tg-opt {
    width: 100%;
    background: var(--tg-black);
    color: var(--tg-white);
}

.tg-opt:hover {
    background: #2e2e2e;
}

.tg-opt[aria-pressed="true"] {
    background: var(--tg-yellow);
    color: var(--tg-black);
}

.tg-opt[aria-pressed="true"] .tg-ico-wrap {
    background: var(--tg-black);
    color: var(--tg-white);
}

/* riga in basso: ordinamenti e azioni */
.tg-sp__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #8f8f8f;
}

.tg-sp__sort {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tg-sp-gap);
}

.tg-sort {
    background: transparent;
    color: var(--tg-black);
    border: 1px solid var(--tg-black);
}

.tg-sort .tg-ico-wrap {
    background: var(--tg-black);
    color: var(--tg-white);
}

.tg-sort:hover {
    background: rgba(0, 0, 0, .06);
}

.tg-sort[aria-pressed="true"] {
    background: var(--tg-yellow);
    border-color: var(--tg-yellow);
}

.tg-sp__actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.tg-sp__go {
    background: var(--tg-black);
    color: var(--tg-white);
    padding-left: 16px;
}

.tg-sp__go:hover {
    background: #2e2e2e;
}

.tg-sp__go .tg-search-go__count {
    margin-left: -4px;
    font-size: 14px;
    opacity: .75;
}

/* --- tablet: 3 colonne --- */
@media (max-width: 1199px) {
    .tg-sp,
    .tg-sp__bottom {
        margin-left: 0;
    }

    .tg-sp__panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* --- mobile: gruppi in riga scorrevole, voci su 2 colonne, azioni fisse in basso --- */
@media (max-width: 991px) {
    .tg-header.is-search-open .logo a {
        visibility: hidden;
    }

    .tg-search-panel > .tg-container {
        padding-top: 14px;
        padding-bottom: 0;
        min-height: 100%;
        display: flex;
        flex-direction: column;
    }

    .tg-sp {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tg-sp__groups {
        flex-direction: row;
        overflow-x: auto;
        margin: 0 -16px;
        padding: 3px 16px 4px;
        scrollbar-width: none;
    }

    .tg-sp__groups::-webkit-scrollbar {
        display: none;
    }

    .tg-sp__tab {
        width: auto;
        flex: 0 0 auto;
    }

    .tg-sp__panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tg-opt,
    .tg-sp__tab,
    .tg-sort,
    .tg-sp__go {
        font-size: 15px;
    }

    .tg-sp__bottom {
        margin-top: 22px;
        padding-top: 18px;
    }

    .tg-sp__actions {
        position: sticky;
        bottom: 0;
        width: calc(100% + 32px);
        margin: 8px -16px 0;
        padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
        background: var(--tg-sp-bg);
        border-top: 1px solid #cfcdca;
        justify-content: space-between;
    }

    .tg-sp__go {
        flex: 1 1 auto;
        justify-content: center;
        gap: 12px;
    }
}

/* allineamento del pannello alla barra di ricerca (desktop):
   logo a larghezza fissa (72px) + gap dell'header (28px) = 100px */
@media (min-width: 1200px) {
    .tg-header.is-search-open .logo {
        flex: 0 0 72px;
        width: 72px;
    }

    .tg-sp,
    .tg-sp__bottom {
        margin-left: 100px;
        /* la barra finisce prima del bottone Accedi */
        margin-right: calc(var(--tg-user-w, 156px) + 28px);
        max-width: none;
    }
}

/* testo evidenziato dal gestionale ([parentesi quadre]) in homepage: giallo, nero sul fondo giallo della Scuderia */
.tg-home .wg-grad {
    color: var(--tg-yellow);
}

.tg-home .tg-scuderia .wg-grad {
    color: var(--tg-black);
}

/* sottotitolo hero centrato (.tg-home p azzerava il margine automatico) */
.tg-home .tg-hero__subtitle {
    margin: 14px auto 0;
}

/* ---------------------------------------------------------------------
   MENU: le voci in eccesso vanno in "Altro" (Index.master, adattaMenu)
   --------------------------------------------------------------------- */
.tg-header .tg-nav {
    flex: 1 1 auto;
    min-width: 0;
}

.tg-header .tg-nav ul.nav.navbar-nav {
    overflow: visible;
}

.tg-header .tg-search {
    flex: 0 0 200px;
    min-width: 0;
}

.tg-nav .tg-more {
    position: relative;
    flex: 0 0 auto;
}

.tg-nav .tg-more__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    border: 0;
    background: none;
    font-family: var(--tg-font);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--tg-black);
    cursor: pointer;
    white-space: nowrap;
}

.tg-nav .tg-more__chev {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.tg-nav .tg-more.is-open .tg-more__chev {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.tg-nav .tg-more__list {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 220px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: var(--tg-white);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
    z-index: 960;
}

.tg-nav .tg-more.is-open .tg-more__list,
.tg-nav .tg-more:focus-within .tg-more__list {
    display: block;
}

@media (hover: hover) {
    .tg-nav .tg-more:hover .tg-more__list {
        display: block;
    }

    /* ponte invisibile tra bottone e tendina, per non perdere l'hover */
    .tg-nav .tg-more::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: 16px;
    }
}

.tg-nav .tg-more__list > li {
    float: none;
    margin: 0;
    list-style: none;
}

.tg-nav .tg-more__list > li > a {
    display: block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--tg-black);
    background: transparent !important;
    white-space: nowrap;
    text-decoration: none;
}

.tg-nav .tg-more__list > li > a::after {
    display: none;
}

.tg-nav .tg-more__list > li > a:hover,
.tg-nav .tg-more__list > li > a:focus {
    background: var(--tg-gray) !important;
}
