/*
 * The Mobile Voice: child template of Cassiopeia.
 * Recreates the former Qualify-based design (flag-stripe header, slideshow, grey search bar, plain left menu).
 */

:root {
  --tmv-red: #b82b33;
  --tmv-red-dark: #962229;
  --tmv-navy: #282c6c;
  --tmv-frame: #333333;
  --tmv-grey: #e6e6e6;
  --tmv-grey-line: #cfcfcf;
  --tmv-text: #333333;

  --cassiopeia-color-primary: var(--tmv-navy);
  --cassiopeia-color-link: var(--tmv-navy);
  --cassiopeia-color-hover: var(--tmv-red);
  --link-color: var(--tmv-navy);
  --link-color-rgb: 40, 44, 108;
  --link-hover-color: var(--tmv-red);
  --link-hover-color-rgb: 184, 43, 51;
}

body {
  color: var(--tmv-text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

/* ---------- Header: red / white / navy stripes, same geometry as images/headers/header.png ---------- */
.container-header {
  background: linear-gradient(to bottom,
      var(--tmv-frame) 0 3px,
      var(--tmv-red) 3px 23px,
      #ffffff 23px 60px,
      var(--tmv-navy) 60px 79px,
      var(--tmv-frame) 79px 82px);
  box-shadow: none;
  min-height: 82px;
}

.container-header .grid-child {
  padding-top: 0;
  padding-bottom: 0;
}

.container-header .navbar-brand {
  margin: 0;
  padding: 0;
}

.container-header .brand-logo {
  display: block;
  line-height: 0;
}

.container-header .brand-logo img {
  display: block;
  height: 82px;
  width: auto;
  max-width: none;
}

/* ---------- Slideshow (module "Slideshow", position top-a) ---------- */
.container-top-a,
.container-top-b {
  margin-top: 1rem;
}

.tmv-slideshow {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--tmv-grey-line);
  border-radius: 4px;
  background: #000;
  aspect-ratio: 950 / 290;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tmv-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.tmv-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.tmv-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tmv-slide figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.35rem 0.9rem;
  color: #fff;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.55);
  border-top-right-radius: 4px;
}

.tmv-slideshow button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.25rem;
  height: 3rem;
  margin-top: -1.5rem;
  border: 0;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: background-color 0.2s;
}

.tmv-slideshow button:hover,
.tmv-slideshow button:focus-visible {
  background: var(--tmv-red);
}

.tmv-slideshow .tmv-prev { left: 0; border-radius: 0 4px 4px 0; }
.tmv-slideshow .tmv-next { right: 0; border-radius: 4px 0 0 4px; }

/* No JavaScript: show the first slide only */
.tmv-slideshow:not(.is-ready) .tmv-slide:first-child { opacity: 1; }
.tmv-slideshow:not(.is-ready) button { display: none; }

@media (prefers-reduced-motion: reduce) {
  .tmv-slide { transition: none; }
}

