/* Keyframes for moving the first container and rotating */
@keyframes moveAndRotateFirstContainer {
  0% {
    transform: translateX(-100%) rotate(0deg);
    /* Start off-screen */
    opacity: 1;
  }

  60% {
    transform: translateX(0%) rotate(0deg);
    /* Fully visible in the center */
    opacity: 1;
  }

  100% {
    transform: translateX(+50%) rotate(-180deg);
    /* Fully rotated and moved */
    opacity: 0;
  }
}

/* Keyframes for revealing the second container */
@keyframes revealSecondContainer {
  0% {
    opacity: 0;
    transform: translateX(50%) rotate(0deg);
    /* Start hidden and rotated */
  }

  100% {
    opacity: 1;
    transform: translateX(0) rotate(+360deg);
    /* Appear fully after the rotation */
  }
}

/* Keyframes for changing the background image */
@keyframes changeBackground {
  60% {
    background-image: url(./images/section1-bg.png);
    /* Initial background */
  }

  100% {
    background-image: url(./images/front-view-bg.png);
    /* Change background */
  }
}

/* Section styles with background animation */
.section1 {
  background-image: url(./images/section1-bg.png);
  background-size: cover;
  height: 70vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  animation: changeBackground 4s forwards 2s;
}

.section-head-con {
  font-size: 40px;
  width: 80%;
  margin: auto;
  font-family: var(--font-family);
  color: var(--secondary-color);
  font-weight: 900;
  text-align: center;
  padding-top: 20px;
}

/* Container wrapper for 3D perspective */
.container-wrapper {
  perspective: 1000px;
  height: 100%;
  width: 100%;
  position: relative;
}

/* First container that moves fully to center and rotates */
.section1-para-con {
  background: linear-gradient(135deg,
      rgba(14, 13, 35, 0.96),
      rgba(0, 104, 56, 0.7));
  width: 60%;
  height: 70vh;
  position: absolute;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%) translateX(-100%);
  backface-visibility: hidden;
  animation: moveAndRotateFirstContainer 5s forwards;
  /* Smooth movement and rotation */
}

/* Second container revealed after the rotation */
.section2-para-con {
  background: linear-gradient(135deg,
      rgba(0, 104, 56, 0.7),
      rgba(14, 13, 35, 0.96));
  width: 60%;
  height: 70vh;
  position: absolute;
  left: 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%) translateX(50%);
  backface-visibility: hidden;
  opacity: 0;
  animation: revealSecondContainer 4s forwards 3s;
  /* Revealed after rotation with delay */
}

/* mobile view  */
@media (max-width: 768px) {

  /* Section styles with background animation */
  .section1 {
    height: 30vh;
    background-size: cover;
    margin-top: -10px;
  }

  /* Container wrapper for 3D perspective */
  .container-wrapper {
    perspective: 800px;
    /* Slightly reduced perspective */
    height: 100%;
    width: 100%;
  }

  /* First container that moves fully to center and rotates */
  .section1-para-con {
    width: 60%;
    height: 30vh;
    transform: translateY(-50%) translateX(-100%);
    animation: moveAndRotateFirstContainer 4s forwards;
  }

  /* Second container revealed after the rotation */
  .section2-para-con {
    width: 60%;
    height: 30vh;
    transform: translateY(-50%) translateX(50%);
    animation: revealSecondContainer 4s forwards 2s;
  }

  /* Adjust the font size for mobile view */
  .section-head-con {
    font-size: 16px;
    /* Reduced font size */
    padding-top: 10px;
  }
}

/* section2 */
.section2 {
  background-color: rgba(14, 15, 36, 1);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
}

