/* =============================================================
   barrio_npm — components
   Cards, buttons, forms, hero patterns, utility classes,
   gradient background utilities, page wrapper rules.
   ============================================================= */

/* ---------- Link & list normalisation ---------- */

a { text-decoration: none !important; }
.text-white a { color: #fff !important; }

ul { list-style-type: square; }
ul.square { list-style-type: square; }

/* ---------- Cards ----------
   Visual rules only — BS4 -ms-flex shims dropped; BS5 supports flex
   natively across all targeted browsers. */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #f9f9f9;
  background-clip: border-box;
  border: 0.0625rem solid rgba(231, 234, 243, 0.7);
  border-radius: 0.75rem;
  box-shadow: none !important;
}

.card-deck .card {
  margin-bottom: 15px;
}

@media (min-width: 576px) {
  .card-deck .card {
    flex: 1 0 0%;
    margin-right: 15px;
    margin-bottom: 0;
    margin-left: 15px;
  }
  .card-sm-gutters-1 .card {
    margin-right: 0.25rem;
    margin-left: 0.25rem;
  }
}

/* ---------- Buttons ----------
   Colour tokens (background, border) live in colors.css; visual rules here. */

button.button {
  text-transform: uppercase;
  margin-left: 0.5em;
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  color: #fff;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: background-color 0.1s ease-in-out,
              border-color 0.1s ease-in-out,
              box-shadow 0.1s ease-in-out;
}

button.button:hover {
  color: #fff;
  background-color: #0069d9;
  border-color: #0062cc;
}

button.button:focus,
button.button.focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

button.button:disabled {
  color: #fff;
}

button.button:not(:disabled):not(.disabled):active,
button.button:not(:disabled):not(.disabled).active {
  color: #fff;
  background-color: #0062cc;
  border-color: #005cbf;
}

.btn,
.btn:hover {
  color: black;
}

.hero-button {
  border-top: 5px solid rgba(255, 255, 255, 0);
  border-bottom: 5px solid rgba(255, 255, 255, 0);
  border-radius: 10px;
  background: transparent;
  color: white;
  padding: 15px 30px;
  text-shadow:
    -1px -1px 0 rgba(28, 71, 74, 0.3),
     1px -1px 0 rgba(28, 71, 74, 0.3),
    -1px  1px 0 rgba(28, 71, 74, 0.3),
     1px  1px 0 rgba(28, 71, 74, 0.3);
}

.hero-button:hover {
  background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
}

/* ---------- Hero patterns ----------
   Legacy .bg-img-hero class used by content blocks and reference templates.
   barrio_npm's landing-page hero uses .np-hero (see proto.css). */

.bg-img-hero {
  height: 30em;
  padding-top: 0;
  background-position: left bottom;
}

.bg-img-hero-center {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 60%;
  background-color: rgba(217, 202, 166, 0.15);
}

.hero-text-left,
.hero-text-right {
  max-width: 300px;
}

h1.hero-left   { font-weight: 900; }
h2.hero-tagline { padding-top: 3rem; }

/* ---------- Forms — Drupal field & views exposed-form chrome ---------- */

/* Row alignment for exposed forms. BEF emits the form-items + form-actions
   inside an inner `<div class="d-flex flex-wrap">` wrapper (Bootstrap
   utility classes), not directly under `.views-exposed-form`, so this
   rule targets the wrapper. Without `align-items: flex-end`, the
   form-actions wrapper (which has no label) floats up to the top of the
   row while labelled form-items push their inputs down, leaving the
   SEARCH / RESET buttons visually misaligned ~one label height above the
   inputs they should sit beside. */
.views-exposed-form > .d-flex.flex-wrap {
  align-items: flex-end;
}

.views-exposed-form label {
  display: block;
  font-weight: 300;
}

/* General select rule kept for non-exposed-form contexts (block config UI,
   node edit forms, etc.). Inside `.views-exposed-form` the height + full
   visual-parity rule below takes precedence. */
select {
  height: 50px;
}

fieldset.js-form-item {
  display: block;
  padding-right: 0.75rem;
}

/* All exposed-filter form controls render at the same height and share
   typography / border treatment so a row of text inputs + selects looks
   like one coherent system. Supersedes the previous `fieldset.js-form-item
   select` rule. */
