/* =============================================
   Manchester City FC - city.raymondapps.com
   Shared Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --city-blue: #6CABDD;
  --city-navy: #1C2C5B;
  --city-navy-light: #243a78;
  --city-white: #FFFFFF;
  --city-gold: #F0A500;
  --city-gold-light: #ffd166;
  --bg-dark: #0d1526;
  --bg-card: #111e38;
  --bg-card-hover: #162445;
  --text-primary: #FFFFFF;
  --text-secondary: #a8c4e0;
  --text-muted: #6a87ad;
  --border-color: rgba(108, 171, 221, 0.2);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); }

a {
  color: var(--city-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--city-gold); }

/* ==================== NAVIGATION ==================== */
.navbar {
  background: var(--city-navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--city-blue);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--city-white);
  text-decoration: none;
}

.nav-logo .crest {
  width: 36px;
  height: 36px;
  background: var(--city-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--city-white);
  background: rgba(108, 171, 221, 0.15);
}

.nav-links a.active {
  color: var(--city-blue);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--city-white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ==================== HERO ==================== */
.hero {
  background: linear-gradient(135deg, var(--city-navy) 0%, #0d1526 50%, #0d2040 100%);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(108,171,221,0.15) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(108,171,221,0.15);
  border: 1px solid rgba(108,171,221,0.3);
  color: var(--city-blue);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: var(--city-white);
  margin-bottom: 1rem;
}

.hero h1 span {
  color: var(--city-blue);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-crest {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  display: block;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
  background: linear-gradient(135deg, var(--city-navy) 0%, #0d1526 100%);
  padding: 3.5rem 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at left center, rgba(108,171,221,0.1) 0%, transparent 60%);
}

.page-header-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-header .breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-header .breadcrumb a {
  color: var(--city-blue);
}

.page-header h1 {
  color: var(--city-white);
  margin-bottom: 0.5rem;
}

.page-header h1 span { color: var(--city-blue); }

.page-header p {
  font-size: 1.05rem;
  max-width: 650px;
}

/* ==================== SECTIONS ==================== */
.section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  color: var(--city-white);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
}

.section-label {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--city-blue);
  border-bottom: 2px solid var(--city-blue);
  padding-bottom: 2px;
  margin-bottom: 0.75rem;
}

/* ==================== CARDS ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(108,171,221,0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ==================== STATS GRID ==================== */
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-box .stat-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--city-blue);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-box .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ==================== TROPHY BADGE ==================== */
.trophy-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(240,165,0,0.12);
  border: 1px solid rgba(240,165,0,0.3);
  color: var(--city-gold);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  margin: 0.15rem;
}

.trophy-badge.pl { background: rgba(108,171,221,0.15); border-color: rgba(108,171,221,0.4); color: var(--city-blue); }
.trophy-badge.cl { background: rgba(255,209,0,0.12); border-color: rgba(255,209,0,0.4); color: #ffd100; }
.trophy-badge.fa { background: rgba(200,60,60,0.12); border-color: rgba(200,60,60,0.4); color: #e07070; }
.trophy-badge.cc { background: rgba(60,180,100,0.12); border-color: rgba(60,180,100,0.4); color: #60c880; }

/* ==================== COMPETITION TABLE ==================== */
.comp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.comp-table th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.comp-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(108,171,221,0.08);
  color: var(--text-secondary);
  vertical-align: middle;
}

.comp-table tr:last-child td { border-bottom: none; }

.comp-table .result-won {
  color: #60d080;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.comp-table .result-runner {
  color: var(--city-blue);
  font-weight: 600;
}

.comp-table .result-out {
  color: var(--text-muted);
}

.comp-icon {
  font-size: 1.1rem;
  margin-right: 0.4rem;
}

/* ==================== SEASON CARDS ==================== */
.season-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s;
}

.season-card.treble {
  border-color: var(--city-gold);
  box-shadow: 0 0 30px rgba(240,165,0,0.15);
}

.season-card.double {
  border-color: rgba(108,171,221,0.5);
}

.season-header {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.season-year {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--city-blue);
  min-width: 90px;
}

.season-label {
  flex: 1;
}

.season-label .title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--city-white);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.season-trophies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.season-toggle {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: transform 0.3s;
  margin-left: auto;
}

