body, p, li, a {
  text-wrap: pretty;
}

/* ==========================================================================   1. Base Styles (Mobile First - Vertical Stack Overlay)   ========================================================================== */

ul.bss-tag-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  list-style: none;
}

/* When the menu has the "show" class, make it visible */

ul.bss-tag-nav.show {
  display: flex;
  width: 220px;
}

/* Make mobile links stretch full-width */

ul.bss-tag-nav .nav-item {
  width: 100%;
}

ul.bss-tag-nav .nav-link {
  display: block;
  width: 100%;
  border-radius: 0 !important;
  color: #212529 !important;
  background: transparent !important;
  padding: 0.5rem 1.25rem;
  text-align: left;
}

/* ==========================================================================   2. Responsive Styles (Tablet & Desktop - Horizontal Overlay)   ========================================================================== */

@media (min-width: 768px) {
  ul.bss-tag-nav.show {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    position: absolute;
    width: max-content;
    max-width: 600px;
    background: var(--bs-light);
    border: 1px solid var(--bs-light);
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem var(--bs-tertiary-color);
    padding: 0.75rem;
    margin-top: 0.5rem;
  }
}

/* Style the links to look like independent horizontal pills/buttons */

@media (min-width: 768px) {
  ul.bss-tag-nav.show .nav-item {
    width: auto;
  }
}

@media (min-width: 768px) {
  ul.bss-tag-nav.show .nav-link {
    border: 1px solid rgba(6,41,25,0.13) !important;
    border-radius: 50px !important;
    padding: 0.375rem 1rem;
    text-align: center;
    white-space: nowrap;
  }
}

/* Hover effect for desktop pills */

@media (min-width: 768px) {
  ul.bss-tag-nav.show .nav-link:hover {
    background-color: var(--bs-secondary) !important;
    border-color: #bbb !important;
  }
}

/* Active highlighted pill style */

@media (min-width: 768px) {
  ul.bss-tag-nav.show .nav-link.active {
    background-color: var(--bs-warning) !important;
    color: var(--bs-light) !important;
    border-color: var(--bs-warning) !important;
  }
}

/* Slightly wider box to give the larger text room to breathe */

@media (min-width: 768px) {
  ul.bss-tag-nav.show, .dropdown-menu.show {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px !important;
  }
}

@media (min-width: 768px) {
  ul.bss-tag-nav.show .nav-item, .dropdown-menu.show .dropdown-item {
    width: auto !important;
    flex: none !important;
    margin: 0 !important;
  }
}

/* --- LARGER COMPACT PROFILE --- */

@media (min-width: 768px) {
  ul.bss-tag-nav.show .nav-link, .dropdown-menu.show a {
    display: inline-block !important;
    font-size: 1.05rem !important;
    padding: 6px 12px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
  }
}

/* Phones and smaller screens */

#special-margin-row {
  margin-top: 30px !important;
}

/* Large screens, 992px and wider */

@media (min-width: 770px) {
  #special-margin-row {
    margin-top: calc(-7rem + -5vw) !important;
  }
}

/* Tablet and smaller */

#special-margin-row {
  padding-right: 0 !important;
}

/* Large screens and bigger */

@media (min-width: 768px) {
  #special-margin-row {
    padding-right: 40vw !important;
  }
}

.blog-button {
  color: var(--bs-light);
  background-color: var(--bs-warning);
  width: 15vw;
  border: none;
  font-size: calc(1rem + .5vw);
  text-align: center;
  min-width: 159px;
  margin-top: 2rem;
  line-height: normal;
}

/* Colors and appearance shared by every button */

.site-button {
  color: var(--bs-light);
  background-color: var(--bs-primary);
}

/* Shared hover and clicked appearance */

.site-button:hover, .site-button:focus, .site-button:active {
  color: var(--bs-dark);
  background-color: var(--bs-secondary);
  border-color: transparent;
}

/* Size used by your blog-loop button */

.blog-button-size {
  width: 15vw;
  min-width: 159px;
  font-size: calc(1rem + .5vw);
}

/* Normal page numbers */

.bss-blog-loop .page-link {
  color: var(--bs-warning) !important;
}

/* Page number when hovering */

.bss-blog-loop .page-link:hover {
  color: white !important;
  background-color: var(--bs-warning) !important;
  border-color: var(--bs-warning) !important;
}

/* Currently selected page */

.bss-blog-loop .page-item.active .page-link {
  color: white !important;
  background-color: var(--bs-warning) !important;
  border-color: var(--bs-warning) !important;
}

body, p, li, a {
  text-wrap: balance;
}

/* Normal desktop navbar */

.navbar .nav-link {
  color: white !important;
}

.form-control::placeholder {
  color: var(--bs-dark) !important;
  opacity: 1 !important;
}

/* Larger screens: white navbar text */

@media (min-width: 768px) {
  #navcol-1 .nav-link {
    color: var(--bs-light) !important;
  }
}

/* Smaller screens: light menu with dark text */

@media (max-width: 767.98px) {
  #navcol-1 {
    background-color: var(--bs-light);
    padding: 16px;
    margin-top: 10px;
    border-radius: 12px;
  }
}

@media (max-width: 767.98px) {
  #navcol-1 .nav-link {
    color: var(--bs-dark) !important;
  }
}

