/* Teams: the four-level pathway, ball levels and upcoming team events.
   Used by /teams and the four team pages. */
.tm-wrap { max-width: 1040px; margin: 0 auto; }

/* Overview cards: two by two, one column on a phone */
.teams-overview .location-cards {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 30px !important; max-width: 1040px; margin: 0 auto;
}
.teams-overview .location-card { min-width: 0 !important; max-width: none !important; display: flex; flex-direction: column; }
.teams-overview .location-content { display: flex; flex-direction: column; flex: 1; }
.teams-overview .location-cta { margin-top: auto; }
.teams-overview .location-stat-value { font-size: 1rem !important; }
.tm-step {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    background: #0a5566; color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .06em;
    text-transform: uppercase; padding: 6px 12px; border-radius: 999px;
}
/* Team names on the photos: plain white, readable on every image */
.teams-overview .location-cards .location-card h3.location-name {
    color: #fff !important; -webkit-text-stroke: 0 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .75) !important;
}
.tm-ages-note { text-align: center; color: #4a5a60; max-width: 720px; margin: 34px auto 0; line-height: 1.6; }

/* Pathway strip on each team page */
.tm-ladder { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 1040px; }
.tm-ladder li { margin: 0; }
.tm-ladder a, .tm-ladder span.tm-here {
    display: block; height: 100%; box-sizing: border-box; padding: 14px 16px; border-radius: 12px;
    background: #fff; border: 2px solid #d9e5e8; color: #1c2b30; text-decoration: none; line-height: 1.35;
}
.tm-ladder a:hover { border-color: #0a5566; }
.tm-ladder .tm-here { border-color: #0a5566; background: #0a5566; color: #fff; }
.tm-ladder small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-bottom: 2px; }
.tm-ladder strong { display: block; font-size: 1.05rem; }
.tm-ladder em { display: block; font-style: normal; font-size: .88rem; opacity: .85; }
.tm-ladder-title { text-align: center; font-size: 1.1rem; color: #0a5566; margin: 44px 0 16px; }

/* Facts row on each team page */
.tm-facts { list-style: none; margin: 0 auto 8px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1040px; }
.tm-facts li { background: #fff; border-radius: 12px; padding: 18px 16px; text-align: center; box-shadow: 0 4px 16px rgba(10, 85, 102, .08); margin: 0; }
.tm-facts span { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5b6b70; margin-bottom: 4px; }
.tm-facts strong { display: block; font-size: 1.05rem; color: #0a5566; line-height: 1.3; }
.tm-points { max-width: 760px; margin: 28px auto 0; padding-left: 1.2em; color: #33444a; line-height: 1.7; }
.tm-points li { margin: .35em 0; }

/* Ball levels */
.tm-balls { padding: 60px 0; background: #f4f8f9; }
.tm-balls h2, .tm-events h2 { text-align: center; color: #0a5566; margin: 0 0 8px; }
.tm-sub { text-align: center; color: #4a5a60; max-width: 720px; margin: 0 auto 30px; line-height: 1.6; }
.tm-ball-grid { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1040px; }
.tm-ball-grid li { background: #fff; border-radius: 14px; padding: 20px 18px; margin: 0; border-top: 6px solid var(--tm-ball, #ccc); box-shadow: 0 4px 16px rgba(10, 85, 102, .08); }
.tm-ball-grid h3 { margin: 0 0 6px; font-size: 1.1rem; color: #1c2b30; display: flex; align-items: center; gap: 8px; }
.tm-ball-grid h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--tm-ball, #ccc); flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.tm-ball-grid p { margin: 0 0 8px; color: #4a5a60; font-size: .95rem; line-height: 1.55; }
.tm-ball-grid p.tm-ball-team { margin: 0; font-weight: 600; color: #0a5566; font-size: .9rem; }

/* Upcoming team events */
.tm-events { padding: 60px 0; background: #fff; }
.tm-events[hidden] { display: none; }
.tm-event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 1040px; margin: 0 auto; }
.tm-event-grid.tm-single { grid-template-columns: minmax(0, 520px); justify-content: center; }
.tm-event { background: #fff; border: 1px solid #d9e5e8; border-radius: 14px; padding: 22px; box-shadow: 0 4px 16px rgba(10, 85, 102, .08); display: flex; flex-direction: column; }
.tm-event-tag { align-self: flex-start; background: #e3f3d0; color: #2d5a12; font-weight: 700; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.tm-event h3 { margin: 0 0 12px; font-size: 1.15rem; color: #1c2b30; line-height: 1.35; }
.tm-event p { margin: 3px 0; color: #4a5a60; font-size: .95rem; }
.tm-event p i { width: 18px; color: #0a5566; margin-right: 6px; }
.tm-event-btn { margin-top: 16px; display: block; text-align: center; background: #0a5566; color: #fff !important; font-weight: 700; padding: 12px 16px; border-radius: 10px; text-decoration: none; }
.tm-event-btn:hover { background: #083f4c; }
.tm-empty { text-align: center; color: #5b6b70; padding: 12px 0; }

/* Elite: by invitation */
.tm-invite { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 34px 28px; text-align: center; box-shadow: 0 8px 26px rgba(10, 85, 102, .1); }
.tm-invite h2 { color: #0a5566; margin: 0 0 10px; }
.tm-invite p { color: #33444a; line-height: 1.65; margin: 0 0 18px; }
.tm-invite-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tm-invite-links a { padding: 12px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.tm-invite-links .tm-primary { background: #0a5566; color: #fff !important; }
.tm-invite-links .tm-ghost { border: 2px solid #0a5566; color: #0a5566 !important; }

@media (max-width: 900px) {
    .tm-ladder, .tm-facts, .tm-ball-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .teams-overview .location-cards { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 480px) {
    .tm-ladder, .tm-ball-grid { grid-template-columns: minmax(0, 1fr); }
}
