/* ¡El Tour — BikeMexico.com lifetime archive
   Faithful port of the original 2002–2020 site theme (main.css, tours.css,
   costs.css, itin.css, index.css) rebuilt as one responsive stylesheet.
   Palette: teal #2a5f55 / deep teal #004040 / gold #fcb404 / cream #fcf2b0 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --teal: #2a5f55;
  --teal-dark: #004040;
  --gold: #fcb404;
  --gold-soft: #fce444;
  --cream: #fcf2b0;
  --paper: #ffffff;
  --page-width: 760px;
}

body {
  background: white url("../img/background.gif") scroll;
  color: black;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
}

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 7px 10px 30px 10px;
}

a:link { color: var(--teal); }
a:visited { color: var(--teal); }
a:active { color: #f00; }
a:hover { background: var(--gold); }

a.x {
  text-decoration: none;
  font-weight: 600;
  color: var(--teal);
}
a.x:hover { background-color: var(--teal); color: #fff; }

/* ---------- Masthead ---------- */

.masthead {
  position: relative;
  margin-bottom: 4px;
}
.masthead .sky {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.masthead .sun {
  position: absolute;
  top: 8px;
  left: 12px;
  height: 130px;
  width: auto;
}
.masthead .titleMain {
  position: absolute;
  top: 10px;
  left: 160px;
  font-family: "Century Gothic", "Avant Garde", Arial, sans-serif;
  font-size: 64px;
  font-weight: bold;
  color: var(--gold);
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  line-height: 1;
  white-space: nowrap;
}
.masthead .titleSub {
  position: absolute;
  top: 84px;
  left: 164px;
  font-size: 19px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  white-space: nowrap;
}
.masthead .bikemexico {
  position: absolute;
  right: 8px;
  top: 6px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
}
.masthead .archivenote {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 12px;
  font-weight: bold;
  color: #000;
  background: var(--gold-soft);
  border: 1px solid #fcb404;
  padding: 1px 7px;
}

@media (max-width: 560px) {
  .masthead .titleMain { font-size: 42px; left: 118px; top: 22px; }
  .masthead .titleSub { font-size: 13px; left: 121px; top: 72px; }
  .masthead .sun { height: 96px; }
  .masthead .bikemexico { display: none; }
}

/* ---------- Navigation ---------- */

.nav {
  background-color: var(--gold-soft);
  border: 1px solid var(--gold);
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  margin: 6px 0 14px 0;
  padding: 5px 2px;
}
.nav:hover { border-color: red; }
.nav a {
  padding: 5px 6px;
  text-decoration: none;
  color: var(--teal);
  white-space: nowrap;
}
.nav a:hover { background: var(--teal); color: var(--gold); }
.nav a.here { background: var(--teal); color: #fff; }

/* ---------- Headings & text ---------- */

h1 { margin: 6px 0 10px 0; font-size: 27px; }
h2 { margin: 18px 0 8px 0; font-size: 21px; }
h3 { margin: 14px 0 6px 0; font-size: 17px; }

.main {
  margin: 3px 0 10px 0;
  text-align: justify;
}
.start {
  font-size: 18px;
  font-weight: bold;
  font-variant: small-caps;
}
.fine { font-size: 65%; }
.small { font-size: 80%; }
.red { color: red; }
.important { color: red; font-weight: bold; }

img.bannerimage {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid black;
}

/* ---------- Season / section bars (tours page) ---------- */

.sectionname {
  font-family: "Avant Garde", Arial, sans-serif;
  clear: both;
  background-color: var(--teal-dark);
  letter-spacing: 14px;
  text-indent: 14px;   /* balance the trailing letter-space */
  font-size: 12px;
  text-align: center;
  font-weight: bold;
  color: white;
  margin: 0;
  padding: 3px 0;
  border-bottom: 5px white solid;
}

.seasonbar {
  font-family: "Avant Garde", Arial, sans-serif;
  background-color: var(--teal);
  color: var(--gold-soft);
  letter-spacing: 6px;
  text-indent: 6px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  padding: 5px 0;
  margin: 26px 0 8px 0;
  border-bottom: 3px solid var(--gold);
}
.seasonbar:first-of-type { margin-top: 8px; }

/* ---------- Tour cards ---------- */

.tour {
  margin-bottom: 20px;
  border: 1px solid black;
  background: rgba(255,255,255,.75);
}
.tourname {
  font-family: "Avant Garde", Arial, sans-serif;
  background-color: black;
  font-size: 19px;
  text-align: center;
  font-weight: bold;
  color: var(--gold);
  padding: 2px 4px;
  border-bottom: 1px white solid;
}
.tourname a { color: var(--gold); text-decoration: none; }
.tourname a:hover { background: var(--gold); color: black; }

.tourgrid {
  display: grid;
  grid-template-columns: 102px 130px 96px 1fr;
  gap: 1px;
  background: black;
}
.tourgrid > div { background: white; }

.tourpic { width: 102px; }
.tourpic img { width: 100px; height: 100px; display: block; margin: 1px; object-fit: cover; }

.tourdates {
  text-align: center;
  padding: 8px 6px;
  font-size: 13px;
}
.tourcost {
  text-align: center;
  padding: 8px 4px;
  font-size: 15px;
}
.tourcost .fine { display: block; }
.tourblurb {
  font-size: 12px;
  padding: 5px 7px;
  text-align: left;
}
.tourlinks {
  background-color: var(--cream);
  color: black;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  border-top: 1px solid black;
  padding: 4px 0;
}
.tourlinks a { color: var(--teal); text-decoration: none; padding: 2px 4px; }
.tourlinks a:hover { background: var(--teal); color: var(--gold); }

@media (max-width: 620px) {
  .tourgrid { grid-template-columns: 102px 1fr 1fr; }
  .tourblurb { grid-column: 1 / -1; }
}

/* diff labels inside blurbs */
a.diffpoplink, span.diff {
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

/* ---------- Season jump index ---------- */

.jumpbar {
  border: 1px solid black;
  background: var(--paper);
  padding: 7px 9px;
  font-size: 13px;
  margin-bottom: 14px;
  text-align: center;
}
.jumpbar a {
  display: inline-block;
  text-decoration: none;
  font-weight: bold;
  color: var(--teal);
  padding: 1px 6px;
}
.jumpbar a:hover { background: var(--teal); color: var(--gold); }

/* ---------- Intro tables (tour detail pages) ---------- */

table.introtable {
  font-size: 14px;
  width: 100%;
  border: 1px solid black;
  border-collapse: collapse;
  background: rgba(255,255,255,.75);
}
table.introtable td {
  padding: 6px 8px;
  vertical-align: top;
}
img.route {
  max-width: 100%;
  height: auto;
  border: 1px solid #666;
  background: #fff;
}

/* ---------- Itinerary ---------- */

.itin {
  border: 1px solid black;
  font-size: 13px;
  background: rgba(255,255,255,.85);
}
.itin .titlerow {
  display: grid;
  grid-template-columns: 110px 170px 70px 1fr;
  background: var(--teal-dark);
  color: white;
  font-weight: bold;
}
.itin .row {
  display: grid;
  grid-template-columns: 110px 170px 70px 1fr;
  border-top: 1px solid #999;
}
.itin .row:nth-child(even) { background: #f7f7f7; }
.itin .row:nth-child(odd) { background: #e9e9e9; }
.itin .cell, .itin .title { padding: 4px 6px; }
.itin details { display: inline; }
.itin summary {
  display: inline;
  cursor: pointer;
  color: var(--teal);
  font-weight: bold;
  font-size: 11px;
}
.itin summary:hover { background: var(--gold); }
.itin .daydetail {
  display: block;
  margin: 5px 0 3px 0;
  padding: 6px 8px;
  border: 1px solid var(--teal);
  background: #fffef2;
  text-align: justify;
}
@media (max-width: 620px) {
  .itin .titlerow, .itin .row { grid-template-columns: 84px 1fr 60px; }
  .itin .highlights { grid-column: 1 / -1; border-top: 1px dotted #bbb; }
}

/* ---------- Costs tables ---------- */

table.costs {
  font-size: 14px;
  width: 100%;
  border: 1px solid black;
  border-collapse: collapse;
  background: rgba(255,255,255,.85);
}
table.costs th, table.costs td {
  border: 1px solid black;
  padding: 3px 6px;
}
table.costs td { text-align: center; }
table.costs td.l { text-align: left; }
.titlerow  { background-color: #ffffcc; text-align: center; }
.titlerow2 { background-color: #ffffaa; text-align: center; }
table.costs tr:nth-child(even) { background-color: #f7f7f7; }
table.costs tr:nth-child(odd)  { background-color: #e7e7e7; }
table.costs tr.titlerow, table.costs tr.titlerow2 { background-color: #ffffcc; }

/* price-history bars */
.pricebar {
  display: inline-block;
  height: 11px;
  background: linear-gradient(to right, var(--gold), #e09b00);
  border: 1px solid #8a5f00;
  vertical-align: middle;
  margin-right: 5px;
}
.timelinewrap { overflow-x: auto; }

/* ---------- Footer ---------- */

.foot {
  margin-top: 34px;
  border-top: 2px solid #9e9e9e;
  padding-top: 8px;
  font-size: 12px;
}
.foot .endlinks {
  background-color: var(--gold-soft);
  border: 1px solid var(--gold);
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  padding: 5px 2px;
  margin-bottom: 10px;
}
.foot .endlinks a {
  padding: 4px 5px;
  text-decoration: none;
  color: var(--teal);
  white-space: nowrap;
}
.foot .endlinks a:hover { background: var(--teal); color: var(--gold); }
.foot .contact {
  text-align: right;
  font-weight: bold;
  font-size: 11px;
}
.foot .archive-disclaimer {
  font-size: 11px;
  color: #555;
  text-align: center;
  margin: 8px 0;
}

/* ---------- About page ---------- */

.guide {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
  border-top: 2px solid #9e9e9e;
  padding: 14px 0;
  align-items: center;
}
.guide img { width: 100%; max-width: 300px; height: auto; border: 1px solid #666; }
.guide .bio { text-align: justify; }
@media (max-width: 560px) {
  .guide { grid-template-columns: 1fr; }
}

/* ---------- Reviews ---------- */

.review {
  border: 1px solid black;
  background: rgba(255,255,255,.8);
  margin: 0 0 14px 0;
  padding: 8px 11px;
  font-size: 14px;
}
.review .who {
  font-weight: bold;
  color: var(--teal-dark);
  font-size: 12px;
  margin-top: 6px;
}
.review .tourtag {
  float: right;
  font-size: 11px;
  background: var(--cream);
  border: 1px solid var(--gold);
  padding: 0 5px;
  margin-left: 8px;
}

/* ---------- Home page two-column ---------- */

.homegrid { }
.homegrid .photo-r { float: right; margin: 0 0 8px 14px; width: 400px; max-width: 60%; height: auto; }
.homegrid .photo-l { float: left; margin: 0 14px 8px 0; width: 400px; max-width: 60%; height: auto; }
.clear { clear: both; }

/* inline expandable popups (replacing dom-drag popups) */
details.pop { display: inline; }
details.pop summary {
  display: inline;
  cursor: pointer;
  font-weight: 600;
  color: var(--teal);
  list-style: none;
}
details.pop summary::-webkit-details-marker { display: none; }
details.pop summary:hover { background-color: var(--teal); color: #fff; }
details.pop .popbody {
  display: block;
  margin: 8px 0;
  padding: 8px 10px;
  border: 2px solid var(--teal-dark);
  background: #fffef2;
  font-size: 13px;
  text-align: justify;
}
details.pop .popbody .poptitle {
  display: block;
  font-weight: bold;
  letter-spacing: 6px;
  font-size: 12px;
  background: var(--teal-dark);
  color: #fff;
  text-align: center;
  margin: -8px -10px 7px -10px;
  padding: 2px 0;
}

/* ---------- Photo albums ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.gallery figure {
  border: 1px solid black;
  background: rgba(255,255,255,.85);
  padding: 4px;
  font-size: 11px;
}
.gallery figure img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  border: 1px solid #666;
}
.gallery figcaption { padding: 3px 2px 1px 2px; text-align: left; }
