/* ACC Okanagan — site styles
   Colours match the previous WordPress theme. */

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/NotoSans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/NotoSans-Italic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --red: #cd2220;
  --red-dark: #a91b19;
  --blue: #007ab7;
  --blue-dark: #005e8c;
  --text: #303030;
  --muted: #6b6b6b;
  --header-bg: #333333;
  --border: #dcdcdc;
  --light-bg: #f4f4f4;
  --content-width: 46rem;
  --wide-width: 70rem;
  --font: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a {
  color: var(--blue);
  text-underline-offset: 0.15em;
}
a:hover {
  color: var(--blue-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  margin: 2rem 0 1rem;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ---------- Header & navigation ---------- */

.site-header {
  background: var(--header-bg);
  color: #fff;
  position: relative;
  z-index: 10;
}
.site-header-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.site-title {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}
.site-title:hover {
  color: #fff;
}
.site-tagline {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.menu-toggle {
  display: none;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.site-nav li {
  position: relative;
}
.site-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.35rem 0.5rem;
}
.site-nav > ul > li > a[aria-current="page"],
.site-nav > ul > li > a.is-active {
  box-shadow: inset 0 -2px 0 #fff;
}
.site-nav > ul > li.has-children > a::after {
  content: " ▾";
  font-size: 0.75em;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
}

/* Desktop dropdowns */
@media (min-width: 60rem) {
  .site-nav .submenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 15rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 0.4rem 0;
  }
  .site-nav li:hover > .submenu,
  .site-nav li:focus-within > .submenu {
    display: block;
  }
  .site-nav .submenu a {
    color: var(--text);
    font-weight: 400;
    font-size: 0.95rem;
    padding: 0.35rem 1rem;
    line-height: 1.4;
  }
  .site-nav .submenu a[aria-current="page"] {
    font-weight: 700;
  }
  /* third level (e.g. photo contest years) shown indented in the same panel */
  .site-nav .submenu .submenu {
    display: block;
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 0.9rem;
    min-width: 0;
  }
}

/* Mobile menu */
@media (max-width: 59.99rem) {
  .menu-toggle {
    display: block;
  }
  .site-nav {
    display: none;
    flex-basis: 100%;
  }
  .site-nav.is-open {
    display: block;
  }
  .site-nav > ul {
    flex-direction: column;
    padding: 0.5rem 0;
  }
  .site-nav .submenu {
    padding-left: 1rem;
  }
  .site-nav .submenu a {
    font-weight: 400;
  }
  .site-nav > ul > li.has-children > a::after {
    content: "";
  }
  .site-nav > ul > li > a.is-active {
    box-shadow: none;
  }
}

/* ---------- Hero (home page) ---------- */

.hero {
  min-height: clamp(18rem, 55vw, 32rem);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}
.hero h1 {
  margin: 0;
  color: #303030;
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ---------- Main content ---------- */

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.breadcrumbs {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.breadcrumbs a {
  color: var(--muted);
}

.entry-title {
  margin-top: 1rem;
}

.entry-content > :first-child {
  margin-top: 0;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.4rem;
}
.entry-content li {
  margin-bottom: 0.3rem;
}

.entry-content hr {
  border: 0;
  height: 2px;
  background: var(--blue);
  width: 6rem;
  margin: 2.5rem auto;
}

.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--blue);
  font-style: italic;
}

.byline {
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.centered {
  text-align: center;
}

/* Wide tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.entry-content th {
  background: var(--light-bg);
}

/* Buttons */
.button {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 0;
  border-radius: 4px;
  padding: 0.75rem 1.4rem;
  cursor: pointer;
}
.button:hover,
.button:focus-visible {
  background: var(--red-dark);
  color: #fff;
}
.button-row {
  text-align: center;
  margin: 1.75rem 0;
}

/* Images */
.figure {
  margin: 1.75rem 0;
  text-align: center;
}
.figure img {
  display: block;
  margin: 0 auto;
}
figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}
.figure.small img {
  max-width: 18rem;
}
.figure.rounded img {
  border-radius: 1rem;
  max-height: 36rem;
  width: auto;
}

/* Link cards (home page) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
}
.card-title {
  text-decoration: underline;
}
.card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border-radius: 4px;
  transition: opacity 0.15s;
}
.card:hover img {
  opacity: 0.88;
}

/* Gallery grid */
.gallery {
  margin: 2rem 0;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
.gallery-grid figure {
  margin: 0;
}
.gallery-grid img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  border-radius: 4px;
  display: block;
}
.gallery-title {
  font-weight: 700;
  color: var(--blue);
  margin-top: 0.75rem;
}

/* Slideshow (scroll-snap; swipe on phones, arrows on desktop) */
.slideshow {
  position: relative;
  margin: 2rem 0;
  background: #1f1f1f;
  border-radius: 6px;
  overflow: hidden;
}
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  list-style: none;
  margin: 0;
  padding: 0;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar {
  display: none;
}
.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0 !important;
}
.slide figure {
  margin: 0;
  height: 32rem;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.slide img {
  max-height: 100%;
  min-height: 0;
  width: auto;
  object-fit: contain;
}
.slide figcaption {
  color: #eee;
  padding: 0.4rem 1rem 0.6rem;
  margin: 0;
}
.slideshow-prev,
.slideshow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.slideshow-prev:hover,
.slideshow-next:hover {
  background: rgba(0, 0, 0, 0.7);
}
.slideshow-prev { left: 0.5rem; }
.slideshow-next { right: 0.5rem; }

/* Cover block (photo with text over it) */
.cover {
  margin: 2.5rem 0;
  min-height: 20rem;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.cover p {
  position: relative;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin: 1rem;
}

/* Embedded calendar */
.calendar {
  margin: 0 0 2rem;
}
.calendar iframe {
  width: 100%;
  height: 600px;
  border: 1px solid #777;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.site-footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}
.acc-logo img {
  display: block;
  height: 140px;
  width: auto;
}
.site-footer-bottom {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer-bottom p {
  margin: 0;
}
.site-footer-bottom ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.site-footer-bottom a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.site-footer-bottom a:hover {
  text-decoration: underline;
}

@media (max-width: 40rem) {
  body {
    font-size: 1.05rem;
  }
  h1 { font-size: 1.9rem; }
  .site-footer-inner {
    justify-content: center;
  }
}
