/* ==========================================================================
   Effective Practice Hub – page template styles
   Add to your theme's style.css or enqueue as a separate file.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  --pd-purple:            #6f2da8;
  --pd-purple-dark:       #4f1f7d;
  --pd-purple-soft:       #f2eafa;
  --pd-blue:              #00a8e8;
  --pd-blue-dark:         #007fad;
  --pd-blue-soft:         #e8f8fe;
  --pd-grey:              #77787b;
  --pd-grey-dark:         #3f4448;
  --pd-grey-soft:         #f4f5f6;
  --standard-green:       #5c8f68;
  --standard-green-soft:  #edf7ef;
  --standard-orange:      #d8843a;
  --standard-orange-soft: #fff3e7;
  --white:                #ffffff;
  --ink:                  #263038;
  --line:                 #dde4e8;
  --radius-lg:            30px;
  --radius-md:            20px;
  --shadow:               0 18px 48px rgba(63, 68, 72, 0.14);
}

/* --------------------------------------------------------------------------
   Page layout
   -------------------------------------------------------------------------- */
.page-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

/* --------------------------------------------------------------------------
   Title banner
   -------------------------------------------------------------------------- */
.title-banner {
  margin-bottom: 24px;
  padding: clamp(26px, 4vw, 44px);
  border-radius: 34px;
  background: linear-gradient(135deg, var(--pd-purple) 0%, var(--pd-purple-dark) 100%);
  box-shadow: var(--shadow);
  text-align: center;
}

.title-banner h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

/* --------------------------------------------------------------------------
   Shared card base
   -------------------------------------------------------------------------- */
.intro-card,
.filters-card,
.resources-section {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

/* --------------------------------------------------------------------------
   Intro card
   -------------------------------------------------------------------------- */
.intro-card {
  display: block;
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 40px);
}

.intro-card p {
  max-width: 980px;
  margin: 0 0 16px;
  color: #4f5961;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
}

.intro-card p:last-child {
  margin-bottom: 0;
}

.notice {
  color: var(--pd-grey-dark);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Filters section – no outer card; each group is its own floating box
   -------------------------------------------------------------------------- */
.filters-section {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.filters-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.filters-header h2 {
  margin: 0;
  color: var(--pd-blue-dark);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.filters-clear {
  margin: 0;
  font-size: 0.9rem;
}

/* Search wrapped in its own card to match filter-group style */
.search-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(63, 68, 72, 0.06);
  padding: 18px;
}

/* --------------------------------------------------------------------------
   Primary action button
   -------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--pd-blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
  background: var(--pd-purple);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(111, 45, 168, 0.24);
}

/* --------------------------------------------------------------------------
   Filter groups – individual floating boxes
   -------------------------------------------------------------------------- */

.filter-group {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(63, 68, 72, 0.06);
}

.filter-label {
  color: var(--pd-blue-dark);
  font-weight: 900;
}

/* --------------------------------------------------------------------------
   Pill list (filter toggles rendered as <a> links)
   -------------------------------------------------------------------------- */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Base pill style – used for both filter links and read-only tag spans */
.pill-list__link,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 168, 232, 0.24);
  background: var(--pd-blue-soft);
  color: var(--pd-blue-dark);
  font-weight: 800;
  font-size: inherit;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}



.pill-list__link:hover,
.pill-list__link:focus {
  background: var(--pd-blue);
  color: var(--white);
  border-color: var(--pd-blue);
}

/* Active / selected state */
.pill-list__link.is-active {
  background: var(--pd-blue);
  color: var(--white);
  border-color: var(--pd-blue);
  box-shadow: 0 4px 14px rgba(0, 168, 232, 0.35);
}

/* Colour variants */
.pill-list__link.green,
.pill.green {
  border-color: rgba(92, 143, 104, 0.22);
  background: var(--standard-green-soft);
  color: var(--standard-green);
}

.pill-list__link.green:hover,
.pill-list__link.green:focus,
.pill-list__link.green.is-active {
  background: var(--standard-green);
  color: var(--white);
  border-color: var(--standard-green);
}

.pill-list__link.orange,
.pill.orange {
  border-color: rgba(216, 132, 58, 0.24);
  background: var(--standard-orange-soft);
  color: var(--standard-orange);
}

.pill-list__link.orange:hover,
.pill-list__link.orange:focus,
.pill-list__link.orange.is-active {
  background: var(--standard-orange);
  color: var(--white);
  border-color: var(--standard-orange);
}

.pill-list__link.purple,
.pill.purple {
  border-color: rgba(111, 45, 168, 0.2);
  background: var(--pd-purple-soft);
  color: var(--pd-purple-dark);
}

.pill-list__link.purple:hover,
.pill-list__link.purple:focus,
.pill-list__link.purple.is-active {
  background: var(--pd-purple);
  color: var(--white);
  border-color: var(--pd-purple);
}

/* --------------------------------------------------------------------------
   Search row (sits inside .search-card which provides the box styling)
   -------------------------------------------------------------------------- */
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.search-row label {
  display: block;
  margin-bottom: 8px;
  color: var(--pd-blue-dark);
  font-weight: 900;
}

.search-row input[type="search"] {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.search-row input[type="search"]:focus {
  outline: 4px solid rgba(0, 168, 232, 0.25);
  border-color: var(--pd-blue);
}

/* --------------------------------------------------------------------------
   Resources section
   -------------------------------------------------------------------------- */
.resources-section {
  padding: clamp(20px, 3vw, 30px);
  border-top: 8px solid var(--pd-blue);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  color: var(--pd-blue-dark);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-heading p {
  margin: 0;
  color: var(--pd-grey);
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   Resource grid & cards
   -------------------------------------------------------------------------- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.resource-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(63, 68, 72, 0.08);
  overflow: hidden;
  align-content: start;
}

/* Decorative circle blob */
.resource-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  opacity: 0.1;
  background: var(--pd-blue);
  pointer-events: none;
}

.resource-card:nth-child(3n+2)::after {
  background: var(--standard-green);
}

.resource-card:nth-child(3n)::after {
  background: var(--standard-orange);
}

.resource-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--pd-grey-dark);
  font-size: 1.32rem;
  line-height: 1.2;
}

.tag-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-block {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.meta-block h4 {
  margin: 0;
  color: var(--pd-blue-dark);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meta-block p,
.meta-block div {
  margin: 0;
  color: #52606a;
}

.meta-block div p {
  margin: 0 0 0.5em;
}

.meta-block div p:last-child {
  margin-bottom: 0;
}

.resource-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--pd-blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 900;
  transition: background 0.18s ease;
}

.download-link:hover,
.download-link:focus {
  background: var(--pd-blue-dark);
  color: var(--white);
}

/* No-results message */
.no-resources {
  padding: 24px;
  color: var(--pd-grey);
  font-weight: 700;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Focus visible (global)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 4px solid rgba(0, 168, 232, 0.35);
  outline-offset: 4px;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1050px) {
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .search-card .button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .filters-header,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .button,
  .search-row .button {
    width: 100%;
  }
}