/* Feature-row responsive sizing and structural alignment. */

/* === Feature row: mobile sizing fix (day + night) === */
/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .top-feature-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
/* Mobile: keep 1 column BUT shrink tiles + lock aspect ratio */
@media (max-width: 720px) {
  .top-feature-row {
    grid-template-columns: 1fr !important;
    row-gap: 14px !important;
  }
  /* stop any theme CSS from forcing weird widths */
  .top-feature-row .top-feature-v2,
  .top-feature-row .top-feature-v2 .the-feature.square,
  .top-feature-row .top-feature-v2 .the-feature.square a {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* THIS is what fixes the “giant poster” look */
  .top-feature-row .top-feature-v2 .the-feature.square .img {
    aspect-ratio: 16 / 9;          /* pick 16/9 or 2/1 */
    overflow: hidden;
  }
  .top-feature-row .top-feature-v2 .the-feature.square .img img {
    width: 100% !important;
    height: 100% !important;       /* fill the aspect-ratio box */
    object-fit: cover !important;  /* crop nicely */
    display: block;
  }
  /* Optional: if the info text makes cards too tall, tighten it */
  .top-feature-row .top-feature-v2 .the-feature.square .info {
    padding: 8px 12px !important;
  }
  .top-feature-row .top-feature-v2 .the-feature.square .info p {
    display: none !important;       /* keep it super clean on phone */
  }
}

/* DARK + MOBILE: replace Axura's white arc separator */
@media (max-width: 900px) {
  body.dark .pattern-center::after,
  body.dark .headertop-bar::after {
    background: #050814 !important; /* dark base */
  }
}


/* ============================================================
   Feature Row Structural Alignment
   Keeps the front-page feature cards consistent in day/night modes.
   ============================================================ */

/* Keep Axura feature cards structurally consistent between day and night. */
.top-feature-row .top-feature-v2,
.top-feature-row .top-feature-v2 .the-feature.square {
  min-width: 0 !important;
}

.top-feature-row .top-feature-v2 .the-feature.square {
  margin: 0 !important;
}

body.dark .top-feature-row .top-feature-v2 .the-feature.square a {
  display: block !important;
  height: 100% !important;
}

body.dark .top-feature-row .top-feature-v2 .the-feature.square .info {
  inset: 0 !important;
  height: auto !important;
  padding: 0 !important;
  background: rgba(2, 6, 23, 0.68) !important;
}

body.dark .top-feature-row .top-feature-v2 .the-feature.square .info h3,
body.dark .top-feature-row .top-feature-v2 .the-feature.square .info p {
  top: auto !important;
}

body.dark .top-feature-row .top-feature-v2 .the-feature.square .info h3 {
  margin: 30px 0 0 !important;
  padding: 10px !important;
  background: rgba(2, 6, 23, 0.82) !important;
}

body.dark .top-feature-row .top-feature-v2 .the-feature.square .info p {
  padding: 20px !important;
}

@media (max-width: 720px) {
  .top-feature-row .top-feature-v2,
  .top-feature-row .top-feature-v2 .the-feature.square,
  .top-feature-row .top-feature-v2 .the-feature.square a {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .top-feature-row .top-feature-v2 .the-feature.square,
  body.dark .top-feature-row .top-feature-v2 .the-feature.square {
    height: auto !important;
  }

  .top-feature-row .top-feature-v2 .the-feature.square a,
  body.dark .top-feature-row .top-feature-v2 .the-feature.square a {
    display: block !important;
    height: auto !important;
  }

  .top-feature-row .top-feature-v2 .the-feature.square .img {
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
  }

  .top-feature-row .top-feature-v2 .the-feature.square .img img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .top-feature-row .top-feature-v2 .the-feature.square .info,
  body.dark .top-feature-row .top-feature-v2 .the-feature.square .info {
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: auto !important;
    min-height: 46px !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.46), transparent) !important;
  }

  body.dark .top-feature-row .top-feature-v2 .the-feature.square .info {
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.64), transparent) !important;
  }

  .top-feature-row .top-feature-v2 .the-feature.square .info h3,
  body.dark .top-feature-row .top-feature-v2 .the-feature.square .info h3 {
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 0 14px !important;
    background: transparent !important;
    color: #f9fafb !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.72) !important;
  }

  .top-feature-row .top-feature-v2 .the-feature.square .info p {
    display: none !important;
  }
}
