/* =====================================================================
   S'PORT FOR GRIEF — COMPANION STYLESHEET
   ---------------------------------------------------------------------
   Tailwind CSS is loaded via CDN in every page's <head> (no build step).
   The Tailwind CDN script only compiles utility classes it finds written
   directly in the HTML — it can't process custom class names through
   @apply the way an installed/built copy of Tailwind can. So this file
   holds the small set of reusable "component" classes (door-card,
   section-title, nav-link, etc.) as plain CSS, written using the same
   colours/spacing/radii as the Tailwind config in each page's <head>.

   If you ever move to a real Tailwind build (npm + a build step), all of
   this can be deleted and replaced with @apply in one place.
   ===================================================================== */

html { scroll-behavior: smooth; }

/* Section heading pattern, reused everywhere */
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a7560; /* sage-600 */
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 1.875rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0f1f29; /* navy-900 */
}
@media (min-width: 1024px) {
  .section-title { font-size: 2.25rem; }
}

/* Top navigation links */
.nav-link {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: #1f3a4a; /* navy-700 */
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.nav-link:hover { background: #f1f6f3; color: #3c5f4e; }
.nav-link-active { background: #f1f6f3; color: #3c5f4e; }

/* Nav panel — desktop default is a plain flex row.
   Visibility/layout on mobile is controlled entirely here (not by
   Tailwind's hidden/flex utilities) so the open/closed state from
   script.js's .menu-open toggle always wins predictably. */
.nav-links { display: flex; }

@media (max-width: 1023px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: 84px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: #ffffff;
    border-bottom: 1px solid #d9e4e8;
    box-shadow: 0 16px 40px rgba(15,31,41,0.12);
    padding: 0.75rem 1.25rem 1.5rem;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .nav-links.menu-open { display: flex; }
  .nav-links a { padding: 0.85rem 0.9rem; font-size: 1rem; }
}

/* Three-door router cards */
.door-card {
  display: block;
  background: #ffffff;
  border: 1px solid #d9e4e8;
  border-radius: 1.75rem;
  padding: 2rem 1.75rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15,31,41,0.04), 0 8px 24px rgba(15,31,41,0.06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.door-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15,31,41,0.16);
  border-color: #bfd6c8;
}
.door-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease, color .2s ease;
}
.door-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #4a7560;
}

/* Generic "text + arrow" link, used as a section-level CTA */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2c4e5e; /* navy-600 */
  text-decoration: none;
}
.text-link:hover { color: #4a7560; }

/* Four-tier teaser cards on the homepage */
.tier-teaser {
  display: block;
  background: #ffffff;
  border: 1px solid #d9e4e8;
  border-radius: 1.25rem;
  padding: 1.5rem 1.35rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15,31,41,0.04), 0 8px 24px rgba(15,31,41,0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tier-teaser:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15,31,41,0.1); }
.tier-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #4a7560;
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}

/* Slim event row links */
.event-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #ffffff;
  border: 1px solid #d9e4e8;
  border-radius: 1.25rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.event-row:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,31,41,0.08); }

/* News teaser cards */
.news-card {
  display: block;
  background: #ffffff;
  border: 1px solid #d9e4e8;
  border-radius: 1.25rem;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15,31,41,0.04), 0 8px 24px rgba(15,31,41,0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15,31,41,0.1); }
