/* Filosofía is read by families comparing the school's purpose on phones and
   desktops. Source prose and images remain in their original DOM order. */
.native-content--identity {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 5rem) 0;
  padding-top: clamp(2rem, 4vw, 4rem);
}
.native-content--identity > :is(.native-navigation, .native-section, span[id]) {
  grid-column: 1 / -1;
}
.native-content--identity > #section-nosotros {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.native-content--identity
  > :is(#filosofia-ideario, #filosofia-proposito, #filosofia-intencion) {
  position: relative;
}
.native-content--identity > .native-section > span[id] {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 0;
  height: 0;
  scroll-margin-top: 7rem;
}
.native-content--identity > .native-section {
  width: 100%;
  max-width: none;
  margin: 0;
  scroll-margin-top: 7rem;
}

/* The route choices read as an editorial index, not another set of cards. */
.native-content--identity > .native-navigation {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin: 0;
  border-block: 1px solid #c9d3e5;
}
.native-content--identity > .native-navigation a {
  justify-content: space-between;
  min-width: 0;
  padding: 1rem 1.25rem;
  border: 0;
  border-inline-end: 1px solid #c9d3e5;
  border-radius: 0;
  color: var(--deep);
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  font-weight: 750;
  line-height: 1.35;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}
.native-content--identity > .native-navigation a:last-child {
  border-inline-end: 0;
}
.native-content--identity > .native-navigation a::after {
  content: "";
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  mask: url("/icons/arrow-up-right.svg") center / contain no-repeat;
}
.native-content--identity > .native-navigation a:hover,
.native-content--identity > .native-navigation a:focus-visible {
  background: var(--blue);
  color: white;
}
.native-content--identity > .native-navigation a:focus-visible {
  outline: 0.2rem solid var(--yellow);
  outline-offset: -0.2rem;
}

/* Ideario: a manifesto, with the source's first sentence as the lead. */
.native-content--identity > #filosofia-ideario {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  overflow: hidden;
  padding: clamp(2rem, 5vw, 5rem);
  border-radius: clamp(1rem, 2vw, 2rem);
  background: linear-gradient(135deg, #08194b 0%, #102471 58%, #1235a8 100%);
  color: white;
}
.native-content--identity > #filosofia-ideario::before,
.native-content--identity > #filosofia-ideario::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(15rem, 33vw, 31rem);
  aspect-ratio: 1;
  border: 1px solid rgb(246 214 103 / 34%);
  border-radius: 50%;
  pointer-events: none;
}
.native-content--identity > #filosofia-ideario::before {
  inset-block-start: -12rem;
  inset-inline-start: -9rem;
  box-shadow: 0 0 0 3.2rem rgb(246 214 103 / 5%);
}
.native-content--identity > #filosofia-ideario::after {
  inset-block-end: -18rem;
  inset-inline-end: -9rem;
  box-shadow: 0 0 0 4.5rem rgb(246 214 103 / 5%);
}
.native-content--identity > #filosofia-ideario > h2 {
  grid-column: 1 / 5;
  width: auto;
  max-width: none;
  margin: 0;
  color: var(--yellow);
  font-size: clamp(2.75rem, 5vw, 5.5rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.055em;
}
.native-content--identity > #filosofia-ideario > p {
  width: auto;
  max-width: none;
  margin: 0;
  padding-top: 1.15rem;
  border-top: 1px solid rgb(255 255 255 / 28%);
  color: #e7ecfb;
  font-size: clamp(1.0625rem, 1.15vw, 1.1875rem);
  line-height: 1.72;
}
.native-content--identity > #filosofia-ideario > p:first-of-type {
  grid-column: 5 / -1;
  padding: 0 0 clamp(0.5rem, 1.5vw, 1.5rem);
  border: 0;
  color: white;
  font-size: clamp(1.375rem, 2.2vw, 2.125rem);
  font-weight: 550;
  line-height: 1.44;
  text-wrap: pretty;
}
.native-content--identity > #filosofia-ideario > p:first-of-type strong {
  color: var(--yellow);
  font-weight: 750;
}
.native-content--identity > #filosofia-ideario > p:nth-of-type(2),
.native-content--identity > #filosofia-ideario > p:nth-of-type(4) {
  grid-column: 1 / 7;
}
.native-content--identity > #filosofia-ideario > p:nth-of-type(3),
.native-content--identity > #filosofia-ideario > p:nth-of-type(5) {
  grid-column: 7 / -1;
}

