:root {
  /* Sampled directly from the Communityhub.ie logo: blue #1800AD, orange #FF751F. */
  --color-primary: #1800ad;
  --color-primary-dark: #100070;
  --color-accent: #ff751f;
  --color-bg: #f5f6fa;
  --color-surface: #ffffff;
  --color-border: #dde1ea;
  --color-text: #1a1a2e;
  --color-muted: #5c6270;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(24, 0, 173, 0.1), 0 1px 2px rgba(24, 0, 173, 0.06);
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}

h1, h2, h3 { line-height: 1.2; color: var(--color-primary-dark); }
h1 { font-size: 2rem; margin: 0.4em 0 0.5em; }
h2 { font-size: 1.35rem; margin-top: 2em; }
h3 { font-size: 1.1rem; margin: 0 0 0.3em; }
p { margin: 0 0 1em; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  background: var(--color-primary-dark);
  color: white;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.9rem 1.25rem;
  gap: 0.75rem;
}
.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 42px;
  width: auto;
  display: block;
  background: white;
  border-radius: 8px;
  padding: 4px 10px;
}
.main-nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.main-nav a { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,0.4); border-radius: 6px;
  color: white; font-size: 1.3rem; line-height: 1; cursor: pointer;
  min-width: 44px; min-height: 44px;
}

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; flex-direction: column; align-items: flex-start; width: 100%;
    gap: 0.75rem; padding-top: 0.75rem;
  }
  .main-nav.nav-open { display: flex; }
  .header-inner { position: relative; }
}
.main-nav a:hover { color: white; text-decoration: none; }
.main-nav a.active { color: white; font-weight: 600; border-bottom: 2px solid var(--color-accent); }
.nav-form { display: inline; }
.main-nav a.nav-social { display: inline-flex; line-height: 0; padding: 4px; }
.link-button {
  background: none; border: none; color: rgba(255,255,255,0.85); font-size: 0.95rem;
  cursor: pointer; padding: 0; font-family: inherit;
}
.link-button:hover { color: white; text-decoration: underline; }

main.container { padding-top: 1.75rem; padding-bottom: 3rem; min-height: 60vh; }

/* Hero */
.hero { text-align: center; padding: 2rem 0 2.5rem; }
.hero h1 { font-size: 2.3rem; }
.hero p { color: var(--color-muted); font-size: 1.1rem; }
.search-box { display: flex; justify-content: center; gap: 0.5rem; max-width: 520px; margin: 1.25rem auto 0; }
.search-box input {
  flex: 1; padding: 0.65rem 0.9rem; border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 1rem;
}

.stats-row {
  display: flex; justify-content: center; gap: 3rem; text-align: center;
  padding: 1.5rem 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}
.stat strong { display: block; font-size: 1.8rem; color: var(--color-primary); }
.stat span { color: var(--color-muted); font-size: 0.9rem; }

.bar-track { width: 160px; height: 10px; background: var(--color-border); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--color-primary); border-radius: 999px; }

.poster-import-row { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; background: var(--color-surface); }
.poster-import-grid { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; }
.poster-import-thumb { display: flex; flex-direction: column; gap: 0.6rem; }
.poster-import-fields { display: flex; flex-direction: column; gap: 0.3rem; max-width: 520px; }
.poster-import-fields h3 { margin: 0.8rem 0 0.2rem; }
@media (max-width: 700px) { .poster-import-grid { grid-template-columns: 1fr; } }

.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.75rem; }
.section-heading h2 { margin-top: 0; }

