
/* NN News HP — actual square photographs only */

/* Desktop: align square portraits to the top */
@media screen and (min-width: 701px) {
  .nn-la-desktop .nn-la-photo:has(img[data-nn-la-square="yes"]) {
    align-items: flex-start !important;
    padding: 0 !important;
  }

  .nn-la-desktop .nn-la-photo img[data-nn-la-square="yes"] {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
}

/* Mobile: give square portraits a larger thumbnail area */
@media screen and (max-width: 700px) {
  .nn-la-mobile .nn-la-card:has(img[data-nn-la-square="yes"]) {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr) !important;
  }

  .nn-la-mobile .nn-la-photo:has(img[data-nn-la-square="yes"]) {
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .nn-la-mobile .nn-la-photo img[data-nn-la-square="yes"] {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
}


/* NN-LA-SQUARE-ALIGNMENT-V2 */

/* Desktop: remove container-created top gap */
@media (min-width: 701px) {

  .nn-la-desktop .nn-la-photo:has(img[data-nn-la-square="yes"]) {
    align-self: stretch !important;
    height: 100% !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 0 !important;
  }

  .nn-la-desktop .nn-la-photo img[data-nn-la-square="yes"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: left top !important;
  }
}

/* Mobile: square portraits use exactly the same
   column and padding as ordinary Literature cards */
@media (min-width: 381px) and (max-width: 700px) {

  .nn-la-mobile .nn-la-card:has(img[data-nn-la-square="yes"]) {
    grid-template-columns:
      minmax(0,36%) minmax(0,1fr) !important;
  }
}

@media (max-width: 380px) {

  .nn-la-mobile .nn-la-card:has(img[data-nn-la-square="yes"]) {
    grid-template-columns:
      minmax(0,33%) minmax(0,1fr) !important;
  }
}

@media (max-width: 700px) {

  .nn-la-mobile .nn-la-photo:has(img[data-nn-la-square="yes"]) {
    padding: 10px 8px !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }

  .nn-la-mobile .nn-la-photo img[data-nn-la-square="yes"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    border-radius: 9px !important;
  }
}
