/* ============================================================
   WorldWideRide.ca — Static Site Stylesheet
   Version: 4.3
   Updated: 2026-03-21
   Changes: YouTube thumbnail widget, version bump
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Open+Sans:wght@300;400;600&display=swap');

:root {
  --bg-main: #5a5550;
  --bg-center: #6b6560;
  --bg-nav: #4a4540;
  --accent-blue: #4db8e8;
  --accent-cyan: #00bcd4;
  --text-light: #f0ece4;
  --text-muted: #c8c0b0;
  --border-subtle: rgba(255,255,255,0.1);
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --max-width: 854px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--bg-main);
  background-image: url('../images/bg-map.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center top;
  min-height: 100vh;
}

a { color: var(--accent-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; display: block; }

/* PAGE WRAPPER */
#wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-center);
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
  min-height: 100vh;
  overflow: hidden;
}

/* HEADER */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-center);
  border-bottom: 1px solid var(--border-subtle);
}

#logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
}

#logo img { height: 60px; width: auto; }

.logo-text {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text-light);
}
.logo-text span { color: #e84040; }
.logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-top: -4px;
}

/* SOCIAL ICONS */
.social-icons { display: flex; gap: 6px; align-items: center; }
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  transition: opacity 0.2s, transform 0.2s;
}
.social-icons a:hover { opacity: 0.8; transform: translateY(-2px); }
.social-icons .fb  { background: #3b5998; }
.social-icons .tw  { background: #1da1f2; }
.social-icons .fl  { background: #ff0084; }
.social-icons .yt  { background: #ff0000; }
.social-icons .ta  { background: #34e0a1; }
.social-icons img { width: 20px; height: 20px; filter: brightness(0) invert(1); }

/* NAV */
#nav {
  background: var(--bg-nav);
  border-bottom: 1px solid rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}
#nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
#nav ul li a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  transition: background 0.2s;
}
#nav ul li a:hover,
#nav ul li a.active { background: rgba(255,255,255,0.12); color: #fff; }
#nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px 16px;
}

/* HERO SLIDER */
#hero {
  position: relative;
  width: 100%;
  height: 435px;
  overflow: hidden;
  background: #2a2520;
}
.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  padding: 10px 16px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  line-height: 1;
}
.slider-btn:hover { background: rgba(0,0,0,0.75); }
.slider-btn.prev { left: 0; }
.slider-btn.next { right: 0; }

/* STATS BAR */
.stats-bar {
  display: flex;
  justify-content: space-around;
  padding: 18px 20px;
  background: var(--bg-center);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}
.stat-item .stat-label {
  display: block;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-item .stat-value {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-light);
}

/* FEATURE BLOCKS */
.feature-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.feature-block {
  display: block;
  min-height: 130px;
  background-size: auto;
  background-position: center 30%;
  background-repeat: no-repeat;
  text-decoration: none;
}
.feature-block:hover { filter: brightness(1.1); }

/* WIDGET ROW */
.widget-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.widget-box {
  background: rgba(0,0,0,0.25);
  padding: 16px;
  min-height: 180px;
}
.widget-box h4 {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.widget-box iframe { width: 100%; border: none; }
/* YOUTUBE THUMBNAIL WIDGET */
.yt-thumb {
  display: block;
  position: relative;
  background: #000;
  line-height: 0;
}
.yt-thumb img {
  width: 100%;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.yt-thumb:hover img { opacity: 1; }
.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(255,0,0,0.85);
  border-radius: 50%;
}
.yt-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
}
.yt-thumb:hover .yt-play { background: rgba(255,0,0,1); }


/* FLICKR GRID */
.flickr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.flickr-grid a img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity 0.2s; }
.flickr-grid a:hover img { opacity: 0.8; }

/* BOTTOM ROW */
.bottom-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.bottom-box {
  background: rgba(0,0,0,0.2);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.email-signup { border: 2px solid var(--accent-cyan); }
.email-signup h4 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}
.email-signup input[type="email"] {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 13px;
  margin-bottom: 8px;
  border-radius: 2px;
}
.email-signup input::placeholder { color: rgba(255,255,255,0.5); }
.btn-group { display: flex; gap: 6px; justify-content: center; }
.btn {
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
}
.btn:hover { background: rgba(255,255,255,0.3); }
.sponsor-box img { max-width: 160px; margin-bottom: 8px; }
.sponsor-box p { font-size: 13px; color: var(--text-muted); }
.charity-box img { max-width: 140px; }
.charity-box a { color: var(--accent-blue); font-size: 13px; font-weight: 600; }

/* FOOTER */
#footer {
  background: rgba(0,0,0,0.3);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}
#footer nav a { color: var(--text-muted); margin: 0 4px; font-size: 12px; }
#footer nav a:hover { color: var(--accent-blue); }
#footer nav a + a::before { content: '|'; margin-right: 8px; color: var(--border-subtle); }

/* INNER PAGES */
.page-content { padding: 30px; }
.page-content h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  color: var(--accent-blue);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.page-content h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  color: var(--text-light);
  margin: 24px 0 10px;
}
.page-content p { margin-bottom: 14px; color: var(--text-muted); line-height: 1.7; }

/* BLOG GRID */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.blog-card {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.blog-card img { width: 100%; height: 180px; object-fit: cover; }
.blog-card .card-body { padding: 14px; }
.blog-card h3 { font-family: 'Oswald', sans-serif; font-size: 1rem; color: var(--text-light); margin-bottom: 6px; }
.blog-card .card-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.blog-card p { font-size: 13px; }

/* RESPONSIVE */
@media (max-width: 768px) {
  :root { --max-width: 100%; }
  #header { flex-wrap: wrap; gap: 10px; }
  #nav ul { display: none; flex-direction: column; }
  #nav ul.open { display: flex; }
  #nav-toggle { display: block; }
  .feature-blocks, .widget-row, .bottom-row { grid-template-columns: 1fr; }
  .stats-bar { flex-direction: column; gap: 10px; }
  .blog-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .logo-text { font-size: 1.4rem; }
  #hero { height: 220px; }
}
/* Logo fallback thumbnail — contain instead of crop */
.blog-card img.logo-thumb {
  object-fit: contain;
  background: #1c1c2e;
  padding: 40px 20px;
}