/* ============================================
   Panama Travel Guide — editorial reference layout
   Builds on services-editorial.css (.se-* hero, eyebrow, link,
   assurance, closing). Brand tokens only, no gradients.
   ============================================ */

/* Headings run title case. style.css sets a global `text-transform: none`
   on h1-h6 late in the file, so this has to restate `capitalize` rather
   than rely on the base rule at the top. */
.tg-page h1,
.tg-page h2,
.tg-page h3,
.tg-page h4 {
  text-transform: capitalize;
}

/* Secondary action on the navy hero — matches .btn-primary geometry */
.tg-page .btn-light-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 30px;
  border: 1px solid var(--neutral-color);
  border-radius: var(--button-radius);
  background: transparent;
  color: var(--neutral-color);
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease;
}

.tg-page .btn-light-outline:hover,
.tg-page .btn-light-outline:focus {
  background: var(--neutral-color);
  color: var(--primary-color);
}

/* ---------- Quick facts ---------- */

.tg-facts {
  border-bottom: 1px solid var(--divider-color);
  background: var(--light-blue);
}

.tg-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tg-facts-grid > div {
  padding: 32px 24px;
  border-left: 1px solid var(--divider-color);
  text-align: center;
}

.tg-facts-grid > div:first-child {
  border-left: 0;
}

.tg-facts-grid strong {
  display: block;
  color: var(--primary-color);
  font-family: var(--font-primary);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.tg-facts-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- Layout: sticky index + open sections ---------- */

.tg-body {
  padding: 72px 0 88px;
}

.tg-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.tg-index {
  position: sticky;
  top: calc(var(--navbar-height) + 24px);
}

.tg-index-title {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--divider-color);
  color: var(--muted);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.tg-index a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  color: var(--primary-color);
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color .25s ease, padding-left .25s ease;
}

.tg-index a i {
  width: 18px;
  color: var(--secondary-color);
  font-size: 14px;
}

.tg-index a:not(.btn):hover {
  padding-left: 4px;
  color: var(--secondary-color);
}

.tg-index-cta {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--divider-color);
}

.tg-index-cta .btn {
  width: 100%;
  margin-bottom: 10px;
}

/* ---------- Guide sections ---------- */

.tg-section {
  padding: 48px 0;
  border-top: 1px solid var(--divider-color);
  scroll-margin-top: calc(var(--navbar-height) + 24px);
}

.tg-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.tg-section-icon {
  display: flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid var(--divider-color);
  border-radius: 50%;
  color: var(--secondary-color);
  font-size: 19px;
}

.tg-section h2 {
  margin: 12px 0 16px;
  color: var(--primary-color);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.25;
}

.tg-section h3 {
  margin: 28px 0 10px;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 700;
}

.tg-section p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.tg-section a {
  color: var(--secondary-color);
  font-weight: 600;
}

.tg-section a:hover {
  color: var(--button-primary-hover);
}

/* The registration card sits inside a guide section, but its dark surface
   needs the callout palette rather than the generic article text colors. */
.tg-section .dsi-registration-callout h2,
.tg-section .dsi-registration-callout h3 {
  margin: 0 0 5px;
  color: var(--neutral-color);
}

.tg-section .dsi-registration-callout p {
  margin: 0;
  color: rgba(255, 255, 255, .84);
}

.tg-section .dsi-registration-callout-cta,
.tg-section .dsi-registration-callout-cta:hover,
.tg-section .dsi-registration-callout-cta:focus-visible {
  color: var(--neutral-color);
}

/* Section photo — same geometry as the services rows */
.tg-figure {
  overflow: hidden;
  margin: 0 0 24px;
  border-radius: 15px;
  aspect-ratio: 16 / 9;
  box-shadow: 0 0 20px rgba(0, 0, 0, .1);
}

.tg-figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.tg-section:hover .tg-figure img {
  transform: scale(1.03);
}

/* Hairline lists — the editorial cue from the services page */
.tg-list {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.tg-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--divider-color);
  color: var(--font-color);
  font-size: 15px;
  line-height: 1.6;
}

.tg-list li:last-child {
  border-bottom: 1px solid var(--divider-color);
}

.tg-list i {
  margin-top: 5px;
  color: var(--secondary-color);
  font-size: 13px;
}

.tg-list strong {
  color: var(--primary-color);
}

/* Month rail */

.tg-months {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tg-months li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--divider-color);
  font-size: 15px;
  line-height: 1.6;
}

.tg-months li:last-child {
  border-bottom: 1px solid var(--divider-color);
}

.tg-months strong {
  color: var(--primary-color);
  font-family: var(--font-primary);
  font-weight: 700;
}

.tg-months span {
  color: var(--ink-soft);
}

/* Callout */

.tg-callout {
  margin: 24px 0 0;
  padding: 20px 24px;
  border: 1px solid var(--divider-color);
  border-left: 4px solid var(--secondary-color);
  border-radius: 15px;
  background: var(--light-blue);
}

.tg-callout p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.tg-callout strong {
  color: var(--primary-color);
}

/* ---------- Related guides ---------- */

.tg-related {
  padding: 88px 0;
  background: var(--light-blue);
}

.tg-related-head {
  margin-bottom: 40px;
  text-align: center;
}

.tg-related-head h2 {
  margin: 16px 0 0;
  color: var(--primary-color);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 600;
}

.tg-related-head .se-eyebrow {
  justify-content: center;
}

.tg-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.tg-related-grid a {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 15px;
  background: var(--neutral-color);
  box-shadow: 0 0 20px rgba(0, 0, 0, .1);
  color: inherit;
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease;
}

.tg-related-grid a:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, .15);
  transform: scale(1.02);
}

.tg-related-grid i {
  margin-bottom: 14px;
  color: var(--secondary-color);
  font-size: 22px;
}

.tg-related-grid h3 {
  margin: 0 0 8px;
  color: var(--primary-color);
  font-size: 19px;
  font-weight: 600;
}

.tg-related-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

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

.tg-faq {
  padding: 88px 0;
  background: var(--neutral-color);
}

.tg-faq-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: start;
}

.tg-faq-heading {
  position: sticky;
  top: calc(var(--navbar-height) + 32px);
}

.tg-faq-heading h2 {
  margin: 16px 0 12px;
  color: var(--primary-color);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.3;
}

.tg-faq-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.tg-accordion .accordion-item {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--divider-color);
  border-radius: 15px;
  background: var(--neutral-color);
}

.tg-accordion .accordion-button {
  padding: 22px 24px;
  background: var(--neutral-color);
  color: var(--primary-color);
  font-family: var(--font-secondary);
  font-size: 17px;
  font-weight: 600;
}

.tg-accordion .accordion-button:not(.collapsed) {
  background: var(--light-blue);
  box-shadow: none;
  color: var(--primary-color);
}

.tg-accordion .accordion-button:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tg-accordion .accordion-body {
  padding: 4px 24px 24px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .tg-layout,
  .tg-faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .tg-index,
  .tg-faq-heading {
    position: static;
  }

  .tg-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tg-facts-grid > div:nth-child(3) {
    border-left: 0;
  }

  .tg-facts-grid > div:nth-child(n + 3) {
    border-top: 1px solid var(--divider-color);
  }

  .tg-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tg-months li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .tg-body,
  .tg-related,
  .tg-faq {
    padding: 56px 0;
  }
}

@media (max-width: 575px) {
  .tg-related-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
