/* v0.8 — navegación con búsqueda funcional y módulos públicos en dos columnas. */

/* ---------- Header / búsqueda ---------- */
.site-header-v8 {
  position: sticky;
  top: 0;
  z-index: 80;
}
.header-inner-v8 {
  gap: .85rem;
}
.header-actions-v8 {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}
.header-search-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  color: #fff;
  background: rgba(255,255,255,.07);
  font-size: 1.2rem;
}
.header-search-toggle:hover,
.header-search-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,.16);
}
.primary-nav-v8 .nav-search-form {
  display: none;
}
.header-search-panel {
  position: absolute;
  z-index: 79;
  top: 100%;
  right: 0;
  left: 0;
  padding: .75rem 0;
  border-top: 1px solid rgba(255,255,255,.11);
  background: rgba(8,25,78,.98);
  box-shadow: 0 14px 30px rgba(5,14,43,.22);
}
.header-search-panel[hidden] {
  display: none;
}
.header-search-panel-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .45rem;
}
.header-search-panel-form input {
  min-width: 0;
  min-height: 46px;
  padding: .75rem .9rem;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 11px;
  color: var(--v7-ink);
  background: #fff;
  outline: 0;
}
.header-search-panel-form button {
  min-height: 46px;
  padding: .7rem .9rem;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: #5d55bd;
  font-weight: 800;
}
.header-search-panel-form .header-search-close {
  width: 46px;
  padding: 0;
  background: rgba(255,255,255,.11);
  font-size: 1.5rem;
}

/* ---------- Home: public cards with two-column rhythm ---------- */
.portal-grid-row--two {
  grid-template-columns: 1fr;
}
.portal-grid-row--two .portal-card {
  min-width: 0;
}
.directory-card-expanded,
.events-card-expanded,
.programs-card-expanded,
.jobs-card-expanded {
  padding: 1.25rem;
}
.directory-card-expanded .card-heading h2,
.events-card-expanded .card-heading h2,
.programs-card-expanded .card-heading h2,
.jobs-card-expanded .card-heading h2 {
  max-width: 540px;
  font-size: clamp(1.35rem, 2.15vw, 1.9rem);
  letter-spacing: -.035em;
}
.directory-grid-expanded {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.directory-item-card {
  min-height: 100%;
  padding: .55rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.directory-item-card:hover {
  transform: translateY(-3px);
  border-color: #a9a7dc;
  box-shadow: 0 13px 26px rgba(43,44,125,.12);
}
.directory-item-card > div {
  display: grid;
  gap: .28rem;
  padding: .1rem .1rem .15rem;
}
.directory-item-card img {
  aspect-ratio: 1.35;
}
.directory-item-card strong {
  font-size: .96rem;
}
.verified-mini {
  margin: 0;
  color: #16765c;
  font-size: .68rem;
  font-weight: 800;
}

.events-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}
.event-visual-card {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 215px;
  border-radius: 16px;
  background: #15286b;
}
.event-visual-card::after {
  position: absolute;
  inset: 38% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(8,20,63,.94));
}
.event-visual-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-visual-content {
  position: absolute;
  z-index: 1;
  right: .65rem;
  bottom: .65rem;
  left: .65rem;
  display: grid;
  gap: .3rem;
  color: #fff;
}
.event-visual-content strong {
  font-size: .85rem;
  line-height: 1.15;
}
.event-visual-content small {
  color: rgba(255,255,255,.72);
  font-size: .68rem;
  line-height: 1.25;
}
.event-date-badge {
  display: inline-grid;
  justify-self: start;
  gap: 0;
  min-width: 42px;
  padding: .28rem .4rem;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  color: var(--v7-violet);
  text-align: center;
}
.event-date-badge b {
  font-size: 1rem;
  line-height: 1;
}
.event-date-badge small {
  color: var(--v7-violet);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.events-wide-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin-top: .9rem;
  border-radius: 11px;
  color: #fff;
  background: #4b4397;
  font-size: .88rem;
  font-weight: 850;
}
.events-wide-cta:hover {
  background: #393176;
}

