/* Slider Revolution rounds its inline width to integer pixels. At fractional
   browser zoom this can exceed the containing block (e.g. 375px vs 374.8px),
   creating a horizontal scrollbar. Constrain the actual boxes, not the page
   overflow, so text, controls, images and navigation remain available. */
rs-module-wrap,
rs-module {
  max-width: 100% !important;
}

/* X-Game shares the existing project contours and typography. */
.xgame-section > .ct-section-inner-wrap { padding-top: 0; padding-bottom: 20px; }
.xgame-card { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.xgame-copy { padding: 40px; align-self: start; min-width: 0; grid-column: 2; grid-row: 1; }
.xgame-copy .xgame-title { margin: 0 0 20px; }
.xgame-copy p { margin: 0 0 26px; }
.xgame-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; }
.xgame-art { position: relative; width: 100%; height: 100%; min-width: 0; grid-column: 1; grid-row: 1; }
.xgame-art img { position: absolute; inset: 0; }
.xgame-art img, .xgame-detail-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.xgame-detail > .ct-section > .ct-section-inner-wrap { padding-top: 45px; gap: 24px; }
.xgame-detail h1, .xgame-detail h2, .xgame-detail p { margin: 0; }
.xgame-detail-art { width: 100%; aspect-ratio: 1586 / 992; }
.xgame-lead { font-size: 24px; }
.xgame-catalog { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; }
.xgame-catalog article { padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.xgame-portal-link { margin: 12px 0; align-self: center; }
.xgame-detail { color: #000; font-family: 'Overpass'; font-size: 18px; line-height: 1.3; }
.xgame-detail a, .xgame-detail a:visited, .xgame-detail a:hover { color: #000; font-weight: 400; }
.xgame-detail h1, .xgame-detail h2 { color: #000; font-family: 'Prosto One'; line-height: 1.3; }
.xgame-detail h2 { font-size: 24px; }
.xgame-page-nav { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 20px; }
.xgame-page-nav nav { display: flex; gap: 18px; }
.xgame-page-nav [aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.xgame-detail .xgame-catalog article { padding: 0; gap: 0; min-width: 0; }
.xgame-game-art { position: relative; width: 100%; aspect-ratio: 16 / 10; flex-shrink: 0; }
.xgame-game-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.xgame-game-copy { padding: 30px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.xgame-game-copy a { margin-top: auto; }
.xgame-reading { display: flex; flex-direction: column; gap: 20px; width: 100%; padding-top: 28px; }
.xgame-reading p { max-width: 960px; }
@media (max-width: 767px) {
  .xgame-detail { font-size: 16px; }
  .xgame-detail h2 { font-size: 18px; }
  .xgame-game-copy { padding: 25px; }
}
@media (max-width: 767px) {
  .xgame-card, .xgame-catalog { grid-template-columns: 1fr; }
  .xgame-art { grid-column: 1; grid-row: 1; height: auto; aspect-ratio: 1586 / 992; }
  .xgame-copy { grid-column: 1; grid-row: 2; }
  .xgame-copy, .xgame-catalog article { padding: 25px; }
  .xgame-lead { font-size: 20px; }
}

/* Keep the existing X-AGRO cutcornersimage mask and edge-to-edge cover. */
#div_block-111-6 > .cutcornersimage {
  background-image: url('/wp-content/uploads/x-agro-provided.png');
  background-size: cover;
  background-position: center bottom;
  aspect-ratio: 1790 / 787;
}

/* User-supplied X-AERO artwork within the existing diagonal frame. */
#div_block-121-6 > .cutcornersimage {
  background-image: url('/wp-content/uploads/x-aero-provided.png');
  background-size: cover;
  background-position: center center;
  aspect-ratio: 1790 / 787;
}

/* Original description and actions beside the agreed three-phone row. */
#div_block-7-6.phone-model-row {
  display: grid;
  grid-template-columns: 1fr 1.64fr 1fr;
  gap: clamp(6px, 1.2vw, 18px);
  align-items: end;
  align-self: stretch;
  padding: 20px 20px 0;
  min-width: 0;
}
#div_block-7-6.phone-model-row > img {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: clamp(140px, 20vw, 240px);
  object-fit: contain;
  object-position: center bottom;
}

/* Banking artwork fills its half of the frame, including its lower edge. */
#div_block-99-6 {
  position: relative;
  padding: 0;
  align-self: stretch;
  min-width: 0;
  /* Match the card's existing 45-degree, 20px gradient contour. */
  -webkit-mask-image: linear-gradient(45deg, transparent 20px, #000 20px calc(100% - 20px), transparent calc(100% - 20px));
  mask-image: linear-gradient(45deg, transparent 20px, #000 20px calc(100% - 20px), transparent calc(100% - 20px));
}
#div_block-99-6 #image-100-6 {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: left center;
}
@media (max-width: 767px) {
  #div_block-99-6 {
    aspect-ratio: 2900 / 1517;
    -webkit-mask-image: linear-gradient(45deg, transparent 10px, #000 10px calc(100% - 10px), transparent calc(100% - 10px));
    mask-image: linear-gradient(45deg, transparent 10px, #000 10px calc(100% - 10px), transparent calc(100% - 10px));
  }
}

#x-game .xgame-title, #x-game .xgame-description, #x-game .xgame-link, #x-game .xgame-link:hover, #x-game .xgame-link:visited { color: #000; }
#x-game .xgame-link { font-weight: 400; }
/* Reflow the remaining company team cards without vacant slots. */
#div_block-158-306 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; width: 100%; }
#div_block-158-306 > .cutcorners { width: 100%; min-width: 0; }
@media (max-width: 991px) { #div_block-158-306 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { #div_block-158-306 { grid-template-columns: 1fr; gap: 10px; } }
button#link_text-44-155:disabled, button#link_text-34-216:disabled, button#link_text-17-204:disabled, button#link_text-27-255:disabled, button#link_text-34-225:disabled, button#link_text-34-238:disabled {
  font-family: 'Overpass'; font-weight: 400; line-height: 1.6;
  border: 0; background-color: #c04268 !important; color: #fff !important;
  cursor: not-allowed; opacity: 1;
}
.local-project-cta > .ct-section-inner-wrap { padding-top: 40px !important; }
.local-project-cta > .ct-section-inner-wrap,
.xgame-detail > .ct-section > .ct-section-inner-wrap { padding-bottom: 40px !important; }
@media (max-width: 767px) {
  .local-project-cta > .ct-section-inner-wrap { padding-top: 30px !important; }
  .local-project-cta > .ct-section-inner-wrap,
  .xgame-detail > .ct-section > .ct-section-inner-wrap { padding-bottom: 30px !important; }
}

/* Homepage smartphone typography matches the approved X-GAME card. */
#div_block-5-6 #div_block-6-6 { justify-content: flex-start; }
#div_block-5-6 #headline-9-6 {
  font-family: 'Prosto One'; font-size: 24px; font-weight: 700;
  line-height: 1.3; color: #000;
}
#div_block-5-6 #text_block-10-6 {
  font-family: 'Overpass'; font-size: 18px; font-weight: 400;
  line-height: 1.3; color: #000;
}
#div_block-5-6 #link_text-23-6, #div_block-5-6 #link_text-24-6 {
  font-family: 'Overpass'; font-size: 18px; font-weight: 400;
  line-height: 1.6; color: #000;
}
@media (max-width: 1120px) {
  #div_block-5-6 #text_block-10-6,
  #div_block-5-6 #link_text-23-6, #div_block-5-6 #link_text-24-6 { font-size: 16px; }
}
@media (max-width: 991px) {
  #div_block-5-6 #headline-9-6 { font-size: 18px; }
}

/* External project button matches the original ALADDIN button. */
.xgame-detail a.xgame-portal-link{padding-left:30px;padding-right:30px;padding-top:15px;padding-bottom:15px;color:#ffffff;transition-duration:0.2s;font-size:18px;background-color:#c04268;text-decoration:none}
.xgame-detail a.xgame-portal-link:after{background-color:#000000;content:""}
.xgame-detail a.xgame-portal-link:hover{background-color:#ffffff;color:#c04268}
@media (max-width:767px) { .xgame-detail a.xgame-portal-link { font-size:12px; } }
