/* ==========================================================================
   Outdoor Gear Doctor — Custom styles (layered on top of Bootstrap 5)
   Palette: Canadian Rockies — forest greens, slate, warm amber, off-white
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  --color-primary:    #2D5016;  /* Deep forest green */
  --color-secondary:  #6B7C5C;  /* Sage green */
  --color-accent:     #C17F24;  /* Warm amber */
  --color-dark:       #1A1A1A;  /* Near black */
  --color-light:      #F5F2ED;  /* Warm off-white */
  --color-text:       #333333;  /* Body text */
  --font-heading:     'Georgia', 'Times New Roman', serif;
  --font-body:        'Arial', 'Helvetica Neue', sans-serif;
  --border-radius:    6px;
  --transition:       0.3s ease;
  --max-width:        1200px;
}

/* ---- Skip navigation link (visually hidden until focused) --------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
}
.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  overflow: visible;
  padding: 0.6rem 1.2rem;
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  outline: 3px solid var(--color-accent);
}

/* ---- Base --------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-light);
  /* Ensure the sticky footer sits at the bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 700;
}

a { color: var(--color-primary); }
a:hover { color: var(--color-accent); }

.section-title {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* Utility section spacing */
.section { padding: 4rem 0; }
.bg-light-warm { background-color: var(--color-light); }
/* bg-sage uses --color-primary (#2D5016) for WCAG AA contrast 8.5:1 with white */
.bg-sage { background-color: var(--color-primary); color: #fff; }

/* ---- Buttons ------------------------------------------------------------ */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  transition: var(--transition);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-accent {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transition: var(--transition);
}
.btn-accent:hover,
.btn-accent:focus {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ---- Navigation --------------------------------------------------------- */
.navbar {
  background-color: var(--color-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
}
.navbar-brand img { height: 48px; width: auto; }
.navbar-brand span { line-height: 1.1; }
.navbar-brand .brand-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  text-transform: uppercase;
}
.navbar .nav-link {
  color: #e8e8e8;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  transition: var(--transition);
}
.navbar .nav-link:hover,
.navbar .nav-link:focus { color: var(--color-accent); }
/* Highlight the link for the current page */
.navbar .nav-link.active {
  color: #fff;
  border-bottom: 3px solid var(--color-accent);
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 7rem 1rem;
  background:
    linear-gradient(rgba(26, 26, 26, 0.55), rgba(26, 26, 26, 0.55)),
    url("../images/hero-background.jpg") center/cover no-repeat;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.hero p.lead {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  max-width: 720px;
  margin: 1rem auto 2rem;
}

/* Smaller page banner for interior pages */
.page-banner {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 3.5rem 1rem;
  background:
    linear-gradient(rgba(45, 80, 22, 0.7), rgba(26, 26, 26, 0.7)),
    url("../images/hero-background-alt.jpg") center/cover no-repeat;
}
.page-banner h1 { color: #fff; margin: 0; }

/* ---- Cards -------------------------------------------------------------- */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}
.card-img-top {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}
.icon-card .icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

/* Product price tag */
.price {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1.25rem;
}

/* ---- Service / list blocks --------------------------------------------- */
.feature-list {
  list-style: none;
  padding-left: 0;
}
.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.5rem;
}
.feature-list li::before {
  content: "\2713"; /* check mark */
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ---- Swiper carousel ---------------------------------------------------- */
.mySwiper { padding: 1rem 0 3rem; }
.mySwiper .swiper-slide {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  background: #fff;
}
.mySwiper .swiper-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.swiper-button-next,
.swiper-button-prev { color: var(--color-accent); }
.swiper-pagination-bullet-active { background-color: var(--color-accent); }

/* ---- Vendor logos ------------------------------------------------------- */
.vendor-logo {
  max-height: 90px;
  width: auto;
  margin: 1rem auto;
  filter: grayscale(20%);
  transition: var(--transition);
}
.vendor-logo:hover { filter: grayscale(0%); transform: scale(1.05); }

/* ---- Contact form ------------------------------------------------------- */
.contact-form label { font-weight: 600; color: var(--color-primary); }
.contact-form .form-control,
.contact-form .form-select {
  border-radius: var(--border-radius);
  border: 1px solid #cfcabd;
}
.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 0.2rem rgba(193, 127, 36, 0.2);
}
.form-feedback { display: none; margin-top: 1rem; }

/* ---- Map ---------------------------------------------------------------- */
.map-container {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.map-container iframe { display: block; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-dark);
  color: #d8d8d8;
  padding: 3rem 0 1.5rem;
  flex-shrink: 0;
}
.site-footer h5 { color: #fff; }
.site-footer a { color: var(--color-accent); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .footer-nav { list-style: none; padding-left: 0; }
.site-footer .footer-nav li { margin-bottom: 0.35rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
}

/* ---- Alerts / notices --------------------------------------------------- */
.notice {
  background-color: #fff8ec;
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
}

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */

/* Mobile (max 576px) */
@media (max-width: 576px) {
  .hero { padding: 4.5rem 1rem; }
  .section { padding: 2.5rem 0; }
  .navbar-brand .brand-text { font-size: 1rem; }
}

/* Tablet (577px – 991px) */
@media (min-width: 577px) and (max-width: 991px) {
  .section { padding: 3rem 0; }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
  .container-narrow { max-width: var(--max-width); }
}

/* ==========================================================================
   Print styles — hide navigation, footer, carousel controls and maps
   ========================================================================== */
@media print {
  .navbar,
  .site-footer,
  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination,
  .map-container,
  .hero,
  .page-banner { display: none !important; }

  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