.what-con {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  padding-left: 8%;
  width: 100%;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* .what-we-con {
  padding-left: 2%;
  margin-right: 10%;
  margin-top: 0px;
  width: 100%;
} */
.cfo-sub-align {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 90%;
}

.line-divide {
  margin-left: -50%;
}

/* section2 */
.cfo-head {
  font-family: var(--font-family);
  color: var(--primary-color);
  font-weight: 900;
  font-size: 40px;
}

.cfo-sub-head {
  font-family: var(--font-family);
  font-size: 24px;
  font-weight: 500;
  color: var(--secondary-color);
}

.cfo-para {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  width: 85%;
  text-align: justify;
  color: var(--secondary-color);
}

.cfo-para2 {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  width: 60%;
  text-align: justify;
  color: var(--secondary-color);
}

.cfo-para3 {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  width: 100%;
  color: var(--secondary-color);
  text-align: justify;
}

.cfo-section1-btn {
  background: transparent;
  border-radius: 20px;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--secondary-color);
  border-style: solid;
  border-width: 1px;
  border-color: white;
  padding: 10px;
  margin-top: 5%;
  cursor: pointer;
  margin-top: 15px;
}

.hidden {
  opacity: 0;
  transform: translateY(80px);
  /* Initially translate downwards */
  transition: all 1.5s ease-in-out;
  /* Smooth transition */
}

.visible {
  opacity: 1;
  transform: translateY(0);
  /* Slide up from the bottom */
}

@media screen and (min-width: 1650px) {
  .section2 {
    width: 92%;
    margin: auto;
    padding: 1%;
  }

  .cfo-para {
    font-size: 20px;
  }

  .cfo-para2 {
    font-size: 20px;
  }

  .cfo-para3 {
    font-size: 20px;
  }
}

/* Base styles for mobile view */
@media only screen and (max-width: 768px) {
  .section2 {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    padding: 0;
    margin: 0;
    /* Add padding around the content */
    background-color: rgba(14, 15, 36, 1);
  }

  .what-con,
  .what-we-con {
    width: 85%;
    display: flex;
    text-align: center;
    /* margin: 20px 0; */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .cfo-head {
    font-size: 24px;
    /* Adjusted font size */
    margin-top: 10px;
  }

  .cfo-sub-head {
    font-size: 20px;
    /* Adjusted font size */
  }

  .cfo-para,
  .cfo-para2,
  .cfo-para3 {
    font-size: 14px;
     width: 95%;
    /* margin: 0 auto; */
    padding: 0;
  }

  .cfo-section1-btn {
    font-size: 14px;
    /* Adjusted font size */
    padding: 10px 20px;
    /* Adjusted padding for button */
    margin-top: 10px;
    /* Space above the button */
    border-radius: 20px;
    border: 1px solid white;
    /* Consistent border style */
    background: transparent;
    color: var(--secondary-color);
  }

  .cfo-sub-align {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    /* Full width for mobile */
    margin-top: 20px;
  }

  .line-divide {
    display: none;
    /* Hide the vertical line on mobile */
  }
}

/* section3 */


.services-animations {
  height: 100%;
  overflow: hidden;
  position: relative;
  /* padding: 2rem 0; */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Heading Container */
.heading-con {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.heading-font2-port {
  font-size: 40px;
  font-weight: 900;
  font-family: var(--font-family);
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  opacity: 0.8;
  text-align: center;
  margin-top: 1%;
}

.service-header-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.heading-font1-port {
  font-size: 30px;
  font-weight: 600;
  font-family: var(--font-family);
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: -10px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s;
}

/* Progress Bar */
/* .progress-bar {
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
}

.progress {
  height: 100%;
  width: 0;
  background: var(--primary-color);
  transition: width 4s linear;
} */

@media only screen and (max-width: 768px){
  .heading-font2-port{
    font-size: 24px;
  }
}


/* Service Description */
.service-description {
  font-size: 16px;
  line-height: 1.6;
  font-family: var(--font-family);
  color: var(--secondary-color);
  max-width: 1200px;
  text-align: justify;
  opacity: 0.85;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s;
}

/* Project List Styling */
.project-list-align {
  display: flex;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
  max-height: 500px;
}

#project-list {
  list-style: none;
  width: 45%;
  max-height: 500px;
  overflow-y: auto;
  scrollbar-width: thin;
}



/* Project Item Styling */
.project-item {
  padding: 10px;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-size: 20px;
  font-family: var(--font-family);
  color: var(--primary-color);
  background: #ffffff;
  /* box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05); */
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.project-item p {
  display: none;
}

.service-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color);
  transition: color 0.3s;
}

.service-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 5px;
  height: 0;
  background: var(--primary-color);
  transition: transform 0.3s ease, height 0.3s ease;
}

