/* ============================================================
   PAGE-SPECIFIC STYLES (Appended)
   ============================================================ */

/* ── Utilities ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.sub-text { font-size: 1.05rem; color: var(--muted); line-height: 1.6; }

/* ── Page Hero (Shared for internal pages) ──────────────────── */
.page-hero {
  position: relative;
  padding: 160px 0 100px;
  background: var(--black);
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.4;
}
.page-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--black) 0%, transparent 100%);
}
.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.page-title em { color: var(--red); font-style: normal; }

/* ── About: Intro ───────────────────────────────────────────── */
.about-intro { padding: 100px 0; background: #fff; }
.about-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-intro-text p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.about-intro-text p:last-child { margin-bottom: 0; }
.image-frame {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* ── About: Facilities ──────────────────────────────────────── */
.facilities-section {
  padding: 100px 0;
  background: var(--gray);
  border-top: 1px solid var(--border);
}
.facilities-header { margin-bottom: 60px; }
.facilities-header p.sub-text { max-width: 600px; margin: 16px auto 0; }

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.equipment-category {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: transform 0.25s, box-shadow 0.25s;
}
.equipment-category:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.eq-icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
}
.equipment-category h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.eq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.eq-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.eq-list li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  color: var(--red);
  font-weight: bold;
}
.eq-list li strong { color: var(--dark); }

/* ── Trainers: Grid ─────────────────────────────────────────── */
.trainers-section { padding: 100px 0; background: #fff; }
.trainers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.trainer-card {
  background: var(--gray);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.trainer-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}
.trainer-img {
  width: 100%;
  aspect-ratio: 1/1;
  background: #E0E0E0;
  position: relative;
}
.placeholder-img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 500;
}
.trainer-info { padding: 24px; }
.trainer-info h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 4px;
}
.trainer-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.trainer-certs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.trainer-certs span {
  font-size: 0.72rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--dark);
}
.trainer-bio {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.support-card {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-color: var(--red-muted);
}

/* ── Membership: Flip Cards ─────────────────────────────────── */
.membership-section { padding: 100px 0; background: var(--gray); }
.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}
.flip-card {
  perspective: 1000px;
  cursor: pointer;
  min-height: 420px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.flip-card-front {
  background: #fff;
  border: 1px solid var(--border);
}
.flip-card-back {
  background: var(--dark);
  color: #fff;
  transform: rotateY(180deg);
  border: 1px solid #333;
}
.fc-duration {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 12px;
}
.fc-price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 24px;
  line-height: 1;
}
.fc-hint {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.fc-hint::after {
  content: '↻';
  font-size: 1.2rem;
}
.flip-card-back .eq-list {
  text-align: left;
  width: 100%;
  margin: 0 auto auto;
}
.flip-card-back .eq-list li {
  color: #ddd;
  font-size: 0.95rem;
  padding-left: 28px;
  margin-bottom: 14px;
}
.flip-card-back .eq-list li::before {
  color: var(--red);
}
.fc-btn {
  margin-top: 24px;
  width: 100%;
}

/* ── Contact Page ───────────────────────────────────────────── */
.contact-page-section { padding: 100px 0; background: var(--gray); }
.contact-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contact-left, .contact-right { display: flex; flex-direction: column; gap: 40px; }
.contact-header { margin-bottom: 10px; }
.c-box {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  margin-bottom: 20px;
}
.c-box h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--dark);
}
.c-box p { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.c-box .c-note { font-size: 0.85rem; color: #aaa; margin-top: 8px; }

.booking-form-wrap {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.booking-form-wrap h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.booking-form .form-group { margin-bottom: 16px; }
.booking-form input, .booking-form select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  background: var(--gray);
  color: var(--dark);
}
.booking-form input:focus, .booking-form select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(212,43,43,0.1);
}

.why-us-box {
  background: var(--dark);
  color: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.why-us-box .eq-list li { color: #ddd; margin-bottom: 12px; }

.map-wrap {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.faq-item {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.faq-item strong { display: block; margin-bottom: 8px; color: var(--dark); font-size: 1.05rem; }
.faq-item p { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* ── Legal Pages ────────────────────────────────────────────── */
.legal-section { padding: 60px 0 100px; background: #fff; }
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}
.legal-content h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  text-transform: uppercase;
  color: var(--dark);
  margin: 40px 0 16px;
}
.legal-content p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.legal-content ul {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 20px;
  padding-left: 24px;
}
.legal-content ul li {
  margin-bottom: 8px;
}
.legal-content a {
  color: var(--red);
  text-decoration: underline;
}

/* ── FIX: Ensure Trainer Images don't jitter in size ────────── */
.trainer-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Gallery ────────────────────────────────────────────────── */
.gallery-section { padding: 80px 0; background: #fff; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.gallery-item {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--gray);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-intro-grid { grid-template-columns: 1fr; }
  .equipment-grid { grid-template-columns: 1fr; }
  .trainers-grid { grid-template-columns: repeat(2, 1fr); }
  .membership-grid { grid-template-columns: 1fr; max-width: 400px; }
  .contact-page-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .trainers-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ONE FITNESS — Lead Generation Popup
   ============================================================ */

/* Overlay */
#of-popup-overlay,
#of-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 1rem;
}

#of-popup-overlay.of-popup-visible,
#of-success-overlay.of-popup-visible {
  opacity: 1;
}

/* Card — glassmorphism */
#of-popup-card {
  position: relative;
  background: rgba(12, 12, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 430px;
  box-shadow:
    0 0 0 1px rgba(225, 29, 72, 0.15),
    0 32px 64px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#of-popup-overlay.of-popup-visible #of-popup-card {
  transform: translateY(0) scale(1);
}

/* Close button */
#of-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

#of-popup-close:hover {
  background: rgba(225, 29, 72, 0.2);
  color: #fff;
  border-color: rgba(225, 29, 72, 0.4);
}

/* Badge */
#of-popup-badge {
  display: inline-block;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  color: #e11d48;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3em 0.75em;
  border-radius: 100px;
  margin-bottom: 1rem;
}

/* Heading */
#of-popup-heading {
  color: #ffffff;
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

/* Subtitle */
#of-popup-subtitle {
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

/* Form fields */
#of-popup-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.of-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.of-field-group label {
  color: #d1d5db;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.of-field-group input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.of-field-group input::placeholder {
  color: #4b5563;
}

.of-field-group input:focus {
  border-color: rgba(225, 29, 72, 0.6);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

/* Submit button */
#of-popup-submit {
  margin-top: 0.4rem;
  background: #e11d48;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(225, 29, 72, 0.35);
}

#of-popup-submit:hover:not(:disabled) {
  background: #be123c;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(225, 29, 72, 0.5);
}

