/* ============================================
   I'm New Page — Gateway Bible Church
   Page-specific layouts only.
   Shared components come from components.css.
   ============================================ */

/* Hero — shift background down so the subject's face isn't cropped on wide screens */
@media (min-width: 768px) {
  .page-hero--photo {
    background-position: center 30%;
  }
}

/* ============================================
   STEP WALKTHROUGH — "What to Expect"
   ============================================ */

.new-steps-wrapper {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

/* ---- Footstep trail — desktop only ---- */
.new-footsteps {
  display: none;
}

@media (min-width: 1024px) {
  .new-footsteps {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    left: -90px;
    top: 10px;
    bottom: 10px;
    width: 50px;
    color: var(--bright-blue-20);
  }
}

.footstep {
  width: 20px;
  height: 28px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out),
              color 0.4s var(--ease-out);
}

.footstep.is-visible {
  opacity: 0.7;
  color: var(--bright-blue);
}

.footstep--left {
  transform: rotate(165deg);
  align-self: flex-start;
  margin-left: 6px;
}

.footstep--right {
  transform: rotate(195deg);
  align-self: flex-end;
  margin-right: 6px;
}

.new-steps {
  max-width: 760px;
  margin: 0 auto;
}

.new-step {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--dark-blue-10);
  align-items: flex-start;
}

.new-step:last-child {
  border-bottom: none;
}

.new-step-number {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: var(--font-weight-thin);
  color: var(--gray-blue);
  letter-spacing: -0.02em;
  line-height: 1;
  min-width: 48px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  padding-top: 2px;
}

.new-step-content {
  flex: 1;
}

.new-step-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--dark-blue);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

.new-step-desc {
  font-size: var(--text-base);
  font-weight: var(--font-weight-book);
  color: var(--gray-blue);
  line-height: 1.7;
}

.new-step-link {
  color: var(--bright-blue);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 156, 255, 0.3);
  padding-bottom: 1px;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.new-step-link:hover {
  border-color: var(--bright-blue);
}


/* ============================================
   SERVICE TIMES & LOCATION
   ============================================ */

.new-times-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 768px) {
  .new-times-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.new-times-cards {
  display: flex;
  gap: var(--space-4);
  margin: var(--space-8) 0;
}

.new-time-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.new-time-hour {
  font-size: clamp(1.5rem, 3vw, var(--text-3xl));
  font-weight: var(--font-weight-bold);
  color: var(--dark-blue);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.new-time-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--gray-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.new-time-note {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-book);
  color: var(--bright-blue);
  margin-top: var(--space-1);
  letter-spacing: 0.02em;
}

.new-location {
  margin-top: var(--space-2);
}

.new-location-name {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--dark-blue);
  margin-bottom: var(--space-2);
}

.new-location-address {
  font-size: var(--text-base);
  font-weight: var(--font-weight-book);
  color: var(--gray-blue);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.new-location-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.new-times-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  order: -1;
}

@media (min-width: 768px) {
  .new-times-photo {
    order: 0;
    aspect-ratio: auto;
    height: 100%;
    min-height: 400px;
  }
}


/* ============================================
   KIDS ON SUNDAY
   ============================================ */

.new-kids-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 768px) {
  .new-kids-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.new-kids-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .new-kids-photo {
    aspect-ratio: auto;
    height: 100%;
    min-height: 420px;
  }
}

.new-kids-ages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.new-kids-age {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--cool-gray);
}

.new-kids-age strong {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  color: var(--dark-blue);
}

.new-kids-age span {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-book);
  color: var(--gray-blue);
}

.new-kids-note {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-book);
  color: var(--gray-blue);
  line-height: 1.7;
  padding-left: var(--space-4);
  border-left: 2px solid var(--gold);
}


/* ============================================
   QUOTE BREAK
   ============================================ */

.new-quote-section {
  padding: var(--space-20) 0;
}

.new-quote-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.new-quote-inner .quote {
  color: var(--white);
  font-size: clamp(1.25rem, 3vw, var(--text-3xl));
  font-weight: var(--font-weight-medium);
  font-style: italic;
  margin-bottom: var(--space-4);
}


