/* ============================================================
   Tennessee Baseball 2026 — Walk-Up Song Cards
   Custom stylesheet (standalone, no external Bootstrap needed)
   Card aspect ratio locked to 744×1028 px (front image size)
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Teko:wght@700&display=swap');

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Oswald', sans-serif;
  background: #FFFFFF;
  color: #fff;
  padding: 20px 0 60px;
}

/* ---------- Bootstrap-like grid (minimal, self-contained) ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.gb--content { padding-top: 20px; }

/* FIX #3: Added justify-content: center so cards center on the page */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
  justify-content: center;
}

/*
  FIX #2: Column breakpoints revised to avoid orphaned 3-column rows.
  Layout steps: 1 col (xs) → 2 col (sm) → 4 col (lg).
  The 3-column step (768px–991px) is intentionally removed.
*/

/* Default: 1 per row */
.col-xs-12 {
  width: 100%;
  padding: 0 10px;
}

/* 2 per row at ≥576px */
@media (min-width: 576px) {
  .col-xs-12 { width: 50%; }
}

/* 4 per row at ≥992px — the 768px 3-column step is removed */
@media (min-width: 992px) {
  .col-md-3 { width: 25%; }
}

/* ---------- Card wrapper ---------- */
/*
  Aspect ratio locked to 744×1028 (front image).
  padding-bottom trick: 1028/744 * 100 = 138.17%
*/
.card {
  perspective: 1200px;
  margin-bottom: 20px;
  position: relative;
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* Spacer that enforces the 744:1028 aspect ratio */
.card::before {
  content: '';
  display: block;
  padding-top: 138.17%; /* 1028/744 */
}

/* ---------- Flipper ---------- */
.flipper {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.card:hover .flipper,
.card.hover .flipper {
  transform: rotateY(180deg);
}

/* ---------- Front & Back shared ---------- */
.front,
.back {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
}

/* ---------- Front ---------- */
.front {
  z-index: 2;
  transform: rotateY(0deg);
  background: #111;
}

.front img.img-responsive {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* ---------- Back ---------- */
.back {
  transform: rotateY(180deg);
  background-color: #FF8200;
  background-image:
    repeating-conic-gradient(#FF8200 0% 25%, #FFFFFF 0% 50%);
  background-size: 16px 16px;
  padding: 14px;
  display: flex;
  align-items: stretch;
}

/* Inner orange panel */
.back > div {
  background: #FF8200;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Back content area ---------- */
.back .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 14px;
  text-align: center;
  color: #fff;
  height: 100%;
  width: 100%;
  text-transform: uppercase;
}

/* Player name */
.back .content p:first-child,
.back .content p.long-name {
  font-family: 'Oswald', sans-serif !important;
  font-weight: 700;
  font-size: 26px !important;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: #fff;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  max-width: 100%;
  display: block !important;
  word-break: break-word !important;
}

.back .content p:first-child span,
.back .content p:first-child span span,
.back .content p:first-child strong,
.back .content p.long-name span,
.back .content p.long-name span span,
.back .content p.long-name strong {
  font-size: 26px !important;
  font-family: 'Oswald', sans-serif !important;
  white-space: normal !important;
  word-break: break-word !important;
  display: inline !important;
}

/* Song title */
.back .content p:nth-child(3) {
  font-family: 'Oswald', sans-serif !important;
  font-size: 20px !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff3e0;
}
.back .content p:nth-child(3) span {
  font-size: 20px !important;
  font-family: 'Oswald', sans-serif !important;
}

/* Artist name */
.back .content p:nth-child(4) {
  font-family: 'Oswald', sans-serif !important;
  font-size: 16px !important;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  text-transform: none;
}
.back .content p:nth-child(4) span {
  font-size: 16px !important;
}

/* Override all Times New Roman spans from HTML */
.back .content p span {
  font-family: 'Oswald', sans-serif !important;
}

/* ---------- Power T logo ---------- */
/*
  FIX #1: Locked to a flat 15px at ALL screen sizes.
  Removed the responsive tweak block that was bumping it to 34px on mobile.
  Using both width and max-width to prevent any override from scaling it up.
*/
.back .power-t-logo {
  width: 15px !important;
  max-width: 15px !important;
  height: auto !important;
  display: block !important;
  margin: 4px auto !important;
  opacity: 0.92;
  min-width: 15px;
}

/* ---------- Play button ---------- */
.back .gb--btn-play,
a.btn.gb--btn-play,
.back .gb--btn-play span,
a.btn.gb--btn-play span,
.back .gb--btn-play *,
a.btn.gb--btn-play * {
  font-family: 'Teko', cursive !important;
  font-size: 24px !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.back .gb--btn-play,
a.btn.gb--btn-play {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff !important;
  color: #FF8200 !important;
  padding: 10px 32px !important;
  border-radius: 35px !important;
  margin-top: 20px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
  line-height: 1;
}

.back .gb--btn-play span::before,
a.btn.gb--btn-play span::before {
  content: '▶';
  font-family: sans-serif;
  font-size: 0.6em;
  vertical-align: middle;
  margin-right: 5px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  color: #FF8200;
  position: relative;
  top: -1px;
}

.back .gb--btn-play:hover,
a.btn.gb--btn-play:hover {
  background: #fff3e0 !important;
  color: #A03000 !important;
  transform: scale(1.04);
}

/* ---------- Playing state ---------- */
.back .gb--btn-play.playing span::before,
a.btn.gb--btn-play.playing span::before,
.gb--btn-play.playing span::before {
  content: '■' !important;
  font-size: 0.9em !important;
  vertical-align: middle !important;
  margin-right: 5px !important;
  color: #FF8200 !important;
  position: relative !important;
  top: -4px !important;
}

/* ---------- Paragraph reset inside back content ---------- */
.back .content p {
  margin: 3px 0 !important;
  line-height: 1.3 !important;
}

/* ---------- Hide audio element ---------- */
audio { display: none !important; }

/* Force all player names to wrap */
.back .content p:first-child,
.back .content p:first-child * {
  white-space: normal !important;
  word-break: break-word !important;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 575px) {
  .card { max-width: 240px; }
  .back .gb--btn-play,
  a.btn.gb--btn-play {
    padding: 8px 22px !important;
  }
  /* FIX #1 continued: Power T stays 15px even on mobile — no override here */
}

.back .content p:first-child,
.back .content p:first-child *,
.back .content p.long-name,
.back .content p.long-name * {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}