#of-popup-submit:active:not(:disabled) {
  transform: translateY(0);
}

#of-popup-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#of-submit-spinner svg {
  animation: of-spin 0.8s linear infinite;
}

/* Privacy note */
#of-popup-privacy {
  color: #6b7280;
  font-size: 0.75rem;
  text-align: center;
  margin: 0.9rem 0 0;
}

/* Inline error */
.of-inline-error {
  color: #f87171;
  font-size: 0.8rem;
  text-align: center;
  margin: 0.25rem 0 0;
}

/* ── Success modal ───────────────────────────────────────── */
#of-success-card {
  background: rgba(12, 12, 12, 0.95);
  border: 1px solid rgba(225, 29, 72, 0.25);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.7);
  transform: scale(0.92);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#of-success-overlay.of-popup-visible #of-success-card {
  transform: scale(1);
}

#of-success-icon {
  width: 72px;
  height: 72px;
  background: rgba(225, 29, 72, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  border: 1px solid rgba(225, 29, 72, 0.25);
}

#of-success-card h3 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
}

#of-success-card p {
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

#of-success-close {
  background: #e11d48;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.7rem 2rem;
  cursor: pointer;
  transition: background 0.2s;
}

#of-success-close:hover {
  background: #be123c;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes of-spin {
  to { transform: rotate(360deg); }
}

@keyframes of-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.of-shake {
  animation: of-shake 0.4s ease;
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #of-popup-card,
  #of-success-card,
  #of-popup-overlay,
  #of-success-overlay {
    transition: opacity 0.2s ease;
    transform: none !important;
  }
  #of-submit-spinner svg {
    animation: none;
  }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  #of-popup-card {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 16px;
  }
  #of-popup-heading {
    font-size: 1.25rem;
  }
}