
/* ========================================
   TEACHING SERIES SIDEBAR
======================================== */

.teaching-sidebar .widget-body {
    padding-top: 5px;
}

.sidebar-series {
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 0;
}

.sidebar-series-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-series-heading > a {
    flex: 1;
    color: #292929;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
}

.sidebar-series-heading > a:hover {
    color: #285d87;
}


/* Expand / collapse button */

.series-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.series-toggle:hover {
    background: #eaf2f8;
}


.series-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -4px;
}

.series-toggle[aria-expanded="true"] .series-arrow {
    transform: rotate(225deg);
    margin-top: 4px;
}

/* Individual posts */

.sidebar-series-posts {
    display: none;
    list-style: none;
    margin: 8px 0 0;
    padding: 0 0 0 12px;
    border-left: 2px solid #e5e5e5;
}

.sidebar-series.is-expanded .sidebar-series-posts {
    display: block;
}

.sidebar-series-posts li {
    margin: 0;
    padding: 0;
}

.sidebar-series-posts a {
    display: block;
    padding: 7px 8px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    border-radius: 3px;
}

.sidebar-series-posts a:hover {
    color: #173e64;
    background: #f0f5f9;
}

/* Highlight the post currently being read */

.sidebar-series-posts a.current-post {
    color: #173e64;
    background: #dce8f2;
    font-weight: 600;
    border-left: 3px solid #173e64;
    padding-left: 5px;
}
/* Browse All Posts */

.sidebar-all-posts {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 2px solid #e5e5e5;
}

.sidebar-all-posts a {
    display: block;
    padding: 10px 12px;
    background: #173e64;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.sidebar-all-posts a:hover {
    background: #285d87;
    color: #fff;
}

/* Keyboard accessibility */

.series-toggle:focus-visible,
.sidebar-series a:focus-visible,
.sidebar-all-posts a:focus-visible {
    outline: 2px solid  #285d87;
    outline-offset: 3px;
}

.sidebar-topic-list a:hover {
    color: #173e64;
    background: #f0f5f9;
}

/* ========================================
   INDIVIDUAL POST BOTTOM NAVIGATION
======================================== */

.post-navigation {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #ddd;
}

/* Section heading */

.post-navigation-heading {
    margin-bottom: 22px;
}

.post-navigation-heading h3 {
    margin: 0 0 8px;
    color: #173e64;
    font-size: 22px;
    font-weight: 600;
}

.post-navigation-heading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Previous and Next cards */

.post-navigation-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.post-nav-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 90px;
    padding: 18px;
    border: 1px solid #dce8f2;
    border-radius: 8px;
    background: #f0f5f9;
    text-decoration: none;
    transition: background 0.2s ease,
                border-color 0.2s ease;
}

.post-nav-card:hover {
    background: #dce8f2;
    border-color: #173e64;
}

.post-nav-label {
    display: block;
    margin-bottom: 8px;
    color: #173e64;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-nav-title {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.next-post {
    text-align: right;
}

/* Previous and Next post images */



/* Keep cards aligned */

.post-nav-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    padding: 15px;
    border: 1px solid #dce8f2;
    border-radius: 8px;
    background: #f0f5f9;
    text-decoration: none;
    transition: background 0.2s ease,
                border-color 0.2s ease;
}
/* Smaller Previous and Next Post Images */

.post-nav-image {
    display: block;
    width: 65%;
    max-width: 140px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 5px;
    margin: 0 auto 12px;
}

.post-nav-card:hover {
    background: #dce8f2;
    border-color: #173e64;
}

/* Keep Next Post text aligned right */

.next-post {
    text-align: right;
}


/* View the entire series */

.post-series-link {
    margin-bottom: 25px;
    border: 1px solid #dce8f2;
    border-radius: 8px;
    overflow: hidden;
}

.post-series-link a {
    display: block;
    padding: 18px;
    text-align: center;
    text-decoration: none;
    background: #fff;
    transition: background 0.2s ease;
}

.post-series-link a:hover {
    background: #f0f5f9;
}

.series-link-title {
    display: block;
    margin-bottom: 6px;
    color: #173e64;
    font-size: 17px;
    font-weight: 600;
}

.series-link-description {
    display: block;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Browse All Posts */

.post-browse-all {
    padding: 25px 20px;
    border-radius: 8px;
    background: #f0f5f9;
    text-align: center;
}

.post-browse-all h4 {
    margin: 0 0 10px;
    color: #173e64;
    font-size: 18px;
    font-weight: 600;
}

.post-browse-all p {
    max-width: 480px;
    margin: 0 auto 18px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}

.post-browse-button {
    display: inline-block;
    padding: 12px 25px;
    border: 1px solid #173e64;
    border-radius: 5px;
    background: #173e64;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.post-browse-button:hover {
    background: #285d87;
    color: #fff !important;
}

/* Mobile layout */

@media (max-width: 600px) {

    .post-navigation-links {
        grid-template-columns: 1fr;
    }

    .next-post {
        text-align: left;
    }

    .post-navigation-heading h3 {
        font-size: 20px;
    }

    .post-nav-card {
        min-height: 75px;
    }

}

.topic-card {
  display: flex;
  padding: 18px;
  text-align: center;
  border: 1px solid #d4dce4;
  border-radius: 7px;
  text-decoration: none;
  font-weight: bold;
  background: #fafafa;
  transition: transform 0.2s ease;
  position: relative;
  align-items: center;
  justify-content: center;
  min-height: 125px;
  overflow: hidden;
  box-sizing: border-box;
  color: #ffffff;
  font-size: 19px;
  background-color: #173e64;
  background-size: cover;
  background-position: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95);
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  color: #FFFFFF;
}
.topic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 25, 48, 0.42);
  transition: background 0.2s ease;
}

.topic-card span {
  position: relative;
  z-index: 1;
}

.topic-card:hover::before {
  background: rgba(0, 25, 48, 0.22);
}

.topic-card:focus-visible {
  outline: 3px solid #c58c32;
  outline-offset: 3px;
}


