/* Home pubblica. Richiede dashboard.css prima di questo file. */

.public-header .public-brand {
    color: var(--text-on-green);
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
}

.public-header-action {
    color: var(--text-on-green);
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .34);
}

.public-header-action:hover {
    color: var(--accent-strong);
    background: #ffffff;
    border-color: #ffffff;
}

.home-container {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 2rem 1.25rem 2.5rem;
    color: var(--text-main);
}

.home-intro {
    margin-bottom: 1.25rem;
}

.home-intro .eyebrow,
.home-card-label {
    margin: 0 0 .35rem;
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-intro h1 {
    margin: 0;
    font-size: clamp(1.75rem, 5vw, 2.45rem);
    line-height: 1.1;
}

.home-intro > p:last-child {
    margin: .5rem 0 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.home-card {
    color: var(--text-main);
    background: var(--bg-card);
    border: var(--border-width) solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 7px rgba(20, 58, 31, .05);
}

.featured-round-card {
    margin-bottom: 1rem;
    padding: 1.2rem;
    border-left: 5px solid var(--accent-primary);
}

.featured-round-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.featured-round-card h2,
.home-card-header h2,
.home-section-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.featured-round-detail {
    margin: .45rem 0 0;
    color: var(--text-muted);
}

.featured-round-status {
    display: inline-flex;
    margin: .65rem 0 0;
    padding: .35rem .55rem;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 700;
}

.featured-round-status.in-corso {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.featured-round-status.prossima {
    color: #6f4a00;
    background: var(--warning-soft);
}

.featured-round-status.conclusa {
    color: var(--text-muted);
    background: #edf1ed;
}

.home-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.home-card-header,
.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem;
    background: #f9fcf9;
    border-bottom: var(--border-subtle-width) solid var(--border-color);
}

.home-section-header {
    margin-bottom: .85rem;
    padding: 0;
    background: transparent;
    border: 0;
}

.home-link {
    color: var(--accent-strong);
    font-size: .86rem;
    font-weight: 800;
}

.home-link:hover {
    color: var(--accent-primary-hover);
    text-decoration: underline;
}

.home-empty {
    margin: 0;
    padding: 1rem;
    color: var(--text-muted);
}

.home-standings-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-standings-list li {
    display: flex;
    align-items: center;
    min-height: 46px;
    gap: .6rem;
    padding: .55rem .85rem;
    border-bottom: var(--border-subtle-width) solid #e8efe9;
}

.home-standings-list li:last-child {
    border-bottom: 0;
}

.home-rank {
    width: 22px;
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 800;
    text-align: center;
}

.home-standings-list img {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    object-fit: contain;
}

.home-team-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.home-standings-list strong {
    color: var(--accent-strong);
    font-size: .9rem;
    white-space: nowrap;
}

.home-match-list {
    padding: .25rem .85rem .6rem;
}

.home-match-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: .75rem;
    padding: .8rem 0;
    border-bottom: var(--border-subtle-width) solid #e8efe9;
}

.home-match-row:last-child {
    border-bottom: 0;
}

.home-match-row time {
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 700;
}

.home-match-row div {
    min-width: 0;
    line-height: 1.35;
}

.home-match-row strong {
    font-size: .9rem;
}

.home-match-row span {
    margin: 0 .35rem;
    color: var(--text-muted);
    font-size: .82rem;
}

.home-teams-section {
    margin-top: 1.5rem;
}

.home-teams-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.home-team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    gap: .6rem;
    padding: 1rem .65rem;
    color: var(--text-main);
    background: var(--bg-card);
    border: var(--border-width) solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 7px rgba(20, 58, 31, .04);
    text-align: center;
}

.home-team-card img,
.home-team-placeholder {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.home-team-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: 50%;
    font-size: 1.5rem;
}

.home-team-card span:last-child {
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.25;
}

@media (max-width: 700px) {
    .home-container {
        padding: 1.25rem 1rem 2rem;
    }

    .featured-round-content {
        display: grid;
        gap: 1rem;
    }

    .featured-round-content .btn {
        width: 100%;
    }

    .home-two-columns {
        grid-template-columns: 1fr;
    }

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

.site-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
}
.home-match-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.home-match-number {
    flex: 0 0 30px;
    color: var(--text-muted, #68766c);
    font-size: .82rem;
    font-weight: 700;
}

.home-fantasy-match {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

.home-fantasy-team {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-fantasy-versus {
    flex: 0 0 auto;
    color: var(--text-muted, #68766c);
    font-size: .85rem;
    font-weight: 500;
}
.home-fantasy-side {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    align-items: center;
    gap: .35rem;
}

.home-fantasy-home {
    justify-content: flex-end;
    text-align: right;
}

.home-fantasy-away {
    justify-content: flex-start;
    text-align: left;
}

.home-fantasy-logo {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    object-fit: contain;
}

.home-fantasy-team {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Forza le dimensioni dei loghi dentro il box partite fantasy */
.home-week-matches .home-fantasy-logo,
.home-week-matches img.home-fantasy-logo {
    display: block !important;
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    max-width: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    flex: 0 0 23px !important;
    object-fit: contain !important;
}

/* Nessuna immagine delle partite può ereditare le dimensioni del logo sito */
.home-week-matches img {
    width: 23px;
    height: 23px;
    max-width: 23px;
    max-height: 23px;
    object-fit: contain;
}
.home-team-card {
    color: inherit;
    text-decoration: none;
}

.home-team-card:hover {
    transform: translateY(-2px);
}