/**
 * Policies & Forms — hero, intro, and policy grid.
 */

.policies-page {
  background: #fff;
}

/* Hero */
.policies-page-hero {
  position: relative;
  height: 60vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.policies-page-hero__media {
  position: absolute;
  inset: 0;
}

.policies-page-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.policies-page-hero__media--fallback {
  background: linear-gradient(135deg, rgb(22, 78, 108) 0%, rgb(30, 108, 147) 50%, rgb(25, 90, 125) 100%);
}

.policies-page-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.policies-page-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 1rem 1rem 2rem;
}

.policies-page-hero__content {
  max-width: 56rem;
  margin: 0 auto;
}

.policies-page-hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.policies-page-hero__title strong {
  font-weight: 700;
}

.policies-page-hero__sub {
  margin: 0 0 1rem;
  font-size: clamp(0.875rem, 1.6vw, 1.125rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.policies-page-hero__pill {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.policies-page-hero__pill-text {
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 1.125rem;
}

/* Section + intro */
.policies-page-section {
  padding: 4rem 0 2rem;
  background: #fff;
}

@media (min-width: 1024px) {
  .policies-page-section {
    padding: 5rem 0 2.5rem;
  }
}

.policies-page-section__wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .policies-page-section__wrap {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .policies-page-section__wrap {
    padding: 0 2rem;
  }
}

.policies-page-intro {
  text-align: center;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .policies-page-intro {
    margin-bottom: 3.5rem;
  }
}

.policies-page-intro__h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: rgb(17, 24, 39);
}

.policies-page-intro__h2 strong {
  font-weight: 700;
}

.policies-page-intro__lead {
  margin: 0 auto;
  max-width: 48rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgb(55, 65, 81);
}

.policies-page-intro .policies-page-intro__lead {
  margin-left: auto;
  margin-right: auto;
}

/*
 * 3 cards per row on large screens; 2 on tablet; 1 on small phones.
 * max-width keeps cards from stretching too wide on large monitors.
 */
.policies-page .policies-page-grid {
  display: grid;
  /* Explicit row/column gaps — WP global styles often zero column-gap when using gap shorthand */
  row-gap: 3rem;
  column-gap: 5rem;
  grid-row-gap: 3rem;
  grid-column-gap: 5rem;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  align-items: stretch;
  align-content: start;
}

.policies-page .policies-page-grid > .policies-page-card {
  margin: 0;
  padding: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .policies-page .policies-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 5rem;
    grid-column-gap: 5rem;
  }
}

@media (min-width: 1024px) {
  .policies-page .policies-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 5rem;
    grid-column-gap: 5rem;
  }
}

.policies-page-card {
  min-width: 0;
}

.policies-page-card__inner {
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem 1.5rem 1.75rem;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 10px 25px rgba(15, 23, 42, 0.08);
  border: 1px solid rgb(229, 231, 235);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.policies-page-card:hover .policies-page-card__inner {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  /* Light lift only — large translateY can overlap the row above and hide gap */
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .policies-page-card:hover .policies-page-card__inner {
    transform: none;
  }
}

.policies-page-card__icon-wrap {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.harkaway-policies-card__icon {
  width: 4rem;
  height: 4rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
}

.policies-page-card__icon--blue {
  background: rgb(37, 99, 235);
}

.policies-page-card__icon--orange {
  background: rgb(249, 115, 22);
}

.policies-page-card__icon--green {
  background: rgb(22, 163, 74);
}

.policies-page-card__icon--purple {
  background: rgb(147, 51, 234);
}

.policies-page-card__icon--indigo {
  background: rgb(79, 70, 229);
}

.policies-page-card__icon--red {
  background: rgb(220, 38, 38);
}

.policies-page-card__icon--teal {
  background: rgb(13, 148, 136);
}

.policies-page-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: rgb(17, 24, 39);
  text-align: center;
}

.policies-page-card__title strong {
  font-weight: 600;
}

.policies-page-card__desc {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgb(75, 85, 99);
  text-align: center;
  flex: 1 1 auto;
  min-height: 0;
}

.policies-page-card__action {
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 0;
  display: flex;
  justify-content: center;
}

.policies-page-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.policies-page-card__btn--resource {
  border: 2px solid rgb(209, 213, 219);
  color: rgb(55, 65, 81) !important;
  background: transparent;
}

.policies-page-card__btn--resource:hover,
.policies-page-card__btn--resource:focus {
  background: rgb(249, 250, 251);
  border-color: rgb(156, 163, 175);
}

.policies-page-card__btn--download {
  background: rgb(37, 99, 235);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.policies-page-card__btn--download:hover,
.policies-page-card__btn--download:focus {
  background: rgb(29, 78, 216);
}

.policies-page-card__btn--disabled {
  color: rgb(156, 163, 175) !important;
  cursor: not-allowed;
  border: 2px dashed rgb(229, 231, 235);
}

.policies-page-card__btn-icon {
  flex-shrink: 0;
}

.policies-page-empty {
  text-align: center;
  color: rgb(107, 114, 128);
  margin: 0;
}

/* CTA wrapper — same horizontal rhythm as section grid */
.policies-page-bottom {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

@media (min-width: 640px) {
  .policies-page-bottom {
    padding: 0 1.5rem 5rem;
  }
}

@media (min-width: 1024px) {
  .policies-page-bottom {
    padding: 0 2rem 6rem;
  }
}

/* Backup if plugins strip gap */
#main-content.policies-page .policies-page-section .policies-page-grid {
  display: grid !important;
  row-gap: 3rem !important;
  column-gap: 5rem !important;
  grid-row-gap: 3rem !important;
  grid-column-gap: 5rem !important;
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
  max-width: 64rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
}

@media (min-width: 640px) {
  #main-content.policies-page .policies-page-section .policies-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 5rem !important;
    grid-column-gap: 5rem !important;
  }
}

@media (min-width: 1024px) {
  #main-content.policies-page .policies-page-section .policies-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 5rem !important;
    grid-column-gap: 5rem !important;
  }
}
