/* ==========================================================
   TrailBound Outdoor Activities - main stylesheet
   One stylesheet shared by every page.

   Colors (stored in variables so we only change them once):
   spruce green = header, headings
   lake blue    = links
   trail yellow = buttons, highlights
   ========================================================== */

:root {
  --spruce: #1f3a2e;
  --spruce-light: #2e5443;
  --lake: #2c5f7a;
  --yellow: #e8b931;
  --text: #1b2420;
  --background: #eef1ec;
  --white: #ffffff;
  --border: #c9d1c7;
}

/* ---------- Base styles ---------- */

* {
  box-sizing: border-box; /* padding and border are included in an element's width */
}

body {
  margin: 0;
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
}

h1, h2, h3 {
  font-family: "Zilla Slab", Georgia, serif;
  line-height: 1.2;
  color: var(--spruce);
}

h1 { font-size: 44px; margin: 0 0 10px; }
h2 { font-size: 28px; margin: 30px 0 10px; }
h3 { font-size: 20px; margin: 20px 0 6px; }

a { color: var(--lake); }
a:hover { color: var(--spruce); }

/* Images shrink to fit their container and never overflow the screen */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Every main content area is centered and limited to 1100px wide */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.lede { font-size: 20px; }

.meta { color: #4a5a52; margin: 0 0 6px; }

/* ---------- Header and navigation (Flexbox) ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 5%;
  background-color: var(--spruce);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  font-family: "Zilla Slab", Georgia, serif;
  font-weight: 700;
  font-size: 24px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--white);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 3px solid transparent;
}

.nav-list a:hover { border-bottom-color: var(--white); }

/* The page you are on gets a yellow underline */
.nav-list a.active { border-bottom-color: var(--yellow); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 5px 5px 5px 0;
  background-color: var(--yellow);
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  font-family: inherit;
  text-decoration: none;
  border: 2px solid var(--yellow);
  border-radius: 4px;
  cursor: pointer;
}

.btn:hover { background-color: #f2c94d; color: var(--text); }

/* Outline button: see-through with a border */
.btn-outline {
  background-color: transparent;
  color: var(--spruce);
  border-color: var(--spruce);
}

.hero .btn-outline { color: var(--white); border-color: var(--white); }
.btn-outline:hover { background-color: var(--white); color: var(--spruce); }

.btn-request.active { border-color: var(--white); }

/* ---------- Home page hero (Grid: text left, photo right) ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 60px 5%;
  background-color: var(--spruce-light);
  color: var(--white);
}

.hero h1 { color: var(--white); }

.hero img {
  width: 100%;
  border-radius: 6px;
  border: 4px solid var(--white);
}

/* ---------- Page title banner on inner pages ---------- */

.page-head {
  padding: 40px 5%;
  background-color: var(--spruce-light);
  color: var(--white);
}

.page-head h1 { color: var(--white); }
.page-head .lede { margin: 0; max-width: 700px; }

.breadcrumb { margin: 0 0 10px; }
.breadcrumb a { color: var(--white); }

/* White panel used for the "How booking works" section */
.band {
  background-color: var(--white);
  border: 1px solid var(--border);
  margin-top: 20px;
}

/* ---------- Activity cards (Grid) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 cards per row on desktop */
  gap: 25px;
}

.card {
  background-color: var(--white);
  border-top: 5px solid var(--spruce);
}

/* All card photos are the same height and get cropped to fit */
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body { padding: 15px 20px 20px; }
.card-body h2, .card-body h3 { margin-top: 0; }

/* ---------- Difficulty badges ---------- */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
}

