/* /css/alternating-squares.css */

.alt-squares {
  width: 100%;
}

.alt-squares__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

/* Alternate row layout */
.alt-squares__row--reverse .alt-squares__tile--text {
  order: 2;
}
.alt-squares__row--reverse .alt-squares__tile--image {
  order: 1;
}

/* Each tile is a perfect square */
.alt-squares__tile {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
}

/* TEXT TILE */
.alt-squares__tile--text {
  background: #f4efe6; /* tweak to match your site */
  display: grid;
  place-items: center;
}

.alt-squares__content {
  width: min(520px, 80%);
}

.alt-squares__title {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
  margin: 0 0 12px;
  color: #111;
}

.alt-squares__body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.5;
  margin: 0 0 22px;
  color: #222;
  max-width: 52ch;
}

/* CTA (simple “Enquire” pill + line) */
.alt-squares__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid #222;
  border-radius: 8px;
  text-decoration: none;
  color: #111;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.alt-squares__cta-line {
  display: inline-block;
  width: 34px;
  height: 1px;
  background: currentColor;
}

/* IMAGE TILE */
.alt-squares__tile--image {
  background: #fff; /* keeps it clean if image has transparent edges */
  display: grid;
  place-items: center;
}

.alt-squares__img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* KEY: no crop, preserves aspect ratio */
  object-position: center;
  display: block;
}

/* Mobile: stack, still squares */
@media (max-width: 900px) {
  .alt-squares__row {
    grid-template-columns: 1fr;
  }

  /* When stacked, let the text come first */
  .alt-squares__row--reverse .alt-squares__tile--text,
  .alt-squares__row--reverse .alt-squares__tile--image {
    order: initial;
  }
}
