/* ============================================================================
   COMPONENTS CSS - Gallery, Carousel, and Modal Styles
   ============================================================================ */

/* ============================================================================
   VIEW GALLERY HOVER EFFECT
   ============================================================================ */
.entry {
  position: relative;
}

.entry::before {
  content: "\f03e  View Gallery";
  background: #114794;
  color: white;
  position: absolute;
  right: 15px;
  font-family: "Font Awesome 5 Free";
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.entry:hover::before {
  opacity: 1;
}

/* ============================================================================
   GALLERY STYLES
   ============================================================================ */
/* Gallery Container */
.gallery-section-title {
  color: #052a5f;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #052a5f;
}

.gallery-section-title i {
  color: #052a5f;
  margin-right: 10px;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* Gallery Items */
.gallery-item {
  background: #fff;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item:active {
  transform: translateY(-2px);
  transition: transform 0.1s ease;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.05);
}

/* Gallery Item Overlay */
.gallery-item-overlay {
  background: linear-gradient(transparent, rgba(5, 42, 95, 0.9));
  color: white;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 15px 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
  transform: translateY(0);
}

.gallery-item-overlay h4 {
  color: white;
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 5px 0;
}

.gallery-item-overlay p {
  font-size: 12px;
  margin: 0;
  opacity: 0.9;
}

/* Gallery Filters */
.gallery-filters,
.inner-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.inner-filters {
  flex-wrap: wrap;
}

/* Filter Buttons */
.filter-btn,
.inner-filter-btn {
  font-weight: 500;
  border: 2px solid;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Outer Filter Buttons */
.filter-btn {
  background: #f8f9fa;
  color: #052a5f;
  font-size: 14px;
  padding: 8px 20px;
  border-color: #052a5f;
}

@media (hover: hover) {
  .filter-btn:hover {
    background: #052a5f;
    color: white;
    transform: translateY(-2px);
  }
}

.filter-btn.active {
  background: #052a5f;
  color: white;
}

/* Inner Filter Buttons */
.inner-filter-btn {
  background: #ffffff;
  color: #2c3e50;
  font-size: 13px;
  padding: 6px 16px;
  border-color: #2c3e50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) {
  .inner-filter-btn:hover {
    background: #34495e;
    color: white;
    border-color: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(52, 73, 94, 0.3);
  }
}

.inner-filter-btn.active {
  background: #2c3e50;
  color: white;
  border-color: #2c3e50;
  box-shadow: 0 3px 8px rgba(44, 62, 80, 0.4);
}

/* Gallery Item States */
.gallery-item.hidden {
  display: none;
}

.gallery-item.visible {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* Gallery Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   CAROUSEL STYLES
   ============================================================================ */
/* Modal Styles */
body.modal-open {
  padding-right: 0 !important;
}

.modal {
  --bs-modal-width: 80vw;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: transparent;
  border: none;
  user-select: none;
}

.modal-body {
  padding: 0;
}

/* Carousel Styles */
.carousel {
  outline: none;
}

.carousel-item img,
.carousel-item video {
  height: 65vh;
  object-fit: contain;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
  background: rgba(255, 255, 255, 0.9);
  top: 50%;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(5, 42, 95, 0.3);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 15;
}

.carousel-control-prev {
  left: 20px;
}

.carousel-control-next {
  right: 20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(5, 42, 95, 0.6);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background: rgba(5, 42, 95, 0.8);
  background-image: none !important;
  position: relative;
  padding: 20px;
  border-radius: 50%;
  z-index: 20;
}

.carousel-control-prev-icon::before,
.carousel-control-next-icon::before {
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: "Font Awesome 5 Free";
  font-size: 24px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.carousel-control-prev-icon::before {
  content: "\f104";
}

.carousel-control-next-icon::before {
  content: "\f105";
}

/* Carousel Caption */
.carousel-caption {
  background: rgba(5, 42, 95, 0.8);
  bottom: 15px;
  padding: 15px;
  border-radius: 8px;
}

.carousel-caption h4 {
  color: white;
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 5px 0;
}

.carousel-caption p {
  color: white;
  font-size: 14px;
  margin: 0;
  opacity: 0.9;
}

/* ============================================================================
   CAROUSEL INDEX INDICATOR
   ============================================================================ */
.carousel-index {
  background: rgba(0, 0, 0, 0.4);
  color: white;
  display: flex;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 400;
  padding: 8px 16px;
  border: none;
  border-radius: 25px;
  gap: 6px;
  align-items: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 1;
  transition: all 0.3s ease, opacity 0.3s ease;
  z-index: 10;
}

/* Carousel Index Dots */
.carousel-index-dot {
  background: rgba(255, 255, 255, 0.7);
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.carousel-index-dot.active {
  background: #5482ff;
}

.carousel-index-dot.far {
  background: rgba(255, 255, 255, 0.4);
  width: 5px;
  height: 5px;
}

.carousel-index-number {
  color: rgba(255, 255, 255, 0.9);
  min-width: 45px;
  font-weight: 500;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
}

/* ============================================================================
   CERTIFICATE MODAL STYLES
   ============================================================================ */
#certificateModal .btn-primary {
  background: #052a5f;
  font-size: 14px;
  border-color: #052a5f;
  transition: all 0.3s ease;
}

#certificateModal .btn-primary:hover {
  background: #031a3f;
  transform: translateY(-2px);
  border-color: #031a3f;
  box-shadow: 0 4px 12px rgba(5, 42, 95, 0.3);
}

/* ============================================================================
   RESPONSIVE STYLES
   ============================================================================ */
@media (max-width: 768px) {
  .entry::before {
    content: "\f03e  View Gallery";
    top: -15px;
    font-size: 9px;
    padding: 3px 6px;
    opacity: 1;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .gallery-item img,
  .gallery-item video {
    height: 150px;
  }

  .gallery-filters,
  .inner-filters {
    gap: 10px;
  }

  .filter-btn,
  .inner-filter-btn {
    font-size: 13px;
    padding: 6px 16px;
  }

  .carousel-item img,
  .carousel-item video {
    height: 400px;
  }

  .carousel-caption {
    bottom: 0px;
    padding: 5px;
  }

  .carousel-caption h4 {
    font-size: 14px;
    margin: 0 0 3px 0;
  }

  .carousel-caption p {
    font-size: 12px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
  }

  .carousel-control-prev {
    left: 10px;
  }

  .carousel-control-next {
    right: 10px;
  }

  .carousel-control-prev-icon::before,
  .carousel-control-next-icon::before {
    font-size: 20px;
  }

  .carousel-index {
    top: 15px;
    padding: 6px 12px;
    gap: 4px;
  }

  .carousel-index-dot {
    width: 6px;
    height: 6px;
  }

  .carousel-index-dot.far {
    width: 4px;
    height: 4px;
  }

  .carousel-index-number {
    font-size: 11px;
    min-width: 35px;
    margin-left: 6px;
    padding-left: 6px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .gallery-item img,
  .gallery-item video {
    height: 200px;
  }

  .carousel-item img,
  .carousel-item video {
    height: 300px;
  }

  .carousel-caption h4 {
    font-size: 12px;
    margin: 0 0 2px 0;
  }

  .carousel-caption p {
    font-size: 10px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 35px;
    height: 35px;
  }

  .carousel-control-prev {
    left: 5px;
  }

  .carousel-control-next {
    right: 5px;
  }

  .carousel-control-prev-icon::before,
  .carousel-control-next-icon::before {
    font-size: 18px;
  }

  .carousel-index {
    top: 10px;
    padding: 5px 10px;
    gap: 3px;
  }

  .carousel-index-number {
    font-size: 10px;
    min-width: 30px;
    margin-left: 5px;
    padding-left: 5px;
  }
}