/**
 * Athletes gallery listing — matches html/inner.html
 * Upload: bootstrap/front/css/athletes-gallery.css
 */

.fg-athletes-page {
  --fg-red: #e31e24;
  --fg-red-dark: #c41a1f;
  --fg-black: #000000;
  --fg-charcoal: #111111;
  --fg-muted: #5c5c5c;
  --fg-border: #dddddd;
  --fg-bg: #f2f2f2;
  --fg-font-display: "Oswald", "Arial Narrow", sans-serif;
  --fg-font-body: "Open Sans", Arial, sans-serif;

  background: var(--fg-bg);
  margin: 0;
  padding: 0;
}

.fg-athletes-page .page-title-bar {
  background: var(--fg-red);
  text-align: center;
  padding: 11px 15px;
}

.fg-athletes-page .page-title-bar h1 {
  margin: 0;
  font-family: var(--fg-font-display) !important;
  font-size: clamp(22px, 4vw, 30px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff !important;
  line-height: 1.2;
}

/* Same horizontal layout as /events (.container width 98% in style.css) */
.fg-athletes-page .gallery-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 0 40px;
  box-sizing: border-box;
}

.fg-athletes-page .page-title-bar {
  border-radius: 4px 4px 0 0;
}

.fg-athletes-page .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--fg-border);
  background: #fff;
}

.fg-athletes-page .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.fg-athletes-page .filter-btn {
  padding: 7px 14px;
  border: 1px solid #ccc;
  background: #fff;
  color: #444;
  font-family: var(--fg-font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.fg-athletes-page .filter-btn:hover {
  border-color: var(--fg-red);
  color: var(--fg-red);
}

.fg-athletes-page .filter-btn[aria-pressed="true"] {
  background: var(--fg-red);
  border-color: var(--fg-red-dark);
  color: #fff;
  box-shadow: 0 2px 10px rgba(227, 30, 36, 0.3);
}

.fg-athletes-page .btn-create {
  display: inline-block;
  padding: 8px 18px;
  background: var(--fg-red);
  color: #fff !important;
  font-family: var(--fg-font-body) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  transition: background 0.2s;
  white-space: nowrap;
}

.fg-athletes-page .btn-create:hover {
  background: var(--fg-red-dark);
  color: #fff !important;
}

.fg-athletes-page .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 992px) {
  .fg-athletes-page .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .fg-athletes-page .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .fg-athletes-page .grid {
    grid-template-columns: 1fr;
  }
}

.fg-athletes-page .athlete-item.hidden {
  display: none !important;
}

.fg-athletes-page .athlete-card {
  position: relative;
}

.fg-athletes-page .card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ddd;
}

.fg-athletes-page .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.35s ease;
}

.fg-athletes-page .athlete-card:hover .card-media img,
.fg-athletes-page .athlete-card.is-overlay-open .card-media img {
  transform: scale(1.04);
  filter: brightness(0.75);
}

.fg-athletes-page .name-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 36px 12px 11px;
  pointer-events: auto;
  text-decoration: none !important;
  background: linear-gradient(
    to top,
    rgba(8, 18, 42, 0.78) 0%,
    rgba(8, 18, 42, 0.42) 38%,
    rgba(8, 18, 42, 0.12) 68%,
    transparent 100%
  );
  transition: opacity 0.3s ease;
}

.fg-athletes-page .name-bar span {
  position: relative;
  width: 100%;
  text-align: center;
  font-family: var(--fg-font-display) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.fg-athletes-page .athlete-card:hover .name-bar,
.fg-athletes-page .athlete-card.is-overlay-open .name-bar {
  opacity: 0;
}

.fg-athletes-page .hover-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  background:
    radial-gradient(ellipse 100% 70% at 50% 0%, rgba(227, 30, 36, 0.2), transparent 58%),
    linear-gradient(175deg, #1a1a1a 0%, var(--fg-charcoal) 45%, #000000 100%);
  color: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
  overflow-y: auto;
}

.fg-athletes-page .back-top-strip {
  flex-shrink: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b1015, var(--fg-red) 35%, #ff5a5f 65%, var(--fg-red) 100%);
}

.fg-athletes-page .back-header {
  padding: 12px 11px 9px;
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fg-athletes-page .athlete-card:hover .hover-overlay,
.fg-athletes-page .athlete-card.is-overlay-open .hover-overlay {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fg-athletes-page .hover-overlay h3 {
  margin: 0 0 5px;
  font-family: var(--fg-font-display) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #fff !important;
}

.fg-athletes-page .hover-overlay h3::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin: 6px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--fg-red), transparent);
}

.fg-athletes-page .hover-overlay .meta {
  display: inline-block;
  margin: 0;
  padding: 4px 10px;
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.fg-athletes-page .athlete-details {
  width: auto;
  margin: 9px 11px 7px;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
}

.fg-athletes-page .detail-row {
  display: grid;
  grid-template-columns: 40% 60%;
  align-items: stretch;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}

.fg-athletes-page .detail-row:last-child {
  border-bottom: none;
}

.fg-athletes-page .detail-label {
  padding: 6px 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px !important;
  color: rgba(255, 200, 200, 0.75);
  background: rgba(0, 0, 0, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.fg-athletes-page .detail-value {
  margin: 0;
  padding: 6px 8px;
  font-weight: 700;
  font-size: 11px !important;
  color: #f4f7ff;
  text-align: right;
}

.fg-athletes-page .hover-overlay .info {
  font-size: 11px !important;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 11px 8px;
  padding: 8px 9px 8px 10px;
  text-align: left;
  background: rgba(0, 0, 0, 0.22);
  border-left: 3px solid var(--fg-red);
  border-radius: 0 8px 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fg-athletes-page .hover-overlay .back-actions {
  margin-top: auto;
  padding: 6px 11px 10px;
}

.fg-athletes-page .hover-overlay .view-link {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e8252c 0%, var(--fg-red) 45%, #a01016 100%);
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(215, 25, 32, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.fg-athletes-page .hover-overlay .view-link:hover {
  transform: translateY(-2px);
  color: #fff !important;
}

.fg-athletes-page .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--fg-muted);
  background: #fff;
  border: 1px dashed #ccc;
  display: none;
  font-size: 15px;
}

.fg-athletes-page .empty-state.visible {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .fg-athletes-page .hover-overlay,
  .fg-athletes-page .card-media img,
  .fg-athletes-page .name-bar {
    transition: none;
  }
}

/* Hide ShareThis / AddThis overlays on athlete card images */
.fg-athletes-page .sharethis-inline-share-buttons,
.fg-athletes-page [id^="st-el"],
.fg-athletes-page [id^="st-"]:not(.stat-item),
.fg-athletes-page .st-btn,
.fg-athletes-page .st-inline-share-buttons,
.fg-athletes-page .addthis_toolbox,
.fg-athletes-page .addthis-smartlayers,
.fg-athletes-page .at-share-btn,
.fg-athletes-page .card-media > div:not(.hover-overlay):not(.name-bar),
.fg-athletes-page .card-media iframe {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
