/**
 * Team dinamici nella homepage Tacticalia.
 *
 * I colori provengono esclusivamente dal master globale:
 * tfm-design-tokens.css
 *
 * @package TFM_Teams
 */

.tfm-home-teams {
    width: 100%;
}

.tfm-home-teams__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 32px;

    margin-bottom: 34px;
}

.tfm-home-teams__intro {
    min-width: 0;
}

.tfm-home-teams__eyebrow {
    margin: 0 0 6px;

    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;

    letter-spacing: 0.02em;

    color: var(--tfm-primary);
}

.tfm-home-teams__title {
    margin: 0;

    font-family: "Outfit", sans-serif;
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 700;
    line-height: 1.08;

    letter-spacing: -0.02em;

    color: var(--tfm-text);
}

.tfm-home-teams__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 12px;

    flex-shrink: 0;
}

.tfm-home-teams__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 10px 20px;

    border: 1px solid transparent;
    border-radius: 8px;

    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.tfm-home-teams__button:hover {
    transform: translateY(-1px);
}


/* =========================================================
   BUTTON SECONDARY
   ========================================================= */

.tfm-home-teams__button--secondary {
    background: var(--tfm-surface);

    border-color: var(--tfm-border-strong);

    color: var(--tfm-text);
}

.tfm-home-teams__button--secondary:hover {
    background: var(--tfm-primary-soft);

    border-color: var(--tfm-primary);

    color: var(--tfm-primary-hover);
}


/* =========================================================
   BUTTON PRIMARY
   ========================================================= */

.tfm-home-teams__button--primary {
    background: var(--tfm-primary);

    border-color: var(--tfm-primary);

    color: #ffffff;
}

.tfm-home-teams__button--primary:hover {
    background: var(--tfm-primary-hover);

    border-color: var(--tfm-primary-hover);

    color: #ffffff;
}


/* =========================================================
   GRID
   ========================================================= */

.tfm-home-teams__grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}


/* =========================================================
   CARD
   ========================================================= */

.tfm-home-teams__card {
    min-width: 0;
    height: 100%;

    margin: 0;

    background: var(--tfm-surface);

    border: 1px solid var(--tfm-border);
    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 1px 2px rgba(16, 24, 32, 0.04),
        0 8px 24px rgba(16, 24, 32, 0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.tfm-home-teams__card:hover {
    transform: translateY(-3px);

    border-color: var(--tfm-border-strong);

    box-shadow:
        0 2px 4px rgba(16, 24, 32, 0.05),
        0 14px 32px rgba(16, 24, 32, 0.08);
}

.tfm-home-teams__card-link {
    display: flex;
    flex-direction: column;

    height: 100%;

    color: inherit;

    text-decoration: none;
}

.tfm-home-teams__card-link:hover {
    color: inherit;
}


/* =========================================================
   CARD MEDIA
   ========================================================= */

.tfm-home-teams__card-media {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 150px;

    padding: 18px;

    background:
        linear-gradient(180deg,
            var(--tfm-background) 0%,
            var(--tfm-surface) 100%);

    border-bottom:
        1px solid var(--tfm-border);
}


/* =========================================================
   LOGO
   ========================================================= */

.tfm-home-teams__logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 94px;
    height: 94px;

    border-radius: 50%;

    overflow: hidden;

    background: var(--tfm-surface);

    border: 1px solid var(--tfm-border);

    box-shadow:
        0 6px 18px rgba(16, 24, 32, 0.08);
}

.tfm-home-teams__logo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    padding: 8px;
}

.tfm-home-teams__logo span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    font-family: "Outfit", sans-serif;
    font-size: 40px;
    font-weight: 700;

    color: var(--tfm-primary-hover);

    background: var(--tfm-primary-soft);
}


/* =========================================================
   BADGES
   ========================================================= */

.tfm-home-teams__badges {
    position: absolute;

    top: 14px;
    left: 14px;
    right: 14px;

    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    pointer-events: none;
}

.tfm-home-teams__badge {
    display: inline-flex;
    align-items: center;

    min-height: 26px;

    padding: 4px 9px;

    border-radius: 999px;

    font-family: "Outfit", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}


/* Verified = stato neutro/brand */

.tfm-home-teams__badge--verified {
    background: var(--tfm-primary-soft);

    color: var(--tfm-primary-hover);
}


/* Open recruitment = stato positivo */

.tfm-home-teams__badge--open {
    background: var(--tfm-success-soft);

    color: var(--tfm-success);
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.tfm-home-teams__card-content {
    display: flex;
    flex-direction: column;

    flex: 1 1 auto;

    padding: 22px 22px 18px;
}

.tfm-home-teams__team-name {
    margin: 0 0 8px;

    font-family: "Outfit", sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.18;

    color: var(--tfm-text);
}

.tfm-home-teams__location {
    margin: 0 0 12px;

    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;

    color: var(--tfm-primary);
}

.tfm-home-teams__description {
    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    overflow: hidden;

    margin: 0;

    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;

    color: var(--tfm-text-secondary);
}


/* =========================================================
   CARD FOOTER
   ========================================================= */

.tfm-home-teams__card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: auto;

    padding: 15px 22px 17px;

    border-top:
        1px solid var(--tfm-border);

    font-family: "Outfit", sans-serif;
    font-size: 14px;
    font-weight: 600;

    color: var(--tfm-primary-hover);
}

.tfm-home-teams__card-footer span:last-child {
    font-size: 18px;
    line-height: 1;

    transition:
        transform 0.2s ease;
}

.tfm-home-teams__card:hover .tfm-home-teams__card-footer span:last-child {
    transform: translateX(3px);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.tfm-home-teams__empty {
    padding: 30px;

    background: var(--tfm-background);

    border: 1px solid var(--tfm-border);
    border-radius: 12px;

    text-align: center;
}

.tfm-home-teams__empty p {
    margin: 0;

    font-family: "Outfit", sans-serif;
    font-size: 15px;
    line-height: 1.5;

    color: var(--tfm-text-secondary);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .tfm-home-teams__header {
        align-items: flex-start;
        flex-direction: column;

        gap: 20px;
    }

    .tfm-home-teams__actions {
        justify-content: flex-start;
    }

    .tfm-home-teams__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 18px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .tfm-home-teams__header {
        margin-bottom: 24px;
    }

    .tfm-home-teams__title {
        font-size: 30px;
        line-height: 1.12;
    }

    .tfm-home-teams__actions {
        width: 100%;

        flex-direction: column;
        align-items: stretch;

        gap: 10px;
    }

    .tfm-home-teams__button {
        width: 100%;
    }

    .tfm-home-teams__grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .tfm-home-teams__card-media {
        min-height: 145px;
    }

    .tfm-home-teams__logo {
        width: 90px;
        height: 90px;
    }

    .tfm-home-teams__card-content {
        padding: 20px 18px 16px;
    }

    .tfm-home-teams__team-name {
        font-size: 21px;
    }

    .tfm-home-teams__card-footer {
        padding: 14px 18px 16px;
    }
}

/**
 * Forza il colore testo del CTA primario del modulo Team.
 *
 * Necessario per evitare sovrascritture provenienti dagli stili globali
 * di Elementor o del tema sui link <a>.
 */
.tfm-home-teams .tfm-home-teams__button--primary,
.tfm-home-teams .tfm-home-teams__button--primary:hover,
.tfm-home-teams .tfm-home-teams__button--primary:focus,
.tfm-home-teams .tfm-home-teams__button--primary:visited {
    color: #ffffff !important;
}