.season-card.open .season-toggle {
  transform: rotate(180deg);
}

.season-body {
  display: none;
  padding: 1.75rem;
}

.season-card.open .season-body {
  display: block;
}

.season-narrative {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.key-players {
  margin-top: 1rem;
}

.key-players h5 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.player-tag {
  background: rgba(108,171,221,0.1);
  border: 1px solid rgba(108,171,221,0.2);
  color: var(--city-blue);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

/* ==================== PLAYER PROFILE ==================== */
.player-profile {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 3rem;
}

.player-header {
  background: linear-gradient(135deg, var(--city-navy) 0%, var(--bg-dark) 100%);
  padding: 2.5rem 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.player-header::before {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(108,171,221,0.08) 0%, transparent 70%);
}

.player-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 6rem;
  color: rgba(108,171,221,0.15);
  line-height: 1;
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.player-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--city-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  border: 3px solid rgba(108,171,221,0.3);
}

.player-info h2 {
  color: var(--city-white);
  margin-bottom: 0.25rem;
}

.player-info .position-years {
  color: var(--city-blue);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.player-body {
  padding: 2rem;
}

.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ==================== DIVIDER ==================== */
.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 3rem 0;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--city-blue);
  color: var(--city-navy);
}

.btn-primary:hover {
  background: #7ec5f5;
  color: var(--city-navy);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--city-blue);
  border: 1.5px solid var(--city-blue);
}

.btn-outline:hover {
  background: rgba(108,171,221,0.1);
  color: var(--city-white);
}

/* ==================== HIGHLIGHT BLOCKS ==================== */
.highlight-block {
  background: rgba(108,171,221,0.05);
  border-left: 3px solid var(--city-blue);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

.highlight-block p {
  color: var(--text-secondary);
  font-style: italic;
}

.highlight-block strong {
  color: var(--city-white);
  font-style: normal;
}

/* ==================== MATCH CARD ==================== */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.match-teams {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.match-team {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--city-white);
  flex: 1;
}

.match-team.home { text-align: right; }
.match-team.away { text-align: left; }

.match-score {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--city-white);
  background: var(--city-navy);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-sm);
  min-width: 90px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.match-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

/* ==================== TROPHY SECTION ==================== */
.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.trophy-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s;
}

.trophy-item:hover {
  border-color: var(--city-gold);
  background: rgba(240,165,0,0.05);
}

.trophy-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.trophy-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--city-white);
  margin-bottom: 0.25rem;
}

.trophy-count {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: var(--city-gold);
  display: block;
}

.trophy-years {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ==================== FOOTER ==================== */
footer {
  background: var(--city-navy);
  border-top: 2px solid rgba(108,171,221,0.2);
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--city-white);
  margin-bottom: 0.5rem;
}

.footer-logo span { color: var(--city-blue); }

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 1rem 0;
}

.footer-links a {
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--city-blue); }

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==================== UTILITY ==================== */
.text-blue { color: var(--city-blue); }
.text-gold { color: var(--city-gold); }
.text-white { color: var(--city-white); }
.text-muted { color: var(--text-muted); }
.font-heading { font-family: 'Montserrat', sans-serif; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.full-width { width: 100%; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--city-blue);
  border-radius: 2px;
  margin: 0.75rem 0 1.5rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--city-navy);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 2px solid var(--city-blue);
    gap: 0.25rem;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.6rem 1rem;
    width: 100%;
  }

  .nav-toggle { display: flex; }

  .navbar { position: relative; }

  .player-header {
    grid-template-columns: 1fr;
  }

  .player-number {
    font-size: 4rem;
    top: 1rem;
    right: 1rem;
    transform: none;
  }

  .match-card {
    flex-direction: column;
    text-align: center;
  }

  .match-teams {
    width: 100%;
  }

  .match-team.home, .match-team.away {
    text-align: center;
  }

  .section { padding: 2.5rem 1rem; }
  .hero { padding: 3rem 1rem; }
  .page-header { padding: 2.5rem 1rem 2rem; }
}

@media (max-width: 480px) {
  .card-grid-2, .card-grid-3, .card-grid-4 {
    grid-template-columns: 1fr;
  }
  .trophy-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--city-navy); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--city-navy-light); }
