/* --- Main Section Container --- */
.cr-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: url("/img/تسليم-أعمال-عظم-بالمواد.webp") no-repeat center
    center/cover;
  opacity: 0.15;
  z-index: 1;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0% 100%);
}
.cr-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  min-height: 80vh;

  padding: 50px 10%;
  box-sizing: border-box;

  background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);

  overflow: hidden;
}

/* --- Certificate Column --- */
.cr-content-left {
  position: relative;
  z-index: 3;

  width: 55%;

  display: flex;
  flex-direction: column;
  align-items: center;

  box-sizing: border-box;
}

/* Image Wrapper */
.cr-image-wrapper {
  position: relative;
  perspective: 1000px;

  width: 100%;

  display: flex;
  justify-content: center;

  margin-bottom: 15px;
}

/* Certificate */
.cr-certificate-img {
  display: block;

  width: auto;
  max-width: 100%;

  /* مهم جدًا */
  max-height: calc(80vh - 150px);

  height: auto;

  object-fit: contain;

  border-radius: 4px;

  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);

  animation: float-up-down 6s ease-in-out infinite;

  transition: transform 0.1s ease-out;

  cursor: pointer;
}

/* Title */
.cr-title {
  position: relative;
  z-index: 10;

  display: block;

  color: #3b6099;

  font-size: 1.5rem;
  font-weight: bold;

  text-align: center;

  margin: 10px 0 0;
  padding: 5px 0;

  line-height: 1.5;

  visibility: visible;
  opacity: 1;
}
.cr-content-right {
  position: relative;
  z-index: 2;
  width: 40%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cr-graphic-img {
  width: 100%;
  max-width: 450px;
  opacity: 0.8;
  filter: grayscale(20%);
}

@keyframes float-up-down {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
  }
  100% {
    transform: translateY(0px);
  }
}

@media (max-width: 992px) {
  .cr-section {
    flex-direction: column;
    padding: 40px 5%;
    min-height: auto;
  }
  .cr-content-left,
  .cr-content-right {
    width: 100%;
  }
  .cr-certificate-img {
    max-height: 60vh; /* أصغر شوية على الموبايل */
  }
  .cr-content-right {
    margin-top: 40px;
    display: none;
  }
}
