/* ============================================
   Strathmore Cricket Club - Main Stylesheet
   Clean & Professional Redesign
   ============================================ */

/* --- CSS Variables --- */
:root {
  --blue: #5D82D1;
  --blue-dark: #4A6AB8;
  --blue-light: #EDF1FA;
  --orange: #E53D00;
  --orange-dark: #C63400;
  --dark: #1E2022;
  --text: #3C4043;
  --text-light: #6C757D;
  --bg: #FFFFFF;
  --bg-alt: #F9F9FA;
  --bg-warm: #FAF9F5;
  --border: #E8EAED;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --font: 'Poppins', sans-serif;
  --max-width: 1200px;
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--blue-dark);
}

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 640px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(93, 130, 209, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--dark);
  transform: translateY(-2px);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.btn-orange:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(229, 61, 0, 0.35);
}

.btn-white {
  background: #fff;
  color: var(--dark);
  border-color: #fff;
}

.btn-white:hover {
  background: var(--bg-alt);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand img {
  height: 48px;
  width: auto;
  transition: height var(--transition);
}

.navbar.scrolled .nav-brand img {
  height: 40px;
}

.nav-brand-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.2;
  transition: color var(--transition);
}

.nav-brand-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.navbar.scrolled .nav-brand-text {
  color: var(--dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.navbar.scrolled .nav-links a {
  color: var(--text);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
  color: var(--blue);
  background: var(--blue-light);
}

.nav-cta {
  margin-left: 8px;
}

.nav-cta .btn {
  padding: 8px 20px;
  font-size: 0.85rem;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text) !important;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.nav-dropdown-menu a:hover {
  background: var(--blue-light) !important;
  color: var(--blue) !important;
}

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

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

.navbar.scrolled .nav-toggle span {
  background: var(--dark);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1a2332 0%, #2d3e54 100%);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 32, 34, 0.85) 0%, rgba(93, 130, 209, 0.6) 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 680px;
  padding: 120px 0 80px;
}

.hero-content h1 {
  color: #fff;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-content h1 span {
  color: var(--blue);
  display: block;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

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

.hero-stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

/* --- Sections --- */
section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

.bg-alt {
  background: var(--bg-alt);
}

.bg-warm {
  background: var(--bg-warm);
}

.bg-dark {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
}

.bg-dark h2, .bg-dark h3, .bg-dark h4 {
  color: #fff;
}

.bg-blue {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
}

.bg-blue h2, .bg-blue h3 {
  color: #fff;
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 28px;
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Values / Features --- */
.value-card {
  text-align: center;
  padding: 40px 28px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.value-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  background: var(--blue-light);
  color: var(--blue);
}

.value-card h4 {
  margin-bottom: 8px;
}

.value-card p {
  color: var(--text-light);
  font-size: 0.925rem;
  margin: 0;
}

/* --- About Split Section --- */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.about-image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.about-image-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: var(--blue);
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}

.about-image-badge span {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.85;
}

.about-text .section-label {
  text-align: left;
}

.about-text h2 {
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-light);
}

/* --- Sponsors --- */
.sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.sponsor-logo {
  height: 60px;
  width: auto;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all var(--transition);
}

.sponsor-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* --- Team Cards --- */
.team-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
  transition: all var(--transition);
  border-top: 4px solid transparent;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--blue);
}

.team-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
}

.team-card h4 {
  margin-bottom: 8px;
}

.team-card p {
  color: var(--text-light);
  font-size: 0.925rem;
}

/* --- Timeline (History) --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--blue);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--blue-light);
  z-index: 2;
}

.timeline-content {
  width: 45%;
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timeline-year {
  font-weight: 700;
  color: var(--blue);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* --- Contact Form --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-info-card h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.contact-info-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(93, 130, 209, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  margin-bottom: 32px;
  opacity: 0.9;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Page Header (inner pages) --- */
.page-header {
  background: linear-gradient(135deg, #1a2332 0%, #2d3e54 100%);
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(93,130,209,0.08)" d="M0,128L48,138.7C96,149,192,171,288,165.3C384,160,480,128,576,128C672,128,768,160,864,186.7C960,213,1056,235,1152,218.7C1248,203,1344,149,1392,122.7L1440,96L1440,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
}

.page-header h1 {
  color: #fff;
  font-size: 2.75rem;
  position: relative;
  z-index: 1;
}

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumb-current {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  height: 56px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
  font-size: 1.1rem;
}

.footer-social a:hover {
  background: var(--blue);
  color: #fff;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: all var(--transition);
}

.footer-links a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Premiership Table --- */
.prem-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.prem-table thead {
  background: var(--blue);
  color: #fff;
}

.prem-table th,
.prem-table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.925rem;
}

.prem-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.prem-table tbody tr:hover {
  background: var(--blue-light);
}

.prem-table tbody tr:last-child {
  border-bottom: none;
}

/* --- Sponsor Page Cards --- */
.sponsor-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  transition: all var(--transition);
}

.sponsor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.sponsor-card img {
  max-height: 80px;
  max-width: 180px;
  object-fit: contain;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.875rem; }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .about-split { gap: 40px; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }

  .hero-content { padding: 100px 0 60px; }
  .hero-content h1 { font-size: 2.25rem; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero-stat-number { font-size: 2rem; }

  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .nav-links.open a {
    color: var(--text) !important;
    padding: 12px 16px;
    width: 100%;
  }

  .nav-links.open a:hover {
    background: var(--blue-light);
    color: var(--blue) !important;
  }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  .about-split { grid-template-columns: 1fr; }
  .about-image img { height: 320px; }

  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .timeline::before { left: 20px; }
  .timeline-dot { left: 20px; }
  .timeline-item, .timeline-item:nth-child(odd) {
    flex-direction: row;
    text-align: left;
    padding-left: 52px;
  }
  .timeline-content { width: 100%; }

  .page-header { padding: 130px 0 60px; }
  .page-header h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-content h1 { font-size: 1.875rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { text-align: center; justify-content: center; }
}
