:root {
  --bg: #edf1f4;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #1d232b;
  --muted: #5f6b7a;
  --brand: #b90000;
  --brand-deep: #8e0000;
  --border: #d7dde4;
  --radius: 12px;
  --shadow: 0 16px 36px rgba(10, 25, 47, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, #ffffff 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #f2f5f8 0%, #e8edf2 100%);
  font-family: "Source Sans 3", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.55;
  font-size: 18px;
}

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

a {
  color: #1f4e96;
}

a:hover {
  color: var(--brand);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #d5dce3;
  background: #f8fafc;
  color: #31415c;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cta-button:hover {
  color: #233754;
  background: #ffffff;
  border-color: #aebdd0;
}

.cta-button:focus-visible {
  outline: 3px solid rgba(52, 126, 220, 0.45);
  outline-offset: 2px;
}

.read-more,
.link_to_home {
  margin-top: 12px;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
}

.site-shell {
  max-width: 1240px;
  margin: 18px auto;
  padding: 0 18px 22px;
}

.site-header {
  background:
    linear-gradient(124deg, rgba(74, 0, 0, 0.22), rgba(74, 0, 0, 0) 55%),
    linear-gradient(180deg, #ca0000 0%, #a20000 100%);
  color: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.site-header__inner {
  padding: 18px 22px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-brand__logo {
  width: 108px;
  min-width: 108px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.site-brand__eyebrow {
  margin-bottom: 2px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  font-family: "Bitter", Georgia, "Times New Roman", serif;
  color: #fff;
}

.site-brand__tagline {
  margin-top: 8px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.93);
  font-size: 1rem;
}

.nav-toggle {
  display: none;
}

.site-nav {
  margin-top: 14px;
}

#main-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#main-nav li {
  margin: 0;
}

#main-nav li a,
#main-nav li span {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: #1f355a;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(20, 39, 61, 0.08);
}

#main-nav li a:hover {
  border-color: #f2aaaa;
  background: #fff7f7;
  color: var(--brand-deep);
}

#main-nav li .nav-current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.site-main {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

#content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(15, 35, 54, 0.07);
  min-width: 0;
}

#content h2,
#content h3 {
  font-family: "Bitter", Georgia, "Times New Roman", serif;
}

#widgets {
  min-width: 0;
}

.widget-panel {
  position: sticky;
  top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 16px rgba(15, 35, 54, 0.07);
  padding: 12px;
}

.widget-panel__title {
  font-family: "Bitter", Georgia, "Times New Roman", serif;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

#footer {
  margin-top: 18px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

#footer a {
  text-decoration: none;
  font-weight: 700;
}

#newscontainer {
  max-width: none;
  padding: 0;
}

.newsitem,
.trail-conditions-list .post,
.events-list .event-block {
  background: var(--surface-soft);
  margin: 0 0 16px;
  border: 1px solid #e0e6ec;
  border-radius: 12px;
  padding: 14px;
}

.newsitem .postername,
span.posted_on,
.events-list .event-date {
  color: var(--muted);
}

span.posted_on {
  font-size: 0.85em;
  font-style: italic;
}

.newsitem .flyer {
  float: left;
  width: 200px;
  margin-right: 14px;
  margin-bottom: 10px;
}

.newsitem .bulletin_body.with_flyer {
  margin-left: 0;
}

.newsitem {
  overflow: hidden;
}

.newsitem .photo img {
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

.newsitem .photo {
  text-align: center;
}

.newsitem .photo a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.newsitem .photo .title {
  margin-top: 8px;
  text-align: center;
  color: #24344e;
}

.events-list .event-block h4 {
  margin: 0 0 8px;
}

.events-list .event-block h4 a,
.events-list .event-attachment a {
  text-decoration: none;
}

.events-list .event-description,
.trail-conditions-list .post-body {
  line-height: 1.65;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.photo-item {
  background: var(--surface);
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 14px rgba(22, 34, 45, 0.15);
}

.photo-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.photo-item img {
  width: 100%;
  display: block;
}

.photo-item .photo-title {
  padding: 8px;
  font-size: 12px;
  text-align: center;
  background: #f5f7f9;
  border-top: 1px solid #e8edf2;
}

.photo-quick-nav {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #dfe4ea;
}

.photo-quick-nav__title {
  margin-bottom: 10px;
}

.photo-quick-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.photo-quick-nav__thumb {
  display: block;
  width: 74px;
  height: 74px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(13, 32, 54, 0.12);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.photo-quick-nav__thumb:hover {
  transform: translateY(-1px);
  border-color: #8eb7ef;
}

.photo-quick-nav__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-quick-nav__thumb.is-current {
  border-color: var(--brand);
}

.links-list {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.links-list li {
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 10px;
  padding: 10px 12px;
}

.links-list li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: #21477f;
  overflow-wrap: anywhere;
}

.links-list li a:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-panel {
  max-width: 520px;
  margin: 8px auto;
  padding: 18px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
}

.login-panel__intro {
  margin-bottom: 14px;
  color: var(--muted);
}

.login-form__group {
  margin-bottom: 12px;
}

.login-form__label {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 700;
}

.login-form__field {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background: #fbfcfd;
  font: inherit;
}

.login-form__field:focus {
  outline: 2px solid rgba(52, 126, 220, 0.3);
  outline-offset: 1px;
  border-color: #84a8d6;
  background: #fff;
}

.login-form__remember {
  margin: 4px 0 14px;
}

.login-form__actions {
  margin: 0;
}

.photos-pagination-top,
.photos-pagination-bottom {
  padding: 16px 0;
  text-align: center;
}

.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 6px 11px;
  border: 1px solid #d5dce3;
  border-radius: 8px;
  text-decoration: none;
  background: #fff;
  color: #1f355a;
}

.pagination a:hover {
  border-color: #f2aaaa;
  color: var(--brand);
  background: #fff7f7;
}

.pagination .current {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  font-weight: 700;
}

.pagination .disabled {
  color: #95a0ad;
  opacity: 0.6;
}

.pagination .gap {
  border: none;
  background: transparent;
  color: #7d8895;
}

.post .attachment {
  margin-top: 12px;
}

.post .attachment img {
  max-width: 100%;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  display: block;
}

.post .attachment .attachment-title {
  margin-top: 8px;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

@media (max-width: 1024px) {
  .site-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .widget-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 17px;
  }

  .site-shell {
    margin: 0;
    padding: 10px 10px 18px;
  }

  .site-header {
    border-radius: 14px;
  }

  .site-header__inner {
    padding: 14px;
  }

  .site-brand {
    align-items: flex-start;
    gap: 10px;
  }

  .site-brand__logo {
    width: 78px;
    min-width: 78px;
    padding: 5px;
  }

  .site-brand__eyebrow {
    font-size: 0.72rem;
  }

  .site-brand__tagline {
    font-size: 0.9rem;
    margin-top: 4px;
  }

  .site-nav {
    margin-top: 10px;
  }

  .nav-toggle {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(22, 29, 37, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
  }

  .nav-toggle__icon {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
  }

  .nav-toggle__bar {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
  }

  #main-nav {
    display: none;
    margin-top: 10px;
  }

  #left-nav.is-open #main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #main-nav li a,
  #main-nav li span {
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.95rem;
  }

  #content {
    padding: 14px;
    border-radius: 12px;
  }

  .newsitem .flyer {
    float: none;
    width: auto;
    margin-right: 0;
  }
}

@media (max-width: 520px) {
  #left-nav.is-open #main-nav {
    grid-template-columns: 1fr;
  }
}
