@font-face {
  font-family: "Bungc";
  src: url("../fonts/bungc.woff2") format("opentype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --warm-bg: #EDDCA6;
  --warm-light: #F4EAD0;
  --warm-dark: #b8a888;
  --green-dark: #1a3c34;
  --green-mid: #2d5a4a;
  --text: #2a2a2a;
  --text-light: #555;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lora', Georgia, serif;
  background-color: transparent;
  background-image: url("../images/hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

/* Slight veil overlay to soften background image */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: rgba(237, 220, 166, 0.45);
}

main {
  position: relative;
  z-index: 1;
}

h1, h2, h3 {
  font-family: "Bungc", Georgia, serif;
}

/* Hero */
#home-hero {
  min-height: 100vh;
  position: relative;
  background: none;
}

/* Navigation */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 1.5rem;
  z-index: 100;
}

.navbar-content {
  position: relative;
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo {
  height: 36px;
  width: auto;
}

.navbar a {
  color: var(--green-dark);
  text-decoration: none;
  font-family: "Bungc", Georgia, serif;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.1rem 0.25rem;
  text-shadow: 0 1px 10px rgba(244, 234, 208, 0.7);
  border-bottom: 1px solid transparent;
}

.navbar a:hover {
  color: rgba(26, 60, 52, 0.9);
  border-bottom-color: rgba(26, 60, 52, 0.75);
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--green-dark);
  background: rgba(244, 234, 208, 0.55);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  margin-bottom: 0.75rem;
}

.back-link:hover {
  background: rgba(244, 234, 208, 0.7);
}

.back-link:focus {
  outline: 2px solid rgba(26, 60, 52, 0.55);
  outline-offset: 2px;
}

.hero-title {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  color: white;
  text-align: right;
  font-family: "Bungc", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}

.hero-title span {
  display: block;
}

.hero-title span:first-child {
  font-size: clamp(3.5rem, 7vw, 5.5rem);
}

.hero-title span:last-child {
  font-size: clamp(4.5rem, 9vw, 7rem);
}

/* Content Section */
.content-section {
  min-height: 100vh;
  padding: 3rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.content-section h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  color: var(--green-dark);
}

/* Search */
.search-container {
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  max-width: 700px;
  padding: 0.625rem 1rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  border: 2px solid var(--green-dark);
  background-color: var(--warm-light);
  color: var(--text);
  border-radius: 0;
}

.search-input:focus {
  outline: none;
  background-color: white;
  border-color: var(--green-mid);
}

/* Sets List */
.sets-list {
  list-style: none;
  max-width: 700px;
}

.sets-list li {
  margin-bottom: 0.5rem;
}

.sets-list a {
  display: block;
  padding: 0.75rem 1.25rem;
  background-color: var(--warm-light);
  color: var(--green-dark);
  text-decoration: none;
  font-family: "Bungc", Georgia, serif;
  font-size: 1.1rem;
  border-left: 4px solid var(--green-dark);
  transition: all 0.2s ease;
}

.set-county {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: normal;
}

.no-results {
  color: var(--text-light);
  font-style: italic;
  margin-top: 1rem;
}

/* Content Text */
.content-text {
  max-width: 700px;
  line-height: 1.6;
}

.content-text p {
  margin-bottom: 0.875rem;
}

.content-text p:last-child {
  margin-bottom: 0;
}

.sets-list a:hover {
  background-color: white;
  padding-left: 1.5rem;
}

/* Set Page */
.set-page .set-header {
  border-bottom: 3px solid var(--green-dark);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.set-page .set-header h1 {
  margin-bottom: 0.25rem;
}

.set-page .set-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

.set-intro {
  background-color: var(--warm-light);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--green-mid);
  font-size: 0.95rem;
  color: var(--text);
}

.set-intro p {
  margin: 0;
}

/* Figures */
.figures-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.figure-card {
  background-color: var(--warm-light);
}

