/**
 * Athlete profile detail — matches html/athlete-detail.html
 * Upload: bootstrap/front/css/athlete-detail.css
 */

.fg-athlete-detail {
  --fg-red: #e31e24;
  --fg-red-dark: #c41a1f;
  --fg-navy: #0a1628;
  --fg-muted: #5c5c5c;
  --fg-border: #dddddd;
  --fg-bg-page: #f2f2f2;
  --fg-card: #ffffff;
  --fg-font-display: "Oswald", "Arial Narrow", sans-serif;
  --fg-font-body: "Open Sans", Arial, sans-serif;
  --fg-radius: 14px;

  width: 100vw;
  max-width: 100vw;
  margin: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 calc(50vw - 50%);
  background: var(--fg-bg-page);
  box-sizing: border-box;
}

/* Same horizontal margins as /events (.container width 98%) */
.fg-athlete-detail .page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 0 40px;
  box-sizing: border-box;
}

.fg-athlete-detail .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.fg-athlete-detail .breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none !important;
}

.fg-athlete-detail .breadcrumb a:hover {
  color: var(--fg-red);
}

.fg-athlete-detail .breadcrumb [aria-current] {
  font-weight: 600;
  color: #1a1a1a;
}

.fg-athlete-detail .profile-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  border-radius: var(--fg-radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(10, 22, 40, 0.15);
  background: var(--fg-card);
}

@media (max-width: 920px) {
  .fg-athlete-detail .profile-hero {
    grid-template-columns: 1fr;
  }
}

.fg-athlete-detail .hero-visual {
  position: relative;
  background: var(--fg-navy);
  min-height: 480px;
}

.fg-athlete-detail .hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.fg-athlete-detail .hero-visual .cat-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--fg-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 11px;
  border-radius: 4px;
  z-index: 2;
}

.fg-athlete-detail .profile-facts-pairs {
  margin-bottom: 20px;
}

.fg-athlete-detail .profile-facts-pairs .fact-pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
  padding: 8px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.fg-athlete-detail .profile-facts-pairs .fact-pair-row:last-child {
  border-bottom: none;
}

.fg-athlete-detail .profile-facts-pairs .fact-cell {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  font-size: 14px;
}

.fg-athlete-detail .profile-facts-pairs .fact-label {
  flex: 0 0 88px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.fg-athlete-detail .profile-facts-pairs .fact-value {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: var(--fg-navy);
  word-break: break-word;
}

@media (max-width: 600px) {
  .fg-athlete-detail .profile-facts-pairs .fact-pair-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 0;
  }

  .fg-athlete-detail .profile-facts-pairs .fact-cell {
    padding: 2px 0;
  }

  .fg-athlete-detail .profile-facts-pairs .fact-label {
    flex: 0 0 76px;
  }
}

.fg-athlete-detail .hero-content {
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

@media (max-width: 920px) {
  .fg-athlete-detail .hero-content {
    padding: 24px 20px;
  }
}

.fg-athlete-detail .hero-content h1 {
  margin: 0 0 6px;
  font-family: var(--fg-font-display) !important;
  font-size: clamp(32px, 5vw, 44px) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: var(--fg-navy) !important;
}

.fg-athlete-detail .hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 20px;
}

.fg-athlete-detail .location-pill {
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 600;
}

.fg-athlete-detail .location-pill::before {
  content: "📍 ";
}

.fg-athlete-detail .about-box {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border-left: 4px solid var(--fg-red);
}

.fg-athlete-detail .about-box .about-lead {
  margin: 0;
  font-size: 15px;
  color: #334155;
  line-height: 1.65;
}

.fg-athlete-detail .about-preview-3line {
  overflow: hidden;
  max-height: calc(15px * 1.65 * 3);
}

.fg-athlete-detail .about-preview-3line .about-lead {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.fg-athlete-detail .about-toggle.about-scroll-more {
  display: inline-block;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  color: var(--fg-red);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
}

.fg-athlete-detail .about-toggle.about-scroll-more:hover,
.fg-athlete-detail .about-toggle.about-scroll-more:focus {
  color: var(--fg-red-dark);
  text-decoration: underline;
}

.fg-athlete-detail .athlete-full-description {
  margin-top: 40px;
  padding-top: 8px;
  padding-bottom: 40px;
  scroll-margin-top: 100px;
}

.fg-athlete-detail .athlete-about-card {
  background: #fff;
  border-radius: var(--fg-radius);
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 40px rgba(10, 22, 40, 0.08);
  overflow: hidden;
}

.fg-athlete-detail .athlete-about-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 20px 28px;
  background: linear-gradient(90deg, var(--fg-navy) 0%, #152238 100%);
  border-bottom: 3px solid var(--fg-red);
}

.fg-athlete-detail .athlete-about-title {
  margin: 0;
  font-family: var(--fg-font-display) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff !important;
  line-height: 1.2;
}

.fg-athlete-detail .athlete-about-sub {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: capitalize;
}

.fg-athlete-detail .athlete-full-description-body {
  padding: 28px 28px 32px;
  border-left: 4px solid var(--fg-red);
  margin-left: 0;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 48px);
}

