.card {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-img-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.custom-card-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  transition: all 0.5s ease-in;
}

.custom-card-img:hover {
  transform: scale(1.03) translate(-48%, -48%);
}

.custom-tabs .nav-link {
  color: #333;
  border: 1px solid #dee2e6;
}

.custom-tabs .nav-link.active {
  background-color: #070f5a !important;
  color: white !important;
  border-color: #070f5a;
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 10px;
}

.modal-body {
  position: relative;
  text-align: center;
  padding: 2rem;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #ff5757;
  cursor: pointer;
  z-index: 1050;
}

.close-button:hover {
  color: #d63031;
}

.video-popup .modal-dialog {
  max-width: 900px;
}

.videotestimonials {
  position: relative;
  margin: 0; /* Changed to 0 for better carousel alignment */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.videotestimonials img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  background-color: #e9ecef;
}

.videobtns {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 55px;
  color: #ff0000;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.videobtns:hover {
  transform: translate(-50%, -50%) scale(1.15);
  opacity: 1;
}

.tab-video-sec {
  padding: 50px 0;
  background-color: #f8f9fa;
}

.tab-video-sec h3 {
  margin-bottom: 30px;
  color: #070f5a;
  font-weight: 600;
}

.case-pictures-section {
  background-color: #070f5a;
  padding: 50px 0;
}

.case-pictures-section h2 {
  color: white;
  margin-bottom: 30px;
}

/* Smooth video container transition */
#video-container {
  transition: opacity 0.2s ease, transform 0.2s ease;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#video-container::-webkit-scrollbar {
  display: none;
}

.video-item {
  scroll-snap-align: start;
  flex: 0 0 calc(50% - 7.5px);
  max-width: calc(50% - 7.5px);
}

@media (max-width: 768px) {
  .card {
    aspect-ratio: 1 / 1;
  }

  .custom-card-img {
    object-fit: contain;
  }

  .custom-tabs {
    margin-top: 30px;
  }

  .videobtns {
    font-size: 40px;
  }

  .videotestimonials img {
    height: 250px;
  }

  .videotestimonials {
    max-width: 100%;
  }

  .video-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 576px) {
  .modal-body {
    padding: 1rem;
  }

  .videotestimonials img {
    height: 200px;
  }
}