.ctc-member-profile {
  width: min(92rem, calc(100vw - 3rem));
  max-width: min(92rem, calc(100vw - 3rem));
  margin: 0 auto;
  color: var(--wp--preset--color--text-strong);
}

.ctc-member-profile__grid {
  display: flow-root;
}

.ctc-member-profile__grid::after {
  content: "";
  display: table;
  clear: both;
}

.ctc-member-gallery {
  max-width: 400px;
  width: 100%;
  float: left;
  margin: 0 38px 24px 0;
}

.ctc-member-gallery__stage {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  max-width: 400px;
  transition: height 240ms ease;
}

.ctc-member-gallery__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.ctc-member-gallery__slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.ctc-member-gallery__image {
  width: 100%;
  height: auto;
  display: block;
}

.ctc-member-gallery__empty {
  width: 100%;
  min-height: 320px;
  background: linear-gradient(
    135deg,
    var(--wp--preset--color--tertiary) 0%,
    var(--wp--preset--color--accent-soft) 100%
  );
}

.ctc-member-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 18, 17, 0.68);
  color: var(--wp--preset--color--background);
  font-size: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 180ms ease,
    background 180ms ease;
}

.ctc-member-gallery__nav::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--wp--preset--color--background);
  font-size: 26px;
  line-height: 1;
  content: "";
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.ctc-member-gallery__nav--prev::before {
  content: "\2039";
}

.ctc-member-gallery__nav--next::before {
  content: "\203A";
}

.ctc-member-gallery__stage:hover .ctc-member-gallery__nav,
.ctc-member-gallery__nav:focus-visible {
  opacity: 0.5;
}

.ctc-member-gallery__nav:hover {
  background: rgba(20, 18, 17, 0.84);
}

.ctc-member-gallery__nav--prev {
  left: 18px;
  z-index: 1;
}

.ctc-member-gallery__nav--next {
  right: 18px;
  z-index: 1;
}

.ctc-member-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
  max-width: 400px;
}

.ctc-member-gallery__thumb {
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  opacity: 0.6;
  filter: saturate(0.5);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 180ms ease,
    filter 180ms ease;
}

.ctc-member-gallery__thumb:hover,
.ctc-member-gallery__thumb:focus-visible,
.ctc-member-gallery__thumb.is-active {
  opacity: 1;
  filter: saturate(1);
  border-color: var(--wp--preset--color--primary);
  transform: translateY(-2px);
}

.ctc-member-gallery__thumb img {
  width: 100%;
  height: 100%;
  min-height: 84px;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.ctc-member-profile__content {
  padding-top: 0;
  max-width: none;
}

.ctc-member-profile__summary {
  display: block;
}

.ctc-member-profile__title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--wp--preset--color--primary);
  font-weight: 500;
}

.ctc-member-profile__restaurant {
  margin: 24px 0 0;
  font-size: 1.15rem;
  color: var(--wp--preset--color--text-strong);
  font-weight: 700;
}

.ctc-member-profile__site {
  margin: 6px 0 0;
}

.ctc-member-profile__site a {
  color: var(--wp--preset--color--primary);
  font-weight: 700;
  text-decoration: none;
}

.ctc-member-profile__description {
  margin-top: 28px;
  margin-bottom: 28px;
  color: var(--wp--preset--color--text-muted);
  font-size: 1.02rem;
  line-height: 1.95;
}

.ctc-member-profile__description > :first-child {
  margin-top: 0;
}

.ctc-member-profile__description > :last-child {
  margin-bottom: 0;
}

.ctc-member-profile__extra-contacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  row-gap: 20px;
  margin: 0 0 26px;
}

.ctc-member-profile__extra-contact {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 0 22px;
}

.ctc-member-profile__extra-contact:first-child {
  padding-left: 0;
}

.ctc-member-profile__extra-contact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(20, 18, 17, 0.12);
}

.ctc-member-profile__extra-contact:nth-child(4n + 1) {
  padding-left: 0;
}

.ctc-member-profile__extra-contact:nth-child(4n + 1)::before {
  display: none;
}

.ctc-member-profile__extra-contact-title,
.ctc-member-profile__extra-contact-value,
.ctc-member-profile__extra-contact-email {
  margin: 0;
}

.ctc-member-profile__extra-contact-title {
  color: var(--wp--preset--color--text-strong);
  font-weight: 700;
}

.ctc-member-profile__extra-contact-value {
  color: var(--wp--preset--color--text-muted);
  line-height: 1.7;
}

.ctc-member-profile__extra-contact-email a {
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}

.ctc-member-profile__extra-contact-email a:hover,
.ctc-member-profile__extra-contact-email a:focus-visible {
  text-decoration: underline;
}

.ctc-member-contact-block {
  margin-top: 52px;
}

.ctc-member-contact-block__heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.ctc-member-contact-block__heading::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(20, 18, 17, 0.12);
}