.figure-header {
  background-color: var(--green-dark);
  color: var(--warm-light);
  padding: 0.625rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.figure-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.figure-meta {
  font-size: 0.85rem;
  opacity: 0.85;
}

.figure-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.figure-instructions {
  min-width: 0;
}

.figure-instructions p {
  margin-bottom: 0.375rem;
  color: var(--text);
  font-size: 0.9rem;
}

.section-label {
  display: block;
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.625rem;
  margin-bottom: 0.125rem;
}

.section-label:first-child,
p:first-child .section-label {
  margin-top: 0;
}

.figure-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.5rem 0;
}

.figure-list li {
  padding: 0.2rem 0 0.2rem 1.25rem;
  position: relative;
  color: var(--text);
  font-size: 0.9rem;
}

.figure-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--green-mid);
  font-weight: bold;
}

/* Figure Video */
.figure-video {
  flex-shrink: 0;
}

.figure-video .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background-color: var(--green-dark);
}

.figure-video .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  background-color: var(--warm-dark);
  padding-bottom: 56.25%;
  position: relative;
}

.video-placeholder span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
  .figure-body {
    grid-template-columns: 1fr;
  }

  .figure-video {
    order: -1;
  }
}

@media (max-width: 600px) {
  .content-section {
    padding: 2.5rem 1rem 1.5rem;
  }

  .set-page .set-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .figure-header {
    padding: 0.625rem 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .figure-header h2 {
    font-size: 1rem;
  }

  .figure-body {
    padding: 0.875rem 1rem;
  }

  .navbar {
    padding: 0.625rem 1rem;
  }

  .nav-left {
    gap: 1rem;
  }

  .logo {
    height: 32px;
  }

  .navbar a {
    font-size: 0.95rem;
  }

  .hero-title {
    bottom: 1.5rem;
    right: 1rem;
  }
}

.home-cards {
  padding: 3rem 1.25rem;
}

.home-cards-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

/* Base card */
.home-card {
  position: relative;
  height: 260px;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  background-size: cover;      /* fill card, crop if needed */
  background-position: center; /* crop from centre */
  background-repeat: no-repeat;
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
}

/* Dark overlay for readability */
.home-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.35)
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.home-card h2 {
  margin: 0 0 0.3rem 0;
  font-size: 1.8rem;
}

.home-card p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.95;
  line-height: 1.4;
}

/* Background images */
.home-card-about {
  background-image: url("../images/fuinn.png");
}

.home-card-sets {
  background-image: url("../images/seiteanna.png");
}

/* =====================
   Homepage map
   ===================== */

.home-map-section {
  padding: 3rem 1.25rem 0;
}

.home-map-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.ireland-map {
  width: 100%;
  /* Use an aspect ratio to avoid a “boxed map” look while keeping it responsive. */
  aspect-ratio: 1 / 1;
  max-height: 720px;
  margin: 0 auto;
}

.ireland-map--compact {
  aspect-ratio: 1 / 1.15;
  max-height: 520px;
}

.ireland-map-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  padding: 0.35rem 0.55rem;
  background: rgba(24, 90, 64, 0.92);
  color: var(--warm-light);
  border: 1px solid rgba(243, 235, 221, 0.65);
  font-family: "Bungc", Georgia, serif;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateY(-100%);
}

.home-map-noscript {
  max-width: 700px;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.75rem;
}

.ireland-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ireland-county {
  fill: rgba(26, 60, 52, 0.88); /* rich dark green */
  stroke: rgba(244, 234, 208, 0.28); /* subtle warm outline */
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.ireland-set-marker {
  fill: var(--green-dark);
  stroke: var(--warm-light);
  stroke-width: 2;
  cursor: pointer;
}

.ireland-set-marker:hover {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.15);
}

/* =====================
   Sets page (map + search + list)
   ===================== */

