/* --------------------------------------------------
   1. Background Image Container
-------------------------------------------------- */
.background-container {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  background-image: url(../images/case-study3.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  min-height: 60vh;
}

/* --------------------------------------------------
   2. Hero Banner
-------------------------------------------------- */
.hero-banner {
  position: relative;
  width: 100%;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  background: none;
}

.hero-overlay {
  position: absolute;
  top: 1px;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 20px;
  z-index: 10;
}

.breadcrumb {
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
  opacity: 0.8;
}

.page-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-transform: capitalize;
  margin: 0;
}

section.hero-banner + .about-us {
  margin-top: 20px;
}

.animate-left,
.animate-right {
  opacity: 0;
}

.animate-now.animate-left {
  animation: slideInLeft 1s ease-out forwards;
}

.animate-now.animate-right {
  animation: slideInRight 1s ease-out forwards;
}


/* --------------------------------------------------
   3. Case Studies Section
-------------------------------------------------- */
.case-studies-section {
  background-color: #ebe8e8;
  padding-bottom: 100px;
}

.case-studies-container {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Area */
.case-studies-hero {
  background: linear-gradient(to right, #2196f3, #64b5f6);
  color: white;
  text-align: center;
  padding: 50px 20px;
  border-radius: 8px;
}

.case-studies-hero h1 {
  font-size: 2.5rem;
}

/* Intro Text */
.case-studies-intro {
  margin: 20px 0;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #555;
}

/* Header with Red Dash */
.case-studies-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 40px;
  padding-bottom: 30px;
}

.red-dash {
  display: inline-block;
  width: 40px;
  height: 3px;
  background-color: red;
}

.featured-title {
  font-size: 24px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 80px;
}

/* --------------------------------------------------
   4. Case Studies Grid
-------------------------------------------------- */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 140px 30px;
  margin-top: 30px;
}

.case-study {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: visible;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.case-study.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Image Wrapper */
.case-study-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.case-study img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.case-study:hover .case-study-image img {
  transform: scale(1.1);
}

/* Info Box */
.case-study-info {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  margin-left: -57px;
  width: 80%;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px 20px 40px;
  border-radius: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  z-index: 10;
}

.case-study-info h4 {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  gap: 20px;
  padding-top: 10px;
  margin-bottom: 20px;
  margin-left: 10px;
}

.case-study-info p {
  font-size: 18px;
  line-height: 1.6;
  text-align: left;
  padding-left: 20px;
}

/* --------------------------------------------------
   5. Final Call-To-Action
-------------------------------------------------- */
.cta-final {
  background-color: white;
  text-align: center;
  padding: 60px 20px;
  margin: 80px 0 40px;
  width: 100%;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-final h2 {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}

.cta-final p {
  font-size: 18px;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background-color: #d62828;
  color: white;
  font-size: 18px;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease-in-out;
}

.cta-button:hover {
  background-color: #b71c1c;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 20px;
  background-color: #c40000;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  display: none;
  z-index: 1000;
}

/* --------------------------------------------------
   6. Responsive Media Queries
-------------------------------------------------- */

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-left {
  animation: slideInLeft 1s ease-out forwards;
}

.animate-right {
  animation: slideInRight 1s ease-out forwards;
}


@media (max-width: 1024px) {
  .case-studies-grid {
    gap: 100px 20px;
  }
}

@media (max-width: 768px) {
  .hero-banner {
    height: 200px;
  }

  .breadcrumb {
    font-size: 0.9rem;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .case-studies-grid {
    grid-template-columns: 1fr;
    gap: 80px;
  }

  .case-study {
    height: 350px;
  }

  .case-study-info {
    width: 90%;
    margin-left: 0;
    padding: 15px 15px 30px;
  }

  .case-study-info p {
    padding-left: 10px;
    font-size: 16px;
  }

  .featured-title {
    margin-bottom: 40px;
  }

  .cta-final h2 {
    font-size: 28px;
  }

  .cta-final p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.5rem;
  }

  .case-study {
    height: 300px;
  }

  .case-study-info h4 {
    font-size: 18px;
    gap: 10px;
  }

  .cta-button {
    font-size: 16px;
    padding: 10px 20px;
  }
}