/* ========================================
   PLANCURE ABOUT PAGE ENHANCEMENTS
   Add these styles to the end of style.css
   ======================================== */

/* ========== 1. WHY WE EXIST STORY BLOCK ========== */

.why-we-exist {
  padding: 48px 0;
}

.story-block {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(230, 241, 251, 0.8));
  border-radius: 20px;
  padding: 32px;
  border: 1px solid rgba(47, 125, 208, 0.15);
  box-shadow: 0 8px 32px rgba(15, 59, 114, 0.08);
  transition: var(--transition);
}

.story-block:hover {
  border-color: rgba(47, 125, 208, 0.25);
  box-shadow: 0 12px 40px rgba(15, 59, 114, 0.12);
}

.story__header h2 {
  margin: 0 0 8px;
  color: var(--blue-900);
  font-size: 1.8rem;
}

.story__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
}

.story__content {
  margin: 20px 0;
  color: var(--text);
  line-height: 1.8;
}

.story__content p {
  margin: 0 0 14px;
}

.story__content p:last-child {
  margin-bottom: 0;
}

.story__content em {
  color: var(--blue-500);
  font-style: normal;
  font-weight: 600;
}

.story__footer {
  display: flex;
  gap: 32px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(47, 125, 208, 0.1);
}

.story__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.story__stat strong {
  color: var(--blue-700);
  font-size: 1.4rem;
}

.story__stat em {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .story-block {
    padding: 24px;
  }
  
  .story__footer {
    flex-direction: column;
    gap: 16px;
  }

  .story__header h2 {
    font-size: 1.4rem;
  }
}

/* ========== 2. INTERACTIVE CARE PRINCIPLES TIMELINE ========== */

.care-principles {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.care-principles h3 {
  margin: 0 0 16px;
  color: var(--blue-900);
}

.timeline-interactive {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  opacity: 0;
  transform: translateX(-12px);
  animation: slideInLeft 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

.timeline-marker {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
  border: 2px solid var(--blue-200);
  display: grid;
  place-items: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.timeline-item:hover .timeline-marker {
  background: linear-gradient(135deg, var(--blue-300), var(--blue-100));
  border-color: var(--blue-500);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(47, 125, 208, 0.2);
}

.timeline-number {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--blue-500);
}

.timeline-body h4 {
  margin: 0 0 4px;
  color: var(--blue-900);
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.timeline-item:hover .timeline-body h4 {
  color: var(--blue-700);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  .timeline-item {
    grid-template-columns: 56px 1fr;
    gap: 12px;
  }
  
  .timeline-marker {
    width: 56px;
    height: 56px;
  }

  .timeline-number {
    font-size: 1.2rem;
  }
}

/* ========== 3. COUNT-UP STATS ========== */

.stat-card .card__icon {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-700);
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-number {
  display: inline-block;
  min-width: 40px;
  text-align: right;
  font-weight: 700;
}

.stat-unit {
  font-size: 0.8em;
  color: var(--muted);
  font-weight: 500;
}

.stat-card {
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-6px);
}

/* ========== 4. HUMANIZED LEADERSHIP ========== */

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.leadership-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.leadership-card:hover {
  transform: translateY(-6px);
}

.leader__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 59, 114, 0.15);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
  transition: var(--transition);
}

.leadership-card:hover .leader__avatar {
  box-shadow: 0 8px 24px rgba(15, 59, 114, 0.22);
}

.avatar-placeholder {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue-500);
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(47, 125, 208, 0.12), rgba(15, 59, 114, 0.08));
}

.leader__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader__name {
  margin: 4px 0 0;
  color: var(--blue-900);
  font-size: 1.15rem;
  font-weight: 600;
}

.leader__role {
  color: var(--blue-500);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.leader__creds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.cred {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.8rem;
  font-weight: 500;
}

.leader__bio-trigger {
  margin-top: 8px;
  font-size: 0.9rem;
  padding: 8px 12px;
  align-self: flex-end;
}

/* Modal Styles (Optional) */
.bio-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 59, 114, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  padding: 20px;
  border: none;
}

.bio-modal[open] {
  display: grid;
  place-items: center;
}

.bio-modal__content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(15, 59, 114, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bio-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--muted);
  transition: var(--transition);
  padding: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.bio-modal__close:hover {
  color: var(--blue-900);
  background: var(--blue-100);
  border-radius: 50%;
}

.bio-modal__body h3 {
  margin: 0 0 4px;
  color: var(--blue-900);
}

.bio-modal__body p {
  color: var(--text);
  line-height: 1.7;
  margin: 0 0 12px;
}

