/*
 * Main styles for the Rotary Club of Templeton website.
 *
 * The color palette is inspired by Rotary International’s official
 * colours (navy and gold) and neutral tones to provide contrast.
 * Variables at the root level make it easy to adjust the look and feel
 * globally. The layout is mobile‑first and uses flexbox and CSS grid
 * where appropriate.
 */

:root {
  --primary-color: #003f87; /* navy blue reminiscent of the Rotary wheel */
  --secondary-color: #f5b112; /* warm gold */
  --light-color: #f7f9fc; /* very light grey for backgrounds */
  --dark-text: #333333;
  --light-text: #ffffff;
  --font-family-base: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  /* a subtle border colour for form inputs */
  --light-border: #cccccc;
}

/* Base reset and typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-base);
  line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--light-color);
}

h1, h2, h3, h4 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

p {
  margin-bottom: 1em;
  font-size: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover,
a:focus {
  color: var(--secondary-color);
}

/* Navigation */
header {
  background-color: var(--light-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo span {
  color: var(--secondary-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav li {
  position: relative;
}

nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: var(--primary-color);
  font-weight: 500;
}

nav a:hover,
nav a:focus {
  background-color: var(--primary-color);
  color: var(--light-text);
  border-radius: 4px;
}

/* Hero section */
.hero {
  position: relative;
  background-image: url('assets/hero.png');
  background-size: cover;
  background-position: center;
  height: 70vh;
  color: var(--light-text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

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

.hero-content h1 {
  font-size: 2.5rem;
  color: var(--light-text);
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.btn-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--dark-text);
}

.btn-primary:hover {
  background-color: #e5a20f;
}

.btn-outline {
  background-color: transparent;
  color: var(--light-text);
  border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
  background-color: var(--secondary-color);
  color: var(--dark-text);
}

/* Sections */
section {
  padding: 4rem 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Events list */
.events-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.event-item {
  background-color: var(--light-text);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1rem;
  border-radius: 6px;
  transition: box-shadow 0.2s ease;
}

.event-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-date {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.event-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.event-details {
  font-size: 0.9rem;
  color: var(--dark-text);
}

/* Impact section */
.impact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.impact-text {
  font-size: 1rem;
}

.impact-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
}

.stat {
  flex: 1 1 45%;
  background-color: var(--light-text);
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--primary-color);
}

.impact-image {
  text-align: center;
}

.impact-image img {
  max-width: 100%;
  height: auto;
}

/* Call to action */
.cta {
  background-color: var(--primary-color);
  color: var(--light-text);
  text-align: center;
  padding: 3rem 1rem;
}

.cta h2 {
  color: var(--light-text);
  margin-bottom: 1rem;
}

.cta p {
  margin-bottom: 2rem;
  color: var(--light-text);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 2rem 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.footer-col h4 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  color: var(--light-text);
  font-size: 0.9rem;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  color: var(--dark-text);
  transition: background-color 0.2s ease;
}

.social-icons a:hover {
  background-color: #e5a20f;
}

.social-icons svg {
  width: 18px;
  height: 18px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul {
    flex-wrap: wrap;
  }
  .btn {
    font-size: 0.9rem;
  }
  .impact-stats .stat {
    flex: 1 1 100%;
  }
}