/* CSV47.6 · Corrección responsive AENOR y cierre de página */

/* Evita desbordamientos internos en grids complejos. */
.csv-trust-shell,
.csv-trust-media,
.csv-trust-copy,
.footer-grid,
.footer-grid > div {
  min-width: 0;
}

/* AENOR: imagen siempre contenida, proporcional y nítida. */
.csv-trust-media {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.csv-trust-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}
.csv-aenor-photo-label {
  max-width: calc(100% - 68px);
  overflow-wrap: anywhere;
}

/* Logo corporativo del footer: escala estable sin deformación. */
footer .footer-grid > div:first-child > img {
  display: block;
  width: clamp(190px, 22vw, 245px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1557 / 844;
  object-fit: contain;
  margin: 0 0 18px;
}

@media (max-width: 800px) {
  .csv-trust-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0;
  }
  .csv-trust-media {
    border-radius: 24px 24px 0 0;
    padding: 14px;
  }
  .csv-trust-copy {
    padding: clamp(24px, 6vw, 38px);
  }
  .csv-aenor-photo-label {
    left: 28px;
    right: 28px;
    bottom: 28px;
    max-width: calc(100% - 56px);
  }
}

@media (max-width: 650px) {
  footer .footer-grid > div:first-child {
    text-align: center;
  }
  footer .footer-grid > div:first-child > img {
    width: min(245px, 78vw);
    margin: 0 auto 18px;
  }
  footer .footer-grid > div:first-child p {
    margin-left: auto;
    margin-right: auto;
    max-width: 34rem;
  }
}

@media (max-width: 560px) {
  .csv-trust-section {
    padding-left: 0;
    padding-right: 0;
  }
  .csv-trust-section > .wrap {
    width: min(100% - 24px, 1180px);
  }
  .csv-trust-shell {
    border-radius: 22px;
  }
  .csv-trust-media {
    padding: 10px;
    border-radius: 22px 22px 0 0;
  }
  .csv-trust-media img {
    border-radius: 15px 15px 0 0;
    transform: none;
  }
  .csv-aenor-photo-label {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0 0 15px 15px;
    font-size: .78rem;
    line-height: 1.35;
  }
  .csv-trust-copy {
    padding: 24px 18px 28px;
  }
  .csv-cert-badge {
    max-width: 100%;
    white-space: normal;
  }
  .csv-aenor-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .csv-aenor-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
}
