/* conquestadorcasino-ie.com — layout rules loaded last on every page:
   1) block rhythm inside content sections (16px between blocks, one side only);
   2) boxes lose the stray margin of their first/last child, so top = bottom padding;
   3) repeated-item grids are sized by item count and by the content column's own
      width (container query), so rows are always even: 4 items = 2x2 or 4 in a row,
      3 = one column or 3 in a row, odd-count lists = one column. */

.cq-main{container:cqmain/inline-size}

/* 1 — rhythm */
.cq-main .cq-sec>*+*{margin-top:var(--size-3)}
.cq-main .cq-sec>h2+*{margin-top:0}
.cq-main .cq-sec>h3{margin-top:var(--size-4)}
.cq-main .cq-sec>h2+h3{margin-top:0}

/* 2 — boxes: no stray first/last margins */
.cq-main :is(.cq-card,.cq-callout,.cq-duo>div,.cq-tool,.cq-lic>li,.cq-fixes>li,.cq-voices>li,.cq-panels>div,.cq-limits>div,
  .cq-split>div,.cq-tiles>li,.cq-steps>li>div,.cq-time>li,.cq-quotes>li,.cq-sec--tint)>:last-child{margin-bottom:0}
.cq-main :is(.cq-card,.cq-callout,.cq-duo>div,.cq-tool,.cq-lic>li,.cq-fixes>li,.cq-voices>li,.cq-panels>div,.cq-limits>div,
  .cq-split>div,.cq-steps>li>div,.cq-quotes>li)>:first-child{margin-top:0}
.cq-main :is(.cq-card,.cq-duo>div,.cq-panels>div,.cq-limits>div) h3{margin-bottom:var(--size-2)}

/* 3 — count-aware grids */
/* cards with text: 1 column → 2 (even counts) → 3 (3 or 6 items) */
.cq-main :is(.cq-voices,.cq-fixes,.cq-quotes,.cq-lic,.cq-panels,.cq-duo,.cq-keep,.cq-provs){grid-template-columns:minmax(0,1fr)}
@container cqmain (min-width:500px){
  .cq-main :is(.cq-voices,.cq-fixes,.cq-quotes,.cq-lic,.cq-panels,.cq-duo,.cq-keep,.cq-provs):has(>:last-child:nth-child(even)){grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container cqmain (min-width:700px){
  .cq-main :is(.cq-voices,.cq-fixes,.cq-quotes,.cq-provs):has(>:last-child:nth-child(3)),
  .cq-main :is(.cq-voices,.cq-fixes,.cq-quotes,.cq-provs):has(>:last-child:nth-child(6)){grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* small tiles: 2x2 (or 2 per row) → 4 in a row once there is room */
.cq-main :is(.cq-tiles,.cq-tool__out,.cq-pays){grid-template-columns:repeat(2,minmax(0,1fr))}
.cq-main .cq-tool__form{grid-template-columns:minmax(0,1fr)}
@container cqmain (min-width:420px){
  .cq-main .cq-tool__form:has(>:last-child:nth-child(even)){grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container cqmain (min-width:560px){
  .cq-main .cq-pays{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cq-main .cq-tool__form:has(>:last-child:nth-child(3)){grid-template-columns:repeat(3,minmax(0,1fr))}
}
@container cqmain (min-width:700px){
  .cq-main :is(.cq-tiles,.cq-tool__out--4){grid-template-columns:repeat(4,minmax(0,1fr))}
  .cq-main .cq-tool__form:has(>:last-child:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* two-column lists: two columns only for even counts, never more than two */
.cq-main :is(.cq-facts,.cq-why){grid-template-columns:minmax(0,1fr)}
@container cqmain (min-width:560px){
  .cq-main :is(.cq-facts,.cq-why):has(>:last-child:nth-child(even)){grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* tile values: long codes wrap inside the tile instead of spilling out */
.cq-main .cq-tiles b{font-size:1.1rem;overflow-wrap:break-word}
.cq-main .cq-tiles li{min-width:0}
/* aside cards and headings inside boxes: same spacing as content boxes */
.cq-aside .cq-card>:last-child{margin-bottom:0}
.cq-main .cq-steps h3{margin:.3em 0 .45em}
.cq-main .cq-callout h3,.cq-main .cq-duo h3{margin-bottom:var(--size-2)}