@media (max-width: 640px) {
  .bio-modal__content {
    padding: 24px;
    width: 90vw;
  }
}

/* ========== 5. CARE FLOW VISUAL ========== */

.care-flow-section {
  padding: 48px 0;
}

.care-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin-top: 32px;
  position: relative;
}

.flow-stage {
  padding: 24px 18px;
  text-align: center;
  position: relative;
  background: var(--white);
  border: 1px solid rgba(47, 125, 208, 0.12);
  transition: var(--transition);
}

.flow-stage:not(:last-child) {
  border-right: none;
}

.flow-stage:hover {
  background: var(--blue-50);
  box-shadow: 0 8px 24px rgba(47, 125, 208, 0.12);
}

.flow-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
  transition: var(--transition);
}

.flow-stage:hover .flow-icon {
  transform: scale(1.1);
}

.flow-stage h3 {
  margin: 0 0 8px;
  color: var(--blue-900);
  font-weight: 600;
}

.flow-stage p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.flow-connector {
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 3px;
  background: linear-gradient(90deg, rgba(47, 125, 208, 0.3), transparent);
  display: block;
}

.flow-stage--last .flow-connector {
  display: none;
}

@media (max-width: 900px) {
  .care-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-stage:nth-child(2) {
    border-right: none;
  }

  .flow-stage:nth-child(odd):not(:nth-child(1)) {
    border-right: 1px solid rgba(47, 125, 208, 0.12);
  }

  .flow-stage:nth-child(1) .flow-connector,
  .flow-stage:nth-child(2) .flow-connector {
    display: block;
  }

  .flow-stage:nth-child(2) .flow-connector,
  .flow-stage:nth-child(4) .flow-connector {
    display: none;
  }
}

@media (max-width: 640px) {
  .care-flow {
    grid-template-columns: 1fr;
  }

  .flow-stage {
    border-right: 1px solid rgba(47, 125, 208, 0.12);
    border-bottom: 1px solid rgba(47, 125, 208, 0.12);
  }

  .flow-stage:last-child {
    border-bottom: none;
  }

  .flow-connector {
    display: none;
  }
}

/* ========== 6. MICRO-INTERACTIONS ========== */

/* Card Lift (Enhanced) */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(47, 125, 208, 0.08), rgba(15, 59, 114, 0.04));
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 48px rgba(15, 59, 114, 0.16);
}

.card:hover::after {
  opacity: 1;
}

/* Button Depth */
.btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  font-size: 0.95rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(15, 59, 114, 0.15);
}

.btn--primary {
  background: linear-gradient(120deg, var(--blue-900), var(--blue-500));
  color: var(--white);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 59, 114, 0.25);
}

.btn--primary:active {
  transform: translateY(0px);
  box-shadow: 0 2px 6px rgba(15, 59, 114, 0.15);
}

.btn--large {
  padding: 12px 28px;
  font-size: 1rem;
}

.btn--ghost {
  background: transparent;
  color: var(--blue-500);
  border: 1px solid var(--blue-200);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  box-shadow: 0 4px 12px rgba(47, 125, 208, 0.1);
  transform: translateY(-1px);
}

/* Header Scroll-In Animation */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(247, 251, 255, 0.75);
  border-bottom: 1px solid rgba(47, 125, 208, 0.12);
  animation: headerSlideIn 0.5s ease-out;
}

@keyframes headerSlideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Nav link underline on active */
.nav__links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  transition: var(--transition);
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--blue-500);
  transform: scaleX(0);
  transform-origin: right;
  transition: var(--transition);
}

.nav__links a:hover::after,
.nav__links a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover {
    transform: none;
  }

  .flow-stage:hover .flow-icon {
    transform: none;
  }

  .timeline-item:hover .timeline-marker {
    transform: none;
  }
}

/* ========== 7. FINAL CTA SECTION ========== */

.cta-final {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  padding: 48px 0;
  margin-bottom: 0; /* Sits directly above footer */
}

.cta-block {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-block h2 {
  color: var(--white);
  font-size: 2rem;
  margin: 0 0 12px;
}

.cta-block p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin: 0 0 28px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.cta-actions .btn--primary {
  background: linear-gradient(120deg, var(--white), rgba(230, 241, 251, 0.95));
  color: var(--blue-900);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-actions .btn--primary:hover {
  background: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.cta-actions .btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.cta-actions .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
}

.cta-badge {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

@media (max-width: 640px) {
  .cta-final {
    padding: 32px 0;
  }

  .cta-block h2 {
    font-size: 1.6rem;
  }

  .cta-actions {
    flex-direction: column;
  }

  .cta-actions .btn {
    width: 100%;
  }
}