/* Identidad: three source symbols become alternating chapters, not tiles. */
.native-content--identity > #section-identidad {
  padding: 0;
  border: 0;
}
.native-content--identity #section-identidad > h2 {
  width: 100%;
  max-width: none;
  margin: 0 0 clamp(1.5rem, 3vw, 3rem);
  color: var(--blue);
  font-size: clamp(2.75rem, 5vw, 5rem);
  font-weight: 650;
  line-height: 1.08;
}
.native-content--identity #section-identidad > h2::before {
  content: "";
  display: block;
  width: 4rem;
  height: 0.4rem;
  margin-bottom: 1rem;
  background: var(--yellow);
}
.native-content--identity #section-identidad > .native-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
}
.native-content--identity #section-identidad .native-card-grid > article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.5fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  min-width: 0;
  min-height: 22rem;
  padding: clamp(2rem, 4vw, 4rem);
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: inset 0 1px #d4dce8;
  transition: background-color 250ms ease;
}
.native-content--identity
  #section-identidad
  .native-card-grid
  > article:first-child {
  box-shadow: inset 0 0.3rem var(--yellow);
}
.native-content--identity
  #section-identidad
  .native-card-grid
  > article:nth-child(2) {
  grid-template-columns: minmax(0, 1.5fr) minmax(12rem, 0.8fr);
  background: var(--deep);
  color: white;
}
.native-content--identity
  #section-identidad
  .native-card-grid
  > article:nth-child(3) {
  background: #ffe28a;
}
.native-content--identity #section-identidad .native-card-grid .native-gallery {
  grid-column: 1;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: min(100%, 15rem);
  margin: 0;
  padding: 0.75rem;
  border: 0.4rem solid var(--yellow);
  border-radius: 50%;
  overflow: hidden;
  background: white;
  aspect-ratio: 1;
}
.native-content--identity
  #section-identidad
  .native-card-grid
  > article:nth-child(2)
  .native-gallery {
  grid-column: 2;
  border-color: #ffe28a;
}
.native-content--identity #section-identidad .native-card-grid .native-photo {
  width: 100%;
  max-width: none;
  margin: 0;
}
.native-content--identity
  #section-identidad
  .native-card-grid
  .native-photo
  img {
  width: min(100%, 13.625rem);
  height: auto;
  max-height: none;
  aspect-ratio: 218 / 214;
  margin-inline: auto;
  border-radius: 0;
  object-fit: contain;
}
.native-content--identity #section-identidad .native-card-grid h3,
.native-content--identity #section-identidad .native-card-grid p {
  grid-column: 2;
  min-width: 0;
}
.native-content--identity
  #section-identidad
  .native-card-grid
  > article:nth-child(2)
  :is(h3, p) {
  grid-column: 1;
}
.native-content--identity #section-identidad .native-card-grid h3 {
  align-self: end;
  width: 100%;
  margin: 0 0 1.1rem;
  color: var(--deep);
  font-size: clamp(1.75rem, 2.9vw, 3rem);
  font-weight: 650;
  line-height: 1.15;
  text-wrap: balance;
}
.native-content--identity
  #section-identidad
  .native-card-grid
  > article:nth-child(2)
  h3,
.native-content--identity
  #section-identidad
  .native-card-grid
  > article:nth-child(2)
  p {
  color: white;
}
.native-content--identity #section-identidad .native-card-grid p {
  align-self: start;
  width: 100%;
  max-width: 62ch;
  margin: 0;
  color: #35455a;
  font-size: clamp(1.0625rem, 1.2vw, 1.25rem);
  line-height: 1.7;
}
.native-content--identity #section-identidad > .native-gallery {
  display: grid;
  place-items: center;
  width: 100%;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 4rem);
  border-radius: 0 0 1.5rem 1.5rem;
  background: #102471;
}
.native-content--identity #section-identidad > .native-gallery .native-photo {
  width: min(100%, 50rem);
  max-width: none;
  margin: 0;
}
.native-content--identity
  #section-identidad
  > .native-gallery
  .native-photo
  img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 0.5rem;
}

