@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000');

:root {
    --green: #7a9f5e;
    --highlight-blue: #DAE9F4;
    --lblue: #017faa;
    --dblue: #004a64;
    --col-block-teal: #004A64;
    --col-block-green: #719050;
    --col-block-blue: #4192CD;
    --col-block-teal-muted: #0049641c;
    --col-block-green-muted: #7190501c;
    --col-block-blue-muted: #4192CD1c;
    --yel: #edbd2a;
    --light-yel: #fff9ec;
    --dgrey: #808080;
    --lgrey: #c7c7c7;
    --font-family: 'DM Sans', sans-serif;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 24px;
    margin: 20px 0 14px 0;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

.fs-xsm {
    font-size: 12px;
}

.col-white {
    color: white;
}

a {
  color: var(--lblue);
  text-decoration: none;
}


body {
    font-family: var(--font-family);
}

.content-width {
    width: 750px;
}

.btn-primary {
    background-color: var(--dblue);
    border-color: var(--dblue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--lblue);
    border-color: var(--lblue);
    color: white;
}

/* ── Shared pill button ───────────────────────────────────────────────────────
   Secondary/utility actions: sort controls, jump-to trigger, back-to-top.
   White background, subtle grey border, rounded pill shape.
   Use when a control sits inline with content (not a primary CTA).
   ──────────────────────────────────────────────────────────────────────────── */
.btn-pill {
    border-radius: 100px;
    border: 1px solid rgb(191, 191, 191);
    background: white;
    color: var(--dblue);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    line-height: 1;
}

.btn-pill:hover {
    background-color: var(--highlight-blue);
    border-color: var(--dblue);
    color: var(--dblue);
}

/* ── Form select ─────────────────────────────────────────────────────────────
   Use Bootstrap's .form-select for all dropdown filter/sort controls.
   Focus ring uses --dblue to stay on-brand.
   ──────────────────────────────────────────────────────────────────────────── */
.form-select:focus {
    border-color: var(--dblue);
    box-shadow: 0 0 0 0.2rem rgba(0, 74, 100, 0.15);
}

/* ── CBCNY-style navigation bar ─────────────────────────────────────────────
   White fixed bar with box-shadow. Always in the compact "stuck" visual state.
   ──────────────────────────────────────────────────────────────────────────── */
.region-navigation {
    background: white;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
    z-index: 1000;
    padding: 0;
}

.region-navigation__inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2em;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.site-name__link {
    display: block;
    padding: 12px 0;
    margin-right: 26px;
    flex-shrink: 0;
}

.site-name__img {
    height: 35px;
    width: auto;
    display: block;
}

.navbar {
    top: 0px;
    min-height: 86px;
}

/* Main nav */
.cbc-main-nav .nav-item {
    position: relative;
    padding-right: 20px;
    white-space: nowrap;
}

.cbc-main-nav .nav-item:last-child {
    padding-right: 0;
}

.cbc-nav-link {
    color: #000;
    font-weight: 600;
    font-size: 1rem;
    padding-top: 10px;
    padding-bottom: 10px;
}

.cbc-nav-link:hover,
.cbc-nav-link:focus {
    color: var(--lblue);
}

/* Dropdown subnav */
.cbc-subnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
    border-radius: 5px;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    min-width: 190px;
    z-index: 1001;
}

/* Desktop: CSS hover opens the dropdown */
@media (min-width: 992px) {
    .cbc-has-subnav:hover > .cbc-subnav {
        display: block;
    }
}

/* Mobile: JS adds .is-open to toggle the dropdown */
.cbc-subnav.is-open {
    display: block;
}

.cbc-subnav li {
    margin: 0;
    padding: 0;
    text-align: center;
}

.cbc-subnav li:first-child { border-radius: 5px 5px 0 0; }
.cbc-subnav li:last-child  { border-radius: 0 0 5px 5px; }

.cbc-subnav li:hover {
    background-color: var(--lblue);
}

.cbc-subnav li a {
    display: block;
    padding: 5px 24px;
    color: #000;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

.cbc-subnav li:hover a {
    color: white;
}

/* Insights sparkle icon */
.cbc-insights-link .bi {
    font-size: 0.8em;
    color: var(--lblue);
    vertical-align: middle;
    margin-right: 3px;
}

/* Utility nav (icon-only) */
.cbc-utility-nav {
    display: flex;
    flex-shrink: 0;
    flex-direction: row !important;
    gap: 2px !important;
    align-items: center;
    margin-left: auto;
}

.cbc-utility-link {
    color: #555;
    font-size: 1rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.cbc-utility-link:hover {
    color: var(--lblue);
    background-color: rgba(1, 127, 170, 0.1);
}

/* Nav item row: parent link + mobile chevron */
.cbc-nav-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cbc-subnav-toggle {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--dgrey);
    flex-shrink: 0;
    line-height: 1;
    display: none;
}

.cbc-subnav-toggle .bi {
    display: block;
    transition: transform 0.2s ease;
}

.cbc-subnav-toggle.is-open .bi {
    transform: rotate(180deg);
}

#navbar-home-link {
    display: none;
}

