/* ==========================================================================
   LIFE AT DCICI PAGE (Brand Crimson & Deep Navy Palette)
   Includes: Aligned Aspect Ratio Grid, 3D Tilt, Radial Spotlight & Lightbox
   ========================================================================== */
:root {
  --life-bg: #fafafa;
  --life-card-bg: #ffffff;
  --life-navy: #0c1b33;
  --life-muted: #52525b;
  --life-border: rgba(228, 228, 231, 0.85);
  --life-border-hover: rgba(229, 35, 32, 0.35);
  --life-red: #e52320;
  --life-red-bright: #f03e3b;
  --life-red-glow: rgba(229, 35, 32, 0.2);
  --life-red-subtle: #fef2f2;
}

body {
  background-color: var(--life-bg);
  color: var(--life-navy);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

/* ==============================================
   1. WAVE ANIMATION ENGINE
   ============================================== */
.wave-word {
  display: inline-block;
  white-space: nowrap;
  margin-right: 0.24em;
}

.wave-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.wave-animated.in-view .wave-char {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--char-index) * 18ms);
}

/* ==============================================
   2. HERO BANNER
   ============================================== */
.life-hero {
  position: relative;
  background: radial-gradient(circle at 85% 15%, rgba(229, 35, 32, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(12, 27, 51, 0.08) 0%, transparent 55%),
              linear-gradient(180deg, #090e17 0%, #0c1b33 100%);
  padding: 95px 0 85px;
  color: #ffffff;
  overflow: hidden;
  text-align: center;
}

.life-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

.life-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.life-hero-badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--life-red-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--life-red-bright);
}

.life-hero-title {
  font-weight: 900;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.life-hero-title .highlight-red {
  color: var(--life-red-bright);
}

.life-hero-desc {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto;
}

/* ==============================================
   3. GALLERY GRID & UNIFORM CARDS
   ============================================== */
.life-gallery-section {
  position: relative;
  padding: 70px 0 90px;
}

.life-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
  width: 100%;
}

.life-gallery-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--life-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px -4px rgba(12, 27, 51, 0.06);
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  will-change: transform;
}

/* Mouse Hover Radial Spotlight */
.life-gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(
    380px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(229, 35, 32, 0.08),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 3;
}

.life-gallery-card:hover::after {
  opacity: 1;
}

.life-gallery-card:hover {
  border-color: var(--life-border-hover);
  box-shadow: 0 18px 38px -10px rgba(12, 27, 51, 0.12),
              0 0 16px -4px rgba(229, 35, 32, 0.15);
}

/* Fixed Height Container to prevent unequal image sizes */
.life-gallery-card__img-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background-color: #f1f5f9;
}

.life-gallery-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.life-gallery-card:hover .life-gallery-card__img-wrap img {
  transform: scale(1.08);
}

/* Hover Expand Tag */
.life-gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12, 27, 51, 0.75) 100%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
}

.life-gallery-card:hover .life-gallery-card__overlay {
  opacity: 1;
}

.life-gallery-card__tag {
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transform: translateY(8px);
  transition: transform 0.35s ease;
}

.life-gallery-card:hover .life-gallery-card__tag {
  transform: translateY(0);
}

.life-gallery-card__tag i {
  color: var(--life-red-bright);
}

/* Title Label at the bottom */
.life-gallery-card__content {
  padding: 14px 18px;
  background: #ffffff;
  border-top: 1px solid var(--life-border);
}

.life-gallery-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--life-navy);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Spinner Custom Color */
.spinner-border.text-primary {
  color: var(--life-red) !important;
}

/* ==============================================
   4. LIGHTBOX MODAL
   ============================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 23, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  animation: zoomLightbox 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomLightbox {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 28px;
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 300;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.lightbox__close:hover {
  color: var(--life-red-bright);
  transform: scale(1.15) rotate(90deg);
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 1.8rem;
  padding: 12px 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }

.lightbox__prev:hover,
.lightbox__next:hover {
  background: var(--life-red);
  border-color: var(--life-red-bright);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.lightbox__caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: center;
  background: rgba(12, 27, 51, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 24px;
  border-radius: 9999px;
  max-width: 80%;
}

@media (max-width: 768px) {
  .life-image-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .life-gallery-card__img-wrap {
    height: 240px;
  }
  .lightbox__prev { left: 10px; }
  .lightbox__next { right: 10px; }
}