/* Gallery Page Specific Styles */
/* Extracted from Gallery.html */

.video-container video {
  position: relative;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 1;
  transform: none;
}

.video-container > img.slider {
  z-index: 11;
}

body .justify-content-center {
  justify-content: center !important;
}

.countercorner {
  z-index: 0;
}

.btnwrap {
  margin-top: 0;
}

.btnwrap .mybtn {
  min-width: 13.4375rem;
}

/* Gallery specific styles */
.gallery {
  margin-top: 2rem;
}

.gallery .row {
  margin-bottom: 1rem;
}

.gallery .col-md-3 {
  margin-bottom: 1.5rem;
}

.cardg {
  position: relative;
}

/* Card5 base styles */
.card5 {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  z-index: 1;
  border: none;
  border-radius: 0rem;
  padding: 0;
  background-color: transparent !important;
}

.cardg .card5 {
  margin-top: 1.25rem;
}

.cardg .card:hover {
  transition: transform 0.3s ease;
  transform: translateY(-0.3125rem);
}

.card5 .card-img-top {
  margin-right: auto;
  margin-left: auto;
  height: 40vh;
  min-height: 20vh;
  max-width: 100%;
  -webkit-border-radius: 0rem;
  -moz-border-radius: 0rem;
  border-radius: 0rem;
  width: 100%;
  object-fit: cover;
}

.card5 .cardline {
  content: " ";
  position: absolute;
  height: 70%;
  width: 70%;
  border: 8px solid var(--color-primary);
  top: 50%;
  right: 50%;
  -webkit-transform: translate(50%, -50%);
  transform: translate(50%, -50%);
  z-index: 1;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.cardg .card5 .cardline {
  border-left: 4px solid var(--color-secondary);
  border-top: 4px solid var(--color-secondary);
  top: 0%;
  left: 0%;
  border-right: 0px;
  border-bottom: 0px;
  bottom: auto;
  right: auto;
  height: 70%;
  width: 70%;
  transform: none;
}

.cardlink {
  text-decoration: none;
  display: block;
}

.card5 .card-text {
  position: relative;
  padding: 0;
}

/* Ensure images load smoothly */
.card-img-top {
  transition: opacity 0.3s ease;
}

.card-img-top[loading="lazy"] {
  opacity: 0;
}

.card-img-top[loading="lazy"].loaded {
  opacity: 1;
}

/* Gallery section styles */
.stu-ser {
  padding: 3rem 0;
}

.str-middle {
  margin-bottom: 2rem;
}

.main-title {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  color: var(--color-text-primary);
}

.str-middle hr {
  border: none;
  height: 0.125rem;
  background: linear-gradient(to right, transparent, var(--color-primary), transparent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .cardg .card-img-top {
    height: 12.5rem;
  }

  .main-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .gallery .col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .cardg .card-img-top {
    height: 15.625rem;
  }
}
