@layer base {
/* ========== Design 1: Detail Page Styles ========== */

/* ========== Breadcrumb ========== */
.d1-breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}
.d1-breadcrumb a {
  color: var(--dark-green-500);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}
.d1-breadcrumb a:hover { color: var(--dark-green-900); }

/* ========== Detail Hero ========== */
.d1-detail-hero {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 0;
}

.d1-detail-hero-accent {
  width: 6px;
  min-height: 60px;
  align-self: stretch;
  background: var(--country-main, var(--olive-green-600));
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.d1-detail-hero-content { flex: 1; min-width: 0; }

.d1-camp-hero {
  align-items: center;
  margin-bottom: 32px;
}
.d1-camp-hero .d1-title { margin-bottom: 0; }

.d1-detail-hero-logo {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
}

.d1-detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--dark-green-600);
  margin-top: -32px;
  margin-bottom: 16px;
}
.d1-detail-location .icon { width: 16px; height: 16px; color: var(--dark-green-500); }

/* ========== Camp Cards (detail page) ========== */
.d1-camp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.d1-camp-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px;
  border-radius: var(--radius-md);
}
/* Hover: .lift .lift--ground (shared.css). */

.d1-camp-card-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.d1-camp-card-logo {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
}

.d1-camp-card-fallback {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  background: rgba(25, 47, 43, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.d1-camp-card-fallback img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.d1-camp-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--dark-green-900);
}

.d1-camp-card-desc {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--dark-green-600);
  margin-bottom: 14px;
}

.d1-camp-card .tag-list { margin-bottom: 8px; }

.d1-camp-card-team {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.d1-camp-card-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.d1-camp-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.d1-camp-card-avatar-initial {
  background: var(--country-main, var(--olive-green-200));
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.d1-camp-card-person-name {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--dark-green-700);
}

.d1-camp-card-orgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(25, 47, 43, 0.07);
}

.d1-camp-card-org {
  display: flex;
  align-items: center;
  gap: 10px;
}

.d1-camp-card-org-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.d1-camp-card-org-initial {
  background: rgba(25, 47, 43, 0.1);
  color: var(--dark-green-600);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.d1-camp-card-org-name {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--dark-green-500);
}

/* ========== Camp Info Fields (camp page) ========== */
.d1-info-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.d1-info-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.d1-info-field dt {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark-green-500);
}

.d1-info-field dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-xl);
  line-height: 1.6;
  color: var(--dark-green-800);
}

.d1-info-chips {
  padding: 0;
  margin: 0;
}

.d1-info-chip {
  background: var(--country-bg, #f0f4f0);
  color: var(--country-dark, #2d4a3e);
  border: 1px solid var(--country-main, #6a9e7a);
}

.action-button {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  background: #F84C01;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.action-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 50%;
  height: 200%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.45) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-18deg);
  opacity: 0;
}
/* Its hover is the glow and the shine, not a rise: the public site has one
   rise, .lift (shared.css, METIS-pub#469). */
.action-button:hover {
  color: #fff;
  animation: action-glow 1.4s ease-in-out infinite;
}
.action-button:hover::after {
  animation: action-shine 3s ease infinite;
}
@keyframes action-glow {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(248,76,1,0.45), var(--elev-2); }
  50%       { box-shadow: 0 0 20px 7px rgba(248,76,1,0.6), 0 4px 14px rgba(248,76,1,0.2); }
}
@keyframes action-shine {
  0%   { left: -80%; opacity: 1; }
  100% { left: 120%; opacity: 1; }
}

/* ========== Organisation Cards (camp page) ========== */
.d1-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.d1-org-card {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: rgba(25, 47, 43, 0.025);
  border: 1px solid rgba(25, 47, 43, 0.06);
  /* A long address in a description must wrap, not widen the page (METIS-pub#499). */
  overflow-wrap: anywhere;
}

.d1-org-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.d1-org-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.d1-org-initial {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--olive-green-200);
  color: var(--dark-green-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.d1-org-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--dark-green-900);
}

.d1-org-desc {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--dark-green-600);
  margin-bottom: 10px;
}

.d1-org-links { font-size: var(--text-base); }
.d1-org-links .icon { width: 14px; height: 14px; }
/* Keep social links clickable above the stretched name-link overlay below. */
.d1-org-card-link .d1-org-links { position: relative; z-index: 1; }

/* Org page hero: initial-letter fallback, matching the org-card filler at hero scale */
.d1-detail-hero-initial {
  background: var(--olive-green-200);
  color: var(--dark-green-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 4.5rem;
  line-height: 1;
}

/* Clickable card: the whole surface highlights on hover, never just an
   underlined name. Applied to a whole-card <a> (gathering/camp chips) and to
   the org card <div> (whose inner social links rule out wrapping it in <a>,
   so the name uses a stretched link — see .d1-org-card-namelink). */
.d1-org-card-link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}
/* Hover: .lift .lift--ground (shared.css). */

/* The name is the anchor; .stretched-link (shared.css) spreads it over the
   whole card so a click anywhere navigates — no underline, no name-only target. */
.d1-org-card-namelink { color: inherit; text-decoration: none; }

/* No description below → no dead space under the header (e.g. gathering cards). */
.d1-org-card-header:last-child { margin-bottom: 0; }

.d1-org-card-heading { display: flex; flex-direction: column; min-width: 0; gap: 2px; }

.d1-org-card-sub {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--dark-green-600);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Splide slideshow for info fields */
.d1-info-field dd.d1-body:has(.splide) {
  max-width: none;
  margin-bottom: 0;
}
.d1-info-field .splide__slide {
  height: 420px;
}
.d1-info-field .splide__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

/* ========== Overview: description + links side-by-side ========== */
.d1-overview {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.d1-overview-desc { flex: 1; min-width: 0; margin-bottom: 0; }
.d1-overview-links { flex-shrink: 0; width: 200px; }
.d1-overview-links .d1-label { margin-bottom: 12px; }
.d1-overview-links .link-row { flex-direction: column; gap: 10px; }

/* ========== Responsive ========== */
@media (max-width: 700px) {
  /* Stretch, not flex-start: a column item at flex-start sizes to its
     content, so a shortened address (`.url-link`) had no width to shrink to
     and set the page's width instead (METIS-pub#541). */
  .d1-overview { flex-direction: column; gap: 20px; align-items: stretch; }
  .d1-overview-links { width: 100%; }
}

@media (max-width: 600px) {
  .d1-detail-hero { flex-direction: column; gap: 16px; }
  .d1-detail-hero-accent { width: 100%; min-height: 4px; align-self: auto; }
  .d1-detail-hero-logo { width: 80px; height: 80px; }
  .d1-detail-hero-initial { font-size: 2.2rem; }
  .d1-camp-card-grid { grid-template-columns: 1fr; }
  .d1-org-grid { grid-template-columns: 1fr; }
  .d1-breadcrumb { padding-top: 40px; }
}
}
