/* service-top-section  */
.service-top-section {
    height: 100vh;
    background-color: #B5B5B5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.service {
    font-size: 180px;
    font-family: "Archivo Black", sans-serif;
    margin: 0;
    line-height: 12rem;
}

.header-slogn {
    font-size: 18px;
    margin: 0;
    color: #494949;
}

/* Keyframes for fade-up effect */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial state - hidden */
.service,
.header-slogn {
    opacity: 0;
    transform: translateY(10px);
}

/* Animate class to trigger fade-up */
.fade-up {
    animation: fadeUp 1s ease forwards;
}

.service-second-head {
    font-size: 80px;
    font-family: "Archivo Black", sans-serif;
    margin: 0;
    padding-left: 50px;
    padding-top: 80px;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial hidden state */
.service-second-head span {
    opacity: 0;
    transform: translateY(30px);
}

/* Animated state */
.service-second-head.animate span {
    animation: fadeUp 0.6s ease forwards;
}

/* Stagger animation delays */
.service-second-head.animate span:nth-child(1) {
    animation-delay: 0.2s;
}

.service-second-head.animate span:nth-child(2) {
    animation-delay: 0.3s;
}

.service-second-head.animate span:nth-child(3) {
    animation-delay: 0.4s;
}

.service-second-head.animate span:nth-child(4) {
    animation-delay: 0.6s;
}

.service-second-head span {
    display: block;
    line-height: 5rem;
}

/* service-second-section */
.service-second-section {
    background-color: #B5B5B5;
    padding: 50px 0px;
}

.custom-hr {
    border: none;
    height: 2px;
    background-color: #494949;
}

.service-second-grid {
  padding: 20px 50px;
  overflow: hidden; /* Hide overflowing content */
  transition: max-height 1.5s ease, padding 1.5s ease;
}

/* When para is visible, expand the container */
.service-second-grid.expanded {
  max-height: 400px; /* Adjust this to fit content height */
  padding-bottom: 90px; /* Extra padding for para’s space */
}


.grid-top {
    display: flex;
}

.count {
    font-size: 20px;
    font-weight: 300;
    width: 5%;
}

.grid-head {
    font-size: 60px;
    color: #000;
    margin: 0;
    font-family: "Archivo Black", sans-serif;
    width: 55%;
}

.grid-minihead {
    font-size: 20px;
    font-weight: 300;
    text-align: right;
    width: 40%;
}

.grid-para {
  font-size: 20px;
  font-weight: 300;
  width: 30%;
  margin: 0;
  padding-top: 50px;

  opacity: 0;
  transform: translateY(30px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 1.5s ease, transform 1.5s ease, max-height 0.8s ease;
}

.grid-para.visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 300px; /* Enough height to show content */
}

.grid-para.hidden {
  opacity: 0;
  transform: translateY(30px);
  max-height: 0;
}






/* service-third-section */
.service-third-section {
    padding: 30px 80px;
}

.lap-img {
  position: relative;
  width: 100%;
  height: 90vh;
  padding-bottom: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.lap-grid-loader {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  pointer-events: none;
  z-index: 10;
  background: transparent;
}

.lap-grid-loader .grid-block-lap {
  width: 15vw;
  height: 12vh;
  background: #07070749;
  opacity: 1;
  transform: scale(1);
  animation: blockRevealLap 1s ease forwards;
  animation-delay: calc(var(--delay) * 0.3s);
  animation-play-state: paused; /* start paused */
}

@keyframes blockRevealLap {
  to {
    opacity: 0;
    transform: scale(0);
  }
}

.laptop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fills container without distortion */
    border-radius: 10px;
}

.image-head {
    font-size: 75px;
    color: #000;
    margin: 0;
    font-family: "Archivo Black", sans-serif;
    line-height: 5rem;
    padding: 40px 0px;
}

.image-para {
    font-size: 22px;
    font-weight: 400;
    width: 30%;
}
.image-head span,
.image-para span {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* When .in-view is added to the container, trigger the animation with delay */
.image-head.in-view span,
.image-para.in-view span {
  animation-play-state: running;
}

.image-head span:nth-child(1),
.image-para span:nth-child(1) {
  animation-delay: 0.1s;
}
.image-head span:nth-child(2),
.image-para span:nth-child(2) {
  animation-delay: 0.2s;
}
.image-head span:nth-child(3),
.image-para span:nth-child(3) {
  animation-delay: 0.3s;
}
.image-head span:nth-child(4),
.image-para span:nth-child(4) {
  animation-delay: 0.4s;
}

.bottom-image-grid {
    display: flex;
    gap: 10px;
    padding-top: 150px;
    padding-bottom: 50px;
}

.bottom-img-set {
  position: relative; /* to position loader absolute inside */
  width: 100%;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.casing-grid-loader {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  pointer-events: none;
  z-index: 10;
  background: transparent;
}

.casing-grid-loader .grid-block-casing {
  width: 12vw;
  height: 10vh;
  background: #00000049;
  opacity: 1;
  transform: scale(1);
  animation: blockRevealCasing 1s ease forwards;
  animation-delay: calc(var(--delay) * 0.3s);
  animation-play-state: paused; /* start paused */
}

@keyframes blockRevealCasing {
  to {
    opacity: 0;
    transform: scale(0);
  }
}

.bottom-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}


/* Service Page Dark Mode Styles */

/* Service top section dark mode */
body.dark-mode .service-top-section {
    background-color: #000000;
}

body.dark-mode .service {
    color: #ffffff;
}

body.dark-mode .header-slogn {
    color: #ffffff;
}

/* Service second head section dark mode */
body.dark-mode .service-second-head {
    color: #ffffff;
}

/* Service second section dark mode */
body.dark-mode .service-second-section {
    background-color: #000000;
}

body.dark-mode .custom-hr {
    background-color: #ffffff;
}

body.dark-mode .count {
    color: #ffffff;
}

body.dark-mode .grid-head {
    color: #ffffff;
}

body.dark-mode .grid-minihead {
    color: #ffffff;
}

body.dark-mode .grid-para {
    color: #ffffff;
}

/* Service third section dark mode */
body.dark-mode .service-third-section {
    background-color: #000000;
}

body.dark-mode .image-head {
    color: #ffffff;
}

body.dark-mode .image-para {
    color: #ffffff;
}

/* Add smooth transitions for service page elements */
.service-top-section,
.service-second-section,
.service-third-section {
    transition: background-color 0.3s ease;
}

.service,
.header-slogn,
.service-second-head,
.count,
.grid-head,
.grid-minihead,
.grid-para,
.image-head,
.image-para {
    transition: color 0.3s ease;
}

.custom-hr {
    transition: background-color 0.3s ease;
}