/* Shared styles for all pages. Loaded after Bootstrap so these rules win. */

:root {
  --brand: #ce1b28;
  --footer-bg: rgb(41, 40, 40);
}

/* Font sizes scale with screen width, capped at the original desktop sizes. */
p {
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
}

h5 {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5625rem);
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1030;
  --bs-navbar-brand-color: var(--brand);
  --bs-navbar-brand-hover-color: var(--brand);
  --bs-navbar-hover-color: var(--brand);
  --bs-navbar-active-color: var(--brand);
}

/* The brand fills the free space and wraps, so the menu toggler stays on the
   same line on phones instead of dropping below the long company name. */
.navbar-brand {
  flex: 1 1 0%;
  min-width: 0;
  font-weight: bold;
  font-size: clamp(1rem, 0.8rem + 1vw, 1.5625rem);
  white-space: normal;
}

@media (min-width: 992px) {
  .navbar-collapse {
    flex-grow: 0;
  }
}

/* ---------- Section headings & cards ---------- */

.section-title {
  text-align: center;
  color: var(--brand);
}

/* 18rem wide, but allowed to shrink (margins included) on narrow phones. */
.info-card {
  flex: 0 1 18rem;
  min-width: 0;
  min-height: 12rem;
  overflow-wrap: anywhere;
}

.info-card i {
  color: var(--brand);
}

.card-title {
  color: var(--brand);
  text-align: center;
}

.card-body {
  text-align: center;
}

/* ---------- Home: hero ---------- */

/* The hero card sits in normal flow so the section grows with its text;
   the particles canvas is stretched behind it. */
#particles-js {
  position: relative;
  width: 100%;
  min-height: clamp(22rem, 60vh, 40rem);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e7e5e5;
}

#particles-js canvas {
  position: absolute;
  inset: 0;
}

.hero-card {
  position: relative;
  z-index: 1;
  background-color: #e7e5e5;
  font-family: arial;
  margin: 1.5rem 1rem;
  padding: 0 0.75rem;
  width: calc(100% - 2rem);
  max-width: 50rem;
  opacity: 90%;
}

#welcome-block {
  margin: clamp(1rem, 4vw, 40px);
}

#head2-tagline {
  font-style: italic;
  font-weight: bolder;
  color: var(--brand);
  font-size: clamp(1.5rem, 1rem + 2.5vw, 2.5rem);
}

#p-tagline {
  font-weight: bolder;
  color: black;
}

/* ---------- Home: partner logo carousel ---------- */

@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.logos {
  overflow: hidden;
  padding: 5px 0;
  white-space: nowrap;
  position: relative;
}

.logos:before,
.logos:after {
  position: absolute;
  top: 0;
  width: clamp(40px, 15vw, 250px);
  height: 100%;
  content: "";
  z-index: 2;
}

.logos:before {
  left: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0), white);
}

.logos:after {
  right: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), white);
}

.logos-slide {
  display: inline-block;
  animation: 30s slide infinite linear;
}

.logos-slide img {
  height: 30px;
  margin: 0 clamp(20px, 4vw, 40px);
}

/* ---------- About ---------- */

.about-content {
  max-width: 50rem;
}

/* Justified text leaves big gaps between words on narrow screens. */
@media (min-width: 768px) {
  .about-content {
    text-align: justify;
  }
}

/* ---------- Products ---------- */

/* 1 column on phones, 2 on tablets, 3 on desktops. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.product-card {
  border: solid;
  border-radius: 20px;
  border-color: var(--brand);
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s;
}

.product-card:hover {
  transform: scale(1.05);
}

.product-card img {
  height: 50px;
  max-width: 85%;
  object-fit: contain;
}

/* ---------- Footer ---------- */

.site-footer {
  background-color: var(--footer-bg);
  color: whitesmoke;
  margin-top: 100px;
  padding: 30px 1rem 0;
}

.site-footer h3,
.site-footer a,
.site-footer hr {
  color: whitesmoke;
}

.copyright {
  text-align: center;
  margin: 0;
  padding: 1rem 0;
}
