/* ==========================================================================
   ALUR MASUK PERPUSTAKAAN - MODERN HORIZONTAL PROCESS FLOW
   Institut Kesehatan Karsa Husada Garut
   ========================================================================== */

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

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

.am-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);
}

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

@keyframes amPulse {
  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);
  }
}

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

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

.am-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;
}

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

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

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

/* --------------------------------------------------------------------------
   2. Horizontal Process Flow Architecture
   -------------------------------------------------------------------------- */
.am-process-wrapper {
  max-width: 1240px;
  margin: 0 auto 5rem;
  position: relative;
}

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

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

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

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

.am-point-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #09a89e;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.85rem;
  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;
}

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

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

/* Horizontal Flow Container (4 Columns) */
.am-horizontal-flow {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.85rem;
  position: relative;
}

/* Individual Column Card */
.am-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;
}

.am-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 */
.am-card-media {
  width: 100%;
  height: 190px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #f1f5f9;
}

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

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

.am-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;
}

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

.am-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);
}

.am-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;
}

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

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

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

/* Card Content Details */
.am-card-content {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

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

.am-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);
}

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

.am-card-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.am-card-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: auto;
}

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

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

.am-card-note-label {
  font-weight: 800;
  color: #09a89e;
  margin-right: 0.25rem;
}

/* Minimalist Floating Horizontal Chevron */
.am-horizontal-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  z-index: 3;
}

.am-chevron-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #09a89e;
  color: #09a89e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(9, 168, 158, 0.2);
  transition: all 0.25s ease;
}

.am-horizontal-chevron:hover .am-chevron-pill {
  transform: translateX(3px) scale(1.1);
  background: #09a89e;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. Infografis Poster Banner
   -------------------------------------------------------------------------- */
.am-poster-card {
  background: linear-gradient(135deg, #064e48 0%, #0f766e 50%, #09a89e 100%);
  border-radius: 24px;
  padding: 3rem 3.5rem;
  color: #ffffff;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3.5rem;
  align-items: center;
  box-shadow: 0 20px 50px -10px rgba(6, 78, 72, 0.35);
  margin-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.am-poster-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.am-poster-text-side {
  position: relative;
  z-index: 2;
}

.am-poster-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  color: #e6fffa;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.am-poster-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.am-poster-desc {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 540px;
}

.am-poster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.btn-poster-view, .btn-poster-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-poster-view {
  background: #ffffff;
  color: #064e48;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-poster-view:hover {
  background: #f0fdfa;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-poster-download {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
}

.btn-poster-download:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  transform: translateY(-2px);
}

.am-poster-image-side {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.3s ease;
  background: #ffffff;
}

.am-poster-image-side:hover {
  transform: scale(1.03);
}

.am-poster-img {
  width: 100%;
  height: auto;
  display: block;
}

.am-poster-zoom-hint {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   4. Quick Action Links
   -------------------------------------------------------------------------- */
.am-quick-actions-wrap {
  margin-top: 1rem;
}

.am-qa-heading {
  text-align: center;
  margin-bottom: 2.25rem;
}

.am-qa-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #09a89e;
  display: block;
  margin-bottom: 0.35rem;
}

.am-qa-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
}

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

.am-qa-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.75rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.am-qa-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08);
}

.am-qa-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform 0.25s ease;
}

.am-qa-card:hover .am-qa-icon {
  transform: scale(1.08);
}

.am-qa-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.am-qa-card-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

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

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

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

.am-lightbox-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.am-lightbox-dialog {
  max-width: 900px;
  max-height: 92vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.am-lightbox-overlay.is-active .am-lightbox-dialog {
  transform: scale(1);
}

.am-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;
}

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

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

.am-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;
}

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

/* --------------------------------------------------------------------------
   6. Responsive Layout Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .am-horizontal-flow {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .am-horizontal-chevron {
    display: none;
  }
  .am-roadmap-track {
    display: none;
  }
  .am-poster-card {
    grid-template-columns: 1fr;
    padding: 2.5rem;
    gap: 2rem;
  }
  .am-qa-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .am-main-section {
    padding: 3rem 0 4.5rem;
  }
  .am-intro-title {
    font-size: 1.85rem;
  }
  .am-horizontal-flow {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .am-card-media {
    height: 180px;
  }
  .am-poster-card {
    padding: 1.75rem;
  }
  .am-poster-title {
    font-size: 1.5rem;
  }
}
