/* ===========================
   Blat Bastards Color Palette
   =========================== */
:root {
  --bb-primary:        #1A3560; /* deep navy */
  --bb-primary-light:  #97B9DC; /* logo text blue */
  --bb-primary-soft:   #738EA1; /* steel blue */
  --bb-dark:           #232323; /* dark text */
  --bb-body-text:      #4C4C4C; /* body copy */
  --bb-bg:             #FFFFFF; /* main background */

  --bb-accent-orange:  #DF7146; /* dirt / exhaust */
  --bb-accent-red:     #DA2631; /* suit stripes */
  --bb-accent-yellow:  #FCE7A6; /* koala ear highlights */
}

/* Hero header */
.hero-header {
  padding-top: 30px;      /* smaller, so it lines up better with sidebar */
  padding-bottom: 0;
  text-align: center;
  background-color: var(--bb-bg);
  color: var(--bb-primary);
}

.hero-header .hero-image {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* ===========================
   Home hero row + sidebar
   =========================== */

/* Row containing hero (centre) + sidebar (right edge of container) */
.home-hero-row {
  display: grid;
  /* left gutter | hero | spacer | sidebar (right) */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 320px;
  column-gap: 32px;
  align-items: flex-start;
  margin-top: 20px;
}

/* Hero sits in the second column and is centred */
.hero-col {
  grid-column: 2;
  text-align: center;
}

/* Sidebar sits in the fourth column, flush with container right */
.home-sidebar {
  grid-column: 4;
  max-width: 320px;
  padding-left: 0;
}

/* Main content block under hero row */
.home-content {
  margin-top: 40px;
}

/* Mobile / narrow screens: stack hero, sidebar, then content */
@media (max-width: 768px) {
  .home-hero-row {
    display: block;          /* drop back to normal flow */
  }

  .hero-col,
  .home-sidebar {
    grid-column: auto;
  }

  .home-sidebar {
    max-width: 100%;
    padding-left: 0;
    margin-top: 20px;
  }

  .home-content {
    margin-top: 30px;
  }
}

/* Footer tweak */
.bb-footer {
  padding: 20px 0;
  font-size: 0.9rem;
  color: var(--bb-primary-soft);
  background-color: var(--bb-primary);
}

.bb-footer a {
  color: var(--bb-primary-light);
}

.bb-footer a:hover {
  color: var(--bb-accent-orange);
}

/* Top navigation colours */
.navbar-custom {
  background-color: var(--bb-primary);   /* deep navy */
  border-color: var(--bb-primary);
}

.navbar-custom .navbar-brand,
.navbar-custom .nav > li > a {
  color: #ffffff; /* light text */
}

/* Hover / active states */
.navbar-custom .nav > li > a:hover,
.navbar-custom .nav > li > a:focus {
  color: var(--bb-primary-light);
  background-color: transparent;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus {
  color: var(--bb-primary-light);
}

/* Sidebar tags */
.bb-sidebar-tags h5 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--bb-primary);
}

.bb-sidebar-tags ul {
  list-style: none;
  padding-left: 0;
}

.bb-sidebar-tags li {
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--bb-body-text);
}

/* Rides list */
.rides-list {
  margin-top: 20px;
}

.ride-item {
  margin-bottom: 1px;
  border-bottom: 1px solid #E2E8F0; /* light blue-grey divider */
  padding-bottom: 1px;
}

.ride-item:last-child {
  border-bottom: none;
}

.ride-meta {
  font-size: 1.2rem;
  color: var(--bb-accent-orange);
  margin-top: 2px; 
  margin-left: 1.5rem;
}

/* Optional: links in main content */
.home-content a {
  color: var(--bb-primary);
}

.home-content a:hover,
.home-content a:focus {
  color: var(--bb-accent-orange);
  text-decoration: none;
}

/* ==============================================
   Global big page title (Rides, Logistics, etc.)
   ============================================== */
