/* North Bay Fencing Academy — layout based on the 2014 Joomla / Artisteer template. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #ccddef;
  background-image: url("../images/page-bg.jpg");
  background-repeat: repeat-x;
  background-position: top center;
  color: #152933;
  font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

img {
  border: 0;
  max-width: 100%;
  height: auto;
}

a {
  color: #254e79;
  text-decoration: none;
}

a:visited {
  color: #3e7a98;
}

a:hover {
  color: #09c1e1;
}

.page {
  width: 900px;
  max-width: 100%;
  margin: 50px auto 24px;
  background: #fff;
  padding: 4px;
}

.header img {
  display: block;
  width: 100%;
  height: auto;
}

/* Navigation — same navy bar as the original site */
.nav {
  position: relative;
  height: 43px;
  background-image: url("../images/nav.png");
  background-repeat: repeat-x;
  background-position: left top;
  background-color: #2b5f96;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 6px;
  list-style: none;
  height: 43px;
}

.nav li {
  display: flex;
  align-items: center;
}

.nav li + li {
  border-left: 1px solid rgba(204, 221, 239, 0.28);
}

.nav a {
  display: block;
  color: #ccddef;
  font-size: 12px;
  line-height: 31px;
  padding: 0 14px;
  white-space: nowrap;
}

.nav a:visited {
  color: #ccddef;
}

.nav a:hover,
.nav a.active {
  color: #e8eff8;
}

.nav a.active {
  color: #c4d8ed;
}

.layout {
  display: flex;
  width: 100%;
  align-items: flex-start;
}

.sidebar {
  width: 267px;
  flex: 0 0 267px;
  padding: 7px;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 5px;
}

.block,
.post {
  margin-bottom: 10px;
}

.block-header {
  height: 30px;
  padding: 0 8px;
  margin-bottom: 2px;
  background-image: url("../images/block-header.png");
  background-repeat: repeat-x;
  background-position: left top;
  background-color: #7eacd8;
  color: #162d46;
  font-size: 12px;
  line-height: 30px;
  white-space: nowrap;
  border-radius: 6px 6px 0 0;
}

.block-header span {
  display: inline-block;
  padding-left: 18px;
  background-image: url("../images/block-header-icon.png");
  background-repeat: no-repeat;
  background-position: left center;
}

.block-body,
.post-body {
  background: #e0eaf5;
  padding: 10px 12px 14px;
  color: #152933;
  border-radius: 0 0 8px 8px;
}

.block-intro {
  margin: 0 0 10px;
}

.post-title {
  margin: 0.2em 0 0.6em;
  padding: 0;
  font-weight: normal;
  font-size: 22px;
  color: #193552;
}

.lede {
  text-align: center;
  font-size: 14px;
  color: #152933;
  margin: 0 0 0.4em;
}

.lede strong {
  font-weight: bold;
}

.post-body p {
  margin: 0 0 1em;
}

.post-body p:last-child,
.block-body p:last-child {
  margin-bottom: 0;
}

.weapon-list {
  margin: 0 0 1em 0.4em;
  padding: 0;
  list-style: none;
}

.weapon-list li {
  margin: 0.15em 0;
}

.contact-block {
  margin: 0;
}

.contact-block p {
  margin: 0 0 0.85em;
}

.contact-block a {
  word-break: break-word;
}

/* Tournament cards */
.tournament-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tournament {
  background: #fff;
  border: 1px solid #9dc4d7;
  padding: 8px 9px;
}

.tournament-name {
  display: block;
  font-weight: bold;
  color: #193552;
  font-size: 13px;
  line-height: 1.3;
}

a.tournament-name:hover {
  color: #09c1e1;
}

.tournament-date {
  margin-top: 3px;
  color: #356982;
  font-size: 11px;
}

.tournament-note {
  margin: 6px 0 0;
  font-size: 12px;
}

.tournament-links {
  margin-top: 6px;
  font-size: 11px;
}

.tournament-empty {
  margin: 0;
  font-size: 12px;
  color: #356982;
}

.footer {
  position: relative;
  width: 100%;
  margin-top: 5px;
  padding: 10px 8px 14px;
  text-align: center;
  color: #13262f;
  background-image: url("../images/footer.png");
  background-repeat: no-repeat;
  background-position: left bottom;
  background-color: #d5e2ef;
}

.footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .page {
    margin-top: 0;
  }

  .nav {
    height: auto;
  }

  .nav ul {
    height: auto;
  }
}

@media (max-width: 700px) {
  .layout {
    flex-direction: column;
  }

  .sidebar,
  .main {
    width: 100%;
    flex-basis: auto;
  }

  .nav a {
    padding: 0 10px;
  }
}
