.directory-page {
  visibility: hidden;
  background: #f5f8fa;
  color: #132434;
  scrollbar-color: #8abebb #e8eef1;
}

.directory-page ::selection {
  background: rgba(0, 166, 166, 0.2);
  color: #071827;
}

.directory-page.directory-ready {
  visibility: visible;
}

.directory-page [hidden] {
  display: none !important;
}

.directory-header {
  position: relative;
}

.directory-header .nav-links a[aria-current="page"] {
  color: #8fe0db;
}

.directory-main {
  margin: 0 auto;
  max-width: 1480px;
  padding: 0 clamp(20px, 4vw, 64px) 96px;
}

.directory-hero {
  align-items: center;
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.55fr);
  min-height: 300px;
  padding: clamp(34px, 5vw, 58px) 0 48px;
}

.directory-hero-copy {
  align-self: center;
  max-width: 760px;
}

.directory-kicker {
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.directory-hero h1 {
  color: var(--navy);
  font-size: clamp(3rem, 6vw, 5.4rem);
  letter-spacing: -0.04em;
  line-height: 0.94;
  margin: 0;
  max-width: 10ch;
}

.directory-hero-copy > p:last-child {
  color: #526273;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.6;
  margin: 28px 0 0;
  max-width: 54ch;
}

.directory-hero-visual {
  align-content: end;
  background:
    linear-gradient(180deg, rgba(7, 24, 39, 0.08) 15%, rgba(7, 24, 39, 0.86) 100%),
    url("../assets/restaurants/uk-city-dining-hero.webp") center / cover;
  border-radius: 18px;
  color: #f7ffff;
  display: grid;
  justify-self: end;
  min-height: 220px;
  overflow: hidden;
  padding: 22px;
  width: min(100%, 350px);
}

.directory-hero-visual span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.directory-hero-visual strong {
  font-size: clamp(1.55rem, 3vw, 2.8rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 12ch;
}

.directory-search {
  background: #ffffff;
  border: 1px solid rgba(7, 24, 39, 0.11);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(28, 61, 76, 0.08);
  padding: clamp(24px, 4vw, 42px);
}

.directory-search-heading {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.directory-search h2,
.directory-results h2 {
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
  margin: 0;
}

#directory-status {
  color: #657586;
  font-size: 0.92rem;
  margin: 0;
}

.directory-filter-grid {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(140px, 1fr)) auto;
}

.directory-field {
  display: grid;
  gap: 8px;
}

.directory-field span {
  color: #34495a;
  font-size: 0.82rem;
  font-weight: 700;
}

.directory-field input,
.directory-field select {
  appearance: none;
  background: #f7fafb;
  border: 1px solid #a9b6c0;
  border-radius: 12px;
  color: #102333;
  font: inherit;
  min-height: 52px;
  padding: 0 16px;
  width: 100%;
}

.directory-field input::placeholder {
  color: #687785;
  opacity: 1;
}

.directory-field input:focus,
.directory-field select:focus,
.directory-clear:focus-visible,
.directory-card-action:focus-visible,
.review-page-button:focus-visible {
  outline: 3px solid rgba(0, 120, 124, 0.28);
  outline-offset: 2px;
}

.directory-clear {
  background: #e3f5f3;
  border: 1px solid #83c9c5;
  border-radius: 12px;
  color: #075e62;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 52px;
  padding: 0 20px;
  white-space: nowrap;
}

.directory-clear:active,
.directory-card-action:active,
.review-page-button:active {
  transform: translateY(1px);
}

.directory-results {
  padding: 62px 0 20px;
}

.directory-results-heading {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

#directory-count {
  color: #657586;
  font-size: 0.95rem;
}

.directory-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-card {
  background: #ffffff;
  border: 1px solid rgba(7, 24, 39, 0.12);
  border-radius: 18px;
  display: grid;
  grid-template-columns: minmax(180px, 0.78fr) minmax(0, 1.22fr);
  min-height: 270px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 220ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 220ms cubic-bezier(0.23, 1, 0.32, 1), transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.directory-card:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 166, 166, 0.24);
  outline: 2px solid var(--teal-dark);
  outline-offset: 3px;
}

.directory-card-platform {
  border: 2px solid var(--teal);
  box-shadow: 0 0 0 1px rgba(0, 166, 166, 0.12), 0 16px 46px rgba(0, 166, 166, 0.22);
}

.directory-card:active {
  transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
  .directory-card:hover {
    border-color: rgba(0, 120, 124, 0.48);
    box-shadow: 0 18px 48px rgba(30, 71, 83, 0.11);
    transform: translateY(-2px);
  }

  .directory-card-platform:hover {
    border-color: #00b9b9;
    box-shadow: 0 0 0 2px rgba(0, 166, 166, 0.16), 0 20px 58px rgba(0, 166, 166, 0.3);
  }
}

