/* ===================================
   NovaFitSport — Global Stylesheet
   =================================== */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary:     #080c14;
  --bg-secondary:   #0f1624;
  --bg-card:        #141d2e;
  --bg-card-hover:  #1a2640;
  --accent:         #00e5be;
  --accent-dark:    #00b899;
  --accent2:        #ff4d6d;
  --accent2-dark:   #cc3354;
  --gold:           #ffd166;
  --text-primary:   #f0f4ff;
  --text-secondary: #8da0bb;
  --text-muted:     #5a7091;
  --border:         rgba(0,229,190,0.15);
  --border-card:    rgba(255,255,255,0.06);
  --shadow:         0 8px 40px rgba(0,0,0,0.55);
  --shadow-card:    0 4px 24px rgba(0,0,0,0.4);
  --radius:         16px;
  --radius-sm:      10px;
  --radius-lg:      24px;
  --transition:     0.3s cubic-bezier(0.4,0,0.2,1);
  --font-main:      'Inter', 'Segoe UI', Arial, sans-serif;
  --header-h:       76px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  min-width: 300px;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ---------- Typography ---------- */
h1,h2,h3,h4,h5 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.1rem; }

.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-secondary); }

/* ---------- Layout Helpers ---------- */
.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 90px 0; }
.section-sm { padding: 60px 0; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header p { color: var(--text-secondary); max-width: 620px; margin: 16px auto 0; font-size: 1.05rem; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,229,190,0.1);
  border: 1px solid rgba(0,229,190,0.25);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,229,190,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(255,255,255,0.25);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--accent2);
  color: #fff;
}
.btn-danger:hover {
  background: var(--accent2-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,77,109,0.35);
}

.btn-sm { padding: 10px 22px; font-size: 0.85rem; }
.btn-lg { padding: 18px 44px; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition);
}
.site-header.scrolled { background: rgba(8,12,20,0.97); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 22px; height: 22px; fill: var(--bg-primary); }
.logo-text { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; }
.logo-text span { color: var(--accent); }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 4px;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  background: rgba(8,12,20,0.98);
  backdrop-filter: blur(20px);
  padding: 28px 24px 36px;
  z-index: 999;
  border-bottom: 1px solid var(--border-card);
  flex-direction: column;
  gap: 6px;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
}
.mobile-nav.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav .nav-link {
  font-size: 1.05rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-card);
  color: var(--text-primary);
}
.mobile-nav .nav-link:last-child { border-bottom: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-card);
  padding-top: 70px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border-card);
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-brand-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 12px 0 20px;
  line-height: 1.7;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.footer-contact-item svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; fill: var(--accent); }
.footer-contact-item a { color: var(--text-secondary); }
.footer-contact-item a:hover { color: var(--accent); }

/* Footer Map */
.footer-map {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-card);
  margin-top: 16px;
}
.footer-map iframe { display: block; width: 100%; height: 160px; }

/* Socials */
.social-links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.social-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}
.social-link svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.social-link-label { line-height: 1.3; }
.social-link-label em { font-style: normal; display: block; font-size: 0.72rem; color: var(--text-muted); }
/* LinkedIn */
.social-link--linkedin:hover { background: rgba(10,102,194,0.12); border-color: #0a66c2; color: #5aacf0; }
.social-link--linkedin:hover svg { fill: #0a66c2; }
/* Instagram */
.social-link--instagram:hover { background: rgba(225,48,108,0.1); border-color: #e1306c; color: #f57bb0; }
.social-link--instagram:hover svg { fill: #e1306c; }
/* Twitter / X */
.social-link--twitter:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); color: #fff; }
.social-link--twitter:hover svg { fill: #fff; }

/* Payment icons */
.payment-icons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.payment-icon {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.payment-icon-svg {
  padding: 4px 6px;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.payment-icon-svg:hover {
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.payment-icon-svg svg { display: block; border-radius: 3px; }

/* Footer bottom */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: calc(100% - 48px);
  max-width: 920px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.7);
  transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
}
.cookie-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.cookie-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.cookie-icon { font-size: 2rem; flex-shrink: 0; }
.cookie-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.cookie-text { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

.cookie-toggles {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
}
.cookie-toggles.visible { display: flex; }

.cookie-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cookie-toggle-label { font-size: 0.88rem; }
.cookie-toggle-label strong { display: block; margin-bottom: 2px; }
.cookie-toggle-label span { color: var(--text-muted); font-size: 0.8rem; }

.toggle-switch { position: relative; width: 42px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.cookie-actions .btn { font-size: 0.85rem; padding: 10px 20px; }
#cookie-customize-btn { color: var(--text-secondary); background: transparent; border: 1px solid var(--border-card); border-radius: 50px; }
#cookie-customize-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Scroll animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.fade-in.visible { opacity: 1; }

.slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.slide-left.visible { opacity: 1; transform: translateX(0); }

.slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.slide-right.visible { opacity: 1; transform: translateX(0); }

/* Delay helpers */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ---------- Hero base ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(8,12,20,0.92) 0%, rgba(8,12,20,0.6) 60%, rgba(8,12,20,0.8) 100%);
}
.hero-content { position: relative; z-index: 1; }

/* ---------- Stars / Rating ---------- */
.stars { display: flex; gap: 3px; }
.star { color: var(--gold); font-size: 0.9rem; }
.rating-count { color: var(--text-muted); font-size: 0.82rem; margin-left: 6px; }

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-accent { background: rgba(0,229,190,0.12); color: var(--accent); }
.badge-accent2 { background: rgba(255,77,109,0.12); color: var(--accent2); }
.badge-gold { background: rgba(255,209,102,0.12); color: var(--gold); }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: calc(var(--header-h) + 60px) 0 70px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 80% 50%, rgba(0,229,190,0.07) 0%, transparent 70%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-breadcrumb { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.page-hero-breadcrumb a { color: var(--text-muted); }
.page-hero-breadcrumb a:hover { color: var(--accent); }
.page-hero-breadcrumb span { margin: 0 8px; }

/* ---------- Divider ---------- */
.divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 3px;
  margin: 16px 0;
}
.divider-center { margin: 16px auto; }

/* ---------- Page body offset ---------- */
.page-body { padding-top: var(--header-h); }

/* ---------- Glow decorations ---------- */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.glow-orb-accent { background: rgba(0,229,190,0.1); }
.glow-orb-accent2 { background: rgba(255,77,109,0.08); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 991px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cookie-banner { padding: 20px; bottom: 12px; }
  .cookie-actions { flex-direction: column; }
  .cookie-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .btn-lg { padding: 16px 28px; font-size: 1rem; }
}

/* =============================================
   Accessibility & Performance Additions
   ============================================= */

/* Skip navigation link */
.skip-nav {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 99999;
  background: var(--accent);
  color: #080c14;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-nav:focus {
  top: 0;
  outline: 3px solid #080c14;
  outline-offset: 2px;
}

/* Enhanced focus-visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(0, 229, 190, 0.2);
}
/* Remove default focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-up, .fade-in, .slide-left, .slide-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* High contrast mode support */
@media (forced-colors: active) {
  .btn-primary { border: 2px solid ButtonText; }
  .nav-link.active { text-decoration: underline; }
  .badge, .section-label { border: 1px solid ButtonText; }
}

/* Visually hidden utility (screen-reader only) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure images never overflow and have aspect ratio hints */
img {
  max-width: 100%;
  height: auto;
}

/* Print styles */
@media print {
  .site-header, .site-footer, .cookie-banner,
  #nfs-chat-btn, #nfs-chat-panel, .burger { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
