/* ------------------------------------------
   Superior Distribution – Vendor Partnership
   Custom CSS for the vendor-facing website
   This stylesheet defines colour variables, section rhythms, navbar transparency,
   hero background/video, feature icons, statistics cards, accordion overrides
   and other visual details. Adjust the variables to refine the palette.
-------------------------------------------- */

/* Colour palette */
:root {
  --sd-red: #e53935;        /* primary red accent */
  --sd-dark: #1c1c1c;       /* dark for nav and hero overlay */
  --sd-gray-900: #2a2a2a;   /* deeper gray for backgrounds */
  --sd-gray-50: #f5f5f5;    /* light gray for subtle sections */
}

/* General typography */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Navbar styling */
.navbar {
  backdrop-filter: saturate(140%) blur(6px);
  background: rgba(28, 28, 28, 0.5) !important; /* 50% transparency for nav bar */
  transition: background-color 0.3s ease;
}
.navbar .navbar-brand span {
  color: #fff;
}
.navbar .nav-link {
  color: #d1d5db;
  transition: color 0.2s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff;
}
.navbar .btn-primary {
  background-color: var(--sd-red);
  border-color: var(--sd-red);
}
.navbar .btn-primary:hover {
  background-color: #c62828;
  border-color: #c62828;
}

/* Global primary button styling so CTAs match our brand red */
.btn-primary {
  background-color: var(--sd-red) !important;
  border-color: var(--sd-red) !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #c62828 !important;
  border-color: #c62828 !important;
  color: #fff !important;
}

/* Outline primary buttons adopt red palette */
.btn-outline-primary {
  color: var(--sd-red) !important;
  border-color: var(--sd-red) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--sd-red) !important;
  color: #fff !important;
}
.navbar .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.navbar-brand img.logo-img {
  width: 80px;
  height: 80px;
}
@media (max-width: 576px) {
  .navbar-brand img.logo-img {
    width: 64px;
    height: 64px;
  }
}

/* Hero section */
.hero {
  min-height: 90vh;
  position: relative;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -3;
}
.hero-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
  z-index: -2;
  pointer-events: none;
}
.hero-video.show {
  opacity: 1;
  visibility: visible;
}
.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 177.78vh;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(255,255,255,.08), transparent 60%), linear-gradient(180deg, rgba(28,28,28,0.75), rgba(28,28,28,0.65));
  z-index: -1;
}
.hero h1 {
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

/* Section rhythm */
.py-lg-6 {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}
.section-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: var(--sd-red);
  margin-top: 0.5rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(229, 57, 53, 0.08), 0 4px 12px rgba(229, 57, 53, 0.35);
}

/* Feature icons */
.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(229, 57, 53, 0.1);
  color: var(--sd-red);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* Override Bootstrap primary text colour to use our red accent */
.text-primary {
  color: var(--sd-red) !important;
}

/* Stat cards */
.stat-card {
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #edf2f7;
  text-align: center;
}
.stat-card .label {
  font-size: 0.9rem;
  color: #6b7280;
}
.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

/* Gallery thumbnails */
.gallery-thumb {
  cursor: pointer;
  border-radius: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Accordion custom colours */
.accordion {
  --bs-accordion-active-bg: var(--sd-gray-50);
  --bs-accordion-active-color: var(--sd-red);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(229, 57, 53, 0.25);
  --bs-accordion-border-color: #e9ecef;
}
.accordion-button:not(.collapsed) {
  border-left: 3px solid var(--sd-red);
}

/* Subtle gray background class */
.bg-gray-subtle {
  background-color: var(--sd-gray-50) !important;
}

/* Footer styling */
footer {
  background-color: #fafafa;
}

/* Badge colours for distribution centre labels */
.badge.bg-primary {
  background-color: var(--sd-red) !important;
}
.badge.bg-secondary {
  background-color: #6b7280 !important;
}

/* Anchor offset for fixed nav bar: ensures anchor targets are not hidden */
:target::before {
  content: "";
  display: block;
  height: 90px;
  margin-top: -90px;
  visibility: hidden;
}
@media (max-width: 576px) {
  :target::before {
    height: 78px;
    margin-top: -78px;
  }
}