/* Custom Design System for The FitLife */

:root {
  /* Backgrounds */
  --bg-main: #070709;
  --bg-darker: #040405;
  --bg-surface: rgba(20, 20, 25, 0.6);
  --bg-surface-solid: #121217;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;

  /* Brand Colors (Matched to logo gradient) */
  --accent-color: #00efc2;
  --accent-hover: #18c9c3;
  --accent-dark: #2a9fc4;
  --accent-gradient: linear-gradient(135deg, #00efc2 0%, #18c9c3 45%, #2a9fc4 100%);
  --glass-border: rgba(0, 239, 194, 0.15);

  /* Typography */
  --font-main: "Montserrat", sans-serif;

  /* Spacing */
  --section-padding: 120px 0;
  --container-width: 1280px;
  --mobile-nav-height: 84px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle Global Background Glow */
.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(0, 239, 194, 0.03) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(42, 159, 196, 0.03) 0%,
      transparent 40%
    );
  pointer-events: none;
  z-index: -1;
}

.bg-darker {
  background-color: var(--bg-darker);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.section-tag {
  color: var(--accent-color);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  display: block;
}

p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 400;
}

span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

a {
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

img.img-fallback {
  filter: none !important;
  background: linear-gradient(135deg, #11151b, #0a0c10);
}

img.img-fallback {
  filter: none !important;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.section {
  padding: var(--section-padding);
}

.text-center {
  text-align: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  text-align: left;
  max-width: 600px;
  margin-bottom: 4rem;
}

.section-header.text-center {
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-bounce);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--bg-main);
  box-shadow: 0 4px 15px rgba(0, 239, 194, 0.2);
  border: none;
  z-index: 1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #18c9c3, #2a9fc4, #00efc2);
  z-index: -1;
  transition: opacity var(--transition-smooth);
  opacity: 0;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(24, 201, 195, 0.4);
  color: white;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: var(--bg-main);
  transform: translateY(-3px);
}

.btn-large {
  padding: 1.2rem 3.5rem;
  font-size: 1.1rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background-color: rgba(7, 7, 9, 0.85);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  flex-shrink: 0;
  z-index: 1001;
  position: relative;
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.navbar .logo img {
  height: 56px;
}

.navbar.scrolled .logo img {
  height: 50px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--accent-color);
}

.nav-links a.active-link {
  color: var(--accent-color);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-cta {
  padding: 0.75rem 1.8rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Full Screen Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(4, 4, 5, 0.98);
  backdrop-filter: blur(15px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateY(0);
}

.mobile-nav-links {
  list-style: none;
  text-align: center;
  margin-bottom: 3rem;
  width: 100%;
}

.mobile-nav-links li {
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.mobile-nav-links a {
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
  display: block;
  transition: color var(--transition-fast);
}

.mobile-nav-links a:hover {
  color: var(--accent-color);
}

.mobile-nav-links .menu-item,
.menu-cta,
.mobile-menu-footer {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.28s ease,
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active .mobile-nav-links .menu-item,
.mobile-menu-overlay.active .menu-cta,
.mobile-menu-overlay.active .mobile-menu-footer {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-links li:nth-child(1) .menu-item {
  transition-delay: 0.04s;
}
.mobile-menu-overlay.active .mobile-nav-links li:nth-child(2) .menu-item {
  transition-delay: 0.08s;
}
.mobile-menu-overlay.active .mobile-nav-links li:nth-child(3) .menu-item {
  transition-delay: 0.12s;
}
.mobile-menu-overlay.active .mobile-nav-links li:nth-child(4) .menu-item {
  transition-delay: 0.16s;
}
.mobile-menu-overlay.active .mobile-nav-links li:nth-child(5) .menu-item {
  transition-delay: 0.2s;
}
.mobile-menu-overlay.active .mobile-nav-links li:nth-child(6) .menu-item {
  transition-delay: 0.24s;
}
.mobile-menu-overlay.active .menu-cta {
  transition-delay: 0.28s;
}
.mobile-menu-overlay.active .mobile-menu-footer {
  transition-delay: 0.32s;
}

.menu-cta {
  margin-bottom: 4rem;
  width: 100%;
  max-width: 300px;
}

.mobile-menu-footer {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  width: 100%;
}

.mobile-menu-footer p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.mobile-menu-footer .social-icons {
  justify-content: center;
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  width: 30px;
  height: 20px;
}

.hamburger .bar {
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  left: 0;
}

.hamburger .bar:nth-child(1) {
  top: 0;
}
.hamburger .bar:nth-child(2) {
  top: 9px;
}
.hamburger .bar:nth-child(3) {
  top: 18px;
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(1) {
  top: 9px;
  transform: rotate(45deg);
  background-color: var(--accent-color);
}
.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
  top: 9px;
  transform: rotate(-45deg);
  background-color: var(--accent-color);
}

/* Amenities */
.amenities-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.amenity-item {
  text-align: center;
  flex: 1;
  min-width: 150px;
}

.amenity-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.amenity-item h4 {
  font-size: 1rem;
  color: var(--text-primary);
}

/* Schedule Table */
.schedule-table-wrapper {
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.schedule-table th,
.schedule-table td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.schedule-table th {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  -webkit-text-fill-color: currentcolor;
}

.badge.private {
  background: rgba(0, 239, 194, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(0, 239, 194, 0.3);
}

.badge.group {
  background: rgba(42, 159, 196, 0.1);
  color: #6dbbd1;
  border: 1px solid rgba(42, 159, 196, 0.3);
}

.schedule-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background: var(--bg-surface);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem 2rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent-color);
}

.faq-question i {
  transition: transform var(--transition-fast);
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth);
}

.faq-answer p {
  padding: 0 2rem 1.5rem 2rem;
}

/* Gallery Items (shared between homepage & gallery page) */
.gallery-item {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: grayscale(0);
}

.gallery-item::before {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  z-index: 2;
  transition: var(--transition-bounce);
  pointer-events: none;
}

.gallery-item:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.gallery-item.tall {
  grid-row: span 2;
}
.gallery-item.wide {
  grid-column: span 2;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(4, 4, 5, 0.95);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent-color);
}

/* Team Section */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.team-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1000px;
  margin: 0 auto;
}

.team-card {
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
  text-align: center;
  transition: var(--transition-bounce);
}

.team-card:hover {
  transform: translateY(-10px);
  border-color: var(--glass-border);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.team-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  position: relative;
}

.team-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition:
    transform 0.5s ease,
    filter 0.35s ease;
}

.team-card:hover .team-img img {
  transform: scale(1.05);
  filter: grayscale(0);
}

.team-social {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  display: flex;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.team-card:hover .team-social {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.team-social a {
  width: 35px;
  height: 35px;
  background: var(--accent-gradient);
  color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.9rem;
}

.team-info h3 {
  margin-bottom: 0.2rem;
  font-size: 1.2rem;
}

.team-info span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: none;
  -webkit-text-fill-color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* CTA */
.cta {
  position: relative;
  padding: 8rem 0;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(0, 239, 194, 0.05) 0%,
    rgba(4, 4, 5, 1) 70%
  );
  z-index: 0;
}

#cta-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

.cta p {
  margin-bottom: 3rem;
  font-size: 1.25rem;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Footer */
.footer {
  background-color: var(--bg-darker);
  padding: 5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 300px;
}

.footer h4 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer ul {
  list-style: none;
}
.footer ul li {
  margin-bottom: 0.8rem;
}
.footer ul a:hover {
  color: var(--accent-color);
}
.footer-contact p {
  margin-bottom: 0.5rem;
}
.footer-contact i {
  margin-right: 0.5rem;
  color: var(--accent-color);
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 45px;
  height: 45px;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-icon:hover {
  background: var(--accent-gradient);
  color: var(--bg-main);
  border-color: transparent;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-legal-links {
  margin-top: 0.6rem;
  font-size: 0.95rem;
}

.footer-legal-links a {
  color: var(--text-secondary);
}

.footer-legal-links a:hover {
  color: var(--accent-color);
}

/* ---- Global Responsive ---- */
@media (max-width: 1024px) {
  .navbar .logo img {
    height: 50px;
  }
  .navbar.scrolled .logo img {
    height: 46px;
  }
  .desktop-only {
    display: none !important;
  }
  .hamburger {
    display: block;
    z-index: 1201;
  }
  .mobile-menu-overlay {
    top: var(--mobile-nav-height);
    height: calc(100vh - var(--mobile-nav-height));
    z-index: 1100;
    padding: 1.5rem;
  }
  .mobile-menu-content {
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 1rem;
  }
  .mobile-nav-links {
    margin-bottom: 2rem;
  }
  .mobile-nav-links a {
    font-size: clamp(1.8rem, 8vw, 2.3rem);
  }
  .team-grid,
  .team-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar .logo img {
    height: 46px;
  }
  .navbar.scrolled .logo img {
    height: 42px;
  }
  .schedule-table th,
  .schedule-table td {
    padding: 1rem 0.5rem;
    font-size: 0.85rem;
  }
  .badge {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }
  .faq-question {
    padding: 1.2rem;
    font-size: 1rem;
  }
  .faq-answer p {
    padding: 0 1.2rem 1.2rem 1.2rem;
    font-size: 0.95rem;
  }
  .cta-buttons {
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .team-grid,
  .team-grid-3 {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 80px 0;
  }
}
