/* Westport Chess Club - Main Stylesheet */
/* Mobile-first responsive design */

:root {
  /* Color Palette */
  --chess-green: #3A5F1F;
  --chess-green-dark: #2D5016;
  --chess-green-light: #4A7028;
  --cream: #F5F1E8;
  --cream-dark: #E8E3D8;
  --charcoal: #2B2B2B;
  --charcoal-light: #4A4A4A;
  --gold: #D4A574;
  --gold-dark: #B8916A;
  --border-subtle: #D9D5CC;
  
  /* Typography */
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                'Helvetica Neue', Arial, sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* Layout */
  --max-width: 1200px;
  --border-radius: 4px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-stack);
  background-color: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--charcoal);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.75rem;
  margin-top: var(--spacing-xl);
}

h3 {
  font-size: 1.5rem;
  margin-top: var(--spacing-lg);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--chess-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--chess-green-dark);
  text-decoration: underline;
}

strong {
  font-weight: 600;
  color: var(--charcoal);
}

/* Header and Navigation */
header {
  background-color: var(--chess-green-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
}

.logo:hover {
  color: var(--gold);
  text-decoration: none;
}

.nav-links {
  display: none;
  list-style: none;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  color: var(--cream);
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  display: block;
  transition: background-color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  background-color: var(--chess-green-light);
  text-decoration: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--spacing-xs);
  display: block;
}

.menu-toggle:hover {
  color: var(--gold);
}

/* Mobile Menu - Show when active */
.nav-links.active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background-color: var(--chess-green-dark);
  border-top: 1px solid var(--chess-green-light);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
  min-height: calc(100vh - 200px);
}

/* Sections */
section {
  margin-bottom: var(--spacing-xxl);
}

section:last-child {
  margin-bottom: 0;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--spacing-xxl) var(--spacing-md);
  background: 
    linear-gradient(rgba(45, 80, 22, 0.75), rgba(58, 95, 31, 0.75)),
    url('../img/header-bg.jpg') center center / cover no-repeat;
  color: var(--cream);
  border-radius: 16px;
  margin-bottom: var(--spacing-xxl);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  color: var(--cream);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero .cta-button {
  display: inline-block;
  background-color: var(--gold);
  color: var(--charcoal);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero .cta-button:hover {
  background-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

/* Cards and Boxes */
.card {
  background-color: white;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card h3 {
  margin-top: 0;
  color: var(--chess-green-dark);
}

/* Info Box (for highlights) */
.info-box {
  background-color: var(--cream-dark);
  border-left: 4px solid var(--chess-green);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  border-radius: var(--border-radius);
}

.info-box.highlight {
  background-color: #FFF8E7;
  border-left-color: var(--gold);
}

/* FAQ Section */
.faq-item {
  margin-bottom: var(--spacing-lg);
}

.faq-item h3 {
  color: var(--chess-green-dark);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

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

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

/* Officers/Team Grid */
.officer-card {
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  text-align: center;
}

.officer-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--spacing-md);
  border: 3px solid var(--chess-green);
}

.officer-card h3 {
  margin: var(--spacing-sm) 0 var(--spacing-xs);
  font-size: 1.25rem;
}

.officer-card p {
  color: var(--charcoal-light);
  font-size: 0.95rem;
  margin: 0;
}

/* Tournament Schedule */
.tournament-item {
  background: white;
  border-left: 4px solid var(--chess-green);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  border-radius: var(--border-radius);
}

.tournament-item h3 {
  margin-top: 0;
  color: var(--chess-green-dark);
}

.tournament-item .time {
  color: var(--charcoal-light);
  font-weight: 600;
  font-size: 0.95rem;
}

.tournament-item .fee {
  color: var(--gold-dark);
  font-weight: 600;
  margin-top: var(--spacing-sm);
}

/* Forms */
form {
  max-width: 600px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--charcoal);
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 2px solid var(--border-subtle);
  border-radius: var(--border-radius);
  font-family: var(--font-stack);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
  margin-bottom: var(--spacing-md);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--chess-green);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

button[type="submit"],
.button {
  background-color: var(--chess-green);
  color: var(--cream);
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-medium);
  display: inline-block;
}

button[type="submit"]:hover,
.button:hover {
  background-color: var(--chess-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: var(--cream);
}

/* Footer */
footer {
  background-color: var(--charcoal);
  color: var(--cream);
  padding: var(--spacing-xl) var(--spacing-md);
  margin-top: var(--spacing-xxl);
}

footer .footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

footer a {
  color: var(--gold);
}

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

footer p {
  margin-bottom: var(--spacing-sm);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.social-links a {
  font-size: 1.5rem;
  transition: transform var(--transition-fast);
  display: inline-block;
}

.social-links a:hover {
  transform: scale(1.1);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

/* Calendar Embed */
.calendar-embed {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  margin: var(--spacing-lg) 0;
}

/* Merch Grid */
.merch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.merch-item {
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  text-align: center;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.merch-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.merch-item img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
}

.merch-item h3 {
  font-size: 1.1rem;
  margin: var(--spacing-sm) 0;
}

/* Tablet Breakpoint (768px and up) */
@media (min-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .menu-toggle {
    display: none;
  }
  
  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .merch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  main {
    padding: var(--spacing-xxl) var(--spacing-lg);
  }
}

/* Desktop Breakpoint (1024px and up) */
@media (min-width: 1024px) {
  h1 {
    font-size: 3rem;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .hero {
    min-height: 500px;
    padding: var(--spacing-xxl) var(--spacing-xl);
  }
  
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .merch-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