.views-exposed-form input[type="text"],
.views-exposed-form input[type="search"],
.views-exposed-form input[type="number"],
.views-exposed-form input[type="url"],
.views-exposed-form input[type="email"],
.views-exposed-form input[type="date"],
.views-exposed-form input[type="datetime-local"],
.views-exposed-form input[type="tel"],
.views-exposed-form input[type="password"],
.views-exposed-form select,
.views-exposed-form fieldset.js-form-item select {
  height: calc(1.6em + 1.625rem);
  padding: 0 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: #1e2022;
  background-color: #fff;
  border: 0.0625rem solid #e7eaf3;
  border-radius: 0.3125rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Submit button — branded fill on `--npm-blue`, dark text for WCAG AA
   contrast (~6.5:1), matches the form-control row height and border
   radius. Replaces the stock BS5 .btn-primary loud blue so the SEARCH
   button reads on-brand alongside the muted cluster palette. */
.views-exposed-form button[type="submit"],
.views-exposed-form input[type="submit"] {
  height: calc(1.6em + 1.625rem);
  padding: 0 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #1e2022;
  background: var(--npm-blue);
  border: 1px solid var(--npm-blue);
  border-radius: 0.3125rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease;
}

.views-exposed-form button[type="submit"]:hover,
.views-exposed-form input[type="submit"]:hover {
  background: color-mix(in srgb, var(--npm-blue), black 12%);
  border-color: color-mix(in srgb, var(--npm-blue), black 12%);
  color: #1e2022;
}

.views-exposed-form button[type="submit"]:focus-visible,
.views-exposed-form input[type="submit"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--npm-blue), black 25%);
  outline-offset: 2px;
}

/* Exposed-filter labels in views */
div > fieldset.js-form-item > label {
  text-transform: capitalize;
  font-size: larger;
  color: indianred;
}

.view-filters {
  padding: 1em;
}

input#edit-keys {
  background-color: white;
}

blockquote {
  margin: 1rem;
}

/* ---------- Gradient background utilities ----------
   Used inline from templates and content. Beige (#D9CAA6 base), blue
   (#C9D7D1 base), gray (#50514F base), warm-gray (#A59E96 base). */

.background-beige-gradient               { background: linear-gradient(rgba(217, 202, 166, 0.4), rgba(217, 202, 166, 0.1)) !important; }
.background-beige-gradient-light         { background: linear-gradient(rgba(217, 202, 166, 0.1), rgba(217, 202, 166, 0))   !important; }
.background-beige-gradient-light-reverse { background: linear-gradient(rgba(217, 202, 166, 0),   rgba(217, 202, 166, 0.1)) !important; }
.background-beige                        { background: linear-gradient(rgba(217, 202, 166, 0.3), rgba(217, 202, 166, 0.3)) !important; }

.background-blue-gradient                { background: linear-gradient(rgba(201, 215, 209, 0.4), rgba(201, 215, 209, 0.1)) !important; }
.background-blue-gradient-light          { background: linear-gradient(rgba(201, 215, 209, 0.1), rgba(201, 215, 209, 0))   !important; }
.background-blue                         { background: linear-gradient(rgba(201, 215, 209, 0.3), rgba(201, 215, 209, 0.3)) !important; }

.background-gray-gradient                { background: linear-gradient(rgba(80, 81, 79, 0.2),   rgba(80, 81, 79, 0))       !important; }
.background-gray-gradient-light          { background: linear-gradient(rgba(80, 81, 79, 0.1),   rgba(80, 81, 79, 0))       !important; }

.background-warmgray-gradient            { background: linear-gradient(rgba(165, 158, 150, 0.2), rgba(217, 202, 166, 0))   !important; }

.bg-grey          { background-color: #f2f2f2; }
.background-white { background-color: white !important; }

/* ---------- Page wrappers ---------- */

#main-wrapper { background-color: #fff; }
#main         { background-color: #fff; }

#main .node--type-front-page-item {
  padding: 20px;
}

/* Escape a contained .container to full-viewport width. Used by menu blocks
   and hero strips that should span edge-to-edge. */
.child-fullwidth {
  width: 100vw;
  position: relative;
  left: calc(-50vw + 50%);
}

/* ---------- Utility / layout helpers ---------- */

.comma-sep::after { content: ', '; }

.lh-1  { line-height: 1   !important; }
.lh-12 { line-height: 1.2 !important; }
.lh-15 { line-height: 1.5 !important; }

.mh-2  { min-height: 2em   !important; }
.mh-25 { min-height: 2.5em !important; }
.mh-3  { min-height: 3em   !important; }
.mh-35 { min-height: 3.5em !important; }

.fa-text-right { float: right; }
.feed-icon     { display: none; }

.about-more {
  display: block;
  padding: 1em;
}

/* Embedded video iframe wrapper (e.g. Vimeo on About) */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  padding-top: 30px;
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
