/* Life Page Sections Styling */
.life-section {
  padding: 3rem 0;
  width: 100%;
  flex: none !important;
}

.life-section-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.life-section-tag.birthday,
.life-section-tag.diwali,
.life-section-tag.events,
.life-section-tag.stories {
  position: relative;
  padding-left: 28px;
}

.life-section-tag::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.life-section-tag.birthday::before {
  background-image: url("../images/life/birthday-cone.webp");
}

.life-section-tag.diwali::before {
  background-image: url("../images/life/diwali-diva.webp");
}

.life-section-tag.events::before {
  background-image: url("../images/life/events.webp");
}

.life-section-tag.stories::before {
  background-image: url("../images/life/teams.webp");
}

@media (min-width: 768px) {
  .life-section-wrapper {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }
}

.life-section-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.life-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #333;
}

.life-section-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 1rem;
}

.life-section-carousel-wrapper {
  flex: 1;
  position: relative;
}

.life-image-carousel {
  position: relative;
  width: 100%;
}

.life-image-carousel .owl-stage-outer {
  width: 100%;
}

.life-image-carousel .owl-stage {
  display: flex;
}

.life-image-carousel .item {
  width: 100%;
  padding: 0.5rem;
  flex-shrink: 0;
}

.life-image-card {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.life-image-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Touch-friendly for mobile devices */
@media (hover: none) and (pointer: coarse) {
  .life-image-card:active .life-image-overlay {
    background: rgba(0, 0, 0, 0.6);
    opacity: 1;
  }

  .life-image-card:active .life-image-overlay-content {
    transform: translateY(0);
  }
}

.life-image-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9 !important;
  display: block;
}

.life-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.life-image-card:hover .life-image-overlay {
  background: rgba(0, 0, 0, 0.6);
  opacity: 1;
}

.life-image-overlay-content {
  color: #fff;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.life-image-card:hover .life-image-overlay-content {
  transform: translateY(0);
}

.life-image-overlay h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: #fff;
}

.life-image-overlay p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  color: #fff;
  opacity: 0.9;
}

/* Mobile Styles (up to 575px) */
@media (max-width: 575.98px) {
  .life-section {
    padding: 2rem 0;
  }

  .life-section-wrapper {
    gap: 1.5rem;
  }

  .life-section-content {
    width: 100%;
    text-align: center;
  }

  .life-section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: start;
  }

  .life-section-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0rem;
    text-align: center;
  }

  .life-section-carousel-wrapper {
    width: 100%;
  }

  .life-image-carousel .item {
    padding: 0.25rem;
  }

  .life-image-overlay {
    padding: 0.75rem;
  }

  .life-image-overlay h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
  }

  .life-image-overlay p {
    font-size: 0.8rem;
    line-height: 1.4;
  }
}

/* Tablet Styles (576px to 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .life-section {
    padding: 2.5rem 0;
  }

  .life-section-wrapper {
    gap: 2rem;
  }

  .life-section-content {
    width: 100%;
    text-align: center;
  }

  .life-section-title {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    text-align: center;
  }

  .life-section-text {
    font-size: 0.95rem;
    margin-bottom: 0.875rem;
    text-align: center;
  }

  .life-section-carousel-wrapper {
    width: 100%;
  }

  .life-image-carousel .item {
    padding: 0.4rem;
  }

  .life-image-overlay {
    padding: 1.25rem;
  }

  .life-image-overlay h4 {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
  }

  .life-image-overlay p {
    font-size: 0.9rem;
  }
}

/* Small Desktop / Large Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .life-section {
    padding: 2.75rem 0;
  }

  .life-section-wrapper {
    gap: 2.5rem;
  }

  .life-section-content {
    width: 45%;
  }

  .life-section-title {
    font-size: 1.85rem;
    margin-bottom: 1.25rem;
  }

  .life-section-text {
    font-size: 0.95rem;
  }

  .life-section-carousel-wrapper {
    width: 55%;
  }

  .life-image-overlay {
    padding: 1.25rem;
  }

  .life-image-overlay h4 {
    font-size: 1.4rem;
  }

  .life-image-overlay p {
    font-size: 0.9rem;
  }
}

/* Celebrations Overview Feature Box Styles */
.feature-box-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.feature-box-link:hover {
  text-decoration: none;
  transform: translateY(-5px);
}

.feature-box-link:focus {
  text-decoration: none;
  outline: none;
}

.feature-box {
  cursor: pointer;
  transition: all 0.3s ease;
}

.feature-box:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.feature-box-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 25%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: end;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.feature-box:hover .feature-box-overlay {
  background: rgba(0, 0, 0, 0.4);
  opacity: 1;
}

.feature-box-heading {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.feature-box:hover .feature-box-heading {
  transform: translateY(-40px);
}

/* Touch-friendly for mobile devices */
@media (hover: none) and (pointer: coarse) {
  .feature-box:active .feature-box-overlay {
    background: rgba(0, 0, 0, 0.6);
    opacity: 1;
  }

  .feature-box:active .feature-box-heading {
    transform: translateY(0);
  }
}

.feature-box-heading strong {
  color: var(--white);
  font-weight: 600 !important;
}

.life-image-card {
  height: auto !important;
}

/* Mobile Styles for Feature Box */
@media (max-width: 575.98px) {
  .feature-box {
    min-height: 200px !important;
  }

  .feature-box-heading {
    font-size: 1.2rem;
  }
}

/* Tablet Styles for Feature Box */
@media (min-width: 576px) and (max-width: 767.98px) {
  .feature-box {
    min-height: 220px !important;
  }

  .feature-box-heading {
    font-size: 1.3rem;
  }
}

/* Life Section Tag Labels */
.life-section-tag {
  width: fit-content;
  display: inline-block;
  background-color: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 10px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.life-section-tag:hover {
  background-color: var(--blue);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(9, 72, 179, 0.2);
}

/* Mobile Styles for Life Section Tag */
@media (max-width: 575.98px) {
  .life-section-tag {
    font-size: 0.65rem;
    padding: 3px 8px;
    margin-bottom: 0.5rem;
  }
}

/* Tablet Styles for Life Section Tag */
@media (min-width: 576px) and (max-width: 767.98px) {
  .life-section-tag {
    font-size: 0.7rem;
    padding: 3px 9px;
  }
}

/* Hero Grid Styles */
.hero-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  aspect-ratio: 1;
}

.hero-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-grid-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.hero-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-grid-item.empty {
  background-color: #f0f0f0;
}

/* Grid span classes for varied image sizes */
.hero-grid-item.span-2x2 {
  grid-column: span 2;
  grid-row: span 2;
}

.hero-grid-item.span-2x1 {
  grid-column: span 2;
}

.hero-grid-item.span-1x2 {
  grid-row: span 2;
}

@media (max-width: 991.98px) {
  .hero-image-grid {
    gap: 6px;
  }
}

@media (max-width: 575.98px) {
  .hero-image-grid {
    gap: 4px;
  }
}
