﻿/* Berwick shared styles extracted from templates */

/* Header */
.berwick-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
}
.berwick-site-header__inner {
  max-width: 1420px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.berwick-site-header__brand img {
  max-width: 260px;
  height: auto;
  display: block;
}
.berwick-main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
}
.berwick-main-menu li { margin: 0; }
.berwick-main-menu a {
  color: #0b3f6f;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.berwick-main-menu a:hover { color: #1f79c9; }

/* Blog page */
.berwick-blog-page {
  --berwick-blue: #073d6a;
  --berwick-link: #1f79c9;
  --berwick-bg: #f3f3f3;
  --berwick-text: #0b3f6f;
  --berwick-divider: #8aa5bf;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  background: var(--berwick-bg);
}
.berwick-blog-page a { color: var(--berwick-link); text-decoration: none; }
.berwick-blog-page a:hover { text-decoration: underline; }
.berwick-blog-sidebar {
  background: var(--berwick-blue);
  color: #fff;
  min-height: 100%;
  padding: 38px 32px;
  position: sticky;
  top: 0;
  align-self: start;
  box-shadow: 10px 0px 10px 0px rgba(0, 0, 0, .28);
  z-index: 1;
}
.berwick-sidebar-logo {
  max-width: 300px;
  width: 100%;
  height: auto;
  margin-bottom: 24px;
}
.berwick-sidebar-intro {
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  margin: 10px 0 20px;
  color: #fff;
}
.berwick-sidebar-copy {
  font-size: 19px;
  line-height: 1.25;
  margin-bottom: 36px;
  max-width: 320px;
}
.berwick-cat-menu { list-style: none; padding: 0; margin: 0; }
.berwick-cat-menu li { margin-bottom: 16px; }
.berwick-cat-menu a {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  display: inline-block;
}
.berwick-blog-main {
  display: flex;
  flex-direction: column;
  padding: 52px 94px 80px;
  max-width: 1550px;
}
.berwick-section-title {
  color: var(--berwick-link);
  font-size: 52px;
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
}
.berwick-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding: 2rem 0px!important;
  border-bottom: 1px solid var(--berwick-divider);
  min-width: 100%;
}
.berwick-featured-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 14px;
}
.berwick-featured-card h3 {
  margin: 0 0 8px;
  color: var(--berwick-text);
  font-size: 24px;
  line-height: 1.12;
  font-weight: 700;
}
.berwick-featured-card .cat,
.berwick-list-item .cat {
  color: var(--berwick-link);
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.berwick-featured-card p {
  color: var(--berwick-text);
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
}
.berwick-list-item {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 290px;
  gap: 26px;
  align-items: center;
  border-top: 1px solid var(--berwick-divider);
  padding: 28px 0;
}
.berwick-list-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
}
.berwick-list-item h3 {
  margin: 0 0 10px;
  color: var(--berwick-text);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
}
.berwick-list-item p {
  color: var(--berwick-text);
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
}
.berwick-read-post {
  display: inline-block;
  background: var(--berwick-blue);
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 22px 26px;
  text-align: center;
  border-radius: 14px;
  min-width: 210px;
}
.berwick-list-cta { text-align: center; }
.berwick-pagination {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  justify-content: center;
}
.berwick-pagination .page-numbers {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.berwick-pagination .page-numbers,
.berwick-pagination .page-numbers li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.berwick-pagination .page-numbers a,
.berwick-pagination .page-numbers span {
  display: inline-block;
  min-width: 36px;
  text-align: center;
  border: 1px solid #ececec;
  color:#003660;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 16px;
  background: #ececec;
  &.current {
    background: #003660;
    color: #fff;
    border-color: #003660;
  }
}

/* Category */
.berwick-category-wrap {
  background: #ffffff;
  min-height: 100vh;
  padding-bottom: 48px;
}
.berwick-hero {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  background-size: cover;
  background-position: center;
  min-width: 100%;
}
.berwick-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 34, 61, 0.46);
}
.berwick-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 16px;
  font-size: 56px;
  line-height: 1.08;
  color: #fff;
}
.berwick-hero-description {
  position: relative;
  z-index: 1;
  margin: 14px auto 0;
  padding: 0 16px;
  max-width: 900px;
  color: #fff;
  font-size: 20px;
  line-height: 1.4;
}
.berwick-hero-actions {
  position: absolute;
  left: 50%;
  bottom: 0px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 12px;
  width: 100%;
  background-color: rgba(0, 54, 96, 0.32);
  justify-content: center;
  padding-top: .5rem;
  padding-bottom: .5rem;
}
.berwick-btn {
  display: inline-block;
  min-width: 130px;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  background: #073d6a;
  color: #fff;
}

