/*
 * Micael Chess Club Website Styles
 *
 * This stylesheet defines the look and feel of the Micael Chess Club
 * website. The palette and typography have been inspired by the club
 * logo: a rich golden yellow paired with deep blacks and off‑white tones.
 *
 * Colors and fonts are declared as CSS variables near the top to make
 * it easy to adjust the theme later. Responsive design techniques
 * (flexbox and CSS grid) are used throughout to ensure the site
 * gracefully adapts to different screen sizes.
 */

:root {
  --primary-color: #FFD000;        /* golden yellow from the club logo */
  --primary-dark: #e6b800;         /* slightly darker shade for hover states */
  --dark: #101010;                 /* near black for text and header */
  --light: #ffffff;                /* pure white */
  --background-color: #f7f4e9;     /* warm off‑white background */
  --accent: #2b2b2b;               /* dark grey for subtle elements */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

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

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

/* Header and navigation */
header {
  background-color: var(--dark);
  color: var(--light);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo img {
  height: 50px;
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}

nav a {
  color: var(--light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
  color: var(--primary-color);
}

/* Mobile navigation toggle */
.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-icon span {
  background-color: var(--light);
  height: 3px;
  width: 25px;
  margin-bottom: 4px;
  border-radius: 2px;
}

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

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
}

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

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.btn {
  background-color: var(--primary-color);
  color: var(--dark);
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease;
  display: inline-block;
}

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

/* Generic sections */
section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

section.dark {
  background-color: var(--dark);
  color: var(--light);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  margin-bottom: 40px;
  color: var(--accent);
  font-style: italic;
}

/* Benefits section */
.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.benefit {
  background-color: var(--light);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.benefit h3 {
  font-family: var(--font-heading);
  margin-bottom: 10px;
  color: var(--secondary-color);
}

/* Events cards */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.event-card {
  background-color: var(--light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

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

.event-card .event-info {
  padding: 15px;
  flex-grow: 1;
}

.event-card .event-info h4 {
  margin-bottom: 10px;
  font-family: var(--font-heading);
  color: var(--secondary-color);
}

.event-card .event-info p {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--accent);
}

.event-card .event-info span {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--primary-color);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

/* Contact form */
.contact-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-family: var(--font-heading);
  margin-bottom: 10px;
}

.contact-info p {
  margin-bottom: 10px;
  font-size: 1rem;
}

.contact-form {
  flex: 1;
}

.contact-form form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form form .full-width {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-family: var(--font-body);
  resize: vertical;
}

.contact-form button {
  background-color: var(--primary-color);
  color: var(--dark);
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: var(--primary-dark);
}

/* Footer */
footer {
  background-color: var(--dark);
  color: var(--light);
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

footer p {
  font-size: 0.9rem;
  color: #cccccc;
}

footer .socials {
  display: flex;
  gap: 15px;
}

footer .socials a {
  color: var(--primary-color);
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

footer .socials a:hover {
  color: var(--primary-dark);
}

/* Responsive behaviour */
@media (max-width: 768px) {
  .navbar nav ul {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 200px;
    height: calc(100% - 70px);
    background-color: var(--dark);
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    transition: right 0.3s ease;
  }
  .navbar nav ul.open {
    right: 0;
  }
  .menu-icon {
    display: flex;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .contact-form form {
    grid-template-columns: 1fr;
  }
}