/* Enhanced Gallery Styles */
.gallery-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: perspective(1000px) translateZ(0);
}

.gallery-thumb:hover {
  transform: perspective(1000px) translateZ(20px) scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.viewer-overlay {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  padding: 20px;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.viewer-overlay.active {
  display: flex;
  opacity: 1;
}

.viewer-image {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease-out;
}

.viewer-overlay.active .viewer-image {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.close-btn:hover {
  transform: rotate(90deg) scale(1.2);
  color: var(--accent);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(var(--primary-rgb), 0.8);
  border: none;
  color: white;
  font-size: 24px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-btn:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.nav-btn.prev {
  left: 30px;
}

.nav-btn.next {
  right: 30px;
}

@media (max-width: 768px) {
  .gallery-thumb {
    height: 180px;
  }
  .nav-btn {
    padding: 10px 15px;
    font-size: 20px;
  }
  .close-btn {
    top: 20px;
    right: 20px;
    font-size: 30px;
  }
}

/* Enhanced Testimonial Cards */
.testimonial-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateY(0);
  overflow: hidden;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.testimonial-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.testimonial-card:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Enhanced Feature Cards */
.feature-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-left: 5px solid var(--primary);
  text-align: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  color: white;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover .feature-icon,
.feature-card:hover h5,
.feature-card:hover p {
  color: white !important;
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
  display: inline-block;
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(10deg);
}

/* Enhanced Branch Cards */
.branch-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.branch-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.branch-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.branch-card:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.branch-icon {
  font-size: 2.5rem;
  color: var(--primary);
  transition: all 0.4s ease;
}

.branch-card:hover .branch-icon {
  transform: scale(1.2);
  color: var(--secondary);
}

/* Enhanced Video Gallery */
.video-gallery {
  padding: 5rem 0;
  background-color: #f8f9fa;
  position: relative;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: perspective(1000px) translateZ(0);
}

.video-container:hover {
  transform: perspective(1000px) translateZ(20px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.video-title {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
  transition: color 0.3s ease;
}

.video-container:hover + .video-title {
  color: var(--primary);
}

/* Custom Icons with Animation */
.fa-users-class:before,
.fa-brain:before,
.fa-user-graduate:before,
.fa-hands-helping:before,
.fa-chess:before,
.fa-tools:before,
.fa-procedures:before,
.fa-book:before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  display: inline-block;
  transition: transform 0.3s ease;
}

.feature-card:hover .fa-users-class:before,
.feature-card:hover .fa-brain:before,
.feature-card:hover .fa-user-graduate:before,
.feature-card:hover .fa-hands-helping:before,
.feature-card:hover .fa-chess:before,
.feature-card:hover .fa-tools:before,
.feature-card:hover .fa-procedures:before,
.feature-card:hover .fa-book:before {
  transform: scale(1.2) rotate(10deg);
}

/* Course List Enhancements */
.course-list {
  list-style: none;
  padding-left: 0;
}

.course-list li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 2rem;
  transition: all 0.3s ease;
}

.course-list li:hover {
  transform: translateX(5px);
}

.course-list li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--primary);
  transition: all 0.3s ease;
}

.course-list li:hover::before {
  color: var(--secondary);
  transform: scale(1.2);
}