/* Guidebook Web Viewer Styles */
/* Uses px for font sizes per site rules (html { font-size: 62.5% } makes rem unreliable) */

/* ============================================================
   VIEWER CONTAINER
   ============================================================ */

.gb-viewer {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 60px;
  font-size: 20px;
  line-height: 1.65;
  color: #333;
}

.gb-viewer h1,
.gb-viewer h2,
.gb-viewer h3,
.gb-viewer h4 {
  color: #1a5276;
  line-height: 1.25;
}

/* Cover / hero header */
.gb-cover {
  text-align: center;
  padding: 48px 24px 40px;
  border-radius: 12px;
  margin-bottom: 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.gb-cover h1 {
  color: #fff;
  font-size: 49px;
  margin: 0 0 4px;
  letter-spacing: 1px;
}

.gb-cover .gb-tagline {
  font-size: 23px;
  color: rgba(255,255,255,0.85);
  margin: 0 0 16px;
  font-style: italic;
}

.gb-cover .gb-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

/* Toolbar (print / back to download) */
.gb-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e2e6ea;
}

.gb-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.gb-toolbar-btn:active {
  transform: scale(0.97);
}

.gb-btn-print {
  background: #1a5276;
  color: #fff;
}

.gb-btn-print:hover {
  background: #154060;
  color: #fff;
}

.gb-btn-pdf {
  background: #27ae60;
  color: #fff;
}

.gb-btn-pdf:hover {
  background: #219a52;
  color: #fff;
}

.gb-btn-back {
  background: transparent;
  color: #1a5276;
  border: 1px solid #1a5276;
}