.directory-featured-badge {
  background: var(--teal);
  border-radius: 10px 0 0 10px;
  box-shadow: 0 8px 24px rgba(0, 80, 84, 0.26);
  color: #032e31;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  padding: 10px 14px;
  position: absolute;
  right: 0;
  text-transform: uppercase;
  top: 18px;
  z-index: 2;
}

.directory-card-media {
  background: #dce9e9;
  min-height: 240px;
  overflow: hidden;
}

.directory-card-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.directory-card-body {
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.directory-card-meta,
.restaurant-detail-meta {
  color: #5e6c79;
  font-size: 0.86rem;
  font-weight: 650;
  margin: 0 0 14px;
}

.directory-card h3 {
  color: var(--navy);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0;
}

.directory-card-summary {
  color: #596978;
  line-height: 1.55;
  margin: 15px 0 22px;
}

.directory-card-footer {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: auto;
  flex-wrap: wrap;
}

.directory-affordability {
  color: #08756f;
  display: inline-block;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-top: 7px;
}

.directory-rating {
  color: #173848;
  font-size: 0.92rem;
  font-weight: 750;
}

.directory-card-action,
.review-page-button {
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 12px;
  color: #f7ffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  align-items: center;
  min-height: 44px;
  padding: 0 17px;
  text-decoration: none;
}

.directory-message {
  background: #ffffff;
  border: 1px solid rgba(7, 24, 39, 0.13);
  border-radius: 18px;
  padding: 38px;
  text-align: center;
}

.directory-message h3 {
  color: var(--navy);
  font-size: 1.55rem;
  margin: 0;
}

.directory-message p {
  color: #657586;
  margin: 10px auto 20px;
}

.directory-skeleton {
  animation: directory-pulse 1.5s ease-in-out infinite;
  background: linear-gradient(100deg, #e7eef1 30%, #f4f7f8 48%, #e7eef1 66%);
  background-size: 220% 100%;
  border-radius: 18px;
  min-height: 270px;
}

.restaurant-detail {
  border-top: 1px solid rgba(7, 24, 39, 0.14);
  border-bottom: 1px solid rgba(7, 24, 39, 0.14);
  margin: 0 0 58px;
  padding: 58px 0;
}

.directory-pagination { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding-top: 34px; }
.directory-pagination span { color: #526273; font-weight: 700; }

.directory-page-numbers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.directory-page-number {
  justify-content: center;
  min-width: 44px;
  padding-left: 12px;
  padding-right: 12px;
}

.directory-page-number.is-current {
  background: #0e8f88;
  border-color: #0e8f88;
  box-shadow: 0 0 0 3px rgba(14, 143, 136, 0.16);
}

.directory-page-number.is-current:hover,
.directory-page-number.is-current:focus-visible {
  background: #08756f;
  border-color: #08756f;
}

.restaurant-facts { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 42px; }
.restaurant-fact-card { background: #fff; border: 1px solid rgba(7, 24, 39, 0.12); border-radius: 16px; padding: 24px; }
.restaurant-fact-card h3,
.restaurant-fact-card h2 { color: var(--navy); font-size: 1.2rem; margin: 0 0 16px; }
.restaurant-price strong { color: var(--teal-dark); font-size: 2.7rem; }
.restaurant-hours { list-style: none; margin: 0; padding: 0; }
.restaurant-hours li { border-bottom: 1px solid rgba(7, 24, 39, 0.08); color: #405565; padding: 7px 0; }
.restaurant-feature-group + .restaurant-feature-group { margin-top: 16px; }
.restaurant-feature-group > strong { color: #304556; display: block; margin-bottom: 8px; }
.restaurant-feature-group > div { display: flex; flex-wrap: wrap; gap: 7px; }
.restaurant-feature-group span { background: #eaf6f5; border-radius: 999px; color: #16575a; font-size: .83rem; padding: 6px 9px; }
.restaurant-facts-note { color: #657586; font-size: .86rem; grid-column: 1 / -1; margin: 0; }

.restaurant-detail-hero {
  display: grid;
  gap: clamp(28px, 5vw, 70px);
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.restaurant-detail-image {
  background: #dce9e9;
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  max-height: 420px;
  min-height: 320px;
  overflow: hidden;
}

.restaurant-detail-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.restaurant-detail-copy {
  align-self: center;
}

.restaurant-detail-copy h2,
.restaurant-detail-copy h1 {
  color: var(--navy);
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
}

.restaurant-detail-description {
  color: #526273;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 24px 0;
  max-width: 58ch;
}

.restaurant-address {
  color: #304556;
  font-style: normal;
  line-height: 1.55;
}

.restaurant-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.restaurant-detail-actions .button {
  border-radius: 12px;
}

.restaurant-detail-actions .button-secondary {
  background: #08756f;
  border-color: #08756f;
  box-shadow: 0 10px 24px rgba(8, 117, 111, 0.2);
  color: #ffffff;
}

.restaurant-detail-actions .button-secondary:hover,
.restaurant-detail-actions .button-secondary:focus-visible {
  background: #065d59;
  border-color: #065d59;
  color: #ffffff;
}

.restaurant-booking {
  background: #ffffff;
  border: 1px solid rgba(7, 24, 39, 0.12);
  border-radius: 18px;
  box-shadow: 0 18px 54px rgba(28, 61, 76, 0.09);
  display: grid;
  gap: clamp(24px, 4vw, 54px);
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 0.66fr);
  margin-top: 42px;
  padding: clamp(22px, 4vw, 38px);
}

.restaurant-booking-intro {
  align-self: start;
  padding-top: 8px;
}

.restaurant-booking-intro h3 {
  color: var(--navy);
  font-size: clamp(1.8rem, 3.3vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0;
}

.restaurant-booking-intro > p:last-child {
  color: #526273;
  line-height: 1.6;
  margin: 18px 0 0;
  max-width: 34ch;
}

.restaurant-booking-frame {
  background: #f5f8fa;
  border: 1px solid rgba(7, 24, 39, 0.13);
  border-radius: 14px;
  height: min(760px, calc(100dvh - 90px));
  min-height: 640px;
  width: 100%;
}

.restaurant-profile-main {
  padding-top: clamp(58px, 8vw, 110px);
}

.restaurant-profile-back {
  color: var(--teal-dark);
  display: inline-flex;
  font-weight: 750;
  margin-bottom: 34px;
}

.restaurant-platform-note {
  background: #fff8e8;
  border: 1px solid #e4c878;
  border-radius: 14px;
  color: #594817;
  line-height: 1.55;
  margin: 26px 0 0;
  max-width: 58ch;
  padding: 16px 18px;
}

.restaurant-profile-rating {
  align-items: baseline;
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.restaurant-profile-rating strong {
  color: var(--teal-dark);
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.restaurant-profile-rating span {
  color: #657586;
}

.restaurant-reviews {
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 0.64fr);
  padding-top: 82px;
}

.review-summary {
  align-self: start;
  position: sticky;
  top: 110px;
}

.review-summary h3,
.review-list-heading h3 {
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
  margin: 0;
}

.review-score {
  color: var(--teal-dark);
  display: block;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 760;
  letter-spacing: -0.07em;
  line-height: 1;
  margin-top: 20px;
}

.review-source {
  color: #657586;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 10px;
}

.review-list-heading {
  align-items: baseline;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.review-list-heading span {
  color: #657586;
  font-size: 0.92rem;
}

.review-list article {
  border-bottom: 1px solid rgba(7, 24, 39, 0.14);
  padding: 28px 0;
}

.review-list article:first-child {
  padding-top: 18px;
}

.review-head {
  align-items: baseline;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.review-head strong {
  color: var(--navy);
}

.review-head span {
  color: var(--teal-dark);
  font-weight: 760;
}

.review-list p {
  color: #3d5262;
  line-height: 1.68;
  margin: 15px 0 10px;
}

.review-list time,
.review-attribution {
  color: #71808d;
  font-size: 0.82rem;
}

.review-pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 26px;
}

.review-page-button[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.restaurant-detail-loading {
  min-height: 460px;
}

.directory-footer {
  align-items: start;
}

.directory-footer > div p {
  color: #b8cbd5;
  line-height: 1.5;
  max-width: 38ch;
}

@keyframes directory-pulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 1080px) {
  .directory-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .directory-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .directory-hero,
  .restaurant-detail-hero,
  .restaurant-reviews,
  .restaurant-facts {
    grid-template-columns: 1fr;
  }

  .directory-hero {
    gap: 24px;
    min-height: 0;
    padding: 30px 0 32px;
  }

  .directory-hero h1 {
    font-size: clamp(2.7rem, 13vw, 3.45rem);
    line-height: 0.96;
  }

  .directory-hero-copy > p:last-child {
    font-size: 1rem;
    line-height: 1.55;
    margin-top: 18px;
  }

  .directory-hero-visual {
    justify-self: stretch;
    min-height: 160px;
    padding: 18px;
    width: 100%;
  }

  .directory-hero-visual strong {
    font-size: 1.5rem;
    max-width: 15ch;
  }

  .directory-search {
    border-radius: 16px;
    padding: 22px;
  }

  .directory-search-heading,
  .directory-results-heading,
  .review-list-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-filter-grid,
  .directory-card {
    grid-template-columns: 1fr;
  }

  .restaurant-booking {
    grid-template-columns: 1fr;
  }

  .restaurant-booking-frame {
    height: 720px;
    min-height: 620px;
  }
  .directory-card-media {
    min-height: 220px;
  }

  .restaurant-detail-image {
    min-height: 0;
  }

  .review-summary {
    position: static;
  }

  .directory-footer {
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .directory-card,
  .directory-clear,
  .directory-card-action,
  .review-page-button {
    transition: none;
  }

  .directory-skeleton {
    animation: none;
  }
}