.badge-easy { background-color: #2f7a3d; }
.badge-moderate { background-color: var(--lake); }
.badge-challenging { background-color: var(--text); }

.legend {
  background-color: var(--white);
  border-left: 6px solid var(--yellow);
  padding: 5px 20px 15px;
  margin-bottom: 30px;
}

.legend h2 { font-size: 20px; margin-top: 10px; }
.legend ul { list-style: none; padding: 0; margin: 0; }
.legend li { margin-bottom: 6px; }
.legend .badge { width: 120px; text-align: center; margin-right: 10px; }

/* ---------- Home: booking steps (Grid) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.step { border-left: 4px solid var(--yellow); padding-left: 15px; }

/* ---------- Two-column section: text and image side by side (Grid) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.split img { width: 100%; border-radius: 6px; }

/* ---------- Activity details: trip facts (Grid) ---------- */

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}

.facts div { background-color: var(--white); padding: 10px 15px; }
.facts dt { font-size: 14px; color: #4a5a52; }
.facts dd { margin: 0; font-weight: 600; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; } /* table scrolls sideways on small screens instead of breaking the page */

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
}

caption {
  text-align: left;
  font-family: "Zilla Slab", Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--spruce);
  padding: 8px 0;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

thead th { background-color: var(--spruce); color: var(--white); }

/* ---------- Guides (Grid: photo left, text right) ---------- */

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.guide {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  background-color: var(--white);
  padding: 20px;
}

.guide img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%; /* makes the photo a circle */
}

.guide h2 { margin-top: 0; }

blockquote {
  margin: 15px 0 0;
  padding-left: 15px;
  border-left: 4px solid var(--yellow);
  font-style: italic;
}

/* ---------- FAQ ---------- */

.faq details {
  background-color: var(--white);
  border-left: 4px solid var(--lake);
  margin-bottom: 8px;
}

.faq summary { padding: 12px 15px; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0; padding: 0 15px 15px; }

/* ---------- Request form ---------- */

.request-form { max-width: 650px; }

fieldset {
  background-color: var(--white);
  border: 1px solid var(--border);
  padding: 15px 20px 20px;
  margin: 0 0 25px;
}

legend {
  font-family: "Zilla Slab", Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--spruce);
  padding: 0 6px;
}

label {
  display: block;
  font-weight: 600;
  margin: 15px 0 5px;
}

input, select, textarea {
  width: 100%;
  padding: 10px;
  font-family: inherit;
  font-size: 16px;
  border: 1px solid #8b978f;
  border-radius: 4px;
}

/* Experience level: radio buttons side by side */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border: none;
  padding: 0;
  margin: 20px 0 0;
}

.radio-group legend { font-family: inherit; font-size: 17px; color: var(--text); padding: 0; margin-bottom: 5px; }
.radio-group label { display: inline; font-weight: 400; margin: 0; }
.radio-group input { width: auto; }

/* ---------- Contact (Grid) ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

address { font-style: normal; }

/* ---------- Footer (Grid) ---------- */

.site-footer {
  background-color: var(--text);
  color: #d8dfd9;
  margin-top: 30px;
  padding: 30px 5% 10px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.site-footer h2 { color: var(--white); font-size: 18px; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: #d8dfd9; }
.site-footer a:hover { color: var(--yellow); }

.copyright {
  border-top: 1px solid #3a4540;
  padding-top: 12px;
  margin-top: 25px;
  font-size: 14px;
}

/* ==========================================================
   Responsive design
   ========================================================== */

/* Tablets and small laptops: fewer columns */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: 1fr; }
}

/* Phones: everything stacks into one column */
@media (max-width: 650px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }

  /* Header stacks: logo, then menu, then button */
  .site-header { flex-direction: column; align-items: flex-start; }

  .site-header nav { width: 100%; }

  /* Menu links become a 2-column list with bigger tap areas */
  .nav-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .nav-list a {
    display: block;
    padding: 10px 0;
  }

  .hero,
  .split,
  .card-grid,
  .steps,
  .contact-grid,
  .footer-columns,
  .facts {
    grid-template-columns: 1fr;
  }

  /* Guide card: photo on top, text below */
  .guide { grid-template-columns: 1fr; }
}

/* Remove extra space above the first heading inside the white panel */
.band h2 { margin-top: 0; }
