/* ============================================================
   Alchotech Solutions - Life at Alchotech Page Stylesheet
   (assets/css/life-at-alchotech.css)
   ============================================================ */

/* --- Hero Banner Section --- */
.life-hero-section {
  position: relative;
  padding: 130px 0 80px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  overflow: hidden;
  color: #ffffff;
}

.life-hero-section .bg.image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  z-index: 1;
}

.life-hero-section .bg.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.life-hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -1px;
  margin-bottom: 16px;
  font-family: "Poppins", sans-serif;
}

@media (max-width: 767px) {
  .life-hero-title {
    font-size: 2.2rem;
  }
}

/* --- Category Block Section (Top Left Title + Full Width Card Area) --- */
.life-category-block-section {
  padding: 85px 0 95px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  background-color: #ffffff;
  overflow: hidden;
}

.life-category-block-section:nth-child(even) {
  background-color: #f8fafc;
}

.life-category-header-top {
  text-align: left;
}

.life-category-header-top .sec-title {
  font-size: 2.3rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  font-family: "Poppins", sans-serif;
}

.life-category-header-top .sec-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #64748b;
  max-width: 780px;
  margin: 0;
}

/* --- Borderless, Shadowless, Gapless Natural Aspect-Ratio Masonry Grid --- */
.life-gallery-grid {
  column-count: 4;
  column-gap: 0 !important;
  width: 100%;
}

.life-gallery-item {
  break-inside: avoid;
  margin-bottom: 0 !important;
  position: relative;
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  background: transparent;
  width: 100%;
}

.life-gallery-item:hover {
  z-index: 5;
}

.life-gallery-link {
  display: block;
  position: relative;
  width: 100%;
  text-decoration: none;
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

.life-gallery-item img {
  width: 100%;
  height: 360px !important;
  display: block;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

/* Minimalistic Expand Icon at Top Right of Each Image */
.life-gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  border-radius: 0 !important;
  pointer-events: none;
}

.life-gallery-item:hover .life-gallery-overlay {
  opacity: 1;
  visibility: visible;
}

.life-gallery-title {
  display: none !important;
}

.life-gallery-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.life-gallery-item:hover .life-gallery-icon {
  background: #0d52f3;
  border-color: #0d52f3;
}

/* Responsive Masonry Breakpoints */
@media (max-width: 1200px) {
  .life-gallery-grid {
    column-count: 4;
    column-gap: 0 !important;
  }
}

@media (max-width: 991px) {
  .life-gallery-grid {
    column-count: 2;
    column-gap: 0 !important;
  }
  .life-gallery-item img {
    height: 300px !important;
  }
}

@media (max-width: 575px) {
  .life-gallery-grid {
    column-count: 2;
    column-gap: 0 !important;
  }
  .life-gallery-item img {
    height: 240px !important;
  }
  .life-gallery-item {
    border-radius: 0 !important;
  }
  .life-gallery-item img,
  .life-gallery-link,
  .life-gallery-overlay {
    border-radius: 0 !important;
  }
  .life-gallery-overlay {
    padding: 12px;
  }
  .life-gallery-icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}

/* --- Masonry Gallery White Fade Overlay & Modal Trigger Button --- */
.life-gallery-wrapper {
  position: relative;
  width: 100%;
}

.life-gallery-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 380px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 20%,
    rgba(255, 255, 255, 0.88) 60%,
    #ffffff 90%
  );
  pointer-events: none;
  z-index: 10;
}

.life-category-block-section:nth-of-type(even) .life-gallery-fade-overlay {
  background: linear-gradient(
    to bottom,
    rgba(248, 250, 252, 0) 0%,
    rgba(248, 250, 252, 0.45) 20%,
    rgba(248, 250, 252, 0.88) 60%,
    #f8fafc 90%
  );
}

.life-gallery-btn-container {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  text-align: center;
  width: 100%;
}

.btn-view-all-gallery {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 34px;
  background: #0f172a;
  color: #ffffff !important;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  text-decoration: none;
}

.btn-view-all-gallery:hover {
  background: #0d52f3;
  color: #ffffff !important;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px rgba(13, 82, 243, 0.4);
}

/* --- Animated Flex Accordion Card Wrapper --- */
.tv-project-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  width: 100%;
}

@media (max-width: 991px) {
  .tv-project-wrapper {
    flex-direction: column;
    gap: 20px;
  }
}

.tv-project-wrapper .tv-project-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  border-radius: 36px;
  overflow: hidden;
  cursor: pointer;
  flex: 1;
  min-width: 130px;
  transition: flex 0.6s cubic-bezier(0.25, 1, 0.3, 1);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

@media (max-width: 991px) {
  .tv-project-wrapper .tv-project-card {
    width: 100%;
    height: 520px;
    flex: none !important;
  }
}

.tv-project-wrapper .tv-project-card .project-thumb {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #0f172a;
  border-radius: 32px;
  overflow: hidden;
}