.ctc-member-contact-block__title {
  margin: 0;
  color: var(--wp--preset--color--primary);
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 500;
  line-height: 1.1;
}

.ctc-member-contact-block__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 450px);
  gap: 40px;
  align-items: start;
}

.ctc-member-contact-block__grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.ctc-member-contact-block__details {
  display: grid;
  max-width: 560px;
}

.ctc-member-contact-block__item {
  display: grid;
  grid-template-columns: minmax(155px, 180px) minmax(0, 1fr);
  align-items: baseline;
  padding: 8px 0;
}
.ctc-member-contact-block__item > p {
  margin: 0;
}

.ctc-member-contact-block__meta {
  display: inline-grid;
  grid-template-columns: 18px auto;
  gap: 12px;
  align-items: center;
}

.ctc-member-contact-block__icon {
  width: 18px;
  height: 18px;
  color: var(--wp--preset--color--primary);
}

.ctc-member-contact-block__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ctc-member-contact-block__label {
  color: var(--wp--preset--color--text-strong);
  font-weight: 700;
  line-height: 1.4;
}

.ctc-member-contact-block__value {
  display: block;
  color: var(--wp--preset--color--text-muted);
  text-decoration: none;
  min-width: 0;
  font-size: 1.06rem;
  line-height: 1.75;
  align-self: start;
}

a.ctc-member-contact-block__value {
  color: var(--wp--preset--color--primary);
}

.ctc-member-contact-block__value:hover,
.ctc-member-contact-block__value:focus-visible {
  text-decoration: underline;
}

.ctc-member-contact-block__map {
  width: 100%;
  height: 310px;
  background:
    linear-gradient(135deg, rgba(20, 18, 17, 0.04), rgba(175, 33, 79, 0.08)),
    var(--wp--preset--color--background);
  border: 1px solid rgba(20, 18, 17, 0.08);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(20, 18, 17, 0.08);
}

.ctc-member-contact-block__map iframe,
.ctc-member-contact-block__map > div {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.ctc-member-contact-block__map--error {
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--wp--preset--color--text-muted);
  font-size: 0.96rem;
  text-align: center;
}

@media (max-width: 980px) {
  .ctc-member-profile {
    width: min(92rem, calc(100vw - 2rem));
    max-width: min(92rem, calc(100vw - 2rem));
  }

  .ctc-member-profile__grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  .ctc-member-profile__content {
    display: contents;
  }

  .ctc-member-profile__summary {
    order: 1;
  }

  .ctc-member-gallery {
    order: 2;
    float: none;
    margin: 0 auto;
  }

  .ctc-member-gallery,
  .ctc-member-gallery__stage,
  .ctc-member-gallery__thumbs {
    max-width: 400px;
  }

  .ctc-member-profile__content {
    padding-top: 0;
    max-width: none;
  }

  .ctc-member-profile__description {
    margin-top: 0;
    order: 3;
  }

  .ctc-member-contact-block {
    margin-top: 40px;
  }

  .ctc-member-profile__extra-contacts {
    margin-bottom: 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ctc-member-profile__extra-contact {
    padding-left: 22px;
  }

  .ctc-member-profile__extra-contact:nth-child(4n + 1)::before {
    display: block;
  }

  .ctc-member-profile__extra-contact:nth-child(4n + 1) {
    padding-left: 22px;
  }

  .ctc-member-profile__extra-contact:nth-child(2n + 1) {
    padding-left: 0;
  }

  .ctc-member-profile__extra-contact:nth-child(2n + 1)::before {
    display: none;
  }

  .ctc-member-contact-block__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .ctc-member-contact-block__details {
    max-width: none;
  }

  .ctc-member-contact-block__map {
    height: 300px;
  }
}

@media (max-width: 640px) {
  .ctc-member-gallery {
    max-width: 100%;
  }

  .ctc-member-gallery__stage {
    max-width: 100%;
  }

  .ctc-member-gallery__nav {
    opacity: 0.5;
    width: 46px;
    height: 46px;
  }

  .ctc-member-gallery__thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
  }

  .ctc-member-profile__description {
    font-size: 0.98rem;
    line-height: 1.8;
  }

  .ctc-member-profile__extra-contacts {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ctc-member-profile__extra-contact {
    padding: 0;
  }

  .ctc-member-profile__extra-contact::before {
    display: none;
  }

  .ctc-member-contact-block__heading {
    gap: 14px;
    margin-bottom: 22px;
  }

  .ctc-member-contact-block__item {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .ctc-member-contact-block__meta {
    grid-template-columns: 16px auto;
    gap: 10px;
  }

  .ctc-member-contact-block__label {
    line-height: 1.3;
  }

  .ctc-member-contact-block__map {
    height: 260px;
  }

  .ctc-member-contact-block__value {
    font-size: 1rem;
  }
}