.fg-athlete-detail .athlete-full-description-body p {
  margin: 0 0 18px;
  font-size: 15px;
  color: #334155;
  line-height: 1.8;
  max-width: 72ch;
}

.fg-athlete-detail .athlete-full-description-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .fg-athlete-detail .athlete-about-head {
    padding: 16px 18px;
  }

  .fg-athlete-detail .athlete-full-description-body {
    padding: 20px 18px 24px;
  }
}

.fg-athlete-detail .hero-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.fg-athlete-detail .social-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fg-athlete-detail .social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fg-navy);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none !important;
}

.fg-athlete-detail .social-links a:hover {
  background: var(--fg-red);
  transform: translateY(-2px);
  color: #fff !important;
}

.fg-athlete-detail .social-links img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.fg-athlete-detail .back-gallery {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-navy) !important;
  text-decoration: none !important;
}

.fg-athlete-detail .back-gallery:hover {
  color: var(--fg-red) !important;
}

.fg-athlete-detail .content-section {
  margin-top: 36px;
}

.fg-athlete-detail .section-title {
  font-family: var(--fg-font-display) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-navy) !important;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fg-athlete-detail .section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--fg-red), transparent);
}

.fg-athlete-detail .section-title .badge {
  font-family: var(--fg-font-body) !important;
  font-size: 11px !important;
  background: var(--fg-navy);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.fg-athlete-detail .media-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .fg-athlete-detail .media-layout {
    grid-template-columns: 1fr;
  }
}

.fg-athlete-detail .panel {
  background: var(--fg-card);
  border-radius: var(--fg-radius);
  padding: 20px;
  box-shadow: 0 8px 28px rgba(15, 30, 60, 0.06);
}

.fg-athlete-detail .photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 560px) {
  .fg-athlete-detail .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fg-athlete-detail .photo-grid button {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: #cbd5e1;
}

.fg-athlete-detail .photo-grid button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.fg-athlete-detail .photo-grid button:hover img {
  transform: scale(1.08);
}

.fg-athlete-detail .photo-grid button .zoom-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.45);
  color: #fff;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.3s;
}

.fg-athlete-detail .photo-grid button:hover .zoom-icon {
  opacity: 1;
}

.fg-athlete-detail .gallery-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--fg-muted);
  font-size: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}

.fg-athlete-detail .video-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fg-athlete-detail .video-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin: 0;
}

.fg-athlete-detail .video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: var(--fg-navy);
}

.fg-athlete-detail .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.fg-athlete-detail .video-empty {
  text-align: center;
  padding: 32px;
  color: var(--fg-muted);
  font-size: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}

.fg-athlete-detail .video-empty.hidden {
  display: none;
}

.fg-athlete-detail .fg-ad-wrap {
  text-align: center;
  margin-top: 32px;
}

/* Lightbox */
.fg-athlete-detail .fg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 10, 20, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 64px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.fg-athlete-detail .fg-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.fg-athlete-detail .fg-lightbox[hidden] {
  display: none !important;
}

.fg-athlete-detail .fg-lightbox:not([hidden]).is-open {
  display: flex !important;
}

.fg-athlete-detail .fg-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 96px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.fg-athlete-detail .lb-close,
.fg-athlete-detail .lb-prev,
.fg-athlete-detail .lb-next {
  position: absolute;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.2s;
}

.fg-athlete-detail .lb-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.fg-athlete-detail .lb-close:hover {
  background: var(--fg-red);
}

.fg-athlete-detail .lb-prev,
.fg-athlete-detail .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.fg-athlete-detail .lb-prev {
  left: 16px;
}

.fg-athlete-detail .lb-next {
  right: 16px;
}

.fg-athlete-detail .lb-prev:hover,
.fg-athlete-detail .lb-next:hover {
  background: var(--fg-red);
  transform: translateY(-50%) scale(1.05);
}

.fg-athlete-detail .lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

body.has-fg-header .fg-athlete-detail .page-shell {
  padding-top: 12px;
}

/* Hide ShareThis / AddThis on profile hero image */
.fg-athlete-detail .sharethis-inline-share-buttons,
.fg-athlete-detail [id^="st-el"],
.fg-athlete-detail [id^="st-"],
.fg-athlete-detail .st-btn,
.fg-athlete-detail .addthis_toolbox,
.fg-athlete-detail .addthis-smartlayers,
.fg-athlete-detail .hero-visual > div:not(.cat-tag) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
