html {
  background-color: white;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: url(../Images/bg_squares.svg);
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  color: #333333; 
}
/* --------------------------------------Styles for the Title Card---------------------------------------------- */

.titleCard {
  max-width: 100%;
  background-image: url(../Images/renovation_header-scaled.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
}

.titleCard h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #f9f9f9;
  text-transform: uppercase; /* Styling the header to stand out */
  font-weight: 500; 
  margin: 0 auto 20px;
  padding-top: 2%;
  padding-bottom: 2%;
  text-align: center;
}

/* --------------------------------------Styles for the main section---------------------------------------------- */

.mainContentArea {
  padding: 40px;
  margin: 0 auto; /* Centering the entire section */
  max-width: 90%; /* Limiting the max width for better aesthetics */
}

.contentHeader {
  text-align: center;
  font-size: 2.5rem;
  color: #3e2a75;
  margin-bottom: 30px; /* Spacing between the header and the text boxes */
  text-transform: uppercase; /* Styling the header to stand out */
  font-weight: 400;
}

.mainText {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 20px; /* Reduced padding inside grid to fit the overall frame */
  justify-content: center;
  align-items: stretch;
  margin-bottom: 5%;
}

.mainText p {
  background: linear-gradient(to right, #3e2a75, #5a4e8c, #7a53a3);
  color: #ffffff;
  border-radius: 15px;
  padding: 25px 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: riseIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  min-height: 300px;
  text-align: center;
}

.mainText p::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, transparent, rgba(0, 0, 0, 0.3) 70%);
  transition: transform 0.5s, opacity 0.3s ease;
  opacity: 0;
  z-index: 0;
}

.mainText p:hover::before {
  opacity: 1;
  transform: rotate(10deg);
}

.mainText p:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

@keyframes riseIn {
  0% {
      transform: translateY(50px) scale(0.9);
      opacity: 0;
  }
  100% {
      transform: translateY(0) scale(1);
      opacity: 1;
  }
}


/* --------------------------------------Styles for the Carousel---------------------------------------------- */


html, body {
  max-width: 100%;
  overflow-x: hidden;
  font-family: Open Sans, sans-serif;
}

.head1, .head2 {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 2.5rem;
  color: #3e2a75;
  margin-bottom: 30px; /* Spacing between the header and the text boxes */
  text-transform: uppercase; /* Styling the header to stand out */
  font-weight: 400;
  margin: 0 auto 0px;
  padding: 0 0 0% 0;
  padding-top: 0%;
  z-index: -1;
}

.head1 h3, .head2 h3 {
  margin-bottom: 2%;
  margin-top: 1%;
}

.head1 {
  border-top: 6px solid #3e2a75; 
}

.head2 {
  border-top: 6px solid darkgreen; 
}

.logos1, .logos2 {
  white-space: nowrap;
  padding: 60px 0;
  padding-top: 8%;
  padding-bottom: 0%;
  position: relative;
}

.logos-slide {
  display: inline-block;
}

.logos-slide a {
  display: inline-block;
  transition: transform 0.3s;
  position: relative;
}

.logos-slide a:hover {
  transform: translateY(-5px); 
}

.logos-slide img {
  height: 115px;
  margin: 0 50px;
  padding: 12.5px 0;
  transition: transform 0.3s;
}

.logos2 {
  border-bottom: 6px solid #ff7c1a; 
}

.logo-description {
  display: none; 
  position: absolute;
  bottom: auto; 
  left: 50%; 
  transform: translateX(-50%);
  width: 220px;
  background-color: #f9f9f9;
  color: #333;
  text-align: center;
  text-wrap: wrap;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border: 1px solid #ccc;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  overflow: visible;
}

.logos-slide a:hover .logo-description {
  position: absolute;
  display: block; 
  opacity: 1; 
  visibility: visible;
  z-index: 1;
}

.logoCarousel {
  position: relative;
}


/* Project gallery styles */
.projectGallery {
  position: relative;
  padding-bottom: 2rem;
}

