:root {
  /* Tokens taken from publicnoticeportal.uk */
  --header-bg: #d6e1f1;       /* --color-secondary */
  --navy: #454578;            /* --color-text-heading / --color-primary */
  --navy-text: #454578;
  --footer-bg: #454578;       /* --color-background-primary */
  --tertiary: #f9f4d7;        /* --color-tertiary (info box + tags) */
  --tertiary-text: #575338;   /* --color-tertiary-contrast */
  --copy: #2c2c2c;            /* --color-text-copy */
  --border-secondary: #c0d4f0;
  --max-width: 1100px;        /* --breakpoint-large */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: #fff;
  color: var(--copy);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Full-width colored bands; inner content is capped at --max-width */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--header-bg);
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
}

/* ---------- Main content ---------- */
.content {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 60px;
  flex: 1;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eef1f6;
  color: #57607f;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 6px;
}

.back-link:hover {
  background: #e4e8f1;
}

.chevron-left {
  display: block;
  width: 7px;
  height: 11px;
  flex-shrink: 0;
}

.page-title {
  color: var(--navy);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  margin: 26px 0 22px;
}

.info-box {
  background: var(--tertiary);
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 34px;
}

.info-box h2 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tertiary-text);
}

.info-box p {
  margin: 0;
  font-size: 12.5px;
  color: var(--tertiary-text);
}

.section-title {
  color: var(--navy);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}

/* ---------- Notices grid ---------- */
.notice-grid {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
}

.notice a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 4px;
  border-bottom: 1px solid #c0d4f0;
}

.notice a:hover .notice-title {
  text-decoration: underline;
}

.notice a:hover .chevron-right,
.notice a:focus-within .chevron-right {
  color: var(--navy);
}

.notice-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Sizes mirror PNP-Project notice-card.tsx (1rem = 10px there) */
.notice-title {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 16px;
  /* Always occupy 2 lines so the date/publication rows align across the grid,
     regardless of how long each title is */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 32px;
  overflow: hidden;
}

.notice-date {
  color: var(--copy);
  font-size: 13px;
  line-height: 22px;
}

.notice-publication {
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.91px;
}

.notice-pub-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  /* Fallback tint until the publication logo loads */
  background: #ffd500;
}

.notice-pub-name {
  display: flex;
  align-items: center;
  height: 16px;
  color: var(--navy);
  font-size: 10px;
}

.chevron-right {
  display: block;
  width: 13px;
  height: 20px;
  color: #aeb6cc;
  flex-shrink: 0;
  align-self: center;
}

/* ---------- Tags ---------- */
.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  background: var(--tertiary);
  color: var(--tertiary-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 10px 5px;
  border-radius: 11px;
}

.tag:hover {
  filter: brightness(0.97);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: #fff;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo img {
  height: 34px;
  /* Render the colored logo as white on the dark footer */
  filter: brightness(0) invert(1);
}

.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  font-size: 12px;
  font-weight: 600;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-nav .copyright {
  font-weight: 400;
  opacity: 0.85;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .notice-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .page-title {
    font-size: 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    gap: 14px 20px;
  }
}