.sets-page {
  min-height: 100vh;
  padding: 3rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.sets-page-header {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.sets-page-title {
  margin: 0 0 0.5rem 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-family: "Bungc", Georgia, serif;
  color: var(--green-dark);
  letter-spacing: 0.03em;
}

.sets-page-intro {
  margin: 0 0 1rem 0;
  color: var(--text-light);
  line-height: 1.6;
}

.sets-search {
  margin-top: 0.5rem;
}

.sets-search-input {
  width: 100%;
  max-width: 760px;
  padding: 0.9rem 1rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  border: 1px solid rgba(26, 60, 52, 0.35);
  background-color: rgba(244, 234, 208, 0.8);
  color: var(--text);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.sets-search-input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(26, 60, 52, 0.6);
}

.sets-page-body {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.sets-page-map {
  position: sticky;
  top: 1.25rem;
}

.sets-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.sets-count {
  color: var(--text-light);
  font-size: 0.95rem;
}

.sets-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 0;
}

.sets-result {
  border-bottom: 0;
  margin-bottom: 0.6rem;
}

.sets-result-link {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.85rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 14px;
  background: rgba(244, 234, 208, 0.48);
  backdrop-filter: blur(8px);
  border: 0;
  box-shadow: 0 8px 18px rgba(0,0,0,0.09);
}

.sets-result-title {
  font-family: "Bungc", Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--green-dark);
}

.sets-result-link:hover {
  background: rgba(255, 255, 255, 0.56);
}

.sets-result-link:focus {
  outline: 2px solid rgba(26, 60, 52, 0.6);
  outline-offset: 2px;
  border-radius: 14px;
}

.sets-empty {
  margin-top: 1rem;
  color: var(--text-light);
  font-style: italic;
}

.sets-page-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.sets-browse-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 60, 52, 0.55);
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color 160ms ease, border-bottom-color 160ms ease;
}

.sets-browse-all::after {
  content: "→";
  display: inline-block;
  transform: translateY(1px);
}

.sets-browse-all:hover {
  color: var(--green-dark);
  border-bottom-color: rgba(26, 60, 52, 0.9);
  background-color: rgba(244, 234, 208, 0.55);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
}

/* =====================
   Browse-all page (A–Z)
   ===================== */

.browse-page {
  min-height: 100vh;
  padding: 3rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.browse-results-list {
  column-count: 3;
  column-gap: 2rem;
}

.browse-item {
  break-inside: avoid;
}

.browse-results-list .sets-result-link {
  padding: 0.7rem 0.25rem;
}

@media (max-width: 980px) {
  .browse-results-list {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .browse-results-list {
    column-count: 1;
  }
}

.sets-page-results--updated .sets-results-meta,
.sets-page-results--updated .sets-results-list {
  animation: setsPulse 320ms ease-out;
}

@keyframes setsPulse {
  from {
    background-color: rgba(244, 234, 208, 0.65);
  }
  to {
    background-color: transparent;
  }
}

/* Desktop layout */
@media (min-width: 900px) {
  .home-cards-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .home-map-section {
    padding: 2.25rem 1rem 0;
  }

  .ireland-map {
    aspect-ratio: 1 / 1.1;
  }
}

@media (max-width: 980px) {
  .sets-page-body {
    grid-template-columns: 1fr;
  }

  .sets-page-map {
    position: relative;
    top: auto;
  }

  .ireland-map--compact {
    max-height: 460px;
  }
}

/* =====================
   Footer
   ===================== */

.site-footer {
  margin-top: 3rem;
  background-color: transparent;
  color: #fff;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-footer-title {
  font-family: "Bungc", Georgia, serif;
  letter-spacing: 0.03em;
}

.site-footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  border-bottom-color: rgba(255, 255, 255, 0.7);
}

.site-footer-nav a,
.site-footer-contact a {
  font-family: "Bungc", Georgia, serif;
}

.site-footer-contact a {
  opacity: 0.95;
}

@media (max-width: 600px) {
  .site-footer {
    padding: 1.25rem 1rem;
  }
}

/* =====================
   Fúinn + Glac Páirt pages
   ===================== */

.fuinn-page,
.glac-pairt-page {
  min-height: 100vh;
}

.fuinn-page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--green-dark);
  margin-bottom: 1.75rem;
}

.fuinn-section {
  padding: 3rem 1.5rem 2.5rem;
  max-width: 760px;
  margin: 0 auto;
  border-bottom: 1px solid var(--warm-dark);
}

.fuinn-section:last-child {
  border-bottom: none;
}

