/*
Theme Name: High Weald Archery
Theme URI: https://main.dy50skyyna0h5.amplifyapp.com/
Author: OpenAI Codex
Description: A single-page WordPress theme based on the High Weald Archery Club reference site.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: high-weald-archery
*/

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

:root {
  --site-max-width: 1280px;
  --surface: #f8f8f8;
  --surface-alt: #ffffff;
  --border: #dddddd;
  --text: #151515;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 116px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.logo-container {
  flex: 0 0 auto;
}

.custom-logo-link,
.fallback-logo {
  display: inline-flex;
  align-items: center;
}

.site-header .custom-logo,
.fallback-logo img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 75px;
  object-fit: contain;
}

.header-content {
  display: flex;
  flex: 24;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2.25rem);
  line-height: 1.2;
  text-align: center;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.primary-nav {
  width: 100%;
}

.nav-links {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  font-size: 1.125rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  text-decoration: underline;
}

.site-main {
  padding-top: 116px;
}

.section-block {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.hero-image {
  height: 35vh;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.section-content {
  display: flex;
  flex-direction: row;
  width: min(100%, var(--site-max-width));
  margin: 0 auto;
  padding: 20px;
}

.section-content article {
  flex: 1;
  padding: 20px;
  text-align: left;
}

.section-content h2 {
  margin-bottom: 1rem;
}

.section-content p,
.section-content li {
  line-height: 2;
}

.section-content ul {
  padding-left: 1.25rem;
}

table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background: #f4f4f4;
}

tr:nth-child(even) {
  background: #f9f9f9;
}

.map-embed-wrapper {
  width: 100%;
  max-width: 640px;
}

.map-embed {
  width: 100%;
  height: 400px;
  border: 1px solid #000000;
}

.site-footer {
  padding: 1rem 1.5rem 2rem;
  text-align: center;
  background: var(--surface-alt);
}

@media (max-width: 768px) {
  .site-header {
    min-height: 96px;
    padding: 16px;
  }

  .site-main {
    padding-top: 96px;
  }

  .site-header .custom-logo,
  .fallback-logo img {
    max-height: 56px;
  }

  .header-content {
    align-items: flex-end;
    gap: 0.5rem;
    flex: 1;
  }

  .site-title {
    width: 100%;
    font-size: 1.25rem;
    text-align: right;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    background: #f4f4f4;
    padding: 10px 0;
  }

  .primary-nav.is-open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .section-content {
    flex-direction: column;
  }

  .section-content h2,
  .section-content p,
  .section-content li,
  .nav-links a {
    font-size: 1rem;
  }

  .map-embed {
    height: 280px;
  }
}