.portal-event-feature {
  display: grid;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(120deg, #142764 0%, #293c84 54%, #4b4498 100%);
  box-shadow: 0 18px 42px rgba(20,34,87,.18);
}
.portal-event-feature-media {
  position: relative;
  min-height: 250px;
}
.portal-event-feature-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(9,19,55,.12), rgba(8,19,58,.52));
}
.portal-event-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-feature-date {
  position: absolute;
  z-index: 1;
  top: 1rem;
  left: 1rem;
  padding: .45rem .65rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  color: #fff;
  background: rgba(11,22,65,.7);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.portal-event-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.65rem;
}
.portal-event-feature-copy h2 {
  max-width: 620px;
  margin: .1rem 0 .7rem;
  color: #fff;
  font-size: clamp(2rem, 4.3vw, 3.5rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.portal-event-feature-copy > p:not(.eyebrow) {
  max-width: 630px;
  color: rgba(255,255,255,.82);
}
.event-feature-location {
  margin: .3rem 0 .6rem;
  color: #dbe8ff !important;
  font-weight: 800;
}
.event-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: .8rem;
}

.programs-grid-expanded {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.programs-grid-expanded .program-card {
  min-height: 150px;
  padding: 1rem;
  background: linear-gradient(180deg, #fff 0%, #f6f7ff 100%);
}
.programs-grid-expanded .program-card:hover {
  border-color: #afaade;
  box-shadow: 0 14px 26px rgba(50,48,129,.11);
}
.programs-grid-expanded .program-card em {
  margin-top: auto;
  color: var(--v7-violet);
  font-size: .75rem;
  font-style: normal;
  font-weight: 850;
}
.jobs-expanded-layout {
  display: grid;
  gap: 1rem;
}
.jobs-list-expanded {
  gap: 0;
}
.jobs-list-expanded .job-item {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .8rem 0;
}
.jobs-list-expanded .job-item > div {
  display: grid;
  gap: .15rem;
}
.jobs-list-expanded .job-item em {
  padding: .35rem .55rem;
  border-radius: 999px;
  background: #f0edfb;
  color: var(--v7-violet);
  font-size: .7rem;
}
.job-feature-box {
  padding: 1rem;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #28377e, #5851ae);
}
.job-feature-box h3 {
  margin: .15rem 0 .35rem;
  color: #fff;
  font-size: 1.15rem;
}
.job-feature-box p {
  margin: .3rem 0 .65rem;
  color: rgba(255,255,255,.82);
  font-size: .85rem;
  line-height: 1.45;
}
.job-feature-box a {
  color: #fff;
  font-size: .8rem;
  font-weight: 850;
}
.jobs-footer-button {
  margin-top: 1rem;
}

.investment-card-expanded {
  display: grid;
  gap: 1.25rem;
  padding: 1.45rem;
  border-color: #cbd4ee;
  background:
    radial-gradient(circle at 92% 14%, rgba(125,115,211,.17), transparent 22%),
    linear-gradient(135deg, #fff 0%, #f3f5fe 100%);
}
.investment-card-copy h2 {
  max-width: 580px;
  margin: 0 0 .6rem;
  color: var(--v7-ink);
  font-size: clamp(1.6rem, 2.8vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}
.investment-card-copy p:not(.eyebrow) {
  max-width: 600px;
  color: var(--v7-muted);
}
.investment-stats-expanded {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.investment-stats-expanded span {
  min-height: 100px;
  justify-content: center;
  border-color: #d8def1;
  background: rgba(255,255,255,.82);
}
.investment-stats-expanded strong {
  color: var(--v7-violet);
  font-size: 1.35rem;
}
.investment-routes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.investment-routes span {
  padding: .75rem;
  border-radius: 12px;
  color: var(--v7-ink);
  background: rgba(226,231,250,.72);
  font-size: .8rem;
  font-weight: 850;
}

/* ---------- Breakpoints ---------- */
@media (min-width: 760px) {
  .directory-grid-expanded {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .jobs-expanded-layout {
    grid-template-columns: 1.08fr .92fr;
    align-items: stretch;
  }
  .job-feature-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .investment-card-expanded {
    grid-template-columns: 1.05fr 1.25fr;
    align-items: center;
  }
  .investment-routes {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet: preserve usable 180px search without squeezing navigation. */
@media (min-width: 850px) and (max-width: 1199px) {
  .site-header-v8 .header-inner-v8 {
    display: grid;
    grid-template-columns: 1fr auto;
    padding-top: .65rem;
    padding-bottom: .65rem;
  }
  .site-header-v8 .header-actions-v8 {
    display: none;
  }
  .site-header-v8 .nav-toggle {
    display: none !important;
  }
  .site-header-v8 .primary-nav-v8 {
    position: static !important;
    grid-column: 1 / -1;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: .12rem;
    width: 100%;
    margin-top: .25rem;
    padding: .45rem 0 0;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.11);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    inset: auto;
  }
  .site-header-v8 .primary-nav-v8 a {
    padding: .42rem .46rem;
    color: rgba(255,255,255,.88);
    font-size: .73rem;
    white-space: nowrap;
  }
  .primary-nav-v8 .nav-search-form {
    display: grid;
    grid-template-columns: 1fr 34px;
    flex: 0 0 184px;
    width: 184px;
    overflow: hidden;
    margin-left: .25rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 9px;
    background: rgba(255,255,255,.1);
  }
  .primary-nav-v8 .nav-search-form input {
    min-width: 0;
    height: 32px;
    padding: .35rem .52rem;
    border: 0;
    color: #fff;
    background: transparent;
    outline: 0;
    font-size: .73rem;
  }
  .primary-nav-v8 .nav-search-form input::placeholder {
    color: rgba(255,255,255,.64);
  }
  .primary-nav-v8 .nav-search-form button {
    border: 0;
    color: #fff;
    background: rgba(255,255,255,.16);
    font-size: 1rem;
  }
  .portal-grid-row--two {
    grid-template-columns: 1.05fr .95fr;
  }
}

/* Desktop: one line navigation + a true 220–260px search field. */
@media (min-width: 1200px) {
  .site-header-v8 .header-actions-v8 {
    display: none;
  }
  .site-header-v8 .nav-toggle {
    display: none !important;
  }
  .site-header-v8 .primary-nav-v8 {
    display: flex !important;
    align-items: center;
    gap: .08rem;
  }
  .site-header-v8 .primary-nav-v8 a {
    padding: .45rem .52rem;
    font-size: .77rem;
    white-space: nowrap;
  }
  .primary-nav-v8 .nav-search-form {
    display: grid;
    grid-template-columns: 1fr 38px;
    flex: 0 0 clamp(220px, 15vw, 260px);
    width: clamp(220px, 15vw, 260px);
    overflow: hidden;
    margin-left: .45rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 10px;
    background: rgba(255,255,255,.1);
  }
  .primary-nav-v8 .nav-search-form input {
    min-width: 0;
    height: 36px;
    padding: .42rem .65rem;
    border: 0;
    color: #fff;
    background: transparent;
    outline: 0;
    font-size: .78rem;
  }
  .primary-nav-v8 .nav-search-form input::placeholder {
    color: rgba(255,255,255,.66);
  }
  .primary-nav-v8 .nav-search-form button {
    border: 0;
    color: #fff;
    background: rgba(255,255,255,.16);
    font-size: 1rem;
  }
  .portal-grid-row--two {
    grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
  }
  .portal-event-feature {
    grid-template-columns: minmax(320px, .88fr) minmax(0, 1.12fr);
    min-height: 330px;
  }
  .portal-event-feature-media {
    min-height: 330px;
  }
  .portal-event-feature-copy {
    padding: 2.1rem 2.35rem;
  }
  .programs-card-expanded,
  .jobs-card-expanded {
    min-height: 430px;
  }
  .investment-card-expanded {
    grid-template-columns: .85fr 1.3fr;
    padding: 1.8rem 2rem;
  }
}

@media (min-width: 1420px) {
  .site-header-v8 .primary-nav-v8 a {
    padding-right: .62rem;
    padding-left: .62rem;
    font-size: .8rem;
  }
}