.project-item.active {
  background: var(--primary-color);
  color: #fff;
  font-weight: bold;
  transform: translateX(0);
}

.project-item.active .service-indicator {
  height: 70%;
  transform: translateY(-50%) scaleY(1);
}

.project-item.active .service-title {
  color: #fff;
  border-radius: 10px;
}

/* Image Column */
.images-in-colum {
  width: 50%;
  position: relative;
  height: 400px;
  overflow: hidden;
}

.image-container {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1) translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.image-container.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom right, rgba(var(--primary-color-rgb), 0.2), transparent);
  pointer-events: none;
}

.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}


.get-in-touch {
  font-size: 64px;
  font-family: var(--font-family);
  color: var(--secondary-color);
  font-weight: 600;
}

.arrow-align {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  /* gap: 20%; */
}

.arrow-size {
  font-size: 60px;
}


@media (min-width: 1600px) {
  .heading-font2-port {
    font-size: 48px;
    /* Larger heading for big screens */
  }

  .heading-font1-port {
    font-size: 36px;
  }

  .heading-con {
    max-width: 1550px;
  }

  .service-description {
    text-align: justify;
    width: 100%;
    max-width: 1550px;
  }

  .project-list-align {
    width: 100%;
    max-width: 1550px;
    justify-content: space-between;
    gap: 150px;
    padding-bottom: 2%;
  }

  #project-list {
    width: 80%;
    /* Adjusts project list width */
  }

  .images-in-colum {
    width: 80%;
    /* Adjusts image column width */
    height: 400px;
    /* Increases height to match larger screen */
  }
}


/* mobile view */
@media only screen and (max-width: 768px) {
  /* General Section Styling */
  .services-animations {
    padding: 1rem;
    align-items: center;
  }

  /* Heading Container */
  .heading-con {
    width: 100%;
    padding: 0 1rem;
    text-align: center;
  }

  .heading-font2-port {
    font-size: 28px;
    letter-spacing: 1px;
    margin-top: 1rem;
  }

  .heading-font1-port {
    font-size: 20px;
    margin-bottom: 1rem;
  }

  /* Service Description */
  .service-description {
    font-size: 14px;
    /* line-height: 1.4; */
    /* padding: 0 1rem; */
    text-align: justify;
    margin-top: -30px;
    width: 90%;
    margin-bottom: 10px;
  }

  /* Project List Styling */
  .project-list-align {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  #project-list {
    width: 100%;
    max-height: 300px;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar on mobile */
  }

  .project-item {
    font-size: 16px;
    padding: 8px;
  }

  .service-title {
    font-size: 14px;
  }

  /* Image Column */
  .images-in-colum {
    width: 100%;
    height: 250px;
  }

  .image-container {
    height: 100%;
  }

  .image-wrapper img {
    object-fit: cover;
    border-radius: 8px;
  }

  /* Call-to-Action Section */
  .get-in-touch {
    font-size: 32px;
    text-align: center;
    margin-top: 2rem;
  }

  .arrow-align {
    justify-content: center;
  }

  .arrow-size {
    font-size: 40px;
  }
}

/* section4 */
/* Initial hidden state */
.section4 {
  opacity: 0;
  transform: scale(0.98);
  /* Start slightly scaled down */
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
  /* Smooth transition */
  will-change: opacity, transform;
  /* Optimize performance */
}

/* Animation effect */
.section4.visible {
  opacity: 1;
  transform: scale(1);
  /* Scale to original size */
}

.section4 {
  padding: 2%;
  display: flex;
  flex-direction: column;
  /* align-items: center; */
  width: 90%;
  /* justify-content: space-between; */
  margin: auto;
}

.improve-align {
  padding: 1%;
  display: flex;
  gap: 10%;
}

.value-align {
  padding: 1%;
  display: flex;
  gap: 5%;
  justify-content: space-between;
}

.improve-head {
  font-size: 30px;
  font-family: var(--font-family);
  color: var(--primary-color);
  font-weight: 900;
  margin-left: -15px;
}

