/* ══════════════════════════════════════════
   DCC — Global Enhancements CSS
   Preloader · Page Transitions · Lightbox
   ══════════════════════════════════════════ */

/* ── PRELOADER ── */
#dcc-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #020617;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#dcc-preloader.done {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: preloaderFade 0.6s 0.2s forwards;
}

.preloader-logo span {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.preloader-bar {
  width: 160px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
  opacity: 0;
  animation: preloaderFade 0.6s 0.3s forwards;
}

.preloader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 99px;
  animation: preloaderLoad 0.8s 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  width: 0%;
}

@keyframes preloaderFade {
  to { opacity: 1; }
}

@keyframes preloaderLoad {
  to { width: 100%; }
}

/* ── PAGE TRANSITIONS ── */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #020617;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
}

#page-transition.fade-out {
  opacity: 0;
}

/* ── LIGHTBOX ── */
#dcc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(2, 6, 23, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

#dcc-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lb-img-wrap {
  max-width: min(90vw, 1000px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#lb-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#dcc-lightbox.open #lb-img {
  transform: scale(1);
}

#lb-caption {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
  font-style: italic;
}

.lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.lb-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

.lb-nav {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.lb-nav:hover {
  background: rgba(255,255,255,0.18);
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .lb-nav {
    position: fixed;
    bottom: 1.5rem;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }
  .lb-prev { left: 1rem; }
  .lb-next { right: 1rem; }
}

/* ── GALLERY HOVER EFFECT ── */
.gallery-card img,
.project-image img {
  transition: transform 0.5s ease;
}

.gallery-card:hover img,
.project-image:hover img {
  transform: scale(1.06);
}

.gallery-image {
  overflow: hidden;
}

/* ── UPDATES PAGE ── */
.update-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.update-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15,23,42,0.1);
}

.update-card-img {
  height: 220px;
  overflow: hidden;
}

.update-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.update-card-body {
  padding: 1.75rem;
}

.update-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 99px;
  margin-bottom: 0.75rem;
}

.update-tag.ongoing { background: rgba(34,197,94,0.1); color: #16a34a; }
.update-tag.completed { background: rgba(59,130,246,0.1); color: #2563eb; }
.update-tag.milestone { background: rgba(197,160,89,0.15); color: #b45309; }
.update-tag.video { background: rgba(239,68,68,0.1); color: #dc2626; }

.update-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  .updates-grid {
    grid-template-columns: 1fr;
  }
}