.gb-btn-back:hover {
  background: #1a5276;
  color: #fff;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */

.gb-toc {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 36px;
  border-left: 4px solid #1a5276;
}

.gb-toc h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.gb-toc ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.gb-toc li {
  padding: 5px 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gb-toc-icon {
  font-size: 15px;
  opacity: 0.8;
  flex-shrink: 0;
}

.gb-toc a {
  text-decoration: none;
}

.gb-toc a:hover {
  text-decoration: underline;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.gb-section {
  margin-bottom: 40px;
  scroll-margin-top: 80px;
}

.gb-viewer .gb-section-header {
  padding: 12px 18px 12px 30px !important;
  border-radius: 0 6px 6px 0;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 18px;
  border-left: 5px solid currentColor;
}

.gb-section h3 {
  font-size: 22px;
  margin: 24px 0 10px;
  padding-bottom: 4px;
  border-bottom: 2px solid #eee;
}

.gb-section p {
  margin: 0 0 14px;
}

/* Quick facts */
.gb-facts {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gb-facts li {
  padding: 9px 12px 9px 14px;
  background: #f4f8fb;
  border-left: 3px solid var(--gb-accent, #1a5276);
  border-radius: 0 6px 6px 0;
  font-size: 18px;
  line-height: 1.4;
  color: #333;
}

@media (max-width: 600px) {
  .gb-facts {
    grid-template-columns: 1fr;
  }
}

/* Region cards */
.gb-region-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

.gb-region-card h4 {
  margin: 0 0 6px;
  font-size: 19px;
}

.gb-region-card p {
  margin: 0;
  font-size: 18px;
  color: #555;
}

/* ============================================================
   INFOGRAPHIC CHARTS
   ============================================================ */

.gb-chart-wrap {
  margin: 20px 0 28px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.gb-chart-wrap h4 {
  text-align: center;
  margin: 0 0 16px;
  font-size: 20px;
  color: #333;
}

.gb-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Source attribution line below charts */
.gb-chart-source {
  font-size: 12px;
  color: #aaa;
  text-align: right;
  margin: -16px 0 24px;
  padding-right: 4px;
}
.gb-chart-source a {
  color: #aaa;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
}
.gb-chart-source a:hover {
  color: #555;
}

/* Bar chart labels */
.gb-bar-label {
  font-size: 13px;
  fill: #666;
}

.gb-bar-value {
  font-size: 12px;
  fill: #333;
  font-weight: 600;
}

/* Season rating badges */
.gb-season-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}

@media (max-width: 500px) {
  .gb-season-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gb-season-card {
  text-align: center;
  padding: 16px 10px;
  border-radius: 10px;
  background: #f8f9fa;
  border: 1px solid #e2e6ea;
}

.gb-season-card .gb-season-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #333;
}

.gb-season-card .gb-season-months {
  display: block;
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

.gb-season-card .gb-season-icon {
  font-size: 33px;
  display: block;
  margin-bottom: 8px;
}

.gb-season-card .gb-season-rating {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* ============================================================
   NUMBERED LISTS (beaches, activities, etc.)
   ============================================================ */

.gb-numbered-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: gb-item;
}

.gb-numbered-list li {
  counter-increment: gb-item;
  padding: 14px 14px 14px 52px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  position: relative;
  font-size: 18px;
  line-height: 1.55;
}

.gb-numbered-list li::before {
  content: counter(gb-item);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gb-accent, #1a5276);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gb-numbered-list li strong {
  display: block;
  font-size: 19px;
  margin-bottom: 4px;
  color: #222;
}

/* ============================================================
   IMAGE CARDS (alternating left/right photo layout)
   ============================================================ */

.gb-img-card {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  align-items: stretch;
}

.gb-img-card.gb-img-right {
  flex-direction: row-reverse;
}

.gb-img-card-photo {
  flex: 0 0 220px;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}

.gb-img-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gb-img-card-photo a {
  display: block;
  width: 100%;
  height: 100%;
}

.gb-img-card-photo a img {
  transition: opacity 0.15s ease;
}

.gb-img-card-photo a:hover img {
  opacity: 0.88;
}

.gb-img-card-body {
  flex: 1;
  padding: 16px 18px;
  position: relative;
}

.gb-img-card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
}

.gb-img-card-body strong {
  font-size: 19px;
  color: #222;
  vertical-align: middle;
}

.gb-img-card-body strong a {
  color: #1a5276;
  text-decoration: none;
}

.gb-img-card-body strong a:hover {
  text-decoration: underline;
}

.gb-img-card-body p {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: #555;
}

@media (max-width: 600px) {
  .gb-img-card,
  .gb-img-card.gb-img-right {
    flex-direction: column;
  }

  .gb-img-card-photo {
    flex: 0 0 auto;
    min-height: 180px;
    max-height: 220px;
  }
}

/* Mile marker badge (inline highway sign)
   Mimics real HDOT green mile marker signs:
   green rectangle, white reflective border, route + MILE + number */
.gb-mile-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-left: 8px;
  vertical-align: middle;
  cursor: default;
  flex-shrink: 0;
}

.gb-mile-sign {
  background: #006b3f;
  border: 2px solid #fff;
  outline: 1px solid #006b3f;
  border-radius: 2px;
  padding: 2px 7px 3px;
  text-align: center;
  min-width: 30px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.3);
  line-height: 1;
}

.gb-mile-hwy {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin-bottom: 1px;
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
}

.gb-mile-label {
  display: block;
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
}

.gb-mile-num {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
}

.gb-mile-post {
  width: 3px;
  height: 7px;
  background: #9e9e9e;
  border-radius: 0 0 1px 1px;
}

/* Links in numbered lists and region cards */
.gb-numbered-list a,
.gb-region-card a {
  color: #1a5276;
  text-decoration: none;
}

.gb-numbered-list a:hover,
.gb-region-card a:hover {
  text-decoration: underline;
}

/* Links in hotel pills */
.gb-hotel-pill a {
  color: #1a5276;
  text-decoration: none;
}

.gb-hotel-pill a:hover {
  text-decoration: underline;
}

/* Links in restaurant tables */
.gb-restaurant-table a {
  color: #1a5276;
  text-decoration: none;
}

.gb-restaurant-table a:hover {
  text-decoration: underline;
}

/* ============================================================
   RESTAURANT TABLE
   ============================================================ */

.gb-restaurant-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 20px;
  font-size: 18px;
}

.gb-restaurant-table th {
  text-align: left;
  padding: 8px 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.gb-restaurant-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}

.gb-restaurant-table tr:nth-child(even) td {
  background: #f8f9fa;
}

/* ============================================================
   ITINERARY
   ============================================================ */

.gb-itinerary {
  margin-bottom: 28px;
}

.gb-itinerary h3 {
  border-bottom: none;
  margin-bottom: 12px;
}

.gb-day {
  margin-bottom: 16px;
}

.gb-day-header {
  padding: 8px 14px;
  border-radius: 6px;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}

.gb-day ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.gb-day li {
  position: relative;
  padding: 3px 0 3px 16px;
  font-size: 18px;
  line-height: 1.5;
}

.gb-day li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  top: 3px;
  color: #888;
  font-size: 16px;
}

/* ============================================================
   TIP BOX
   ============================================================ */

.gb-tip {
  background: #fff8dc;
  border-left: 4px solid #f0c040;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 16px 0 20px;
  font-size: 18px;
  color: #665000;
}

.gb-tip strong {
  color: #996600;
}

/* ============================================================
   SECTION MAPS (Leaflet)
   ============================================================ */

.gb-section-map {
  height: 320px;
  margin: 16px 0 24px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0e6ed;
}

@media (max-width: 600px) {
  .gb-section-map {
    height: 240px;
  }
}

/* ============================================================
   CHECKLIST (packing)
   ============================================================ */

.gb-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  columns: 2;
  column-gap: 20px;
}

@media (max-width: 500px) {
  .gb-checklist {
    columns: 1;
  }
}

.gb-checklist li {
  padding: 4px 0 4px 24px;
  position: relative;
  font-size: 16px;
  break-inside: avoid;
}

.gb-checklist li::before {
  content: "\2610";
  position: absolute;
  left: 0;
  top: 4px;
  font-size: 19px;
  color: #999;
}