@media (max-width: 1136px) {
    .cbc-utility-nav {
        display: none;
    }   
}

/* Mobile layout (below lg = 992px) */
@media (max-width: 991.98px) {
    /* Override Bootstrap's align-items: center so the inner div anchors to the
       top when the collapse opens and the navbar grows taller. */
    .navbar {
        align-items: flex-start;
        min-height: 76px;
    }

    .region-navigation__inner {
        flex-wrap: wrap;
        padding: 0 1em;
        padding-top: 12px;
    }

    .navbar-toggler {
        flex-shrink: 0;
    }

    /* Logo centered via flex; spacer on right matches toggler width */
    .site-name__link {
        flex: 1;
        display: flex;
        justify-content: center;
        margin: 0;
        padding: 8px 0;
    }

    .cbc-mobile-spacer {
        flex: 0 0 44px;
        flex-shrink: 0;
    }

    .region-navigation .navbar-collapse {
        width: 100%;
        padding: 0px;
        border-top: 1px solid #eee;
        margin-top: 14px;
        max-height: 90vh;
        overflow-y:auto;
    }

    #navbar-home-link {
        display: block;
        top: 86px;
        left: 8px;
        font-size: 20px;
        background-color: white;
        padding: 7px 14px;
        border-radius: 10px;
    }

    .cbc-main-nav {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100%;
        gap: 0 !important;
        padding: 20px 0px;
    }

    .cbc-main-nav .nav-item {
        padding-right: 0;
        width: 100%;
    }

    .cbc-nav-link {
        padding: 8px 0;
        display: block;
    }

    .cbc-subnav-toggle {
        display: block;
    }

    /* Mobile subnav: indented, no box-shadow */
    .cbc-subnav {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0 0 0px 1rem;
        background: transparent;
        border-left: 2px solid var(--lblue);
        margin: 2px 0 4px;
        min-width: 0;
    }

    .cbc-subnav li { text-align: left; }
    .cbc-subnav li:first-child,
    .cbc-subnav li:last-child { border-radius: 0; }
    .cbc-subnav li:hover { background-color: transparent; }

    .cbc-subnav li a {
        padding: 5px 0;
        color: var(--dblue);
        white-space: normal;
    }

    .cbc-subnav li:hover a { color: var(--lblue); }

    .cbc-utility-nav {
        display: none !important;
    }
}

/* When search occupies the center, prevent collapse from growing */
@media (min-width: 992px) {
    .has-navbar-search .navbar-collapse {
        flex-grow: 1;
    }
}

/* Loading bar base */
#loading-bar {
  position: fixed;            /* stays at top even if page scrolls */
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;

  background: var(--lblue);
  z-index: 9999;

  /* start hidden above the viewport */
  transform: translateY(-100%);
  opacity: 0;

  /* smooth slide in/out */
  transition: transform 100ms ease, opacity 100ms ease;

  /* for shimmer overlay */
  overflow: hidden;

  /* optional: if you use progress mode, this animates width changes */
  will-change: transform, opacity, width;
}

/* Visible state */
#loading-bar.is-active {
  transform: translateY(0);
  opacity: 1;
}

/* Shimmer / flowing effect */
#loading-bar::after {
  content: "";
  position: absolute;
  inset: 0;

  /* A bright “wave” that moves across */
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 25%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.55) 75%,
    rgba(255, 255, 255, 0) 100%
  );

  transform: translateX(-100%);
  opacity: 0;
}

#loading-bar.is-active::after {
  opacity: 1;
  animation: loading-bar-shimmer 1.1s linear infinite;
}

@keyframes loading-bar-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #loading-bar,
  #loading-bar::after {
    transition: none;
    animation: none !important;
  }
}

.col {
    flex-direction: column !important;
}

.bg-body-grey {
    background-color: #999999;
}

.search-rotator {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;

  /* Don't block clicks into the input */
  pointer-events: none;

  /* Align with Bootstrap input padding */
  padding-left: 1rem;
  padding-right: 48px;

  /* Keep it vertically centered like input text */
  display: flex;
  align-items: center;

  /* Make sure it matches the input's rounded corners visually */
  border-radius: 0.5rem;

  /* Keep it above the input's background, below button */
  z-index: 3;
  width: calc(100% - 48px);
}

