/* Basic layout */
.container { max-width: 1100px; margin: 0 auto; padding: 16px; box-sizing: border-box; }
.page-title { font-size: 2rem; margin: 8px 0 16px; }

/* two-column layout: aside image + main content */
.rates-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.rates-aside .responsive-image { width: 100%; height: auto; display: block; border-radius: 6px; }
.rates-main { min-width: 0; }

/* lead text */
.lead-text { font-size: 1.05rem; margin: 0 0 12px; color: #222; }

/* pricing grid */
.pricing-heading { font-size: 1.15rem; margin: 12px 0; color: #1b6b86; }
.pricing-grid { display: grid; grid-template-columns: 1fr repeat(3, 120px); gap: 8px; align-items: center; margin-bottom: 12px; }
.pricing-grid--head .col-label { font-weight: 700; color: #fff; background: #8EC0D4; padding: 8px; border-radius: 4px; text-align: center; }
.row-label { font-weight: 700; padding: 8px; background: #AEDAEC; border-radius: 4px; }
.pricing-grid > div { padding: 8px; background: #f7f9fb; border-radius: 4px; }
.full-span { grid-column: 1 / -1; padding: 10px; background: #eef6fa; border-radius: 4px; }

/* notes */
.note { font-size: 0.95rem; }

/* list-based pricing styles */

.pricing-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pricing-item { display: grid; grid-template-columns: 1fr 320px; gap: 12px; align-items: center; padding: 10px; background: #f7f9fb; border-radius: 6px; }
.pricing-item .label { font-weight: 700; color: #1b6b86; }
.pricing-item .single-price { justify-self: end; font-weight: 700; font-size: 1.05rem; }

.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; justify-items: end; }
.prices .col { background: transparent; padding: 6px; border-radius: 4px; text-align: right; }
.col-label { display: block; font-size: 0.85rem; color: #666; }
.col-price { display: block; font-weight: 700; font-size: 1.02rem; color: #222; }

.pricing-note, .full-span { grid-column: 1 / -1; padding: 8px 10px; background: #eef6fa; border-radius: 6px; font-size: 0.95rem; }

/* responsive adjustments */
@media (max-width: 880px) {
  .rates-layout { grid-template-columns: 160px 1fr; }
  .pricing-grid { grid-template-columns: 1fr repeat(3, 100px); }
  .pricing-item { grid-template-columns: 1fr 1fr; }
  .prices { grid-template-columns: repeat(3, minmax(80px, 1fr)); }
}

@media (max-width: 680px) {
  /* collapse to single column: image on top (small) + stacked sections */
  .rates-layout { grid-template-columns: 1fr; }
  .rates-aside { order: -1; }
  .rates-aside .responsive-image { width: 120px; float: right; margin-left: 12px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid--head { display: none; } /* column headers not needed when rows stack */
  .pricing-grid > div { background: transparent; padding: 6px 0; border-radius: 0; }
  .row-label { background: transparent; padding: 6px 0; font-weight: 700; }
  .full-span { background: transparent; padding: 8px 0; }
  .pricing-list { gap: 8px; }
  .pricing-item { grid-template-columns: 1fr; padding: 8px; }

  /* ensure single-price and per-column prices are left-justified on mobile */
  .single-price,
  .prices,
  .prices .col,
  .col-price {
    text-align: left !important;
    justify-self: start !important;
  }

  .single-price { margin-top: 6px; }
  .prices { display: block; margin-top: 6px; }
  .prices .col { text-align: left; padding: 6px 0; }
  .pricing-note, .full-span { background: transparent; padding: 6px 0; }
}

/* small polish */
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color: #222; }

/* single price spanning the three price columns */
.spanned-price {
  grid-column: 2 / -1;    /* span the three price columns (keeps label in column 1) */
  text-align: center;
  font-weight: 700;
  padding: 8px;
  background: #f7f9fb;
  border-radius: 4px;
}

/* ensure stacked/mobile layout still looks correct (grid becomes single column) */
@media (max-width: 680px) {
  .spanned-price { 
    grid-column: auto;     /* allow full-width in the single-column layout */
    padding: 6px 0;
    background: transparent;
  }
}

/* Desktop: allow general text to use full content width (not constrained like mobile) */
@media (min-width: 681px) {
  .rates-main,
  .pricing-block,
  .pricing-list {
    width: 100%;
    max-width: none;
  }

  /* lead text should span the whole content area */
  .lead,
  .lead-text {
    width: 100%;
    max-width: 100%;
  }

  /* pricing notes already span full width; ensure they remain full-width on desktop */
  .pricing-note,
  .full-span {
    grid-column: 1 / -1;
  }
}

/* Ensure lead text spans the full width of the grid (not confined to a single column) */
.rates-layout .lead {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.rates-layout .lead-text {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}