.berwick-hero-actions .berwick-btn { background: #0576B8; }
.berwick-btn:hover { background: #1f79c9; color: #fff; }
.berwick-category-content {
  max-width: 1100px;
  margin: 66px auto 0;
  padding: 0 20px;
  flex-direction: column;
}
.berwick-list-section {
  display: flex;
  flex-direction: column;
  padding: 0px!important;
  min-width: 100%;
}
.berwick-category-wrap .berwick-list-item {
  display: flex;
  align-items: start;
  gap: 20px;
  padding: 24px 0;
  &:not(:last-child) {
    border-bottom: 1px solid #b3c2d1;
  }

  & .berwick-list-cta {
    align-self: center;
  }
}
.berwick-category-wrap .berwick-list-item > a {
  flex: 0 0 240px;
}

.berwick-category-wrap .berwick-list-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  height: 180px;
}
.berwick-category-wrap .berwick-list-item h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.15;
}
.berwick-category-wrap .berwick-list-item h2 a { color: #0b3f6f; text-decoration: none; }
.berwick-category-wrap .berwick-list-item h2 a:hover { color: #1f79c9; }
.berwick-category-wrap .berwick-list-item p {
  margin: 0 0 10px;
  color: #0b3f6f;
  font-size: 18px;
  line-height: 1.35;
}
.berwick-category-wrap .berwick-list-item .read-link {
  color: #1f79c9;
  font-weight: 700;
  text-decoration: none;
}
.berwick-category-wrap .berwick-list-item .read-link:hover { text-decoration: underline; }
.berwick-category-pagination {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  justify-content: center;
}
.berwick-category-pagination .page-numbers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}
.berwick-category-pagination .page-numbers a,
.berwick-category-pagination .page-numbers span {
  display: inline-block;
  min-width: 36px;
  text-align: center;
  border: 1px solid #ececec;
  color:#003660;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 16px;
  background: #ececec;
  text-decoration: none;
  &.current {
    background: #003660;
    color: #fff;
    border-color: #003660;
  }
}

/* Single */
.berwick-single-wrap {
  background: #ffffff;
  min-height: 100vh;
  padding-bottom: 48px;
}
.berwick-single-hero {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  background-size: cover;
  background-position: center;
  min-width: 100%;
}
.berwick-single-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 34, 61, 0.52);
}
.berwick-single-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 16px;
  font-size: 56px;
  line-height: 1.08;
  color: #fff;
}
.berwick-single-content {
  max-width: 980px;
  margin: 40px auto 0;
  padding: 0 20px;
  color: #0b3f6f;
}
.berwick-single-content h1,
.berwick-single-content h2,
.berwick-single-content h3,
.berwick-single-content h4,
.berwick-single-content h5,
.berwick-single-content h6 {
  color: #0b3f6f;
}
.berwick-single-content p,
.berwick-single-content li {
  font-size: 18px;
  line-height: 1.5;
}
.berwick-single-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 20px;
}

@media (max-width: 1600px) {
  .berwick-blog-page { grid-template-columns: 320px 1fr; }
  .berwick-sidebar-intro { font-size: 20px; }
  .berwick-sidebar-copy { font-size: 17px; }
  .berwick-cat-menu a { font-size: 17px; }
  .berwick-blog-main { padding: 42px 48px 64px; }
  .berwick-section-title { font-size: 44px; }
  .berwick-featured-card h3 { font-size: 22px; }
  .berwick-featured-card .cat,
  .berwick-list-item .cat { font-size: 15px; }
  .berwick-featured-card p,
  .berwick-list-item p { font-size: 15px; }
  .berwick-list-item h3 { font-size: 22px; }
  .berwick-read-post { font-size: 16px; }
}
@media (max-width: 1100px) {
  .berwick-blog-page { grid-template-columns: 1fr; }
  .berwick-blog-sidebar {
    position: static;
    padding: 24px 20px;
  }
  .berwick-sidebar-copy,
  .berwick-cat-menu a { font-size: 20px; }
  .berwick-sidebar-intro { font-size: 28px; }
  .berwick-blog-main { padding: 26px 20px 40px; }
  .berwick-section-title { font-size: 40px; margin-bottom: 24px; }
  .berwick-featured-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 36px; }
  .berwick-featured-card h3 { font-size: 32px; }
  .berwick-featured-card .cat,
  .berwick-list-item .cat { font-size: 20px; }
  .berwick-featured-card p,
  .berwick-list-item p { font-size: 26px; }
  .berwick-list-item {
    gap: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .berwick-list-item h3 { font-size: 34px; }
  .berwick-list-item img {
    max-width: 100%;
    border-radius: 12px;
  }
  .berwick-list-cta {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 10px;
    flex-wrap: wrap;
  }
  .berwick-read-post { font-size: 24px; padding: 15px 20px; }
}
@media (max-width: 980px) {
  .berwick-site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .berwick-site-header__brand img { max-width: 220px; }
  .berwick-main-menu { gap: 14px; }
  .berwick-main-menu a { font-size: 16px; }
}
@media (max-width: 900px) {
  .berwick-hero,
  .berwick-single-hero { min-height: 240px; }
  .berwick-hero h1,
  .berwick-single-hero h1 { font-size: 40px; }
  .berwick-hero-description { font-size: 18px; }
  .berwick-category-content { margin-top: 56px; }
  .berwick-category-wrap .berwick-list-item {
    flex-direction: column;
    gap: 14px;
    & > a { flex: none; width: 100%; }

    & img {
      width: 100%;
      height: auto;
    }

    & .berwick-list-cta {
      align-self: flex-start;
      text-align: left;
    }
  }
  .berwick-single-content { margin-top: 28px; }
}