/* Purpose and long-term intent deliberately use different spatial rhythms. */
.native-content--identity > #filosofia-proposito {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 5rem);
  background: #ffe28a;
}
.native-content--identity > #filosofia-proposito > h2 {
  width: auto;
  max-width: none;
  margin: 0;
  color: var(--deep);
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  line-height: 1.05;
}
.native-content--identity > #filosofia-proposito > p {
  width: auto;
  max-width: 58ch;
  margin: 0;
  color: #172348;
  font-size: clamp(1.25rem, 1.75vw, 1.75rem);
  font-weight: 550;
  line-height: 1.52;
}
.native-content--identity > #filosofia-proposito > p strong {
  color: var(--blue);
  font-weight: 800;
}
.native-content--identity > #filosofia-intencion {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: auto 1fr;
  gap: 1.5rem clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 4rem) 0;
  border-block-start: 0.35rem solid var(--blue);
}
.native-content--identity > #filosofia-intencion > h2,
.native-content--identity > #filosofia-intencion > p {
  grid-column: 1;
  width: auto;
  max-width: none;
  margin: 0;
}
.native-content--identity > #filosofia-intencion > h2 {
  align-self: end;
  color: var(--blue);
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  line-height: 1.05;
  text-wrap: balance;
}
.native-content--identity > #filosofia-intencion > p {
  align-self: start;
  color: var(--ink);
  font-size: clamp(1.125rem, 1.4vw, 1.375rem);
  line-height: 1.65;
}
.native-content--identity > #filosofia-intencion > .native-gallery {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 100%;
  margin: 0;
  padding: 0.7rem;
  background: #eaf0f8;
  transform: rotate(1.2deg);
}
.native-content--identity > #filosofia-intencion .native-photo,
.native-content--identity > #filosofia-intencion .native-photo img {
  width: 100%;
  max-width: none;
  margin: 0;
}
.native-content--identity > #filosofia-intencion .native-photo img {
  height: auto;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 60rem) {
  .native-content--identity > #filosofia-ideario > h2 {
    grid-column: 1 / -1;
  }
  .native-content--identity > #filosofia-ideario > p:first-of-type {
    grid-column: 1 / -1;
  }
  .native-content--identity > #filosofia-ideario > p:nth-of-type(n + 2) {
    grid-column: span 6;
  }
}
@media (max-width: 44rem) {
  .native-content--identity {
    gap: 2.5rem 0;
  }
  .native-content--identity > .native-navigation {
    grid-template-columns: minmax(0, 1fr);
  }
  .native-content--identity > .native-navigation a {
    border-inline-end: 0;
    border-block-end: 1px solid #c9d3e5;
  }
  .native-content--identity > .native-navigation a:last-child {
    border-block-end: 0;
  }
  .native-content--identity > #filosofia-ideario {
    gap: 1.25rem;
    padding: 1.5rem;
  }
  .native-content--identity > #filosofia-ideario > p:nth-of-type(n + 2) {
    grid-column: 1 / -1;
  }
  .native-content--identity #section-identidad .native-card-grid > article,
  .native-content--identity
    #section-identidad
    .native-card-grid
    > article:nth-child(2) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 0;
    min-height: 0;
    padding: 1.75rem 1.5rem;
  }
  .native-content--identity
    #section-identidad
    .native-card-grid
    .native-gallery,
  .native-content--identity
    #section-identidad
    .native-card-grid
    > article:nth-child(2)
    .native-gallery {
    grid-column: 1;
    grid-row: 1;
    width: min(100%, 11rem);
    margin: 0 0 1.5rem;
  }
  .native-content--identity #section-identidad .native-card-grid :is(h3, p),
  .native-content--identity
    #section-identidad
    .native-card-grid
    > article:nth-child(2)
    :is(h3, p) {
    grid-column: 1;
  }
  .native-content--identity #section-identidad .native-card-grid h3 {
    grid-row: 2;
  }
  .native-content--identity #section-identidad .native-card-grid p {
    grid-row: 3;
  }
  .native-content--identity > #filosofia-proposito,
  .native-content--identity > #filosofia-intencion {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding: 2rem 1.5rem;
  }
  .native-content--identity > #filosofia-intencion > h2,
  .native-content--identity > #filosofia-intencion > p,
  .native-content--identity > #filosofia-intencion > .native-gallery {
    grid-column: 1;
  }
  .native-content--identity > #filosofia-intencion > .native-gallery {
    grid-row: auto;
    transform: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .native-content--identity > #filosofia-ideario,
  .native-content--identity > #section-identidad,
  .native-content--identity > #filosofia-proposito,
  .native-content--identity > #filosofia-intencion {
    animation: identity-arrive 550ms var(--ease) both;
  }
  .native-content--identity
    #section-identidad
    .native-card-grid
    .native-gallery {
    transition: transform 250ms var(--ease);
  }
  .native-content--identity
    #section-identidad
    .native-card-grid
    > article:hover
    .native-gallery {
    transform: translateY(-0.25rem) rotate(-2deg);
  }
}
@keyframes identity-arrive {
  from {
    transform: translateY(0.5rem);
  }
  to {
    transform: none;
  }
}