/* ---------- Search bar (Smart Search module, position top-b) ---------- */
.container-top-b .mod-finder,
.container-top-b form.mod-finder {
  padding: 0.6rem;
  background: linear-gradient(to bottom, #efefef, #dcdcdc);
  border: 1px solid var(--tmv-grey-line);
  border-radius: 4px;
}

.container-top-b .mod-finder .input-group,
.container-top-b .mod-finder .awesomplete {
  flex-wrap: nowrap;
  width: 100%;
}

.container-top-b .mod-finder .awesomplete {
  display: flex;
  flex: 1 1 auto;
}

.container-top-b .mod-finder .input-group > .awesomplete > input,
.container-top-b .mod-finder .input-group > input {
  flex: 1 1 auto;
  width: 100%;
}

.container-top-b .mod-finder input[type="search"],
.container-top-b .mod-finder input[type="text"] {
  border-color: var(--tmv-grey-line);
  border-radius: 3px 0 0 3px;
}

.container-top-b .mod-finder .btn,
.container-top-b .mod-finder button {
  padding-inline: 1.75rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: var(--tmv-red);
  border-color: var(--tmv-red);
}

.container-top-b .mod-finder .btn:hover,
.container-top-b .mod-finder button:hover {
  background-color: var(--tmv-red-dark);
  border-color: var(--tmv-red-dark);
}

.container-top-b .mod-finder .btn .icon-search {
  display: none;
}

/* ---------- Left menu: plain list like the old site ---------- */
.container-sidebar-left .card {
  background: none;
  border: 0;
  box-shadow: none;
}

.container-sidebar-left .card-body {
  padding: 0;
}

.container-sidebar-left .card-header {
  padding: 0 0 0.25rem;
  margin-bottom: 0.4rem;
  color: var(--tmv-navy);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  background: none;
  border-bottom: 2px solid var(--tmv-red);
}

.container-sidebar-left .mod-menu {
  padding: 0;
  margin: 0 0 1.25rem;
  list-style: none;
}

.container-sidebar-left .mod-menu > li {
  border-bottom: 1px solid #eeeeee;
}

.container-sidebar-left .mod-menu a,
.container-sidebar-left .mod-menu .mod-menu__separator,
.container-sidebar-left .mod-menu .mod-menu__heading {
  display: block;
  padding: 0.3rem 0.2rem;
  color: var(--tmv-text);
  font-size: 0.9rem;
  text-decoration: none;
}

.container-sidebar-left .mod-menu a:hover,
.container-sidebar-left .mod-menu .current > a,
.container-sidebar-left .mod-menu .active > a {
  color: var(--tmv-red);
}

.container-sidebar-left .mod-menu .current > a,
.container-sidebar-left .mod-menu .active > a,
.container-sidebar-left .mod-menu a[aria-current] {
  font-weight: 700;
  text-decoration: none;
}

/* Hide Cassiopeia's red "current" accent bar so the list stays plain */
.container-sidebar-left .mod-menu .current > a::before,
.container-sidebar-left .mod-menu .active > a::before {
  display: none;
}

/* ---------- Content ---------- */
.container-component h1,
.container-component h2,
.container-component .page-header h2 a,
.container-component .item-title a {
  color: var(--tmv-text);
}

.container-component .page-header a,
.container-component .item-title a {
  text-decoration: none;
}

.container-component .page-header h2 a:hover,
.container-component .item-title a:hover {
  color: var(--tmv-red);
}

.blog-featured .page-header h2,
.blog .page-header h2,
.blog-featured .item-title,
.blog .item-title,
.blog-items .item-title {
  font-size: 1.15rem;
  line-height: 1.3;
}

.blog-featured .items-leading .item-title,
.blog .items-leading .item-title {
  font-size: 1.6rem;
}

.blog-featured .blog-items,
.blog .blog-items {
  column-gap: 1.75rem;
}

.com-content-article .page-header h1,
.com-content-article .page-header h2 {
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--tmv-red);
}

.btn-primary,
.readmore .btn {
  background-color: var(--tmv-navy);
  border-color: var(--tmv-navy);
}

.btn-primary:hover,
.readmore .btn:hover {
  background-color: var(--tmv-red);
  border-color: var(--tmv-red);
}

.mod-breadcrumbs__wrapper .breadcrumb {
  font-size: 0.85rem;
  background: none;
}

/* ---------- Footer & back-to-top ---------- */
.container-footer {
  background: var(--tmv-navy);
  border-top: 4px solid var(--tmv-red);
}

.back-to-top-link {
  background-color: var(--tmv-red);
}

/* ---------- Tablet & mobile: menu above the content, as compact pills ---------- */
@media (max-width: 991.98px) {
  .site-grid {
    grid-template-areas:
      ". banner banner banner banner ."
      ". top-a top-a top-a top-a ."
      ". top-b top-b top-b top-b ."
      ". side-l side-l side-l side-l ."
      ". comp comp comp comp ."
      ". side-r side-r side-r side-r ."
      ". bot-a bot-a bot-a bot-a ."
      ". bot-b bot-b bot-b bot-b .";
  }

  .container-sidebar-left .mod-menu {
    display: flex;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
  }

  .container-sidebar-left .mod-menu > li {
    flex: 0 0 auto;
    width: auto;
    border: 0;
  }

  .container-sidebar-left .mod-menu a,
  .container-sidebar-left .mod-menu .mod-menu__separator,
  .container-sidebar-left .mod-menu .mod-menu__heading {
    padding: 0.3rem 0.7rem;
    background: #f2f2f2;
    border: 1px solid var(--tmv-grey-line);
    border-radius: 999px;
  }

  .container-sidebar-left .mod-menu .current > a,
  .container-sidebar-left .mod-menu a[aria-current] {
    color: #fff;
    background: var(--tmv-red);
    border-color: var(--tmv-red);
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 575.98px) {
  .container-header .brand-logo img {
    height: 70px;
  }

  .container-header {
    background: linear-gradient(to bottom,
        var(--tmv-frame) 0 3px,
        var(--tmv-red) 3px 20px,
        #ffffff 20px 51px,
        var(--tmv-navy) 51px 67px,
        var(--tmv-frame) 67px 70px);
    min-height: 70px;
  }

  .container-top-b .mod-finder .btn,
  .container-top-b .mod-finder button {
    padding-inline: 0.9rem;
  }
}