.head3 {
  position: relative;
  text-align: center;
  font-size: 2.5rem;
  color: #3e2a75;
  text-transform: uppercase; /* Styling the header to stand out */
  font-weight: 400;
  margin: 0 auto 0px;
  padding: 0 0 0% 0;
  padding-top: 0%;
  z-index: -1;
}

.galleryWindow {
  padding: 2rem 0;
  overflow: hidden;
  position: relative;
}

.galleryWrapper {
  display: flex;
  transition: transform 0.5s ease;
}

.galleryWrapper img {
  flex: 0 0 auto;
  max-width: 40%;
  opacity: 0.5;
  transition: opacity 0.5s ease, transform 0.5s ease;
  margin: 0 1rem;
}

.galleryWrapper img.active {
  opacity: 1;
  transform: scale(1.1);
}

.galleryControls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 1rem;
  z-index: 3;
}

.prevButton,
.nextButton {
  background-color: #999;
  color: white;
  padding: 0.75rem;
  font-size: 1.5rem;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.prevButton:hover,
.nextButton:hover {
  background-color: #555;
  color: white;
}

.prevButton:disabled,
.nextButton:disabled {
  background-color: #eee;
  color: #ddd;
  cursor: not-allowed;
}

.pagination {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  z-index: 2;
}

.pagination button {
  background-color: transparent;
  color: #ddd;
  padding: 0 0.5rem;
  cursor: pointer;
  font-size: 2rem;
  border: none;
  margin: 0 0.25rem;
}

.pagination button.active {
  color: #666;
}

/* Media queries for responsiveness */
@media screen and (max-width: 768px) {
  .firstText h2 {
      font-size: 1.5rem;
  }

  .nav-links li {
      opacity: 1;
      transform: translateX(0px);
  }

  .firstText p {
      font-size: 1rem;
      padding: 0 20px;
  }

  .firstText {
      margin-top: 20%;
  }

  .head1,
  .head2,
  .head3 {
      font-size: 1.5rem;
      padding-top: 1.5rem;
      padding-bottom: 1rem;
      margin-bottom: 0;
  }

  .logos-slide img {
      height: 80px;
      margin: 0 1rem;
  }

  .galleryWrapper img {
      max-width: 60%;
      margin: 0 0.5rem;
  }

  .prevButton,
  .nextButton {
      font-size: 1rem;
      padding: 0.5rem;
  }

  .pagination button {
      font-size: 1.5rem;
      margin: 0 0.25rem;
  }
}

@media screen and (min-width: 769px) {
  .firstText h2 {
      font-size: 2.5rem;
  }

  .firstText p {
      font-size: 1.5rem;
  }

  .head1,
  .head2,
  .head3 {
      font-size: 2.5rem;
      padding-top: 3rem;
      padding-bottom: 2rem;
  }

  .logos-slide img {
      height: 150px;
      margin: 0 3rem;
  }

  .galleryWrapper img {
      max-width: 40%;
      margin: 0 2rem;
  }

  .prevButton,
  .nextButton {
      font-size: 2rem;
      padding: 1rem;
  }

  .pagination button {
      font-size: 2.5rem;
      margin: 0 0.5rem;
  }
}

/* Project Gallery – make slides larger on big screens */
.projectGallery .galleryWindow{
  max-width: 1280px;   /* keeps the whole strip nicely centered */
  margin: 0 auto;
}

.projectGallery .galleryWrapper{
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
}

/* Override the old max-width:40% with a responsive width */
.projectGallery .galleryWrapper img{
  width: clamp(260px, 28vw, 560px) !important;  /* grows with screen */
  height: auto;
  opacity: .55;
  margin: 0 clamp(8px, 1.5vw, 20px);
  transition: opacity .5s ease, transform .5s ease;
}

/* Make the active/center slide feel bigger */
.projectGallery .galleryWrapper img.active{
  opacity: 1;
  transform: scale(1.12);
}

@media (min-width: 1440px){
  .projectGallery .galleryWrapper img{
    /* bigger than before */
    width: clamp(400px, 36vw, 860px) !important;
  }
  .projectGallery .galleryWrapper img.active{
    transform: scale(1.22);
  }
}