/* ============================================
   WHAT WE BELIEVE — accordion layout
   ============================================ */

.new-beliefs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (min-width: 768px) {
  .new-beliefs-layout {
    grid-template-columns: 1fr 1.3fr;
    gap: var(--space-16);
  }
}

.new-beliefs-intro .section-headline {
  margin-bottom: var(--space-4);
}


/* ============================================
   OUR TEAM — circular portrait grid
   ============================================ */


/* ============================================
   VIEW 2: FULL STAFF — uniform portrait grid
   ============================================ */

.new-staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 1060px;
  margin: 0 auto;
  contain: layout style;
}

@media (min-width: 640px) {
  .new-staff-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
  }
}

@media (min-width: 900px) {
  .new-staff-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: var(--space-4);
  }
}

.new-staff-member {
  text-align: center;
}

.new-staff-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-2);
  background: var(--cream);
  contain: layout style paint;
  border: 3px solid var(--bright-blue-20);
  transition: border-color var(--duration-normal) var(--ease-out);
}

.new-staff-member:hover .new-staff-photo {
  border-color: var(--bright-blue);
}

.new-staff-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.85);
  transition: filter 0.4s var(--ease-out),
              transform 0.4s var(--ease-out);
}

.new-staff-member:hover .new-staff-photo img {
  filter: saturate(1.05);
  transform: scale(1.06);
}

.new-staff-name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--dark-blue);
  line-height: 1.3;
}

.new-staff-role {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--bright-blue);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}


/* ============================================
   STAFF TOGGLE — "Organize this chaos"
   ============================================ */

.staff-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--space-4);
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

.staff-toggle:focus-visible {
  outline: 2px solid var(--bright-blue);
  outline-offset: 6px;
  border-radius: 20px;
}

.staff-toggle-track {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--dark-blue);
  border-radius: 13px;
  opacity: 0.2;
  transition: opacity 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
  flex-shrink: 0;
}

.staff-toggle:hover .staff-toggle-track {
  opacity: 0.35;
}

.staff-toggle[aria-pressed="true"] .staff-toggle-track {
  background: var(--bright-blue);
  opacity: 1;
}

.staff-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.staff-toggle[aria-pressed="true"] .staff-toggle-thumb {
  transform: translateX(22px);
}

.staff-toggle-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--gray-blue);
  letter-spacing: 0.01em;
  transition: color 0.3s var(--ease-out);
  user-select: none;
}

.staff-toggle[aria-pressed="true"] .staff-toggle-label {
  color: var(--bright-blue);
}

/* --- Category headers (hidden by default, shown in organized mode) --- */

.staff-category-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: var(--space-5) 0 var(--space-2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  pointer-events: none;
}

.staff-category-header:first-of-type {
  padding-top: 0;
}

.staff-category-header.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.staff-category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.staff-category-dot--pastoral { background: var(--bright-blue); }
.staff-category-dot--teaching { background: var(--dark-blue); }
.staff-category-dot--worship { background: var(--gold); }
.staff-category-dot--next-gen { background: var(--bright-blue); }
.staff-category-dot--life-stage { background: var(--tan); }
.staff-category-dot--counselors { background: var(--gray-blue); }
.staff-category-dot--global { background: var(--gold); }
.staff-category-dot--operations { background: var(--gray-blue); }
.staff-category-dot--elders { background: var(--dark-blue); }

.staff-category-name {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-blue);
  white-space: nowrap;
}

.staff-category-line {
  flex: 1;
  height: 1px;
  background: var(--dark-blue);
  opacity: 0.1;
}

.staff-category-count {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-book);
  color: var(--gray-blue);
  white-space: nowrap;
}

/* --- FLIP animation on members --- */

.new-staff-member {
  text-align: center;
  transition: none;
  cursor: pointer;
}

