/* ==========================================================================
   ALUR PEMINJAMAN BUKU - MODERN HORIZONTAL PROCESS FLOW
   Institut Kesehatan Karsa Husada Garut
   Konsistensi Penuh dengan Desain Alur Masuk Perpustakaan
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Quick Stats Strip (Di Bawah Hero Banner)
   -------------------------------------------------------------------------- */
.ap-stats-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  position: relative;
  z-index: 10;
}

.ap-stats-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0.5rem;
  gap: 1rem;
}

.ap-stat-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.ap-stat-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(9, 168, 158, 0.1);
  color: #09a89e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.ap-stat-item:hover .ap-stat-icon-circle {
  background: #09a89e;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(9, 168, 158, 0.3);
}

.ap-stat-text {
  display: flex;
  flex-direction: column;
}

.ap-stat-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.ap-stat-sub {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 500;
}

.ap-stat-divider {
  width: 1px;
  height: 36px;
  background: #e2e8f0;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   2. Main Section Wrapper
   -------------------------------------------------------------------------- */
.ap-main-section {
  padding: 4.5rem 0 6rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}

/* Institutional Intro Header */
.ap-intro-header {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 3.5rem;
  position: relative;
}

.ap-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: rgba(9, 168, 158, 0.1);
  color: #09a89e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border: 1px solid rgba(9, 168, 158, 0.25);
}

.ap-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #09a89e;
  box-shadow: 0 0 0 0 rgba(9, 168, 158, 0.7);
  animation: apPulse 2s infinite;
}

@keyframes apPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(9, 168, 158, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(9, 168, 158, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(9, 168, 158, 0);
  }
}

.ap-intro-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.ap-intro-subtitle {
  font-size: 1.05rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.ap-header-notice {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #09a89e;
  border-radius: 12px;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-top: 1.5rem;
}

.ap-notice-icon {
  color: #09a89e;
  flex-shrink: 0;
  margin-top: 1px;
}

.ap-notice-text {
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.6;
}

.ap-notice-text strong {
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   3. Horizontal Process Flow Architecture (5 Columns)
   -------------------------------------------------------------------------- */
.ap-process-wrapper {
  max-width: 1320px;
  margin: 0 auto 5rem;
  position: relative;
}

/* Top Milestone Roadmap Track */
.ap-roadmap-track {
  position: relative;
  margin-bottom: 2.25rem;
  padding: 0 2rem;
}

.ap-roadmap-line {
  position: absolute;
  top: 17px;
  left: 50px;
  right: 50px;
  height: 3px;
  background: linear-gradient(90deg, #09a89e 0%, #14b8a6 50%, #0d9488 100%);
  border-radius: 2px;
  z-index: 1;
}

.ap-roadmap-points {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

.ap-roadmap-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.ap-point-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #09a89e;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 5px #f8fafc, 0 4px 10px rgba(9, 168, 158, 0.35);
  transition: transform 0.25s ease;
}

.ap-roadmap-point:hover .ap-point-circle {
  transform: scale(1.12);
}

.ap-point-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #078f86;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(9, 168, 158, 0.2);
}

/* Horizontal Flow Container */
.ap-horizontal-flow {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  position: relative;
}

/* Individual Column Card */
.ap-col-card {
  flex: 1 1 0;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.ap-col-card:hover {
  transform: translateY(-6px);
  border-color: #09a89e;
  box-shadow: 0 18px 36px -4px rgba(9, 168, 158, 0.16), 0 4px 12px -2px rgba(9, 168, 158, 0.08);
}

/* Card Visual Media */
.ap-card-media {
  width: 100%;
  height: 185px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #f1f5f9;
}

.ap-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.ap-col-card:hover .ap-card-img {
  transform: scale(1.08);
}

.ap-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.65) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.85rem;
}

.ap-col-card:hover .ap-card-overlay {
  opacity: 1;
}

.ap-zoom-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ap-card-step-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 0.25rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.ap-card-step-badge span {
  font-size: 0.54rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
  line-height: 1;
}

.ap-card-step-badge strong {
  font-size: 1rem;
  font-weight: 900;
  color: #09a89e;
  line-height: 1.1;
}

.ap-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #94a3b8;
}