.list-item2 {
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--secondary-color);
  font-weight: 500;
  width: 85%;
  padding-bottom: 20px;
  padding-left: 30px;
  /* Increase padding to make room for the larger image */
  background-image: url(../assets/images/checkmark.png);
  background-size: 20px 20px;
  /* Image size set to 30px by 30px */
  background-repeat: no-repeat;
  background-position: 0 10%;
  /* Align the image to the left and center vertically */
  line-height: 30px;
  /* Match the line-height to the image size to vertically align */
  list-style-type: none;
  /* Remove default list style */
  margin-left: -10px;
}

.value-sec-img {
  margin-top: 15px;
}

.minus-width {
  width: 350px !important;
  margin-left: -50px;
}

/* larger screens */
@media screen and (min-width: 1650px) {
  .improve-align {
    width: 94%;
    margin: auto;
    justify-content: space-between;
  }

  .value-align {
    width: 94%;
    margin: auto;
    justify-content: space-between;
  }

  .list-item {
    font-size: 20px;
  }
}

/* Base styles for mobile view */
@media only screen and (max-width: 768px) {
  .section4 {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* width: 100%;*/
  }

  .improve-align,
  .value-align {
    display: block;
    /* width: 100%; */
    margin-bottom: 30px;
    text-align: center;
  }

  .improve-align img,
  .value-align img {
    width: 100%;
    /* Full width for images */
    height: auto;
    /* Maintain aspect ratio */
    max-width: 300px;
    /* Set a max-width for better scaling */
    padding-top: 20px;
  }

  .value-align .value-sec-img {
    margin-top: 0;
    /* Remove top margin */
  }

  .improve-head,
  .value-align .improve-head {
    font-size: 20px;
    /* Adjust font size */
    margin-left: 0;
    /* Remove negative margin */
    margin-bottom: 0;
    /* Space below the heading */
  }

  .list-item2 {
    font-size: 14px;
    padding-bottom: 15px;
    padding-left: 5px;
    background-size: 16px 16px;
    background-position: 0 5%;
    line-height: 24px;
    margin-left: 20px;
  }

  .minus-width {
    width: 100% !important;
    /* Full width for mobile view */
    margin-left: 0;
    /* Remove negative margin */
  }
}

/* section5 */
/* Keyframes for horizontal movement with limited range */
@keyframes moveText {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-50px);
    /* Move text left */
  }

  100% {
    transform: translateX(0);
    /* Move text back to original position */
  }
}

@keyframes moveArrow {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(50px);
    /* Move arrow right */
  }

  100% {
    transform: translateX(0);
    /* Move arrow back to original position */
  }
}

.section5 {
  background-color: #006838;
  overflow: hidden;
  /* Hide overflow to ensure smooth animation */
  position: relative;
  /* Ensure positioning for child elements */
  padding: 1%;
  /* Adjust padding as needed */
}

.arrow-align {
  display: flex;
  width: 100%;
  justify-content: center;
  position: relative;
  /* Ensure the position is relative for proper animation */
}

/* Animation for the text container */
.get-in-touch {
  font-size: 64px;
  font-family: var(--font-family);
  color: var(--secondary-color);
  font-weight: 600;
  position: relative;
  animation: moveText 4s ease-in-out infinite;
  /* Continuous movement left and right */
}

/* Animation for the arrow container */
.arrow-size {
  font-size: 60px;
  animation: moveArrow 4s ease-in-out infinite;
  /* Continuous movement right and left */
  margin-left: 130px;
}

/* .section5 {
  background-color: #006838;
} */

/* section5 */

/* larger screens */
@media screen and (min-width: 1650px) {
  .list-item2 {
    font-size: 20px;
  }
}

/* Base styles for mobile view */
@media only screen and (max-width: 768px) {
  .section5 {
    padding: 10px;
    /* Add padding around the content */
    background-color: #006838;
    text-align: center;
    /* Center-align text and content */
  }

  .arrow-align {
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    align-items: center;
    /* Center-align items */
    justify-content: center;
    /* Center-align items vertically */
    gap: 10px;
    /* Adjust gap between text and arrow */
  }

  .get-in-touch {
    font-size: 24px;
    /* Reduced font size */
    animation: none;
    /* Disable animation on mobile for better performance */
  }

  .arrow-size {
    font-size: 30px;
    /* Reduced font size */
    animation: none;
    /* Disable animation on mobile for better performance */
  }
}