.badge-vittoria {
    background: rgba(25, 135, 84, 0.15);
    color: #0f5132;
    font-weight: 600;
}

.badge-sconfitta {
    background: rgba(220, 53, 69, 0.15);
    color: #842029;
    font-weight: 600;
}
/* Stili personalizzati per il progetto Volley */

:root {
    --primary-color: #8B1538;
    --primary-dark: #640f27;
    --primary-light: #fbe4ec;
    --surface-color: #ffffff;
    --surface-muted: #f6f5f9;
    --text-color: #1f1f2b;
    --text-muted: #626271;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 10px 24px rgba(139, 21, 56, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background: var(--surface-muted);
}

main {
    flex: 1;
}

a {
    text-decoration: none;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-section {
    background: linear-gradient(120deg, rgba(139, 21, 56, 0.95), rgba(26, 26, 26, 0.9)),
        url('../img/hero-texture.png');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 3.5rem 0 2.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 18px 45px rgba(139, 21, 56, 0.25);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-self: center;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 2.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.hero-actions .btn {
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    box-shadow: none;
}

.btn-light-shadow {
    background-color: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 8px 18px rgba(255, 255, 255, 0.18);
}

.btn-outline-glass {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    backdrop-filter: blur(6px);
}

.btn-light.text-primary-dark,
.btn-sm.text-primary-dark {
    color: var(--primary-dark) !important;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-highlight {
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.4rem;
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(10, 10, 25, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.hero-highlight-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
}

.hero-highlight-label.success {
    background: rgba(25, 135, 84, 0.22);
    color: #d1f7e1;
}

.hero-highlight h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.hero-highlight .teams {
    display: grid;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 1rem;
}

.hero-highlight .score {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-highlight .meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.section-block {
    width: 100%;
    margin: 2.5rem 0;
}

.section-inner {
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    padding: 0 1.25rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-heading h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.section-heading small {
    color: var(--text-muted);
}

.quick-links {
    display: grid;
    gap: 1rem;
}

.quick-link-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-link-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.quick-link-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(139, 21, 56, 0.12);
    color: var(--primary-color);
    font-size: 1.6rem;
}

.quick-link-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.quick-link-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.primary-team-card {
    background: linear-gradient(135deg, #ffffff 0%, #fdf1f6 100%);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-card);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
}

.team-block {
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    box-shadow: inset 0 0 0 1px rgba(139, 21, 56, 0.08);
}

.event-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.4rem;
    height: 100%;
}

.event-card.upcoming {
    background: linear-gradient(135deg, rgba(255, 241, 246, 0.95), rgba(255, 255, 255, 0.95));
}

.event-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.event-header .event-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(139, 21, 56, 0.12);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.event-header.win-yes .event-label {
    background: rgba(25, 135, 84, 0.16);
    color: #0f5132;
}

.event-header .event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.event-body {
    display: grid;
    gap: 0.8rem;
    background: rgba(139, 21, 56, 0.02);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    flex: 1;
}

.team-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.team-line-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.team-line .team-name.highlight {
    color: var(--primary-dark);
}

.team-line .team-score {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--primary-dark);
    min-width: 2.5rem;
    text-align: right;
}

.team-score.upcoming {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.score-divider {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--text-muted);
}

.set-breakdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(139, 21, 56, 0.08);
    color: var(--primary-dark);
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.set-breakdown .label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.set-breakdown .sets {
    font-size: 0.95rem;
}

.event-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.team-logo-circle,
.team-logo-mini {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.team-logo-circle img,
.team-logo-mini img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

.team-logo-mini {
    width: 44px;
    height: 44px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.team-logo-circle i,
.team-logo-mini i {
    font-size: 1.4rem;
    color: var(--primary-dark);
    opacity: 0.6;
}

.team-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.2rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    height: 100%;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.team-card-principale {
    border: 1px solid rgba(139, 21, 56, 0.25);
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.08), #ffffff);
}

.team-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.team-card-badge {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-color);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.team-card-pill {
    background: rgba(139, 21, 56, 0.15);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.team-card-body {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.team-card-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.team-card-logo img {
    max-width: 65%;
    max-height: 65%;
    object-fit: contain;
}

.team-card-logo i {
    font-size: 1.6rem;
    color: var(--primary-dark);
    opacity: 0.7;
}

.team-card-info {
    display: grid;
    gap: 0.3rem;
    text-align: left;
}

.team-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0;
}

.team-card-subtitle,
.team-card-meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.team-card-subtitle i,
.team-card-meta i {
    color: var(--primary-dark);
    margin-right: 0.35rem;
}

.team-block h5 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.score-line {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.score-line strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.score-pill {
    background: rgba(139, 21, 56, 0.12);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
}

.tag-result {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.tag-result.success {
    background: rgba(25, 135, 84, 0.14);
    color: #0f5132;
}

.tag-result.danger {
    background: rgba(220, 53, 69, 0.14);
    color: #842029;
}

.match-list {
    display: grid;
    gap: 1rem;
}

.match-item {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-soft);
}

.match-item.principale {
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(139, 21, 56, 0.18);
}

.match-teams {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.match-teams .team-slot {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.match-teams .team-slot:first-child {
    justify-content: flex-end;
}

.match-teams .team-slot:last-child {
    justify-content: flex-start;
}

.team-slot-name {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.team-slot-name.highlight {
    color: var(--primary-dark);
}

.team-slot-name i {
    font-size: 0.95rem;
}

.match-teams .vs-pill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: rgba(139, 21, 56, 0.1);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.match-meta {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.toplist-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.toplist-card .card-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 1.1rem 1.5rem;
}

.toplist-card .list-group-item {
    padding: 1rem 1.25rem;
    border: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.toplist-card .list-group-item:last-child {
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    border-bottom: none;
}

.badge-points {
    background: rgba(139, 21, 56, 0.12);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
}

.table-principale {
    background: rgba(139, 21, 56, 0.1) !important;
}

.table-classifica tbody tr td {
    vertical-align: middle;
}

.team-slot-desktop {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.table-classifica tbody tr td:nth-child(2) > .team-slot-desktop {
    margin-bottom: 0.25rem;
}

.team-slot-desktop .team-info strong {
    display: block;
}

.team-slot-desktop .team-info small {
    color: var(--text-muted);
}

.team-slot-mobile {
    display: none;
}

.table-classifica tbody tr.playoff-row,
.table-classifica tbody tr.playoff-row td {
    background-color: rgba(139, 21, 56, 0.1) !important;
}

.table-classifica tbody tr.playoff-row td {
    border-top: 1px solid rgba(139, 21, 56, 0.15);
}

.legend-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.legend-swatch.playoff {
    background: rgba(139, 21, 56, 0.28);
    border: 1px solid rgba(139, 21, 56, 0.4);
}

.team-row-mobile-extra {
    display: none;
}

.team-row-mobile-extra div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.8rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.team-row-mobile-extra div span {
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.03em;
    font-size: 0.78rem;
    text-transform: uppercase;
}

@media (min-width: 576px) {
    .quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mobile-hidden {
    display: table-cell;
}

@media (min-width: 992px) {
    .hero-content {
        text-align: left;
        align-items: flex-start;
        max-width: 520px;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .hero-grid {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 3rem;
    }

    .hero-highlight {
        max-width: 320px;
        align-self: center;
    }

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

    .primary-team-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .match-grid {
        display: grid;
        grid-template-columns: 2fr 1.2fr;
        gap: 1.5rem;
    }

    .match-list {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2.6rem 0 1.8rem;
        border-radius: 0 0 28px 28px;
    }

    .primary-team-card {
        padding: 1.2rem;
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .match-teams {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .match-meta {
        align-items: center;
    }

    .team-logo-circle {
        width: 46px;
        height: 46px;
    }

    .team-logo-mini {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 768px) {
    .table-classifica thead {
        display: none;
    }

    .mobile-hidden {
        display: none !important;
    }

    .table-classifica tbody tr {
        display: block;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 16px;
        margin-bottom: 1rem;
        padding: 0.9rem 1rem;
        box-shadow: var(--shadow-soft);
        cursor: pointer;
    }

    .table-classifica tbody tr td {
        display: none;
        border: none;
        padding: 0.3rem 0;
    }

    .table-classifica tbody tr td:nth-child(1),
    .table-classifica tbody tr td:nth-child(2),
    .table-classifica tbody tr td:last-child {
        display: block;
    }

    .table-classifica tbody tr td:nth-child(1),
    .table-classifica tbody tr td:last-child {
        display: none;
    }

    .table-classifica tbody tr td:nth-child(2) {
        display: block;
    }

    .team-slot-desktop {
        display: none;
    }

    .team-slot-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .team-slot-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .team-slot-left .posizione {
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--text-muted);
        min-width: 2.0rem;
        text-align: center;
    }

    .team-slot-left .team-logo-mini {
        width: 40px;
        height: 40px;
    }

    .team-slot-left .team-info strong {
        display: block;
    }

    .points-mobile {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--primary-dark);
        letter-spacing: 0.3em;
    }

    .match-grid {
        margin-top: 1.5rem;
        gap: 1rem;
    }

    .match-grid > div + div {
        margin-top: 1.5rem;
    }

    .table-classifica tbody tr .team-row-mobile-extra {
        margin-top: 0.75rem;
        padding-top: 0.65rem;
        border-top: 1px dashed rgba(15, 23, 42, 0.1);
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem 0.5rem;
    }

    .table-classifica tbody tr.expanded .team-row-mobile-extra {
        display: grid;
    }
}

@media (min-width: 992px) {
    .primary-team-card {
        margin-bottom: 0;
    }

    .quick-links {
        margin-bottom: 0;
    }
}

@media (min-width: 768px) {
    .match-meta {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 1.5rem;
    }
}