@media (max-width: 767.98px) {
  #navcol-1 .nav-link:hover, #navcol-1 .nav-link:focus, #navcol-1 .nav-link.active {
    color: var(--bs-primary) !important;
  }
}

/* The visible window that hides off-screen logos */

.logo-marquee {
  width: calc(100%);
  overflow: hidden;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* The long moving strip */

.logo-track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  animation: logo-scroll 35s linear infinite;
}

/* Each identical group of logos */

.logo-set {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-right: clamp(1.5rem, 4vw, 4rem);
}

/* Movement */

@keyframes logo-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Stops movement for people who disable animations */

@media (prefers-reduced-motion: reduce) {
  .logo-track {
    animation: none;
    transform: none;
  }
}

.marquee-logo {
  display: block;
  width: auto;
  height: clamp(70px, 10vw, 100px);
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .marquee-logo {
    height: 130px;
  }
}

@media (min-width: 992px) {
  .logo-microsoft {
    height: 50px !important;
  }
}

@media (min-width: 992px) {
  .logo-sophos {
    height: 40px !important;
  }
}

@media (min-width: 992px) {
  .logo-getac {
    height: 50px !important;
  }
}

@media (min-width: 992px) {
  .logo-hp {
    height: 70px !important;
  }
}

@media (min-width: 992px) {
  .logo-lenovo {
    height: 55px !important;
  }
}

@media (min-width: 992px) {
  .logo-msp {
    height: 40px !important;
  }
}

@media (min-width: 992px) {
  .logo-ubi {
    height: 50px !important;
  }
}

@media (min-width: 150px) {
  .logo-peplink {
    height: 90px !important;
  }
}

@media (min-width: 992px) {
  .logo-bar {
    height: 55px !important;
  }
}

.service-tabs {
  gap: 0.4rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 3rem;
  padding: 0.4rem;
  background-color: var(--bs-danger);
  border-radius: 50px;
}

.service-tabs .nav-link {
  padding: 0.75rem 1.4rem;
  border: none;
  border-radius: 50px;
  color: var(--bs-dark);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.service-tabs .nav-link:hover {
  background-color: var(--bs-primary);
  color: var(--bs-light);
}

.service-tabs .nav-link.active {
  background-color: var(--bs-warning) !important;
  color: var(--bs-light) !important;
}

.service-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background-color: var(--bs-danger);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  background-color: var(--bs-secondary);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  margin-bottom: 0;
  line-height: 1.6;
}

.service-card i, .service-card svg {
  display: block;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

/* ========================================   SMALL HISTORY EVENT======================================== */

.history-track .history-event.history-event-small {
  flex: 0 0 clamp(173px, 13.2vw, 210px) !important;
  width: clamp(173px, 13.2vw, 210px) !important;
  min-width: clamp(173px, 13.2vw, 210px) !important;
  max-width: clamp(173px, 13.2vw, 210px) !important;
  min-height: 0 !important;
  height: fit-content !important;
  align-self: flex-start;
  padding: 0.9rem 1rem;
}

.history-event-small .history-event-date {
  margin-bottom: 0.65rem;
  font-size: 0.7rem;
  line-height: 1.15;
}

.history-event-small .history-event-title {
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
  line-height: 1.2;
}

.history-event-small .history-event-description {
  margin-bottom: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ========================================   SMALL HISTORY EVENT — MOBILE======================================== */

@media (max-width: 767.98px) {
  .history-track .history-event.history-event-small {
    flex: 0 0 48vw !important;
    width: 48vw !important;
    min-width: 48vw !important;
    max-width: 48vw !important;
  }
}

/* ========================================   TEXT-ONLY HISTORY EVENTS   HEIGHT BASED ON CONTENT======================================== */

.history-track .history-event.history-event-text {
  min-height: 0 !important;
  height: fit-content !important;
  align-self: flex-start;
}

/* More space between copy and image */

/* ========================================   HISTORY EVENT WITH IMAGE======================================== */

.history-event-with-image {
  min-height: 0 !important;
  height: fit-content !important;
  align-self: flex-start;
  padding-bottom: 0;
  overflow: hidden;
}

/* Fixed spacing between paragraph and image */

.history-event-with-image .history-event-description {
  margin-bottom: 0;
}

/* Image Container */

/* Image */

/* ========================================   HISTORY CARD IMAGE======================================== */

.history-event-image-wrap {
  position: relative;
  width: calc(100% + (clamp(1.25rem, 2vw, 1.75rem) * 2));
  margin-top: 1.75rem !important;
  margin-right: calc(-1 * clamp(1.25rem, 2vw, 1.75rem));
  margin-left: calc(-1 * clamp(1.25rem, 2vw, 1.75rem));
  overflow: hidden;
}

.history-event-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ========================================   HISTORY IMAGE — FINAL OVERRIDE======================================== */

/* ========================================   HISTORY IMAGE — CONSISTENT IMAGE AREA======================================== */

/* Actual image */

/* ========================================   HISTORY IMAGE — NATURAL SIZE======================================== */

.history-track .history-event.history-event-with-image {
  min-height: 0 !important;
  height: fit-content !important;
  align-self: flex-start !important;
}

