/* HCPA Profile Grid
   Royal Blue #0057B8
   Canary Yellow #FFD700
   Dark Gray #4A4A4A
   White #FFFFFF
*/

.hcpa-profile-grid{
  --hcpa-profile-blue:#0057B8;
  --hcpa-profile-yellow:#FFD700;
  --hcpa-profile-dark:#4A4A4A;
  --hcpa-profile-white:#FFFFFF;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:flex-start;
  gap:14px;
  width:100%;
  max-width:1520px;
  margin:0 auto;
  padding:0;
  box-sizing:border-box;
}

/* Four cards per complete desktop row.
   Flex + justify-content:center automatically centers:
   1 card, 2 cards, 3 cards, and every incomplete final row. */
.hcpa-profile-grid > .hcpa-profile-card{
  flex:0 0 calc((100% - 42px) / 4);
  max-width:calc((100% - 42px) / 4);
  box-sizing:border-box;
}

.hcpa-profile-card{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  align-self:flex-start;
  height:auto;
  min-height:0;
  min-width:0;
  text-align:center;
  overflow:hidden;
  background:#FFFFFF;
  border:1px solid rgba(0,87,184,.16);
  border-radius:8px;
  box-shadow:0 4px 14px rgba(0,0,0,.06);
}

/* A profile without a bio ends immediately after the title/position area.
   It is never stretched to the height of a neighboring card with a long bio. */
.hcpa-profile-card--no-bio{
  height:auto!important;
  min-height:0!important;
}

.hcpa-profile-image-wrap{
  position:relative;
  width:100%;
  aspect-ratio:1 / 1;
  overflow:hidden;
  background:#F4F4F4;
}

.hcpa-profile-image-wrap img,
.hcpa-profile-image{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  margin:0!important;
  object-fit:cover!important;
}

.hcpa-profile-image-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  color:#777;
  background:#F4F4F4;
  font:600 14px/1.2 Montserrat,Arial,sans-serif;
}

.hcpa-profile-content{
  display:flex;
  flex:0 0 auto;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  width:100%;
  padding:12px 12px 14px;
  background:#FFFFFF;
  text-align:center;
  box-sizing:border-box;
}

.hcpa-profile-content h2{
  width:100%;
  margin:0 0 7px!important;
  text-align:center!important;
  color:#0057B8!important;
  font-family:Montserrat,Arial,sans-serif!important;
  font-size:clamp(20px,1.6vw,26px)!important;
  font-weight:700!important;
  line-height:1.2!important;
}

.hcpa-profile-position{
  width:100%;
  margin:0 0 12px;
  padding:0 0 8px;
  text-align:center!important;
  color:#FFD700!important;
  font-family:Montserrat,Arial,sans-serif!important;
  font-size:15px;
  font-weight:700;
  line-height:1.35;
  border-bottom:2pt solid #C62828;
}

.hcpa-profile-bio{
  width:100%;
  text-align:left!important;
  color:#4A4A4A!important;
  font-family:"Open Sans",Arial,sans-serif!important;
  font-size:15px!important;
  font-weight:400!important;
  line-height:1.5!important;
}

/* Standard paragraph treatment for every profile bio. */
.hcpa-profile-bio p{
  width:100%;
  margin:0 0 1em!important;
  padding:0!important;
  text-align:left!important;
  text-indent:0!important;
  color:#4A4A4A!important;
  font-family:"Open Sans",Arial,sans-serif!important;
  font-size:15px!important;
  font-weight:400!important;
  line-height:1.5!important;
}

.hcpa-profile-bio p:last-child{
  margin-bottom:0!important;
}

.hcpa-admin-profile-preview{
  --hcpa-profile-blue:#0057B8;
  --hcpa-profile-yellow:#FFD700;
  --hcpa-profile-dark:#4A4A4A;
  --hcpa-profile-white:#FFFFFF;
}

.hcpa-profile-card--preview{
  width:100%;
  max-width:300px;
  margin:0 auto;
}

.hcpa-profile-card--preview .hcpa-profile-content{
  padding:14px;
}

.hcpa-profile-card--preview .hcpa-profile-content h2{
  font-size:20px!important;
}

.hcpa-admin-fields input[type="range"]{
  width:calc(100% - 52px);
  vertical-align:middle;
}

#hcpa-focus-y-value{
  display:inline-block;
  width:46px;
  text-align:right;
  font-weight:600;
}

@media(max-width:1100px){
  .hcpa-profile-grid{
    width:100%;
  }
  .hcpa-profile-grid > .hcpa-profile-card{
    flex-basis:calc((100% - 28px) / 3);
    max-width:calc((100% - 28px) / 3);
  }
}

@media(max-width:800px){
  .hcpa-profile-grid{
    width:100%;
    gap:16px;
  }
  .hcpa-profile-grid > .hcpa-profile-card{
    flex-basis:calc((100% - 16px) / 2);
    max-width:calc((100% - 16px) / 2);
  }
}

@media(max-width:520px){
  .hcpa-profile-grid{
    width:100%;
  }
  .hcpa-profile-grid > .hcpa-profile-card{
    flex-basis:100%;
    max-width:100%;
  }
}


