/* ==========================================================================
   PROJECTS SLIDER - RECENT WORKS SHOWCASE
   Ultra-Modern, Responsive & Theme-Integrated Carousel
   ========================================================================== */

.projects-section {
  position: relative;
  background: radial-gradient(
      80% 60% at 50% 0%,
      color-mix(in srgb, var(--color-primary, #292B9A) 8%, transparent),
      transparent 70%
    ),
    var(--color-bg, #F5F7FC);
  padding-block: clamp(3.5rem, 6vw, 6rem);
  overflow: hidden;
}

.proj-slider-wrapper {
  position: relative;
  width: 100%;
  margin-top: 1.5rem;
}

/* ---------------- Topbar Controls ---------------- */
.proj-slider-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-inline: 0.25rem;
}

.proj-slider-status {
  display: flex;
  align-items: center;
}

.proj-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-ink, #1A1B2E);
  background: #ffffff;
  border: 1.5px solid color-mix(in srgb, var(--color-primary, #292B9A) 16%, transparent);
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-pill, 999px);
  box-shadow: 0 4px 14px rgba(41, 43, 154, 0.05);
}

.live-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.6;
  animation: live-pulse 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes live-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.proj-slider-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.proj-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid color-mix(in srgb, var(--color-primary, #292B9A) 18%, transparent);
  color: var(--color-primary, #292B9A);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(41, 43, 154, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.proj-nav-btn:hover:not(:disabled) {
  background: var(--color-primary, #292B9A);
  color: #ffffff;
  border-color: var(--color-primary, #292B9A);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 22px rgba(41, 43, 154, 0.28);
}

.proj-nav-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
}

.proj-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.proj-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-ink, #1A1B2E);
  padding: 0.4rem 0.85rem;
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--color-primary, #292B9A) 14%, transparent);
  border-radius: var(--radius-pill, 999px);
  direction: ltr;
  box-shadow: 0 2px 8px rgba(41, 43, 154, 0.04);
}

.proj-counter-curr {
  color: var(--color-accent, #1A72C9);
  font-weight: 900;
}

.proj-counter-div {
  opacity: 0.35;
}

.proj-counter-total {
  opacity: 0.7;
}

/* ---------------- Slider Viewport & Track ---------------- */
.proj-slider-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg, 22px);
  padding-block: 0.5rem 1.25rem;
  margin-inline: -0.5rem;
  padding-inline: 0.5rem;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.proj-slider-viewport.is-dragging {
  cursor: grabbing;
}

.proj-slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 1.5rem;
  will-change: transform;
}

.proj-slide {
  flex: 0 0 calc((100% - 3rem) / 3);
  max-width: calc((100% - 3rem) / 3);
  box-sizing: border-box;
}

@media (max-width: 1080px) {
  .proj-slide {
    flex: 0 0 calc((100% - 1.5rem) / 2);
    max-width: calc((100% - 1.5rem) / 2);
  }
}

@media (max-width: 680px) {
  .proj-slide {
    flex: 0 0 88%;
    max-width: 88%;
  }
}

/* ---------------- Project Card ---------------- */
.proj-card {
  position: relative;
  height: 480px;
  border-radius: var(--radius-lg, 22px);
  overflow: hidden;
  background: #1A1B2E;
  box-shadow: 0 14px 40px rgba(41, 43, 154, 0.14);
  border: 1.5px solid color-mix(in srgb, var(--color-primary, #292B9A) 18%, transparent);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.proj-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--color-accent, #1A72C9) 55%, transparent);
  box-shadow: 0 24px 55px rgba(41, 43, 154, 0.25);
}

/* Media (Image) */
.proj-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #0f172a;
}

.proj-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: brightness(0.95);
}

.proj-card:hover .proj-media img {
  transform: scale(1.08);
  filter: brightness(1.02);
}

.proj-chip {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.95rem;
  background: rgba(30, 32, 112, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-pill, 999px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.proj-chip i {
  color: #34d399;
}

/* ---------------- The Signature Blue Overlay ---------------- */
.proj-overlay {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(26, 27, 46, 0) 0%,
    rgba(30, 32, 112, 0.75) 24%,
    rgba(41, 43, 154, 0.96) 80%,
    #1E2070 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 -10px 30px rgba(30, 32, 112, 0.35);
  padding: 3.5rem 1.4rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  mask-image: linear-gradient(to top, black 85%, transparent);
  border-radius: 20px;
}

.proj-card:hover .proj-overlay {
  background: linear-gradient(
    180deg,
    rgba(26, 27, 46, 0) 0%,
    rgba(30, 32, 112, 0.86) 20%,
    rgba(41, 43, 154, 0.98) 75%,
    #18195a 100%
  );
  border-top-color: rgba(255, 255, 255, 0.35);
  padding-top: 4.2rem;
}

.proj-overlay-content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.proj-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-pill, 999px);
  width: fit-content;
}

.proj-meta-badge i {
  color: #60a5fa;
}

.proj-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  font-family: var(--font-heading, inherit);
}

.proj-meta-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.92);
  padding-top: 0.15rem;
}

.proj-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.proj-meta-item i {
  color: #7dd3fc;
  font-size: 0.88rem;
}

.proj-actions {
  margin-top: 0.4rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.proj-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.68rem 1.2rem;
  background: linear-gradient(135deg, #1A72C9 0%, #292B9A 100%);
  color: #ffffff;
  border-radius: var(--radius-pill, 999px);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 16px rgba(26, 114, 201, 0.38);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.proj-cta-btn i {
  font-size: 1.15rem;
  color: #4ade80;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-cta-btn:hover {
  background: #ffffff;
  color: var(--color-primary, #292B9A);
  border-color: #ffffff;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.proj-cta-btn:hover i {
  transform: scale(1.2);
  color: #16a34a;
}

/* ---------------- Footer (Progress & Dots) ---------------- */
.proj-slider-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.proj-slider-progress {
  width: 100%;
  max-width: 320px;
  height: 5px;
  background: rgba(41, 43, 154, 0.12);
  border-radius: var(--radius-pill, 999px);
  overflow: hidden;
  position: relative;
}

.proj-progress-bar {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--color-accent, #1A72C9), var(--color-primary, #292B9A));
  border-radius: var(--radius-pill, 999px);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.proj-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill, 999px);
  background: color-mix(in srgb, var(--color-primary, #292B9A) 24%, transparent);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-dot:hover {
  background: var(--color-accent, #1A72C9);
  transform: scale(1.2);
}

.proj-dot.is-active {
  width: 32px;
  background: linear-gradient(90deg, var(--color-primary, #292B9A), var(--color-accent, #1A72C9));
  box-shadow: 0 2px 10px rgba(41, 43, 154, 0.4);
}

/* ---------------- Responsive Adjustments ---------------- */
@media (max-width: 768px) {
  .proj-card {
    height: 440px;
  }
  
  .proj-title {
    font-size: 1.08rem;
  }
  
  .proj-overlay {
    padding: 3rem 1.15rem 1.15rem 1.15rem;
  }
  
  .proj-slider-topbar {
    margin-bottom: 1.25rem;
  }
  
  .proj-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
  
  .proj-live-indicator {
    font-size: 0.84rem;
    padding: 0.4rem 0.85rem;
  }
}