/* We'll hide overlay when user types/focuses */
.search-rotator.is-hidden {
  opacity: 0;
  transition: opacity 150ms ease;
}

.search-rotator__item {
  position: absolute;
  left: 1rem; /* match padding-left above */
  right: 1rem;
  top: 50%;
  transform: translateY(calc(-50% + 18px));

  color: var(--dblue);
  font-size: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  opacity: 0;
}

/* Enter animation (slides up with spring-ish easing) */
.search-rotator__item.is-entering,
.search-rotator__item.is-active {
  animation: rotatorIn 650ms cubic-bezier(0.22, 1.35, 0.36, 1) forwards;
}

/* Exit animation (slides up and out) */
.search-rotator__item.is-exiting {
  animation: rotatorOut 450ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ac-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-top: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  max-height: 45vh;
  overflow-y: auto;
  z-index: 100;
}

.ac-section + .ac-section {
  border-top: 1px solid #e0e0e0;
}

.ac-section h4 {
    padding: 0px 16px;
    margin-top: 0;
    font-size: 14px;
    font-weight: 700;
}

.ac-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 100ms;
}

.ac-item:hover,
.ac-item.is-selected {
  background: var(--highlight-blue);
}

.ac-name {
  font-weight: 600;
  font-size: 16px;
  color: #222;
}

.ac-leader {
  flex: 1 1 auto;
  border-bottom: 2px dotted #ccc;
  margin: 0 10px;
  min-width: 20px;
  align-self: center;
  height: 0;
}

.ac-count {
  font-size: 14px;
  color: var(--dgrey);
  white-space: nowrap;
}

.ac-subtitle {
  width: 100%;
  font-size: 13px;
  color: var(--lblue);
  margin-top: 2px;
  padding-left: 0;
}

.action-highlight {
    padding: 2px 6px;
    border-radius: 3px;
    background-color: rgb(245, 245, 245);
}

.action-highlight .bi {
    font-size: 12px;
    margin-right: 2px;
}

@keyframes rotatorIn {
  0% {
    transform: translateY(calc(-50% + 18px));
    opacity: 0;
  }
  60% {
    transform: translateY(calc(-50% - 2px));
    opacity: 1;
  }
  100% {
    transform: translateY(-50%);
    opacity: 1;
  }
}

@keyframes rotatorOut {
  0% {
    transform: translateY(-50%);
    opacity: 1;
  }
  100% {
    transform: translateY(calc(-50% - 18px));
    opacity: 0;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .search-rotator__item.is-entering,
  .search-rotator__item.is-active,
  .search-rotator__item.is-exiting {
    animation: none !important;
    transform: translateY(-50%) !important;
    opacity: 1 !important;
  }
}

.search-input-group {
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--lblue);
    width: 100%;
    position: relative;
}

/* THIS is the important one */
.search-input {
    background-color: white;
    border: none;
    font-size: 32px;
    color: var(--dblue);

    flex: 1 1 auto;
    min-width: 0;        /* allows shrinking inside flexbox */
    width: 100%;         /* ensures it fills remaining space */
    outline: none;
}

.search-input::placeholder {
    color: var(--dblue);
    opacity: 1;
}

/* keep button only as wide as icon */
.search-submit {
    color: var(--d-grey);
    background-color: white;
    border: none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 32px;
    transition: background-color .2s ease, color .2s ease, border .2s ease;
}

.search-submit:hover {
    color: var(--dblue);
}

.mini-search-input-group {
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--lblue);
    width: 100%;
}

/* THIS is the important one */
.mini-search-input {
    background-color: var(--highlight-blue);
    border: none;
    font-size: 20px;
    color: var(--dblue);

    flex: 1 1 auto;
    min-width: 0;        /* allows shrinking inside flexbox */
    width: 100%;         /* ensures it fills remaining space */
    outline: none;
}

.mini-search-input::placeholder {
    color: var(--d-blue);
    opacity: 1;
}

/* keep button only as wide as icon */
.mini-search-submit {
    color: var(--d-grey);
    background-color: transparent;
    border: none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background-color .2s ease, color .2s ease;
}

.mini-search-submit:hover {
    color: var(--d-blue);
}

/* ── Navbar search ──────────────────────────────────────────────────────── */

/* Desktop search bar: hidden below 800px, shown 800px+ */
.navbar-search-wrapper {
    display: none;
    align-items: center;
}
@media (min-width: 992px) {
    .navbar-search-wrapper {
        display: flex;
    }
}

/* Mobile search in collapse: shown below 800px only */
.navbar-search-mobile {
    width: 100%;
    display: none;
}
@media (max-width: 991px) {
    .navbar-search-mobile {
        display: block;
    }
}


.navbar-search-input-group {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--lblue);
    width: 100%;
}

