/* =========================================================
   Location Pages (CPT)
   Loaded only on single-location and the /locations/ archive.
   Accent role is played by --primary-light (#02924a); the theme has no
   secondary brand colour.
   ========================================================= */

/* --- Hero: featured image + green scrim, breadcrumb grouped above the title --- */
section.location-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 440px;
  padding: 0; /* override the global `section { padding: 70px 0 }` */
  overflow: hidden;
  background: var(--primary-color);
}

.location-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

/* Guarantees the headline stays legible on any featured image. */
.location-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 62, 25, 0.30) 0%,
    rgba(0, 62, 25, 0.50) 42%,
    rgba(0, 62, 25, 0.92) 100%
  );
}

.location-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 2.25rem;
  padding-bottom: 2.75rem;
}

/* The accent bar brackets breadcrumb + title into one unit. */
.location-hero__headline {
  border-left: 4px solid var(--primary-light);
  padding-left: 1.35rem;
}

.location-hero__crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.location-hero__crumbs a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.15s ease;
}

.location-hero__crumbs a:hover,
.location-hero__crumbs a:focus {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.location-hero__crumbs .sep {
  color: var(--primary-light);
  font-weight: 600;
}

.location-hero__crumbs .current {
  color: rgba(255, 255, 255, 0.95);
}

.location-hero__title {
  margin: 0;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.15;
  max-width: 26ch;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.25);
}

@media (max-width: 575.98px) {
  section.location-hero {
    min-height: 360px;
  }
}

/* --- Content wrapper ---
   .footer_wrapper:before is a 343px decorative graphic pulled 300px upward, so
   the last content block has to reserve room for it — the same job .inner_contents
   does on the other inner pages. */
.location-content {
  position: relative;
  z-index: 2;
  padding-bottom: 260px;
}

@media (max-width: 767.98px) {
  .location-content {
    padding-bottom: 180px;
  }
}

/* --- Body: editor content typography --- */
.location-body {
  padding: 60px 0 40px;
}

.location-body__content {
  font-size: 1.05rem;
  line-height: 1.8;
  letter-spacing: 0.5px;
}

.location-body__content h2,
.location-body__content h3,
.location-body__content h4 {
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
}

/* Headings carry the hero's accent-bar motif down the page. */
.location-body__content h2 {
  font-size: 1.55rem;
  margin-top: 3rem;
  padding-left: 1.15rem;
  border-left: 4px solid var(--primary-light);
}

.location-body__content h3 {
  font-size: 1.25rem;
  margin-top: 2.4rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--primary-light);
}

.location-body__content h4 {
  font-size: 1.1rem;
  margin-top: 2rem;
}

.location-body__content > :first-child {
  margin-top: 0;
}

.location-body__content p {
  margin-bottom: 1.25rem;
}

.location-body__content a {
  color: var(--primary-light);
  font-weight: 600;
}

.location-body__content a:hover {
  color: var(--primary-dark-color);
  text-decoration: underline;
}

.location-body__content ul,
.location-body__content ol {
  margin: 0.25rem 0 1.25rem;
  padding-left: 1.25rem;
}

.location-body__content li {
  margin-bottom: 0.5rem;
}

.location-body__content ul li::marker {
  color: var(--primary-light);
}

.location-body__content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
  box-shadow: 0 0.75rem 2rem rgba(1, 105, 56, 0.12);
}

.location-body__content img.alignnone,
.location-body__content img.aligncenter {
  display: block;
  margin: 1.85rem auto;
}

.location-body__content img.alignleft {
  float: left;
  margin: 0.4rem 1.6rem 1rem 0;
  max-width: 48%;
}

.location-body__content img.alignright {
  float: right;
  margin: 0.4rem 0 1rem 1.6rem;
  max-width: 48%;
}

@media (max-width: 575.98px) {
  .location-body__content img.alignleft,
  .location-body__content img.alignright {
    float: none;
    max-width: 100%;
    margin: 1.85rem 0;
  }
}

.location-body__content figcaption,
.location-body__content .wp-caption-text {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-style: italic;
  color: #6f6f63;
  text-align: center;
}

/* Branded pull-quote. */
.location-body__content blockquote {
  position: relative;
  background: #f4f7f5;
  border-radius: 0.75rem;
  margin: 2.25rem 0;
  padding: 2rem 2rem 1.75rem 2.5rem;
  color: var(--primary-dark-color);
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 500;
  box-shadow: 0 0.5rem 1.75rem rgba(1, 105, 56, 0.07);
  overflow: hidden;
}

.location-body__content blockquote::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--primary-light);
}

.location-body__content blockquote p:last-child {
  margin-bottom: 0;
}

.location-body__content blockquote cite {
  display: block;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 600;
  color: var(--primary-light);
}

.location-body__content blockquote cite::before {
  content: "\2014\00a0";
}

/* Tables — JS wraps each pasted <table> in .location-table for mobile scroll. */
.location-body__content .location-table {
  margin: 1.75rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(1, 105, 56, 0.12);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(1, 105, 56, 0.05);
}

/* Neutralise inline widths/borders pasted from Word/Excel/webpages. */
.location-body__content table[border],
.location-body__content table[width],
.location-body__content table td[width],
.location-body__content table th[width] {
  border: 0;
  width: auto;
}

.location-body__content table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.6;
}

.location-body__content table th,
.location-body__content table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(1, 105, 56, 0.1);
}

.location-body__content table thead th {
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 0;
}

.location-body__content table tbody tr:nth-child(even) {
  background: #f4f7f5;
}

.location-body__content table tbody tr:hover {
  background: rgba(2, 146, 74, 0.08);
}

.location-body__content table tbody tr:last-child td {
  border-bottom: 0;
}

/* --- Local FAQ --- */
.location-faq {
  padding: 20px 0 0;
}

.location-faq .heading h2 {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

/* --- Archive card grid --- */
.location-archive .row {
  row-gap: 1.75rem;
}

.location-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.location-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.12);
}

.location-card__media {
  display: block;
}

.location-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.location-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: var(--primary-color);
  color: rgba(255, 255, 255, 0.6);
  font-size: 2.5rem;
}

.location-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.25rem 1.35rem 1.5rem;
}

.location-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.location-card__title a {
  color: var(--primary-color);
  text-decoration: none;
}

.location-card__title a:hover {
  color: var(--primary-light);
}

.location-card__body p {
  color: #666666;
  margin-bottom: 1rem;
}

.location-card__body .more_link {
  margin-top: auto;
  align-self: flex-start;
}