/* Buttons */
button, .button-link {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}
button:hover, .button-link:hover { background: var(--color-primary-dark); text-decoration: none; color: white; }
.button-danger { background: #b3261e; }
.button-danger:hover { background: #8c1d17; }

.follow-form { margin-top: 0.6rem; }
.follow-btn { font-size: 0.85rem; padding: 0.4rem 0.85rem; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); }
.follow-btn:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.follow-btn.following { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.follow-btn.following:hover { background: #b3261e; border-color: #b3261e; }
.table-link-button {
  background: none; border: none; color: var(--color-primary); font-size: 0.9rem;
  cursor: pointer; padding: 0; font-family: inherit; text-decoration: underline;
}
.table-link-button:hover { color: var(--color-primary-dark); }
.table-link-button-danger { color: #b3261e; }
.table-link-button-danger:hover { color: #8c1d17; }
.main-nav a.button-link { padding: 0.4rem 0.85rem; border-radius: 999px; background: var(--color-accent); color: white; }
.main-nav a.button-link:hover { background: #b96305; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  color: var(--color-text);
}
.card:hover { text-decoration: none; border-color: var(--color-primary); }
.card h3 { margin-top: 0.4rem; }

/* Compact single-line directory list */
.group-line-list { display: flex; flex-direction: column; border-top: 1px solid var(--color-border); }
.group-line {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 0.25rem; border-bottom: 1px solid var(--color-border); color: var(--color-text);
}
.group-line:hover { background: var(--color-surface); text-decoration: none; }
.group-line-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-line-meta { font-size: 0.85rem; color: var(--color-muted); white-space: nowrap; flex-shrink: 0; }
/* Groups an optional poster thumbnail with the name so justify-content:
   space-between on .group-line still splits into just two blocks (this
   group vs. the meta on the right) instead of spacing the thumb away
   from the title it belongs to. */
.group-line-main { display: flex; align-items: center; gap: 0.6rem; min-width: 0; flex: 1; }
.group-line-main .group-line-name { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .group-line { flex-direction: column; gap: 0.2rem; }
  .group-line-name { white-space: normal; }
}

/* Group logos */
.card-logo, .card-logo-placeholder {
  width: 48px; height: 48px; border-radius: 8px; margin-bottom: 0.5rem;
  object-fit: cover;
}
.card-logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary); color: white; font-weight: 700; font-size: 1.2rem;
}
.detail-header-with-logo { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.detail-logo, .detail-logo-placeholder {
  width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
}
.detail-logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary); color: white; font-weight: 700; font-size: 2.2rem;
}
.logo-preview { display: flex; align-items: center; gap: 0.6rem; margin: 0.3rem 0 0.5rem; }
.group-logo-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--color-border); }

.flyer-image {
  max-width: 100%; max-height: 480px; border-radius: var(--radius); border: 1px solid var(--color-border);
  display: block; margin: 1rem 0; object-fit: contain;
}
.flyer-image-small {
  max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--color-border);
  display: block; margin-bottom: 0.6rem; object-fit: contain;
}
.card-thumb {
  width: 100%; height: 140px; border-radius: 8px; border: 1px solid var(--color-border);
  display: block; margin-bottom: 0.6rem; object-fit: cover;
}

/* Wraps a flyer/poster image (either .flyer-image or .card-thumb) so a
   "Cancelled" stamp can be centered over it. inline-block so the wrap
   shrinks to the image's own rendered size — .flyer-image has no fixed
   width (object-fit: contain lets its aspect ratio decide), so a
   display:block wrap would stretch to the full column width, centering
   the stamp over empty space beside the image instead of on it. */
.poster-wrap { position: relative; display: inline-block; max-width: 100%; }
.poster-wrap .flyer-image { margin: 1rem 0; }
.poster-wrap .card-thumb { margin-bottom: 0.6rem; }
.cancelled-stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-10deg);
  background: rgba(185, 28, 28, 0.9); color: #fff; font-weight: 800; letter-spacing: 0.08em;
  padding: 0.3rem 1.1rem; border: 3px solid #fff; border-radius: 4px;
  text-transform: uppercase; white-space: nowrap; pointer-events: none;
  font-size: 1.5rem;
}
/* The card-grid thumbnail is a fixed-width fill of its card (width: 100%),
   not intrinsically sized, so its wrap needs to stay block-level (full
   width of the card) rather than shrink like the flyer-image wrap above. */
.poster-wrap-small { display: block; width: 100%; }
.poster-wrap-small .cancelled-stamp {
  font-size: 0.85rem; padding: 0.15rem 0.55rem; border-width: 2px;
}
.calendar-event-cancelled { text-decoration: line-through; color: var(--color-muted); }

.flyer-image-clickable { cursor: zoom-in; }

/* Native <dialog> gives us focus-trapping, Esc-to-close and a backdrop for
   free — no JS beyond the showModal()/close() calls inline on the elements. */
.lightbox { border: none; border-radius: var(--radius); background: transparent; padding: 0; max-width: 92vw; max-height: 92vh; }
.lightbox img { display: block; max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: var(--radius); cursor: zoom-out; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }

.badge-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.55rem;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.02em;
}
.badge-founding { background: #fef3c7; color: #92400e; }
.badge-volunteers { background: #dbeafe; color: #1e40af; }
.badge-free { background: #d1fae5; color: #065f46; }
.badge-price { background: #ede9fe; color: #5b21b6; }
.badge-status-pending { background: #fef3c7; color: #92400e; }
.badge-status-approved { background: #d1fae5; color: #065f46; }
.badge-status-rejected { background: #fee2e2; color: #991b1b; }
.badge-status-active { background: #d1fae5; color: #065f46; }
.badge-status-unsubscribed { background: #e5e7eb; color: #374151; }
.badge-status-bounced { background: #fee2e2; color: #991b1b; }
.badge-status-complained { background: #fed7aa; color: #9a3412; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-national { background: #fce7f3; color: #9d174d; }
.badge-local { background: #e0e7ff; color: #3730a3; }
.badge-charity { background: #d1fae5; color: #065f46; }
.badge-meeting-type { background: #f3f4f6; color: #374151; }
.badge-age-range { background: #f3e8ff; color: #6b21a8; text-transform: none; }
.badge-featured { background: #1a1a2e; color: #fff; }
.badge-new { background: #dbeafe; color: #1e40af; }
.badge-cancelled { background: #b91c1c; color: #fff; }
.badge-county { background: #f3f4f6; color: #374151; text-transform: none; }

.accessibility-note { color: var(--color-muted); font-size: 0.92rem; }

.muted { color: var(--color-muted); font-size: 0.92rem; }
.empty { color: var(--color-muted); font-style: italic; }

/* Filter bars & forms */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 0.9rem; margin-bottom: 1.25rem;
}
.filter-bar input, .filter-bar select {
  padding: 0.5rem 0.7rem; border: 1px solid var(--color-border); border-radius: 6px; font-size: 0.92rem;
}
.filter-bar select {
  max-width: 160px; white-space: nowrap; text-overflow: ellipsis;
}
.reset-link { font-size: 0.9rem; }
.rows-per-page { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; font-size: 0.9rem; }
.rows-per-page a { padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text); }
.rows-per-page a.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.status-tabs a { padding: 0.35rem 0.7rem; border-radius: 999px; color: var(--color-text); }
.status-tabs a.active { background: var(--color-accent); color: white; }

.stacked-form { display: flex; flex-direction: column; gap: 0.35rem; max-width: 520px; }
.stacked-form label { font-weight: 600; font-size: 0.88rem; margin-top: 0.6rem; }
.stacked-form input, .stacked-form select, .stacked-form textarea {
  padding: 0.55rem 0.7rem; border: 1px solid var(--color-border); border-radius: 6px; font-size: 0.95rem;
  font-family: inherit;
}
.stacked-form button { margin-top: 1rem; align-self: flex-start; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400 !important; margin-top: 0.7rem; }
.checkbox-label input { width: auto; }
.radio-group { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.3rem; }
.radio-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400 !important; margin-top: 0 !important; }
.radio-label input { width: auto; }

.form-page { max-width: 560px; }

.opening-hours-grid { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.5rem 0 1rem; }
.opening-hours-row { display: flex; align-items: center; gap: 0.6rem; }
.opening-hours-day { width: 90px; flex-shrink: 0; font-size: 0.88rem; font-weight: 600; color: var(--color-text); }
.opening-hours-row input[type="time"] {
  padding: 0.4rem 0.5rem; border: 1px solid var(--color-border); border-radius: 6px; font-size: 0.88rem; font-family: inherit;
}
.opening-hours-sep { font-size: 0.85rem; color: var(--color-muted); }

.opening-hours-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; max-width: 420px; }
.opening-hours-table td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--color-border); font-size: 0.92rem; }
.opening-hours-table td:first-child { font-weight: 600; }
.opening-hours-table tr.closed-day td { color: var(--color-muted); }
.form-error {
  background: #fee2e2; color: #991b1b; padding: 0.6rem 0.9rem; border-radius: 6px; font-size: 0.92rem;
}

.enquiry-form { display: flex; flex-direction: column; gap: 0.3rem; }
.enquiry-form label { font-weight: 600; font-size: 0.85rem; margin-top: 0.5rem; }
.enquiry-form input, .enquiry-form textarea {
  padding: 0.5rem 0.65rem; border: 1px solid var(--color-border); border-radius: 6px; font-family: inherit;
}
.enquiry-form button { margin-top: 0.75rem; }

.rsvp-box {
  background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.25rem 0; max-width: 420px;
}
.rsvp-box h2 { margin-top: 0.2rem; }
.rsvp-count { font-size: 1.05rem; color: var(--color-primary); margin: 0 0 0.6rem; }
.rsvp-form { display: flex; flex-direction: column; gap: 0.3rem; }
.rsvp-form label { font-weight: 600; font-size: 0.85rem; margin-top: 0.5rem; }
.rsvp-form input {
  padding: 0.5rem 0.65rem; border: 1px solid var(--color-border); border-radius: 6px; font-family: inherit;
}
.rsvp-form button { margin-top: 0.75rem; align-self: flex-start; }

/* Detail pages */
.back-link { display: inline-block; margin-bottom: 1rem; }
.detail-header { margin-bottom: 1.5rem; }
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.detail-sidebar {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1.1rem; align-self: start;
}
.contact-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.contact-list li { margin-bottom: 0.4rem; }

@media (max-width: 760px) {
  .detail-layout { grid-template-columns: 1fr; }
}

/* Events / notices lists */
.event-list { list-style: none; padding: 0; margin: 0; }
.event-list-item {
  display: flex; gap: 1rem; align-items: center; padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.event-date {
  min-width: 60px; text-align: center; background: var(--color-primary); color: white;
  border-radius: 6px; padding: 0.4rem 0.3rem; font-size: 0.85rem; font-weight: 600;
}
.event-date-deadline { background: var(--color-accent); }
.event-title { font-weight: 600; font-size: 1.02rem; }
.event-list-thumb-link { flex-shrink: 0; line-height: 0; }
.event-list-thumb {
  width: 48px; height: 48px; border-radius: 6px; object-fit: cover;
  border: 1px solid var(--color-border);
}

.home-newsletter-link {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0.9rem 1.2rem; margin: 0 0 1.25rem; text-decoration: none; color: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.home-newsletter-link:hover {
  transform: translateY(-1px); box-shadow: 0 4px 10px rgba(24, 0, 173, 0.12);
}
.home-newsletter-icon { font-size: 1.6rem; line-height: 1; }
.home-newsletter-text { display: flex; flex-direction: column; gap: 0.15rem; }
.home-newsletter-text strong { color: var(--color-primary); font-size: 1.02rem; }
.home-newsletter-text span:last-child { color: var(--color-muted); font-size: 0.88rem; }

.featured-callout {
  background: var(--color-primary-dark); color: #fff; border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.featured-callout h2 {
  color: var(--color-accent); font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.05em; margin: 0 0 0.9rem;
}
.featured-event-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.featured-event-list li a { display: flex; align-items: center; gap: 0.6rem; }
.featured-event-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.featured-event-date { color: var(--color-accent); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; }
.featured-event-title { color: #fff; font-weight: 700; font-size: 1.05rem; }
.featured-event-meta { color: #fff; opacity: 0.75; font-size: 0.85rem; }

.notice-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent);
  border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 0.9rem;
}

.resource-list { display: grid; gap: 1rem; }
.resource-item {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

.faq-section { margin: 1.75rem 0; }
.faq-section h2 {
  border-bottom: 2px solid var(--color-accent); padding-bottom: 0.35rem; margin-bottom: 0.75rem;
}
.faq-list { display: grid; gap: 0.6rem; }
.faq-item {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 0.2rem 1.1rem;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; padding: 0.8rem 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--color-accent); font-size: 1.3rem; font-weight: 700; flex-shrink: 0;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin: 0 0 0.9rem; color: var(--color-muted); }

.guide-article { max-width: 760px; }
.guide-article > .muted { font-size: 1.05rem; margin-bottom: 1.5rem; }
.guide-step {
  background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem;
}
.guide-step h2 { margin-top: 0; font-size: 1.05rem; color: var(--color-primary); }
.guide-step p { margin-bottom: 0; }
.guide-disclaimer {
  margin-top: 1.5rem; padding: 0.9rem 1.1rem; border-radius: var(--radius);
  background: var(--color-bg); border: 1px solid var(--color-border); font-size: 0.9rem; color: var(--color-muted);
}
.guide-disclaimer p { margin: 0; }

/* Homepage ticker: a continuous CSS marquee of soonest events and recent
   notices. The item list is rendered twice back-to-back and the track is
   animated exactly -50% so the loop is seamless. */
.ticker-bar {
  background: var(--color-primary-dark); overflow: hidden; white-space: nowrap;
  border-bottom: 2px solid var(--color-accent);
}
.ticker-track {
  display: inline-flex; animation: ticker-scroll 90s linear infinite;
}
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  color: #fff; text-decoration: none; padding: 0.55rem 1.5rem; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
}
.ticker-item:hover { text-decoration: underline; }
.ticker-icon { font-size: 0.95rem; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; overflow-x: auto; }
}

.share-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1rem 0;
}
.share-label { font-weight: 600; color: var(--color-muted); margin-right: 0.2rem; }
.share-link {
  color: #fff; text-decoration: none; font-size: 0.85rem; font-weight: 600;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  border: none; font-family: inherit; cursor: pointer;
}
.share-link:hover { opacity: 0.88; }
.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; }
.share-x { background: #000; }
.share-threads { background: #000; }
.share-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.share-email { background: var(--color-muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--color-primary); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 0; }

.ireland-map-wrap { max-width: 480px; margin: 0 auto; }
.map-credit { text-align: center; font-size: 0.72rem; color: var(--color-muted); margin-top: 0.3rem; }
.ireland-map { width: 100%; height: auto; }
.ireland-map a { cursor: pointer; }
.map-dot { fill: var(--color-border); stroke: var(--color-surface); stroke-width: 1.5; transition: fill 0.15s, r 0.15s; }
.map-dot-active { fill: var(--color-primary); }
.ireland-map a:hover .map-dot { fill: var(--color-accent); }
.map-label { font-size: 7px; fill: var(--color-muted); text-anchor: middle; font-family: inherit; }
.ireland-map a:hover .map-label { fill: var(--color-text); font-weight: 600; }
.map-dot-estimated { stroke-dasharray: 2 1.5; stroke: var(--color-accent); stroke-width: 1; }

.town-leaflet-map { max-width: 700px; height: 480px; margin: 0 auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
.town-map-label { font-size: 0.72rem; font-weight: 600; background: var(--color-surface); border: none; box-shadow: var(--shadow); padding: 1px 5px; }
.town-map-label::before { display: none; }

.zoomable-map-wrap { max-width: 480px; margin: 0 auto; position: relative; }
.zoomable-map-wrap .ireland-map { touch-action: none; cursor: grab; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
.zoomable-map-wrap .ireland-map.map-dragging { cursor: grabbing; }
.map-zoom-controls { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; flex-direction: column; gap: 0.25rem; }
.map-zoom-btn {
  width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-text); font-size: 1rem; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.map-zoom-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.map-zoom-btn[data-zoom="reset"] { width: auto; padding: 0 0.5rem; font-size: 0.72rem; font-weight: 600; }

.view-toggle { display: flex; gap: 0.5rem; margin: 0.75rem 0 1.25rem; }
.view-toggle a {
  padding: 0.4rem 1rem; border-radius: 999px; border: 1px solid var(--color-border);
  color: var(--color-text); text-decoration: none; font-size: 0.9rem; font-weight: 600;
}
.view-toggle a.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.calendar-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem;
}
.calendar-nav h2 { margin: 0; font-size: 1.1rem; }

.calendar-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: auto; gap: 1px;
  background: var(--color-border); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden;
}
.calendar-weekday {
  background: var(--color-primary-dark); color: #fff; text-align: center; font-size: 0.75rem;
  font-weight: 700; padding: 0.4rem 0; text-transform: uppercase; min-width: 0;
}
.calendar-cell {
  background: var(--color-surface); min-height: 90px; min-width: 0; padding: 0.3rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.calendar-cell-empty { background: var(--color-bg); }
.calendar-day-number { font-size: 0.75rem; color: var(--color-muted); font-weight: 600; }
.calendar-event {
  display: block; max-width: 100%; font-size: 0.72rem; line-height: 1.25; padding: 0.15rem 0.3rem; border-radius: 4px;
  background: var(--color-accent); color: #fff; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.calendar-event:hover { opacity: 0.85; }
@media (max-width: 700px) {
  .calendar-cell { min-height: 52px; font-size: 0.85rem; padding: 0.2rem; }
  .calendar-weekday { font-size: 0.6rem; padding: 0.3rem 0; }
  .calendar-day-number { font-size: 0.65rem; }
  .calendar-event { font-size: 0.58rem; padding: 0.1rem 0.2rem; }
}

/* Tables */
.data-table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; }
@media (max-width: 700px) {
  /* Scrolls the table horizontally within itself rather than forcing the
     whole page (including the header) to overflow. */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}
.data-table th, .data-table td {
  text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--color-border); font-size: 0.92rem;
}
.data-table th { color: var(--color-muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; }
.row-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.inline-form { display: inline; }

.bulk-import-table .bulk-import-name-input { width: 240px; }
.bulk-import-table .bulk-import-town-input { width: 140px; }
.bulk-import-table select { max-width: 260px; }
.bulk-import-table input[type="text"], .bulk-import-table select {
  padding: 0.35rem 0.5rem; border: 1px solid var(--color-border); border-radius: 6px; font-family: inherit; font-size: 0.88rem;
}
tr.bulk-import-dup { background: #fff7e6; }
.inline-form button { padding: 0.35rem 0.7rem; font-size: 0.85rem; }

/* Flash */
.flash { padding: 0.7rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: 0.95rem; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-info { background: #dbeafe; color: #1e40af; }
.flash-warning { background: #fef3c7; color: #92400e; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border); padding: 1.5rem 0; margin-top: 2rem;
  color: var(--color-muted); font-size: 0.85rem;
}
.footer-links { margin-top: 0.4rem; }
.footer-links a { color: var(--color-muted); text-decoration: underline; }

.newsletter-subscribe { margin-bottom: 1.25rem; }
.newsletter-title { font-weight: 700; color: var(--color-text); margin-bottom: 0.5rem; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.newsletter-form input[type="email"],
.newsletter-form select {
  padding: 0.5rem 0.7rem; border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 0.85rem; font-family: inherit;
}
.newsletter-form button {
  padding: 0.5rem 1rem; border: none; border-radius: var(--radius); background: var(--color-accent);
  color: #fff; font-weight: 600; cursor: pointer; font-size: 0.85rem;
}
.newsletter-form button:hover { opacity: 0.9; }

/* Honeypot spam-trap field: visually hidden but present in the DOM (unlike
   display:none, which some bots specifically detect and skip). */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.pagination {
  display: flex; justify-content: space-between; align-items: center;
  margin: 1.5rem 0; padding-top: 1rem; border-top: 1px solid var(--color-border);
  font-size: 0.92rem;
}
.pagination-info { color: var(--color-muted); }
.pagination-disabled { color: var(--color-border); }

.report-details { margin-top: 1.5rem; font-size: 0.88rem; }
.report-details summary { cursor: pointer; color: var(--color-muted); }
.report-details summary:hover { color: var(--color-text); }
.report-form { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.6rem; max-width: 360px; }
.report-form label { font-weight: 600; font-size: 0.85rem; margin-top: 0.4rem; }
.report-form textarea, .report-form input:not([type="checkbox"]) {
  padding: 0.5rem 0.6rem; border: 1px solid var(--color-border); border-radius: 6px; font-size: 0.9rem; font-family: inherit;
}
.report-form button { margin-top: 0.5rem; align-self: flex-start; font-size: 0.85rem; padding: 0.4rem 0.8rem; }

.claim-box {
  background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 0.9rem; margin-bottom: 1.25rem;
}
.claim-box p { margin-bottom: 0.5rem; }
.claim-box .button-link { display: inline-block; }

.rss-link { margin-top: -0.5rem; margin-bottom: 1rem; }
.rss-link a { color: var(--color-accent); font-size: 0.9rem; font-weight: 600; }
.home-rss-links { text-align: center; margin: 0 0 1.5rem; color: var(--color-muted); font-size: 0.85rem; }

.footer-social { margin-bottom: 0.6rem; }
.footer-social { display: flex; align-items: center; gap: 0.6rem; }
.footer-social a { display: inline-flex; line-height: 0; }