.new-staff-member.is-flipping {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.new-staff-member.is-popping {
  animation: staffPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes staffPop {
  0% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* --- Organized mode: tighter sub-grids --- */

.new-staff-grid.is-organized {
  display: block;
}

.new-staff-grid.is-organized .staff-category-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 1060px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .new-staff-grid.is-organized .staff-category-group {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
  }
}

@media (min-width: 900px) {
  .new-staff-grid.is-organized .staff-category-group {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-4);
  }
}


/* ============================================
   NETWORK GRAPH — Constellation view
   ============================================ */

.staff-network {
  position: relative;
  width: 100%;
  overflow: visible;
  margin-top: var(--space-6);
}

/* Soft radial glow behind each cluster */
.staff-network-glow {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
  z-index: 0;
}

.staff-network-glow.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.staff-network-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Category hub nodes */
.staff-network-hub {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  z-index: 4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12), 0 0 0 2.5px rgba(255, 255, 255, 0.85);
}

.staff-network-hub.is-visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Label positioned beside the hub, not on top of photos */
.staff-network-hub-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark-blue);
  white-space: nowrap;
  pointer-events: none;
  background: rgba(244, 248, 233, 0.85);
  padding: 2px 7px;
  border-radius: 3px;
}

.staff-network-hub-label--left {
  left: calc(100% + 8px);
}

.staff-network-hub-label--right {
  right: calc(100% + 8px);
}

/* Person photo nodes */
.staff-network-person {
  position: absolute;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  z-index: 2;
  cursor: default;
}


.staff-network-person.is-visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  animation: staffFloat ease-in-out infinite alternate;
}

.staff-network-person:hover {
  z-index: 10;
  transform: translate(-50%, -50%) scale(1.08);
  animation-play-state: paused;
}

.staff-network-person:hover img {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@keyframes staffFloat {
  0%   { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, calc(-50% - 5px)) scale(1); }
}

.staff-network-person img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

/* Hover label: name + title, positioned outward from hub */
.staff-network-person-label {
  position: absolute;
  font-family: 'Montserrat', sans-serif;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 20;
}

.staff-network-person:hover .staff-network-person-label {
  opacity: 1;
}

.staff-network-person-label .label-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--dark-blue);
}

.staff-network-person-label .label-title {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--gray-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Label positioning — outward from hub center */
.staff-network-person-label.label--right {
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}

.staff-network-person-label.label--left {
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}

.staff-network-person-label.label--below {
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
}

.staff-network-person-label.label--above {
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
}

/* --- Mobile: compact grouped list --- */

.staff-network--mobile {
  height: auto !important;
}

.staff-network-mob-group {
  margin-bottom: var(--space-5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.staff-network-mob-group.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.staff-network-mob-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-3);
}

.staff-network-mob-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark-blue);
}

.staff-network-mob-count {
  font-size: var(--text-xs);
  color: var(--gray-blue);
  margin-left: auto;
}

.staff-network-mob-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-network-mob-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: var(--white);
  border: 1px solid rgba(13, 32, 56, 0.08);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--dark-blue);
}

.staff-network-mob-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}


/* ============================================
   STAFF MODAL (both views)
   ============================================ */

.new-staff-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 32, 56, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.new-staff-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.new-staff-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 100%;
  padding: var(--space-8) var(--space-6) var(--space-6);
  position: relative;
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(13, 32, 56, 0.25);
}

.new-staff-modal-overlay.is-open .new-staff-modal {
  transform: translateY(0) scale(1);
}

.new-staff-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-blue);
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.new-staff-modal-close:hover {
  background: rgba(13, 32, 56, 0.06);
  color: var(--dark-blue);
}

.new-staff-modal-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-4);
  border: 3px solid rgba(0, 156, 255, 0.2);
}

.new-staff-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.new-staff-modal-name {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--dark-blue);
  margin-bottom: 2px;
}

.new-staff-modal-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--bright-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}

.new-staff-modal-bio {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-book);
  color: var(--dark-blue-70);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.new-staff-modal-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


/* ============================================
   TALK TO SOMEONE — Closing CTA
   ============================================ */

.new-connect-inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.new-connect-headline {
  font-size: clamp(2rem, 6vw, var(--text-5xl));
  font-weight: var(--font-weight-black);
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-5);
}

.new-connect-sub {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-book);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto var(--space-8);
}

.new-connect-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.new-connect-options .btn {
  gap: var(--space-2);
}

.new-connect-options .btn svg {
  flex-shrink: 0;
}

.new-connect-times {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--dark-blue);
}
