/* Shared Gulf Islands page — used by liread.com/islands.htm and
   lireadgroup.com/islands-near-salt-spring-island-bc/ */

.gi-page {
  --gi-teal: #3d7a7a;
  --gi-teal-dark: #2b5c5c;
  --gi-ink: #2a2a2a;
  --gi-muted: #5b5b5b;
  --gi-line: #d9e3e3;
  --gi-paper: #ffffff;
  --gi-wash: #f4f7f7;
  --gi-gold: #c9a227;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 48px;
  color: var(--gi-ink);
  font-family: "adobe-jenson-pro-display", Georgia, "Times New Roman", serif;
}

.gi-page * {
  box-sizing: border-box;
}

.gi-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gi-teal);
  font-family: "freight-sans-pro", "Helvetica Neue", Arial, sans-serif;
}

.gi-title {
  margin: 0 0 12px;
  color: var(--gi-teal);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.gi-lede {
  max-width: 46em;
  margin: 0 auto 22px;
  text-align: center;
  font-size: 18px;
  line-height: 1.55;
  color: var(--gi-muted);
}

.gi-map-wrap {
  position: relative;
  margin: 0 0 28px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(30, 60, 60, 0.18);
  background: #1c2a2a;
}

.gi-map {
  width: 100%;
  height: 520px;
}

.gi-map-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  font-family: "freight-sans-pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--gi-ink);
  pointer-events: none;
}

.gi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: -8px 0 28px;
  font-family: "freight-sans-pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--gi-muted);
}

.gi-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gi-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.gi-swatch-major {
  background: var(--gi-teal);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--gi-teal);
}

.gi-swatch-other {
  background: var(--gi-gold);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #8a6d12;
}

.gi-section-title {
  margin: 8px 0 16px;
  font-size: 26px;
  font-weight: 400;
  color: var(--gi-teal);
  text-align: center;
}

.gi-majors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.gi-card {
  display: flex;
  flex-direction: column;
  background: var(--gi-paper);
  border: 1px solid var(--gi-line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

a.gi-card:hover,
.gi-card.is-active {
  transform: translateY(-2px);
  border-color: var(--gi-teal);
  box-shadow: 0 8px 20px rgba(61, 122, 122, 0.18);
}

.gi-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: #c5d4d4;
}

.gi-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gi-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 400;
  color: var(--gi-teal-dark);
}

.gi-meta {
  margin: 0 0 8px;
  font-family: "freight-sans-pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gi-teal);
}

.gi-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--gi-muted);
}

.gi-card .gi-more {
  margin-top: 10px;
  font-family: "freight-sans-pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--gi-teal);
}

.gi-video {
  margin: -12px 0 36px;
  text-align: center;
}

.gi-video a {
  display: inline-block;
  color: var(--gi-teal-dark);
  text-decoration: none;
}

.gi-video img {
  display: block;
  width: min(640px, 100%);
  height: auto;
  margin: 8px auto 0;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(30, 60, 60, 0.16);
}

.gi-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.gi-fact {
  background: var(--gi-wash);
  border-radius: 8px;
  padding: 16px 18px 18px;
}

.gi-fact img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
  display: block;
}

.gi-fact h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 400;
  color: var(--gi-teal-dark);
}

.gi-fact p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--gi-muted);
}

.gi-fact a {
  color: var(--gi-teal-dark);
}

.gi-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gi-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--gi-line);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}

.gi-others {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.gi-mini {
  background: var(--gi-paper);
  border: 1px solid var(--gi-line);
  border-radius: 8px;
  padding: 12px 14px 14px;
}

.gi-mini.is-hidden {
  display: none;
}

.gi-mini.is-active {
  border-color: var(--gi-teal);
  box-shadow: 0 4px 14px rgba(61, 122, 122, 0.14);
}

.gi-mini h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 400;
  color: var(--gi-teal-dark);
}

.gi-mini p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--gi-muted);
}

.gi-mini-actions {
  display: flex;
  gap: 12px;
  font-family: "freight-sans-pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
}

.gi-mini-actions a,
.gi-mini-actions button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gi-teal);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.gi-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-family: "freight-sans-pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}

.gi-links a {
  color: var(--gi-teal-dark);
}

.gi-cta {
  text-align: center;
  padding: 22px 16px;
  background: var(--gi-wash);
  border-radius: 8px;
  font-size: 18px;
}

.gi-cta a {
  color: var(--gi-teal-dark);
}

.gi-popup h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--gi-teal-dark);
}

.gi-popup p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
}

.gi-popup a {
  color: var(--gi-teal);
  font-size: 13px;
}

.gi-marker {
  background: none !important;
  border: 0 !important;
}

.gi-pin {
  display: block;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--gi-teal);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.gi-label {
  display: block;
  margin: 4px 0 0 6px;
  padding: 1px 7px 2px;
  white-space: nowrap;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--gi-teal-dark);
  font: 600 11px/1.3 "freight-sans-pro", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.leaflet-container a.leaflet-popup-close-button {
  color: #444;
}

@media (max-width: 900px) {
  .gi-majors,
  .gi-facts,
  .gi-others {
    grid-template-columns: 1fr 1fr;
  }

  .gi-map {
    height: 420px;
  }
}

@media (max-width: 640px) {
  .gi-title {
    font-size: 26px;
  }

  .gi-majors,
  .gi-facts,
  .gi-others {
    grid-template-columns: 1fr;
  }

  .gi-map {
    height: 360px;
  }

  .gi-map-hint {
    font-size: 12px;
  }
}