.tv-project-wrapper .tv-project-card .project-thumb .image {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.tv-project-wrapper .tv-project-card .project-thumb .image img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  transition:
    transform 0.6s ease,
    object-position 0.4s ease;
}

.tv-project-wrapper .tv-project-card:hover .project-thumb .image img {
  transform: scale(1.06);
}

.tv-project-wrapper .tv-project-card .project-thumb .image::before {
  content: "";
  position: absolute;
  z-index: 2;
  background: linear-gradient(
    0deg,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.45) 30%,
    rgba(15, 23, 42, 0.05) 65%,
    transparent 100%
  );
  bottom: 0;
  width: 100%;
  height: 100%;
  left: 0;
}

/* Collapsed Title (Vertical) */
.tv-project-wrapper .tv-project-card .active-content {
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.tv-project-wrapper .tv-project-card .active-content span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
}

.tv-project-wrapper .tv-project-card .active-content h3 {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* Expanded Title & Modal Expand Icon (Horizontal Bottom) */
.tv-project-wrapper .tv-project-card .project-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 35px 40px;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.4s ease 0.1s,
    transform 0.4s ease 0.1s,
    visibility 0.4s ease 0.1s;
  pointer-events: auto;
}

.project-content-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 15px;
}

.tv-project-wrapper .tv-project-card .project-content h2 {
  font-size: 1.85rem;
  color: #ffffff;
  font-weight: 700;
  margin: 0;
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.3px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.card-expand-modal-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-size: 1.25rem;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  text-decoration: none !important;
}

.tv-project-card:hover .card-expand-modal-btn {
  animation: pulseExpand 2s infinite ease-in-out;
}

.card-expand-modal-btn:hover {
  background: #0d52f3 !important;
  border-color: #0d52f3 !important;
  color: #ffffff !important;
  transform: scale(1.18) rotate(90deg);
  box-shadow: 0 8px 25px rgba(13, 82, 243, 0.6);
}

@keyframes pulseExpand {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
}

/* Pure CSS Hover Accordion Expansion Rules */
.tv-project-wrapper:not(:hover) .tv-project-card:first-child {
  flex: 5.5;
}
.tv-project-wrapper:not(:hover) .tv-project-card:first-child .active-content {
  opacity: 0;
  visibility: hidden;
}
.tv-project-wrapper:not(:hover) .tv-project-card:first-child .project-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tv-project-wrapper .tv-project-card:hover {
  flex: 5.5;
}
.tv-project-wrapper .tv-project-card:hover .active-content {
  opacity: 0;
  visibility: hidden;
}
.tv-project-wrapper .tv-project-card:hover .project-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tv-project-wrapper:hover .tv-project-card:not(:hover) {
  flex: 1;
}
.tv-project-wrapper:hover .tv-project-card:not(:hover) .active-content {
  opacity: 1;
  visibility: visible;
}
.tv-project-wrapper:hover .tv-project-card:not(:hover) .project-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

/* Card Framing Adjustments */
.img-pos-award {
  object-position: center 72% !important;
}
.img-pos-festive {
  object-position: center 30% !important;
}
.img-pos-together {
  object-position: center 55% !important;
}
.img-pos-gala {
  object-position: center 65% !important;
}
.img-pos-fun {
  object-position: center 45% !important;
}
.img-pos-holiday {
  object-position: center 88% !important;
}

/* --- Join Team CTA Banner --- */
.life-join-cta-section {
  padding: 90px 0;
  background: linear-gradient(135deg, #0d52f3 0%, #1d4ed8 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.life-join-cta-card {
  position: relative;
  z-index: 2;
}

.life-cta-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  font-family: "Poppins", sans-serif;
}

.life-cta-btn {
  background-color: #ffffff !important;
  color: #0d52f3 !important;
  font-weight: 700 !important;
  padding: 14px 36px !important;
  border-radius: 9999px !important;
  font-size: 1rem !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
}

.life-cta-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3) !important;
  background-color: #f8fafc !important;
}

/* ============================================================
   Image Skeleton Loader & Progressive Section Loading Optimization
   ============================================================ */
.life-gallery-item {
  background-color: #cbd5e1 !important;
  min-height: 200px;
}

/* Skeleton Shimmer Animation Effect */
.life-gallery-item.skeleton-loading {
  position: relative;
  background-color: #cbd5e1 !important;
}

.life-gallery-item.skeleton-loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(203, 213, 225, 0) 0%,
    rgba(241, 245, 249, 0.75) 50%,
    rgba(203, 213, 225, 0) 100%
  );
  animation: skeleton-shimmer 1.5s infinite linear;
  z-index: 2;
  pointer-events: none;
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(50%);
  }
}

/* Smooth Image Fade-In */
.life-gallery-item img {
  opacity: 0;
  transition: opacity 0.45s ease-in-out, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
  will-change: opacity, transform;
}

.life-gallery-item img.img-loaded {
  opacity: 1 !important;
}

/* Section Progressive Loading Fade-In */
.life-category-block-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  will-change: opacity, transform;
}

.life-category-block-section.section-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
