/* ===== หน้า การแข่งขัน / นักกีฬา / นัดซ้อม (ใช้ร่วมกับ site.css) ===== */

/* competitions.php — รายการ */
.comp-list { display: flex; flex-direction: column; gap: 12px; }
.comp-row {
    display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center; padding: 14px 18px 14px 14px;
}
.comp-row .date-block { text-align: center; padding: 8px 0; border-radius: 10px; background: linear-gradient(180deg, rgba(232, 28, 56, .2), rgba(232, 28, 56, .05)); }
.comp-row .date-block b { display: block; font-size: 26px; line-height: 1; font-weight: 800; }
.comp-row .date-block span { font-size: 12px; color: var(--muted); }
.comp-row h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.comp-row .meta { font-size: 13px; }
.comp-row .go { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.comp-row:hover .go { color: var(--red-2); }

/* competitions.php?id= — รายละเอียด */
.comp-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.result-groups { display: grid; gap: 22px; }
.result-group .group-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); background: rgba(232, 28, 56, .06); }
.result-group .group-head h3 { font-size: 16px; font-weight: 600; }

/* athletes.php */
.athlete-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.athlete-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 16px 18px; gap: 6px; }
.athlete-card .avatar { margin-bottom: 6px; width: 88px; height: 88px; overflow: hidden; border: 1px solid var(--border); }
.athlete-card .avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.athlete-card h3 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 6px; justify-content: center; }
.athlete-card h3 svg { color: var(--green); }
.athlete-card .sub { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.athlete-card .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.result-count { color: var(--muted); font-size: 14px; }

/* training.php */
.training-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.training-card { display: flex; gap: 16px; padding: 16px; }
.training-card .thumb { width: 150px; flex-shrink: 0; aspect-ratio: 4 / 3; border-radius: 10px; background: #111 center/cover no-repeat; }
.training-card .body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.training-card h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.training-card h3 a:hover { color: var(--red-2); }
.training-card p { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.info-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: rgba(232, 28, 56, .07); border: 1px solid rgba(232, 28, 56, .3); color: var(--muted); font-size: 14px; }
.info-box svg { color: var(--red-2); flex-shrink: 0; margin-top: 2px; }

@media (max-width: 960px) {
    .athlete-grid { grid-template-columns: repeat(3, 1fr); }
    .training-list { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .athlete-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .athlete-card { padding: 16px 10px 14px; }
    .athlete-card h3 { font-size: 15px; }
    .comp-detail-head .stat { width: 100%; }
    .comp-row { grid-template-columns: 72px 1fr; }
    .comp-row .go { grid-column: 2; justify-self: start; }
    .training-card { flex-direction: column; }
    .training-card .thumb { width: 100%; }
}