/* Category section title used by the dedicated shortcodes. */
.hcpa-profile-section{
  width:100%;
  margin:0 0 44px;
}
.hcpa-profile-section-heading-wrap{
  width:100%;
  margin:0 0 24px;
  text-align:center;
}
.hcpa-profile-section-heading{
  margin:0!important;
  color:#0057B8!important;
  font-family:Montserrat,Arial,sans-serif!important;
  font-size:clamp(28px,3vw,38px)!important;
  font-weight:700!important;
  line-height:1.2!important;
  text-align:center!important;
}
.hcpa-profile-section-rule{
  display:block;
  width:72px;
  height:4px;
  margin:10px auto 0;
  border-radius:0;
  background:#FFD700;
}

/* Keep every card's contents centered and vertically stacked. */
.hcpa-profile-card,
.hcpa-profile-content{
  text-align:center!important;
}
.hcpa-profile-content{
  align-items:center!important;
}


/* Backend headshot uploader */
.hcpa-headshot-uploader{
  margin:18px 0 22px;
  padding:16px;
  border:1px solid #dcdcde;
  border-radius:6px;
  background:#fff;
}
.hcpa-headshot-uploader>label{
  display:block;
  margin-bottom:10px;
}
.hcpa-headshot-admin-preview{
  display:flex;
  align-items:center;
  justify-content:center;
  width:180px;
  max-width:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  border:2px dashed #c3c4c7;
  border-radius:6px;
  background:#f4f4f4;
  color:#646970;
  text-align:center;
}
.hcpa-headshot-admin-preview.has-image{
  border-style:solid;
  border-color:#0057B8;
}
.hcpa-headshot-admin-preview img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.hcpa-headshot-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0 8px!important;
}


/* Generated shortcode box */
.hcpa-generated-shortcode-box label{
  display:block;
  margin:10px 0 6px;
}
.hcpa-shortcode-copy-row{
  display:flex;
  align-items:center;
  gap:6px;
}
.hcpa-shortcode-copy-row input{
  font-family:Consolas,Monaco,monospace;
  font-size:12px;
}
#hcpa-shortcode-copy-status{
  min-height:18px;
  margin:6px 0 0;
  color:#0057B8;
  font-weight:600;
}


/* Leadership headshot auto-fill status */
.hcpa-profile-autofill-status{
  min-height:18px;
  margin:8px 0 0!important;
  font-size:12px;
  font-weight:600;
  line-height:1.4;
}
.hcpa-profile-autofill-status.is-success{
  color:#0057B8;
}
.hcpa-profile-autofill-status.is-warning{
  color:#7a5a00;
}


/* Leadership page jump navigation */
.hcpa-leadership-jump-menu{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:10px;
  width:max-content;
  max-width:100%;
  margin:0 auto 28px;
  padding:0;
  text-align:center;
}

.hcpa-leadership-jump-menu a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:9px 18px;
  border:2px solid #0057B8;
  border-radius:999px;
  background:#FFFFFF;
  color:#0057B8!important;
  font-family:Montserrat,Arial,sans-serif;
  font-size:15px;
  font-weight:700;
  line-height:1.2;
  text-decoration:none!important;
  transition:background .18s ease,color .18s ease,border-color .18s ease;
}

.hcpa-leadership-jump-menu a:hover,
.hcpa-leadership-jump-menu a:focus{
  background:#0057B8;
  color:#FFFFFF!important;
  border-color:#0057B8;
  outline:none;
}

.hcpa-leadership-jump-menu a:focus-visible{
  outline:3px solid #FFD700;
  outline-offset:3px;
}


/* Yellow divider centered beneath the menu at 50% of the menu array width. */
.hcpa-leadership-jump-menu::after{
  content:"";
  flex:0 0 50%;
  width:50%;
  height:4px;
  margin:8px auto 0;
  background:#FFD700;
}

/* Keep anchored section headings visible below the site header after a jump. */
#board-of-directors,
#advisors,
#executive-leadership-team{
  scroll-margin-top:120px;
}

html{
  scroll-behavior:smooth;
}

@media(max-width:600px){
  .hcpa-leadership-jump-menu{
    width:100%;
    gap:8px;
  }

  .hcpa-leadership-jump-menu a{
    width:100%;
    max-width:360px;
  }

  .hcpa-leadership-jump-menu::after{
    flex-basis:50%;
    width:50%;
  }
}


/* Force Leadership jump-menu buttons to true rectangles.
   !important prevents Astra/WordPress button radius styles from overriding this. */
.hcpa-leadership-jump-menu > a,
.hcpa-leadership-jump-menu > a:link,
.hcpa-leadership-jump-menu > a:visited,
.hcpa-leadership-jump-menu > a:hover,
.hcpa-leadership-jump-menu > a:focus,
.hcpa-leadership-jump-menu > a:active{
  border-radius:0!important;
  -webkit-border-radius:0!important;
  clip-path:none!important;
  overflow:visible!important;
}
