/* ============================================
   HARLOW UNITED FC - PROFESSIONAL STYLESHEET
   Modern design inspired by Arsenal FC & Tottenham Hotspur
   ============================================ */

/* ===== CSS VARIABLES & DESIGN TOKENS ===== */
:root {
  /* Brand Colors */
  --primary: #0a4060;
  --primary-dark: #07324b;
  --primary-light: #0d5278;
  --accent: #FFBD00;
  --accent-dark: #e6ad00;
  --accent-light: #ffd633;
  --hufc-dark-white: #ffffff;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL STYLES ===== */
body {
  background-color: var(--gray-200);
  color: var(--gray-900);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ===== TOP BAR ===== */
.top-bar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-bottom: 2px solid var(--accent);
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.top-bar a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.top-bar a:hover {
  color: var(--accent);
}

.top-bar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  margin-left: 0.5rem;
  transition: all var(--transition-base);
}

.top-bar-social a:hover {
  background: var(--accent);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

/* ===== NAVIGATION ===== */
.navbar-bg {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.bg-opacity-85 {
  --bs-bg-opacity: 0.95;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  transition: transform var(--transition-base);
}

.navbar-brand:hover {
  transform: scale(1.02);
}

.navbar-brand img {
  transition: transform var(--transition-base);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-brand:hover img {
  transform: rotate(-5deg) scale(1.05);
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  position: relative;
  transition: all var(--transition-base);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 80%;
}

/* Dropdown Menu Enhancements */
.nav-item.dropdown .dropdown-menu {
  display: none;
  position: absolute;
  background: white;
  padding: 0.5rem 0;
  margin-top: 0;
  list-style: none;
  min-width: 200px;
  border: none;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  animation: dropdownSlide 0.3s ease-out;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-item.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--primary);
  border-left-color: var(--accent);
  padding-left: 1.75rem;
}

/* ===== HERO SECTION ===== */
.hero-gradient {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 189, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 189, 0, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-gradient::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 189, 0, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ===== BUTTONS ===== */
.btn {
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: all var(--transition-base);
  border-radius: 0.5rem;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(10, 64, 96, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 64, 96, 0.4);
}

.btn-outline-dark {
  border: 2px solid var(--gray-800);
  color: var(--gray-800);
  background: transparent;
}

.btn-outline-dark:hover {
  background: var(--gray-800);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-hufc-secondary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--primary-dark);
  border: none;
  box-shadow: 0 4px 12px rgba(255, 189, 0, 0.3);
  font-weight: 700;
}

.btn-hufc-secondary:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 189, 0, 0.4);
}

/* ===== BADGES ===== */
.badge-hufc {
  background: linear-gradient(135deg, rgba(255, 189, 0, 0.2), rgba(255, 189, 0, 0.1));
  border: 1px solid rgba(255, 189, 0, 0.3);
  color: var(--accent);
  font-weight: 700;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  backdrop-filter: blur(10px);
}

/* ===== CARDS ===== */
.card-hufc {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  color: #cbd5e1;
  transition: all var(--transition-base);
  overflow: hidden;
  position: relative;
}

.card-hufc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.card-hufc:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: rgba(255, 189, 0, 0.3);
}

.card-hufc:hover::before {
  transform: scaleX(1);
}

.card-hufc-white {
  background-color: var(--hufc-dark-white);
  border-radius: 1rem;
  color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-200);
}

.card-hufc-white:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--accent);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delays */
.fade-in:nth-child(1) { transition-delay: 0.1s; }
.fade-in:nth-child(2) { transition-delay: 0.2s; }
.fade-in:nth-child(3) { transition-delay: 0.3s; }
.fade-in:nth-child(4) { transition-delay: 0.4s; }

/* ===== UTILITIES ===== */
.border-white-10 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.text-secondary {
  color: var(--gray-400) !important;
}

.rounded-xl {
  border-radius: 1rem;
}

.shadow-soft {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ===== SPONSORS SECTION ===== */
.hufc-sponsors-bottom {
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  padding: 2rem 0;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(10, 64, 96, 0.03) 0%, rgba(255, 189, 0, 0.03) 100%);
}

