/* ===================================================
   CMS Grid – Responsive Column Layouts
   Include this file on all public pages that render
   CMS content created with the column-layout editor.
   All columns stack to 100 % width below 768 px.
   =================================================== */

.cms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.cms-row + .cms-row {
  margin-top: 1rem;
}

.cms-col {
  min-width: 0;
  flex: 1 1 0%;
}

/* -- 2 columns 50 / 50 -- */
.cms-row.cols-2 > .cms-col {
  flex: 1 1 0%;
}

/* -- 3 columns 33 / 33 / 33 -- */
.cms-row.cols-3 > .cms-col {
  flex: 1 1 0%;
}

/* -- 4 columns 25 / 25 / 25 / 25 -- */
.cms-row.cols-4 > .cms-col {
  flex: 1 1 0%;
}

/* -- 2 columns 66 / 33 -- */
.cms-row.cols-2-1 > .cms-col:first-child {
  flex: 2 1 0%;
}
.cms-row.cols-2-1 > .cms-col:last-child {
  flex: 1 1 0%;
}

/* -- 2 columns 33 / 66 -- */
.cms-row.cols-1-2 > .cms-col:first-child {
  flex: 1 1 0%;
}
.cms-row.cols-1-2 > .cms-col:last-child {
  flex: 2 1 0%;
}

/* -- 2 columns 75 / 25 -- */
.cms-row.cols-3-1 > .cms-col:first-child {
  flex: 3 1 0%;
}
.cms-row.cols-3-1 > .cms-col:last-child {
  flex: 1 1 0%;
}

/* -- 2 columns 25 / 75 -- */
.cms-row.cols-1-3 > .cms-col:first-child {
  flex: 1 1 0%;
}
.cms-row.cols-1-3 > .cms-col:last-child {
  flex: 3 1 0%;
}

/* -- 3 columns 50 / 25 / 25 -- */
.cms-row.cols-2-1-1 > .cms-col:first-child {
  flex: 2 1 0%;
}
.cms-row.cols-2-1-1 > .cms-col:nth-child(2),
.cms-row.cols-2-1-1 > .cms-col:nth-child(3) {
  flex: 1 1 0%;
}

/* -- 3 columns 25 / 50 / 25 -- */
.cms-row.cols-1-2-1 > .cms-col:first-child,
.cms-row.cols-1-2-1 > .cms-col:nth-child(3) {
  flex: 1 1 0%;
}
.cms-row.cols-1-2-1 > .cms-col:nth-child(2) {
  flex: 2 1 0%;
}

/* -- 3 columns 25 / 25 / 50 -- */
.cms-row.cols-1-1-2 > .cms-col:first-child,
.cms-row.cols-1-1-2 > .cms-col:nth-child(2) {
  flex: 1 1 0%;
}
.cms-row.cols-1-1-2 > .cms-col:nth-child(3) {
  flex: 2 1 0%;
}

/* -- Mobile: stack everything -- */
@media (max-width: 768px) {
  .cms-row {
    flex-direction: column;
  }

  .cms-row > .cms-col {
    flex: 1 1 100% !important;
  }
}