.navbar-search-input {
    background-color: var(--highlight-blue);
    border: none;
    font-size: 16px;
    color: var(--dblue);
    padding: 6px 10px;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    outline: none;
}

.navbar-search-input::placeholder {
    color: var(--dblue);
    opacity: 1;
}

.navbar-search-submit {
    color: var(--d-grey);
    background-color: transparent;
    border: none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    padding: 6px 10px;
    transition: color .2s ease;
}

.navbar-search-submit:hover {
    color: var(--dblue);
}

.navbar-search-info {
    flex-shrink: 0;
    color: #000;
    font-size: 16px;
    padding: 0 8px;
    transition: color .2s ease;
    text-decoration: none;
}
.navbar-search-info:hover {
    color: var(--lblue);
}

.navbar-search-wrapper .ac-dropdown,
.navbar-search-mobile .ac-dropdown {
    z-index: 1001;
}

#highlight-blue-line {
    border-bottom: 3px solid var(--lblue);
    bottom: -21px;
    width: 100%;
}


.mini-timeline-search {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--lblue);
    width: 100%;
    max-width: 350px;
}

.mini-timeline-search-input::placeholder {
    color: var(--d-grey) !important;
}

.mini-timeline-search input {
    background-color: transparent;
    border: none;
    font-size: 16px;
    color: var(--dblue);
    flex: 1 1 auto;
    min-width: 0;        /* allows shrinking inside flexbox */
    width: 100%;         /* ensures it fills remaining space */
    outline: none;
}

/* Base state: hidden + slightly lower */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s ease;
  will-change: opacity, transform;
}

/* Visible state */
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mw-footer {
  width: 90vw;
  max-width: 1100px;
}

/* FEEDBACK FORM */

.feedback-toggle-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1049;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--lblue);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s;
}
.feedback-toggle-btn:hover {
    background-color: var(--dblue);
    transform: scale(1.08);
}

.feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 1048;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.feedback-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.feedback-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 400px;
    z-index: 1049;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}
.feedback-panel.is-open {
    transform: translateX(0);
}

.feedback-panel-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}
.feedback-panel-title {
    font-weight: 600;
    font-size: 0.95rem;
}
.feedback-close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0 0.25rem;
}
.feedback-close-btn:hover { color: #000; }

.feedback-panel-body {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}

.feedback-rating-row {
    display: flex;
    gap: 0.5rem;
}
.feedback-rating-btn {
    flex: 1;
    padding: 0.4rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feedback-rating-btn:hover {
    border-color: var(--lblue);
    color: var(--lblue);
}
.feedback-rating-btn.selected[data-rating="positive"] {
    background: #d1e7dd;
    border-color: #198754;
    color: #198754;
}
.feedback-rating-btn.selected[data-rating="negative"] {
    background: #f8d7da;
    border-color: #dc3545;
    color: #dc3545;
}

@media (max-width: 576px) {
    .feedback-panel {
        width: 100%;
    }
}

.feedback-success-state {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 1rem;
}
.feedback-success-state .bi {
    font-size: 2rem;
}
#feedback-submit-btn {
    font-size: 16px;
}

#footer {
    border-bottom: 10px solid var(--dblue);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in-section {
    transition: none;
    transform: none;
  }
}

@media (max-width: 920px) {
    .content-width {
        width: 100% !important;
        padding: 0 20px !important;
    }
}

@media (max-width: 768px) {
    #footer {
        padding: 2rem !important;
        padding-bottom: 6rem !important;
    }

    .mw-footer {
        width: unset !important;
    }

    #footer .w-50 {
        width: 100% !important;
    }

    #footer-nav-links {
        justify-content: flex-start !important;
    }

    .flex-row-break {
        flex-direction: column !important;
    }
}


/* ── Back to top ──────────────────────────────────────────────────────────── */

#back-to-top {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 500;
    padding: 12px 20px;
    padding-left: 16px;
    font-size: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#back-to-top i {
    margin-right: 6px;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:hover {
    background-color: var(--dblue);
    color: white;
    border-color: var(--dblue);
}

@media (max-width: 850px) {
    .search-input {
        font-size: 24px;
    }
    .search-submit {
        font-size: 24px;
    }
}

@media (max-width: 992px) {
    #navbar-search-wrapper {
        display: none !important;
    }
    .header-items-wrapper {
        margin-top: 0px !important;
    }
    #highlight-blue-line {
        display: none;
    }
}

#navbar-search-wrapper {
    right: 50%;
    transform: translateX(50%);
    padding: 16px;
    top: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.2);
    background-color: white;
    gap: .5rem;
}

.top-shadow {
    box-shadow: inset 0 100px 40px -10px var(--highlight-blue);
    background-color: white;
}