.fuinn-section-title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--green-dark);
  margin-bottom: 1.25rem;
}

/* An Scéal photo layout */
.sceal-layout {
  overflow: hidden;
}

.sceal-photo {
  float: left;
  margin: 0 1.75rem 1rem 0;
  shape-outside: circle(50%);
}

.sceal-photo img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--green-dark);
  display: block;
}

.fuinn-text {
  line-height: 1.75;
  font-size: 1.05rem;
}

.fuinn-text p {
  margin-bottom: 1rem;
}

.fuinn-text p:last-child {
  margin-bottom: 0;
}

.fuinn-text ul {
  margin: 0.75rem 0 1rem 0;
  padding-left: 0;
  list-style: none;
}

.fuinn-text ul li {
  padding: 0.25rem 0 0.25rem 1.5rem;
  position: relative;
}

.fuinn-text ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--green-mid);
  font-weight: bold;
}

/* Bí Linn CTA section */
.fuinn-section--cta {
  max-width: 760px;
}

.cta-tier {
  background-color: var(--warm-light);
  border-left: 4px solid var(--green-mid);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.cta-tier--directors {
  background-color: var(--green-dark);
  border-left: 4px solid var(--warm-dark);
  color: var(--warm-light);
}

.cta-tier-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  color: var(--warm-light);
}

.cta-tier-intro {
  line-height: 1.6;
  margin-bottom: 1.25rem;
  font-size: 0.975rem;
}

.cta-tier--directors .cta-tier-intro {
  color: var(--warm-light);
  opacity: 0.9;
}

/* Email signup */
.email-signup-form {
  margin-top: 0.5rem;
}

.email-signup-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.email-signup-row .form-input {
  flex: 1 1 240px;
}

/* Shared form elements */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: var(--green-dark);
  margin-bottom: 0.375rem;
}

.cta-tier--directors .form-label {
  color: var(--warm-light);
  opacity: 0.85;
}

.form-input {
  width: 100%;
  padding: 0.625rem 1rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  border: 2px solid var(--green-dark);
  background-color: var(--warm-light);
  color: var(--text);
  border-radius: 0;
}

.form-input:focus {
  outline: none;
  background-color: white;
  border-color: var(--green-mid);
}

.cta-tier--directors .form-input {
  background-color: rgba(255,255,255,0.08);
  border-color: var(--warm-dark);
  color: var(--warm-light);
}

.cta-tier--directors .form-input::placeholder {
  color: var(--warm-dark);
}

.cta-tier--directors .form-input:focus {
  background-color: rgba(255,255,255,0.14);
  border-color: var(--warm-light);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-primary {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  background-color: var(--green-dark);
  color: var(--warm-light);
  font-family: "Bungc", Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.btn-primary:hover {
  background-color: var(--green-mid);
}

.cta-tier--directors .btn-primary {
  background-color: var(--warm-dark);
  color: var(--green-dark);
}

.cta-tier--directors .btn-primary:hover {
  background-color: var(--warm-light);
}

/* Visually hidden (accessibility) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Glac Páirt page */
.glac-pairt-section {
  padding: 3rem 1.5rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
  border-bottom: 1px solid var(--warm-dark);
}

.glac-pairt-section:last-child {
  border-bottom: none;
}

#rang-map {
  height: 450px;
  border: 2px solid var(--green-dark);
  margin-bottom: 0.5rem;
}

/* Leaflet marker override */
.rang-map-pin {
  width: 16px;
  height: 16px;
  background-color: var(--green-dark);
  border: 2px solid var(--warm-light);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.rang-form {
  max-width: 640px;
}

/* Responsive: Fúinn / Glac Páirt */
@media (max-width: 600px) {
  .fuinn-section,
  .glac-pairt-section {
    padding: 2rem 1rem 2rem;
  }

  .email-signup-row {
    flex-direction: column;
  }

  .email-signup-row .form-input {
    flex: none;
    width: 100%;
  }

  #rang-map {
    height: 320px;
  }

  .sceal-photo {
    float: none;
    margin: 0 0 1.25rem 0;
    shape-outside: none;
  }
}
