/* Responsive platform_page.css - replacement for the original fixed 250px sizes.
   NOTE: This replaces fixed 250x250 with fluid widths and breakpoint-aware heights.
   This file intentionally preserves the semantics of your layout while improving responsiveness.
*/

/* Small utility fallbacks — safe if your project doesn't already define them */
.p-0 { padding: 0 !important; }
.m-0 { margin: 0 !important; }
.is-paddingless { padding: 0 !important; }
.is-marginless { margin: 0 !important; }

/* Prevent horizontal overflow on narrow screens */
html, body { overflow-x: hidden; }

.platform-detail-page {
  min-height: calc(100vh - 4rem);
  background: #f6f8f7;
  color: #22312c;
}

.platform-hero-section {
  padding-top: 1.75rem;
  padding-bottom: 1.5rem;
  background: #eef5f0;
  border-bottom: 1px solid #d7e2db;
}

.platform-content-section {
  padding-top: 1.5rem;
}

.platform-header-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.platform-heading {
  max-width: 56rem;
}

.platform-eyebrow {
  margin-bottom: 0.25rem;
  color: #476356;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.platform-title {
  margin: 0;
  color: #1f332b;
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.platform-subtitle {
  margin-top: 0.45rem;
  color: #4b6159;
  font-size: 1rem;
  font-weight: 600;
}

.platform-status-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
}

.platform-media-stack {
  display: grid;
  gap: 1rem;
}

@media (min-width: 769px) {
  .platform-media-stack {
    position: sticky;
    top: 1rem;
  }
}

.platform-panel,
.platform-detail-surface {
  background: #ffffff;
  border: 1px solid #d7dfdc;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(22, 38, 31, 0.05);
}

.platform-panel {
  padding: 1rem;
}

.platform-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.platform-detail-surface {
  padding: 1.25rem;
}

.platform-tabs {
  margin-bottom: 1.25rem;
}

.platform-tab-button.button {
  min-width: 7rem;
  justify-content: center;
  font-weight: 700;
}

.platform-description {
  margin-bottom: 1.25rem;
}

.platform-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.platform-section-title {
  margin: 0;
  color: #22312c;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.platform-date-range-info {
  position: relative;
}

.platform-date-range-info__button {
  padding: 0;
  background: transparent;
  border: 0;
  color: #3273dc;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.platform-date-range-info__button:focus-visible {
  outline: 2px solid #3273dc;
  outline-offset: 2px;
  border-radius: 2px;
}

.platform-date-range-info__popup {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max-content;
  max-width: min(22rem, 80vw);
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid #d7dfdc;
  border-radius: 6px;
  box-shadow: 0 0.5rem 1rem rgba(22, 38, 31, 0.14);
  color: #22312c;
  font-size: 0.875rem;
  line-height: 1.4;
}

.platform-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.platform-fact {
  min-width: 0;
  padding: 0.85rem;
  background: #f7faf8;
  border: 1px solid #e1e8e4;
  border-radius: 6px;
}

.platform-fact span {
  display: block;
  margin-bottom: 0.35rem;
  color: #5b6f66;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.platform-fact strong {
  display: block;
  color: #1f332b;
  font-size: 0.98rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.platform-observation-list {
  display: grid;
  gap: 0.0rem;
}
.platform-observation-list .column {
  #margin-top: -0.25rem;
  #margin-bottom: -0.25rem;
  #padding-top: 0;
  #padding-bottom: 0;
}

.platform-chart-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e1e8e4;
}

.platform-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.platform-chart-canvas-wrap {
  position: relative;
  min-height: 320px;
  height: 42vh;
  max-height: 460px;
}

.platform-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.platform-observation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
  border: 1px solid #e1e8e4;
  border-radius: 6px;
}

.platform-empty-media {
  display: grid;
  min-height: 10rem;
  place-items: center;
  background: #f7faf8;
  border: 1px dashed #c9d7d0;
  border-radius: 6px;
}

/* Make images fluid */
.platform_pic {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* Map responsiveness: width 100%, height varies by breakpoint */
#map {
  width: 100%;
  height: 260px;      /* mobile default */
  min-height: 200px;
  box-sizing: border-box;
}

/* Also support .platform_map if used elsewhere */
.platform_map {
  width: 100%;
  height: 260px;
  min-height: 200px;
}

/* Leaflet container should fill its parent */
.leaflet-container {
  width: 100% !important;
  height: 100% !important;
}

/* Larger heights at tablet/desktop breakpoints */
@media (min-width: 769px) {
  #map, .platform_map { height: 360px; min-height: 300px; }
}
@media (min-width: 1024px) {
  #map, .platform_map { height: 480px; min-height: 420px; }
}

.platform-media-stack #map,
.platform-media-stack .platform_map {
  height: 300px;
  min-height: 240px;
  border-radius: 6px;
}

@media (min-width: 1024px) {
  .platform-media-stack #map,
  .platform-media-stack .platform_map {
    height: 340px;
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .platform-title {
    font-size: 1.85rem;
  }

  .platform-detail-surface {
    padding: 1rem;
  }

  .platform-tabs {
    display: grid;
    gap: 0.5rem;
  }

  .platform-tabs.buttons.has-addons .button {
    border-radius: 6px;
    width: 100%;
  }

  .platform-fact-grid {
    grid-template-columns: 1fr;
  }

  .platform-observation-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-chart-header {
    flex-direction: column;
  }

  .platform-chart-canvas-wrap {
    min-height: 260px;
    height: 56vh;
  }
}

/* Keep full-page/equal height helpers flexible */
.full-page-row { min-height: 100vh; display: block; }
.equal-height-row { min-height: 100vh; display: flex; flex-direction: column; }
.equal-height-row .columns { height: auto; }

/* On larger screens allow equal-height rows to align horizontally */
@media (min-width: 769px) {
  .equal-height-row { flex-direction: row; align-items: stretch; }
  .equal-height-row .columns { flex-direction: row; height: 100%; width: 100%; }
  .equal-height-row .column { display: flex; flex-direction: column; }
}

/* Headline safety: prevent overflow */
.title.responsive-title { word-break: break-word; line-height: 1.15; margin-bottom: 0.5rem; }
@media (max-width: 480px) {
  .title.responsive-title { font-size: 1.25rem; }
}

/* Content lists readability */
.content ul, .content ol { padding-left: 1.15rem; margin-top: 0.25rem; margin-bottom: 0.25rem; }

/* If your project relied on explicit 250px blocks elsewhere, remove or adapt them.
   This file intentionally avoids fixed pixel widths so the layout remains responsive. */