/* Card Information Body */
.ap-card-content {
  padding: 1.25rem 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ap-card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.ap-card-num {
  font-size: 1.45rem;
  font-weight: 900;
  background: linear-gradient(135deg, #09a89e 0%, #056a63 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.ap-card-pill {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: rgba(9, 168, 158, 0.1);
  color: #078f86;
  border: 1px solid rgba(9, 168, 158, 0.2);
}

.ap-card-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.65rem;
  min-height: 2.7rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ap-card-desc {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

/* Subpoints List inside card */
.ap-card-sublist {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.ap-card-sublist li {
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.ap-sublist-icon {
  color: #09a89e;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Card Note / Ketentuan */
.ap-card-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #09a89e;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: auto;
}

.ap-card-note-icon {
  color: #09a89e;
  flex-shrink: 0;
  margin-top: 1px;
}

.ap-card-note-text {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
}

.ap-card-note-label {
  font-weight: 700;
  color: #0f172a;
  margin-right: 0.25rem;
}

/* Floating Chevrons between cards */
.ap-horizontal-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 5;
}

.ap-chevron-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #09a89e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
}

.ap-col-card:hover + .ap-horizontal-chevron .ap-chevron-pill {
  background: #09a89e;
  color: #ffffff;
  border-color: #09a89e;
  transform: scale(1.15) translateX(2px);
  box-shadow: 0 4px 12px rgba(9, 168, 158, 0.3);
}

/* --------------------------------------------------------------------------
   4. Quick Action Link Cards
   -------------------------------------------------------------------------- */
.ap-quick-actions-wrap {
  margin-top: 1rem;
}

.ap-qa-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.ap-qa-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #09a89e;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ap-qa-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 0.35rem;
}

.ap-qa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.ap-qa-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.ap-qa-card:hover {
  transform: translateY(-4px);
  border-color: #09a89e;
  box-shadow: 0 14px 28px -4px rgba(9, 168, 158, 0.12);
}

.ap-qa-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.ap-qa-card:hover .ap-qa-icon {
  transform: scale(1.1);
}

.ap-qa-content {
  flex-grow: 1;
}

.ap-qa-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.4rem 0;
  transition: color 0.2s ease;
}

.ap-qa-card:hover .ap-qa-card-title {
  color: #09a89e;
}

.ap-qa-card-desc {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 0.85rem 0;
}

.ap-qa-card-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: #09a89e;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.2s ease;
}

.ap-qa-card:hover .ap-qa-card-link {
  gap: 0.6rem;
}

/* --------------------------------------------------------------------------
   7. Lightbox Modal Dialog
   -------------------------------------------------------------------------- */
.ap-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ap-lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ap-lightbox-dialog {
  position: relative;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ap-lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ap-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg);
}

.ap-lightbox-image-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.ap-lightbox-image-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  background: #ffffff;
}

.ap-lightbox-caption {
  margin-top: 1rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

/* --------------------------------------------------------------------------
   8. Responsive Layout Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .ap-horizontal-flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .ap-horizontal-chevron {
    display: none;
  }
  .ap-roadmap-track {
    display: none;
  }
}

@media (max-width: 900px) {
  .ap-stats-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .ap-stat-item {
    flex: 1 1 45%;
  }
  .ap-stat-divider {
    display: none;
  }
  .ap-qa-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .ap-main-section {
    padding: 3rem 0 4.5rem;
  }
  .ap-intro-title {
    font-size: 1.85rem;
  }
  .ap-horizontal-flow {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .ap-card-media {
    height: 180px;
  }
  .ap-stat-item {
    flex: 1 1 100%;
  }
}