.news-img { aspect-ratio: 4 / 3; background: #dfeae3; overflow: hidden; }
.news-tag {
  display: inline-block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4a7560;
  background: #f1f6f3;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* Generic content card (used on inner pages) */
.content-card {
  background: #ffffff;
  border: 1px solid #d9e4e8;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(15,31,41,0.04), 0 8px 24px rgba(15,31,41,0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.content-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15,31,41,0.1); }

/* Visually-hidden helper (for skip link / sr-only headings) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Region flags (support directory) */
.flag-ie, .flag-uk {
  display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem; border-radius: 0.3rem; vertical-align: 1px;
}
.flag-ie { background: #dfeae3; color: #3c5f4e; }
.flag-uk { background: #d9e4e8; color: #1f3a4a; }

/* Filter buttons (support directory + resource hub) */
.filter-btn {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid #d9e4e8;
  background: #fff;
  color: #1f3a4a;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.filter-btn:hover { background: #f1f6f3; }
.filter-btn.active { background: #4a7560; border-color: #4a7560; color: #fff; }

/* Sticky quick-jump sub-nav links (support page) */
.subnav-link {
  white-space: nowrap;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #1f3a4a;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid #d9e4e8;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  flex-shrink: 0;
}
.subnav-link:hover { background: #f1f6f3; }
.subnav-link.active { background: #4a7560; border-color: #4a7560; color: #fff; }

/* FAQ accordion (contact.html) — script.js toggles .open and sets
   .faq-a's max-height directly; this CSS provides the collapsed default,
   the smooth transition, and the chevron rotation. */
.faq-item {
  background: #ffffff;
  border: 1px solid #d9e4e8;
  border-radius: 1.25rem;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #0f1f29;
}
.faq-q svg { color: #4a7560; transition: transform .2s ease; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-a p {
  padding: 0 1.4rem 1.25rem;
  color: #3d6577;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Photo lightbox (gallery pop-up) — toggled by script.js adding/removing
   the .open class on #lightbox. Tailwind's "hidden" utility is used as
   the default closed state in the HTML; this rule overrides it to flex
   when .open is present. */
#lightbox.open { display: flex !important; }

@media print {
  header, footer, .skip-link { display: none; }
}

/* =====================================================================
   SCROLL-REVEAL — data-reveal attribute system
   Applied to elements across all pages; triggered by IntersectionObserver
   in script.js. Respects prefers-reduced-motion (script.js checks it and
   won't attach the observer, so elements stay at opacity:1/transform:none
   via the .revealed class never being needed).
   ===================================================================== */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(.22,.68,0,1.2),
              transform 0.75s cubic-bezier(.22,.68,0,1.2);
}
[data-reveal="up"]    { transform: translateY(40px); }
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal].revealed { opacity: 1; transform: none; }

[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }
[data-delay="6"] { transition-delay: 0.6s; }

/* =====================================================================
   INNER PAGE HERO — gradient mesh, no photos.
   Modern dark-navy base with a diagonal sage accent stripe and a soft
   radial glow. Consistent across all inner pages; no background-image
   needed or used.
   ===================================================================== */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, #0f1f29 0%, #172c38 55%, #1a2e3f 100%);
  padding: 5rem 0 4.5rem;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .page-hero { padding: 6.5rem 0 5.5rem; }
}

/* Diagonal sage stripe — decorative right-side accent */
.page-hero::before {
  content: '';
  position: absolute;
  top: -80%; right: -5%;
  width: 48%; height: 240%;
  background: linear-gradient(160deg, rgba(74,117,96,0.22) 0%, rgba(74,117,96,0.06) 60%, transparent 100%);
  transform: skewX(-12deg);
  pointer-events: none;
}

/* Soft radial glow bottom-right */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -100px; right: 8%;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,117,96,0.18) 0%, transparent 68%);
  pointer-events: none;
}

.page-hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.page-hero-brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  opacity: 0.9;
}
.page-hero-brand span {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #9bbfac; /* sage-300 */
  letter-spacing: 0.02em;
}

/* =====================================================================
   HOMEPAGE HERO CAROUSEL
   ===================================================================== */
.carousel-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.carousel-slide.active { opacity: 1; }

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 2.5rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  border: none;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  padding: 0;
}
.carousel-dot.active {
  background: #4a7560;
  transform: scale(1.4);
}
.carousel-dot:hover:not(.active) { background: rgba(255,255,255,0.6); }

/* =====================================================================
   PARTNER LOGO MARQUEE — infinite scroll carousel
   Edge-fade masks give the illusion of logos appearing/disappearing.
   The inner div is 200% wide (two identical sets) and translates by 50%
   so the seam is invisible.
   ===================================================================== */
.logo-marquee-track {
  position: relative;
  overflow: hidden;
}
/* Edge fade-out masks */
.logo-marquee-track::before,
.logo-marquee-track::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}
.logo-marquee-track::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 0%, rgba(255,255,255,0) 100%);
}
.logo-marquee-track::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 0%, rgba(255,255,255,0) 100%);
}

.logo-marquee-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 22s linear infinite;
}
/* Pause on hover so users can read */
.logo-marquee-track:hover .logo-marquee-inner { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.logo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-pill img {
  width: 160px;
  height: 90px;
  object-fit: contain;
  display: block;
  filter: contrast(1.15) saturate(1.1);
  transition: filter .2s ease, transform .2s ease;
}
.logo-pill img:hover {
  filter: contrast(1.25) saturate(1.2);
  transform: scale(1.05);
}
.logo-pill:hover {
  border-color: #4a7560;
  color: #4a7560;
  background: #f1f6f3;
}

/* Respect reduced motion — show all logos statically */
@media (prefers-reduced-motion: reduce) {
  .logo-marquee-inner { animation: none; }
  .logo-marquee-track::before,
  .logo-marquee-track::after { display: none; }
}

/* =====================================================================
   ANIMATED UNDERLINE CTA LINKS (shared across pages)
   ===================================================================== */
.animated-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2c4e5e;
  text-decoration: none;
}
.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  height: 2px; width: 0;
  background: #4a7560;
  transition: width .2s ease;
}
.animated-link:hover::after { width: 100%; }
.animated-link:hover { color: #4a7560; }