/* ===== SUB HEADER ===== */
.sub-header {
  padding: 2rem 0 1rem;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 4px 16px 0 rgba(0, 24, 56, 0.1);
  background: linear-gradient(135deg, rgba(10, 64, 96, 0.05) 0%, transparent 100%);
}

.sub-header__heading {
  margin: 0;
  color: var(--primary-dark);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.sub-nav .nav-link {
  color: var(--primary);
  padding: 0.75rem 1rem;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  transition: all var(--transition-base);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.sub-nav .nav-link:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--accent);
}

.sub-nav .nav-link.active {
  border-bottom-color: var(--accent);
  color: var(--primary-dark);
}

/* ===== FIXTURES & SCORES ===== */
.score-box {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 800;
  min-width: 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.score-box:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.score-separator {
  margin: 0 0.5rem;
  font-weight: 600;
  color: var(--gray-500);
}

.fixture-border-top {
  border-top: 1px solid rgba(10, 64, 96, 0.15);
}

.fixtures-list {
  padding: 0;
  list-style: none;
}

.fixture .fixture-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--gray-300);
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-radius: 0.5rem;
}

.fixture-header__side-info {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 65px;
}

.fixture-body {
  margin-top: auto;
  margin-bottom: auto;
  display: table;
  table-layout: fixed;
}

/* Fixtures Grid Alignment */
.fixture-row {
  display: grid;
  grid-template-columns: 120px 1fr 48px 160px 48px 1fr 100px;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem;
  background: white;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-200);
}

.fixture-row:hover {
  box-shadow: var(--shadow-lg);
  transform: translateX(4px);
  border-color: var(--accent);
}

.fixture-date {
  min-width: 120px;
  font-weight: 600;
  color: var(--primary);
}

.fixture-home-name,
.fixture-away-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--gray-800);
}

.team-logo {
  max-width: 40px;
  max-height: 40px;
  height: auto;
  transition: transform var(--transition-base);
}

.team-logo:hover {
  transform: scale(1.1);
}

.fixture-score {
  min-width: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.fixture-actions {
  text-align: right;
}

/* ===== NEWS FEED ===== */
.hufc__news-feed-image {
  height: 200px;
  object-fit: cover;
  border-radius: 0.75rem 0.75rem 0 0;
  transition: transform var(--transition-slow);
}

.card-hufc:hover .hufc__news-feed-image {
  transform: scale(1.05);
}

/* ===== TABLES ===== */
.table-primary {
  --bs-table-bg: #ffde82f5;
  --bs-table-color: #1a1a1a;
  --bs-table-border-color: #e6ad00;
  --bs-table-striped-bg: #f3b300;
  --bs-table-striped-color: #1a1a1a;
  --bs-table-hover-bg: #f7c533;
  --bs-table-hover-color: #1a1a1a;
  --bs-table-active-bg: #e6ad00;
  --bs-table-active-color: #1a1a1a;
}

:not(caption) > .table-primary > * {
  border-style: solid !important;
}

.hufc-text-primary {
  color: var(--primary);
}

.hufc-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.table,
.table th,
.table td,
.table thead,
.table tbody,
.table-hover tbody tr:hover {
  background-color: transparent !important;
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(180deg, var(--primary-dark) 0%, #05283d 100%);
  color: rgba(255, 255, 255, 0.8);
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

.footer-heading {
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
  .fixture-row {
    grid-template-columns: 100px 1fr 36px 120px 36px 1fr;
  }
  
  .fixture-actions {
    grid-column: 1 / -1;
    text-align: right;
    margin-top: 0.5rem;
  }
  
  .fixture-score {
    min-width: 120px;
  }
  
  .sub-header__heading {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .fixture-row {
    grid-template-columns: 1fr 36px 100px 36px 1fr;
    grid-template-areas:
      'date date date date date'
      'homeName homeLogo score awayLogo awayName'
      'actions actions actions actions actions';
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .fixture-date {
    font-size: 0.875rem;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    text-align: center;
    font-weight: 700;
  }
  
  .score-box {
    padding: 0.5rem 0.75rem;
    min-width: 28px;
  }
  
  .hufc__news-feed-image {
    height: 120px;
  }
  
  .sub-header__heading {
    font-size: 1.75rem;
  }
  
  .navbar .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .navbar .nav-link::after {
    display: none;
  }
}