.bb-page-title {
  text-align: center;
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  margin-top: 40px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.bb-page-title::after {
  content: "";
  display: block;
  width: 180px;
  height: 4px;
  margin: 10px auto 40px;
  background-color: #f44336; /* accent red */
}

/* Two-column logistics rows */
.logistics-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 40px 0;
}

.logistics-col {
  flex: 1 1 50%;
  padding: 10px 20px;
}

.logistics-col-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.logistics-col-video iframe {
  width: 100%;
  min-height: 260px;
}

/* Section headings inside logistics rows */
.logistics-row h2 {
  font-size: 2rem;
  font-weight: 700;
}

/* Stack logistics rows on mobile */
@media (max-width: 768px) {
  .logistics-row {
    flex-direction: column;
  }

  .logistics-col {
    flex-basis: 100%;
  }
}

/* Remove the big grey hero header with the site title */
.intro-header {
  display: none;
}

/* Add a little top padding so content doesn't hug the nav bar */
body {
  padding-top: 70px; /* tweak to match your blue navbar height */
}

/* Ride detail page */
.ride-detail-meta {
  background-color: #f7fafc;
  border-radius: 4px;
  padding: 15px 20px;
  margin-bottom: 25px;
  font-size: 1.5rem;
}

.ride-detail-meta ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ride-detail-meta li + li {
  margin-top: 4px;
}

.ride-detail-meta strong {
  color: var(--bb-primary);
}

.ride-detail-download {
  margin-top: 10px;
}

.ride-detail-content {
  margin-top: 20px;
}

.ride-detail-gallery {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Indent all ride facts except the intro line */
.ride-detail-meta li {
  margin-left: 0;           /* reset */
}

.ride-detail-meta li:not(.ride-intro) {
  margin-left: 1rem;        /* push to the right */
}

.ride-gallery-img {
  max-width: 48%;
  height: auto;
  display: block;
}

/* GPX download button base styles: use accent orange background */
.ride-download-btn.btn-primary {
  background-color: var(--bb-accent-orange);
  border-color: var(--bb-accent-orange);
}

/* Hover/focus state – slightly darker orange */
.ride-download-btn.btn-primary:hover,
.ride-download-btn.btn-primary:focus {
  background-color: #c95e34;
  border-color: #c95e34;
}

/* GPX download button text colour */
.ride-download-btn,
.ride-download-btn:visited {
  color: #ffffff !important;
}

.ride-download-btn:hover,
.ride-download-btn:focus {
  color: #ffffff !important;
}

/* Make the GPX download button text white (extra safety) */
.ride-detail-meta a.btn.btn-primary,
.ride-detail-meta a.btn.btn-primary:link,
.ride-detail-meta a.btn.btn-primary:visited {
  color: #ffffff !important;
}

.ride-intro {
  list-style: none;
  font-style: italic;
  margin-bottom: 2.0rem;
}

/* 2-wide gallery grid */
.ride-detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px auto 0;
}

/* Each cell: vertically + horizontally centered */
.ride-gallery-item {
  display: flex;
  flex-direction: column;
  justify-content: center;          /* vertical centering inside the cell */
  align-items: center;              /* horizontal centering */
  margin: 0;                        /* kill default figure margins */
  text-align: center;
  padding: 4px 0;                   /* tiny buffer so it doesn’t touch row edges */
}

/* Image */
.ride-gallery-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 4px !important;    /* override theme img margins + small gap to caption */
  border-radius: 6px;
}

/* Caption tight under image */
.ride-gallery-caption {
  margin-top: 0 !important;
  font-size: 1.25rem;
  line-height: 1.3;
  font-style: italic;
  color: var(--bb-body-text, #4C4C4C);
  text-align: center;
}

/* Stack 1-wide on small screens */
@media (max-width: 600px) {
  .ride-detail-gallery {
    grid-template-columns: 1fr;
  }
}
