/**
 * ==============================================================================
 * HEFRO SPORTS — Professional Theme Architecture & Design System (theme.css)
 * Headquarters: London, United Kingdom | Contact: hefrosports@gmail.com
 * Supports: PHP, Python (WSGI/Flask), Node.js (Express), Static Hosting
 * ==============================================================================
 */

:root {
  /* Brand Palette */
  --hf-primary: #ff5500;
  --hf-primary-hover: #e04b00;
  --hf-primary-light: #ff7733;
  --hf-primary-glow: rgba(255, 85, 0, 0.35);
  --hf-accent-gold: #f5a623;
  --hf-accent-green: #25d366;
  --hf-accent-blue: #0070f3;
  --hf-accent-red: #ff3344;

  /* Neutral Spectrum */
  --hf-ink-950: #0a0a0c;
  --hf-ink-900: #101014;
  --hf-ink-850: #15151c;
  --hf-ink-800: #1b1b24;
  --hf-ink-700: #262633;
  --hf-ink-600: #3c3c4f;
  --hf-ink-400: #71718a;
  --hf-ink-200: #b0b0c5;
  --hf-ink-100: #e4e4ed;
  --hf-ink-50:  #f8f8fb;
  --hf-white:   #ffffff;

  /* Surfaces & Glassmorphism */
  --hf-surface-card: #15151c;
  --hf-surface-elevated: #1e1e28;
  --hf-surface-glass: rgba(21, 21, 28, 0.78);
  --hf-surface-glass-border: rgba(255, 255, 255, 0.08);

  /* Typography */
  --hf-font-heading: 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hf-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hf-font-mono: 'JetBrains Mono', 'Fira Code', Menlo, monospace;

  /* Geometry & Elevation */
  --hf-radius-xs: 4px;
  --hf-radius-sm: 8px;
  --hf-radius-md: 12px;
  --hf-radius-lg: 18px;
  --hf-radius-xl: 24px;
  --hf-radius-full: 9999px;

  --hf-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --hf-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --hf-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --hf-shadow-glow: 0 0 25px var(--hf-primary-glow);

  /* Animation Timings */
  --hf-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --hf-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --hf-dur-fast: 150ms;
  --hf-dur-norm: 260ms;
  --hf-dur-slow: 450ms;
}

/* ==============================================================================
   1. CORE THEME LAYOUT & SMOOTH SCROLLING
   ============================================================================== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--hf-ink-950);
}
::-webkit-scrollbar-thumb {
  background: var(--hf-ink-700);
  border-radius: var(--hf-radius-full);
  border: 2px solid var(--hf-ink-950);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--hf-primary);
}

/* Selection Color */
::selection {
  background: var(--hf-primary);
  color: var(--hf-white);
}

/* ==============================================================================
   2. THEME COMPONENTS: BUTTONS, BADGES & CARDS
   ============================================================================== */
.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--hf-font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--hf-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--hf-dur-norm) var(--hf-ease-out);
  position: relative;
  overflow: hidden;
}

.hf-btn-primary {
  background: var(--hf-primary);
  color: var(--hf-white);
  box-shadow: 0 4px 14px var(--hf-primary-glow);
}
.hf-btn-primary:hover {
  background: var(--hf-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--hf-primary-glow);
  color: var(--hf-white);
}

.hf-btn-outline {
  background: transparent;
  color: var(--hf-white);
  border-color: rgba(255, 255, 255, 0.2);
}
.hf-btn-outline:hover {
  border-color: var(--hf-primary);
  color: var(--hf-primary);
  background: rgba(255, 85, 0, 0.06);
  transform: translateY(-2px);
}

.hf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--hf-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 85, 0, 0.12);
  color: var(--hf-primary-light);
  border: 1px solid rgba(255, 85, 0, 0.3);
}

.hf-badge-green {
  background: rgba(37, 211, 102, 0.12);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.3);
}

.hf-card {
  background: var(--hf-surface-card);
  border: 1px solid var(--hf-surface-glass-border);
  border-radius: var(--hf-radius-md);
  padding: 24px;
  transition: transform var(--hf-dur-norm) var(--hf-ease-out),
              box-shadow var(--hf-dur-norm) var(--hf-ease-out),
              border-color var(--hf-dur-norm) var(--hf-ease-out);
  position: relative;
}
.hf-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 85, 0, 0.4);
  box-shadow: var(--hf-shadow-md);
}

/* ==============================================================================
   3. CATEGORY GRID & CARD MEDIA RATIO PRESERVATION
   ============================================================================== */
.cat-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 0;
  flex-shrink: 0;
  flex-grow: 0;
  background: #0d0d12;
  overflow: hidden;
  display: block;
}

.cat-card-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.cat-card:hover .cat-card-media img {
  transform: scale(1.05);
}

/* ==============================================================================
   4. GLASSMORPHISM FLOATING ELEMENTS (AI AGENT & PILLS)
   ============================================================================== */
.hf-glass {
  background: var(--hf-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--hf-surface-glass-border);
}

.hf-live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--hf-accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--hf-accent-green);
  animation: hf-pulse 2s infinite ease-in-out;
}

@keyframes hf-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==============================================================================
   5. RESPONSIVE BREAKPOINTS
   ============================================================================== */
@media (max-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

@media (max-width: 600px) {
  .cat-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}
