/* Lista índice de especialidades con panel de foto pegado. */
@layer components {
  .difference {
    background: var(--petroleo-hondo);
    color: var(--blanco);
    padding-block: var(--section-y);
  }
  .difference__title { font-size: var(--fs-3); margin-bottom: 1.5rem; }
  .difference__text { color: var(--acero-claro); margin-bottom: clamp(2.5rem, 6vw, 5rem); }

  .specialties {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgb(125 139 146 / .55);
  }
  .specialties__item { border-bottom: 1px solid rgb(125 139 146 / .55); }

  .specialty {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.5rem;
    grid-template-areas: "name thumb" "desc thumb";
    gap: 0.5rem 1.25rem;
    align-items: start;
    padding-block: 1.5rem;
    text-decoration: none;
    transition: translate var(--t-base) var(--ease);
  }
  .specialty__name {
    grid-area: name;
    font-size: clamp(1.3rem, 1rem + 1.2vw, 2.1rem);
    font-stretch: 100%;
    font-weight: 650;
    line-height: 1.05;
    letter-spacing: -0.02em;
    transition: color var(--t-fast) var(--ease);
  }
  .specialty__desc { grid-area: desc; color: var(--acero-claro); font-size: 1rem; max-width: 46ch; }
  .specialty__thumb { grid-area: thumb; width: 5.5rem; height: 5.5rem; object-fit: cover; }

  .specialties__panel { display: none; }

  @media (min-width: 60rem) {
    .difference__title { grid-column: 1 / span 5; margin-bottom: 0; }
    .difference__text { grid-column: 7 / span 6; margin-top: 0.4rem; }
    .difference__body { align-items: start; }

    .specialties { grid-column: 1 / span 9; }
    .specialty {
      grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
      grid-template-areas: "name desc";
      gap: 2rem;
      padding-block: 1.75rem;
      align-items: baseline;
    }
    .specialty__thumb { display: none; }
    .specialty:hover,
    .specialty:focus-visible,
    .specialty.is-active { translate: 0.75rem 0; }
    .specialty:hover .specialty__name,
    .specialty:focus-visible .specialty__name,
    .specialty.is-active .specialty__name { color: var(--senal); }

    .specialties__panel {
      display: block;
      grid-column: 10 / -1;
      position: sticky;
      top: calc(var(--header-h) + 2rem);
      height: min(70vh, 34rem);
      margin-right: calc(var(--gutter) * -1);
      overflow: hidden;
      background: rgb(255 255 255 / .05);
    }
    .specialties__shot {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      clip-path: inset(0 0 100% 0);
      scale: 1.08;
      transition: clip-path var(--t-slow) var(--ease), scale var(--t-slow) var(--ease);
    }
    .specialties__shot.is-active { clip-path: inset(0); scale: 1; }
  }
}
