/**
 * Mushroom Calendar SEO Pages
 * /mushroom-calendar/ hub + city + species pages.
 *
 * The .fc-* grid rules are copied from css/map-custom.css (the map-popup
 * version of the same grid) so the PHP renderer's markup contract holds.
 * Design-token vars resolve on /forayz/; on these WP pages the fallbacks
 * apply. Page-scale overrides live under .mcal-page at the bottom.
 */

/* ── Fruiting grid (.fc-*, copied from map-custom.css) ─────────────────── */

.fc-wrap {
  font-family: var(--font-body, inherit);
}

.fc-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #1b3a2d);
  letter-spacing: -0.005em;
}

.fc-grid {
  display: grid;
  grid-template-columns: minmax(56px, 88px) repeat(12, 1fr);
  gap: 2px;
  align-items: stretch;
}

.fc-corner {
  display: block;
}

.fc-month {
  font-size: 9.5px;
  font-weight: 600;
  text-align: center;
  color: var(--text-tertiary, #8a9b92);
  line-height: 1.4;
  text-transform: uppercase;
}

/* Static "current month" marker (climatology only — not a live nowcast) */
.fc-month.fc-now {
  color: var(--surface-card, #fff);
  background: var(--brand-accent, #d98b3a);
  border-radius: var(--r-sm, 4px);
  font-weight: 700;
}

.fc-label {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--text-secondary, #5a6e63);
  padding-right: 4px;
}

.fc-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-swatch {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.fc-reg-mark {
  flex: 0 0 auto;
  font-size: 7.5px;
  font-weight: 700;
  color: var(--brand-accent, #d98b3a);
  cursor: help;
  letter-spacing: 0.02em;
}

.fc-reg-key {
  display: inline;
}

.fc-reg-key sup {
  font-weight: 700;
  color: var(--brand-accent, #d98b3a);
}

.fc-cell {
  min-height: 15px;
  border-radius: 2px;
  background: var(--surface-sunken, #f4efe8);
}

.fc-cell.fc-empty {
  background: var(--surface-sunken, #f4efe8);
  opacity: 0.5;
}

/* Outline the species' peak month(s) */
.fc-cell.fc-peak {
  box-shadow: inset 0 0 0 1.5px var(--text-primary, #1b3a2d);
}

.fc-note {
  grid-column: 1 / -1;
  font-size: 9.5px;
  font-style: italic;
  color: var(--text-tertiary, #8a9b92);
  margin: 2px 0 2px;
}

.fc-foot {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-tertiary, #8a9b92);
}

/* ── Page layout (.mcal-*) ─────────────────────────────────────────────── */

.mcal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.mcal-breadcrumb {
  font-size: 13px;
  color: #8a9b92;
  margin-bottom: 16px;
}

.mcal-breadcrumb a {
  color: #5a6e63;
  text-decoration: none;
}

.mcal-breadcrumb a:hover {
  text-decoration: underline;
}

.mcal-breadcrumb span[aria-hidden] {
  margin: 0 6px;
}

.mcal-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
  color: #1b3a2d;
}

.mcal-subtitle {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.5;
  color: #5a6e63;
}

.mcal-page h2 {
  font-size: 22px;
  color: #1b3a2d;
  margin: 32px 0 12px;
}

.mcal-page h3 {
  font-size: 16px;
  color: #1b3a2d;
  margin: 20px 0 8px;
}

/* Full-page grid: scale the sidebar-sized grid up for readability */
.mcal-page .fc-grid {
  grid-template-columns: minmax(90px, 150px) repeat(12, 1fr);
  gap: 3px;
}

.mcal-page .fc-month {
  font-size: 12px;
}

.mcal-page .fc-label {
  font-size: 14px;
  gap: 6px;
}

.mcal-page .fc-swatch {
  width: 10px;
  height: 10px;
}

.mcal-page .fc-cell {
  min-height: 24px;
  border-radius: 3px;
}

.mcal-page .fc-reg-mark {
  font-size: 9px;
}

.mcal-page .fc-note {
  font-size: 12px;
}

.mcal-page .fc-foot {
  font-size: 13px;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .mcal-page .fc-grid {
    grid-template-columns: minmax(64px, 96px) repeat(12, 1fr);
    gap: 2px;
  }

  .mcal-page .fc-label {
    font-size: 11px;
  }

  .mcal-page .fc-month {
    font-size: 10px;
  }

  .mcal-page .fc-cell {
    min-height: 17px;
  }
}

/* City / species link lists */
.mcal-city-list,
.mcal-species-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px 16px;
}

.mcal-city-list a,
.mcal-species-list a {
  color: #1b3a2d;
  text-decoration: none;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mcal-city-list a:hover,
.mcal-species-list a:hover {
  text-decoration: underline;
}

.mcal-narrative {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.6;
  color: #3c4f45;
}

/* Summary strip */
.mcal-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 14px 18px;
  background: #f4efe8;
  border-radius: 8px;
  margin-bottom: 18px;
}

.mcal-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mcal-summary-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a9b92;
}

.mcal-summary-value {
  font-size: 15px;
  font-weight: 600;
  color: #1b3a2d;
}

/* Fruiting-now callout */
.mcal-now {
  padding: 12px 16px;
  border-left: 4px solid #d98b3a;
  background: #fdf6ec;
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #3c4f45;
  margin-bottom: 24px;
}

.mcal-now-quiet {
  border-left-color: #8a9b92;
  background: #f3f5f4;
}

/* Season curve (CSS bar chart) */
.mcal-curve {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  margin-top: 8px;
}

.mcal-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
}

.mcal-bar {
  width: 100%;
  background: #6e8b7d;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}

.mcal-bar-now {
  background: #d98b3a;
}

.mcal-bar-label {
  font-size: 11px;
  font-weight: 600;
  color: #8a9b92;
  text-transform: uppercase;
}

.mcal-bar-label-now {
  color: #d98b3a;
  font-weight: 700;
}

.mcal-curve-note {
  font-size: 13px;
  color: #8a9b92;
  margin: 8px 0 0;
}

/* Free-signup CTA */
.mcal-signup-cta {
  margin-top: 36px;
  padding: 22px 24px;
  background: #1b3a2d;
  border-radius: 10px;
  color: #f4efe8;
}

.mcal-signup-cta h2 {
  color: #fff;
  margin: 0 0 8px;
  font-size: 20px;
}

.mcal-signup-cta p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
  color: #d8e2dc;
}

.mcal-signup-cta p:last-child {
  margin-bottom: 0;
}

.mcal-cta-button {
  display: inline-block;
  padding: 10px 22px;
  background: #d98b3a;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.mcal-cta-button:hover {
  background: #c47a2e;
  color: #fff;
}

/* Species spotlight cards */
.mcal-spotlight-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.mcal-spotlight-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e4ded2;
  border-radius: 10px;
  overflow: hidden;
  padding-bottom: 12px;
}

.mcal-spotlight-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.mcal-spotlight-name {
  font-weight: 700;
  font-size: 16px;
  color: #1b3a2d;
  padding: 4px 12px 0;
}

.mcal-spotlight-peak {
  font-size: 13px;
  color: #5a6e63;
  padding: 0 12px;
}

.mcal-photo-credit {
  font-size: 10.5px;
  color: #a8b3ac;
  padding: 0 12px;
}

.mcal-spotlight-card:hover .mcal-spotlight-name {
  text-decoration: underline;
}

/* Climate section: temp band + precip bars side by side */
.mcal-chart-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.mcal-chart {
  min-width: 0;
}

.mcal-chart-cap {
  font-size: 13px;
  color: #8a9b92;
  margin: 8px 0 0;
  text-align: center;
}

/* Temperature range band */
.mcal-band {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 120px;
}

.mcal-band-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mcal-band-track {
  position: relative;
  flex: 1;
  width: 60%;
  max-width: 16px;
}

.mcal-band-fill {
  position: absolute;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #6e8b7d, #d98b3a);
  border-radius: 6px;
  min-height: 4px;
}

.mcal-band-fill.mcal-band-now {
  background: linear-gradient(to top, #c47a2e, #e8a317);
  box-shadow: 0 0 0 1.5px rgba(217, 139, 58, 0.4);
}

/* Forest composition */
.mcal-trees-intro {
  font-size: 15px;
  color: #5a6e63;
  margin: 0 0 12px;
}

.mcal-tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
}

.mcal-tree {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #f4efe8;
  border-radius: 6px;
}

.mcal-tree-name {
  font-weight: 600;
  color: #1b3a2d;
  font-size: 15px;
}

.mcal-tree-pct {
  font-variant-numeric: tabular-nums;
  color: #5a6e63;
  font-size: 14px;
}

/* Attribution footnote */
.mcal-attribution {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid #e4ded2;
}

.mcal-attribution p {
  font-size: 12px;
  line-height: 1.5;
  color: #a8b3ac;
  margin: 0;
}

/* Species page photo */
.mcal-species-photo {
  margin: 0 0 24px;
}

.mcal-species-photo img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.mcal-species-photo figcaption {
  margin-top: 4px;
}

/* FAQ */
.mcal-faq h3 {
  font-size: 17px;
  margin: 18px 0 6px;
}

.mcal-faq p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.6;
  color: #3c4f45;
}

.mcal-map-cta {
  margin-top: 36px;
  padding: 16px 18px;
  background: #f4efe8;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: #3c4f45;
}

.mcal-map-cta p {
  margin: 0;
}