/* ============================================================
   HOTEL PILLS
   ============================================================ */

.gb-hotel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.gb-hotel-pill {
  display: inline-block;
  padding: 4px 12px;
  background: #e8f0f8;
  border-radius: 16px;
  font-size: 15px;
  color: #1a5276;
}

/* ============================================================
   TIPS LIST (practical tips)
   ============================================================ */

.gb-tips-list {
  list-style: disc;
  padding-left: 22px;
  margin: 0 0 16px;
}

.gb-tips-list li {
  padding: 3px 0;
  font-size: 18px;
  line-height: 1.5;
  color: #444;
}

/* ============================================================
   RESOURCES LINKS
   ============================================================ */

.gb-resources {
  list-style: none;
  padding-left: 0;
  margin: 0 0 8px;
}

.gb-resources li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 18px;
  border-bottom: 1px solid #eee;
}

.gb-resources li::before {
  content: "\203A";
  position: absolute;
  left: 0;
  top: 6px;
  font-size: 21px;
  font-weight: 700;
  color: #1a5276;
  line-height: 1.4;
}

.gb-resources li:last-child {
  border-bottom: none;
}

.gb-resources a {
  color: #1a5276;
  font-weight: 600;
  text-decoration: none;
}

.gb-resources a:hover {
  text-decoration: underline;
}

/* ============================================================
   FOOTER / MAHALO
   ============================================================ */

.gb-footer {
  text-align: center;
  padding: 28px 20px;
  border-radius: 10px;
  color: #fff;
  margin-top: 40px;
}

.gb-footer h2 {
  color: #fff;
  margin: 0 0 8px;
  font-size: 28px;
}

.gb-footer p {
  margin: 0;
  font-size: 16px;
  color: rgba(255,255,255,0.8);
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
  /* Hide site chrome */
  header, footer, nav, .site-header, .site-footer,
  .gb-toolbar, .content-nav-bar-links, .hgads,
  #gb-back-to-top, .gb-btn-print, .gb-btn-pdf,
  .gb-btn-back {
    display: none !important;
  }

  .gb-viewer {
    max-width: 100%;
    padding: 0;
    font-size: 14pt;
  }

  .gb-cover {
    padding: 36px 20px;
    page-break-after: always;
  }

  .gb-toc {
    page-break-after: always;
  }

  .gb-section {
    page-break-inside: avoid;
  }

  .gb-section-header {
    page-break-after: avoid;
  }

  .gb-chart-wrap {
    page-break-inside: avoid;
    box-shadow: none;
    border-color: #ccc;
  }

  .gb-numbered-list li {
    page-break-inside: avoid;
  }

  .gb-img-card {
    page-break-inside: avoid;
  }

  .gb-img-card-photo {
    flex: 0 0 160px;
  }

  /* Ensure attraction/beach images render in print — not hidden by lazy loading or display rules */
  .gb-img-card-photo img,
  .gb-viewer img {
    display: block !important;
    visibility: visible !important;
    max-width: 100% !important;
  }

  .gb-day {
    page-break-inside: avoid;
  }

  .gb-footer {
    page-break-before: always;
  }

  /* Hide paygates on print — lite guide prints as clean truncated content */
  .gb-paygate {
    display: none !important;
  }

  /* Hide the lite toolbar (it has no print button) */
  .gb-toolbar {
    display: none !important;
  }
}

/* ============================================================
   BACK TO TOP BUTTON (web only)
   ============================================================ */

#gb-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 23px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.2s;
}

#gb-back-to-top:hover {
  opacity: 0.85;
}

/* ============================================================
   LITE MODE — Paygate & Cover Badge
   ============================================================ */

/* Cover badge for lite preview */
.gb-lite-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.9);
}

/* Paygate container */
.gb-paygate {
  background: #fff8f2;
  border: 2px dashed #e0956a;
  border-radius: 12px;
  padding: 28px 24px 22px;
  text-align: center;
  margin: 20px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gb-paygate-lock {
  font-size: 34px;
  margin-bottom: 10px;
}

.gb-paygate-title {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 16px;
  line-height: 1.3;
}

.gb-paygate-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  text-align: left;
  display: block;
  width: 100%;
}

.gb-paygate-bullets li {
  font-size: 16px;
  padding: 4px 0;
  color: #444;
}

.gb-paygate-bullets .fa {
  margin-right: 8px;
}

.gb-paygate-cta {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 8px;
  color: #fff !important;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.3;
}

.gb-paygate-cta:hover {
  opacity: 0.88;
}

.gb-paygate-secondary {
  margin-top: 12px;
  font-size: 14px;
}

.gb-paygate-secondary a {
  color: #888;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .gb-paygate {
    padding: 22px 16px 18px;
  }
  .gb-paygate-cta {
    font-size: 15px;
    padding: 12px 20px;
    width: 100%;
    box-sizing: border-box;
  }
  .gb-paygate-bullets {
    text-align: left;
    width: 100%;
  }
}
