/* Glass Morphism Effects for GIVC-BRAINSAIT Landing Page */
/* © Dr. Al Fadil (BRAINSAIT LTD) */

/* Base Glass Card */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.glass-card:hover::before {
  left: 100%;
}

/* Glass Button */
.glass-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.2);
  position: relative;
  overflow: hidden;
}

.glass-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.glass-btn:hover::after {
  width: 200%;
  height: 200%;
}

.glass-btn:active {
  transform: scale(0.98);
}

/* Glass Header */
.glass-header {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px 0 rgba(31, 38, 135, 0.15);
}

/* Glass Navigation */
.nav-glass {
  position: relative;
}

.nav-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border-radius: inherit;
  z-index: -1;
}

/* Hero Glass Card */
.hero-glass-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  box-shadow: 
    0 12px 40px 0 rgba(31, 38, 135, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-glass-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 10s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Stat Cards */
.stat-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 6px 24px 0 rgba(31, 38, 135, 0.25);
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px 0 rgba(31, 38, 135, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Service Cards with Enhanced Glass Effect */
.service-card {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  box-shadow: 0 8px 28px 0 rgba(31, 38, 135, 0.3);
  padding: 2rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.service-card:hover::after {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 16px 40px 0 rgba(31, 38, 135, 0.45);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Technology Item Glass */
.tech-item {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 6px 20px 0 rgba(31, 38, 135, 0.2);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 28px 0 rgba(31, 38, 135, 0.3);
}

/* Contact Form Glass */
.contact-form {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 10px 32px 0 rgba(31, 38, 135, 0.35);
  padding: 2.5rem;
}

.contact-info {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 8px 28px 0 rgba(31, 38, 135, 0.25);
  padding: 2.5rem;
}

/* Team Member Glass */
.team-member {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 10px 32px 0 rgba(31, 38, 135, 0.3);
  padding: 2.5rem;
  transition: all 0.4s ease;
}

.team-member:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px 0 rgba(31, 38, 135, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Image Frame Glass */
.glass-frame {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
  padding: 0.5rem;
  position: relative;
}

.glass-frame::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.2)
  );
  border-radius: inherit;
  z-index: -1;
}

/* Footer Glass */
.glass-footer {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.glass-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 64, 175, 0.1) 0%,
    rgba(5, 150, 105, 0.1) 100%
  );
  z-index: -1;
}

/* Special Effects */
.glass-particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  animation: float 3s ease-in-out infinite;
}

.glass-particle:nth-child(odd) {
  animation-delay: -1s;
}

.glass-particle:nth-child(even) {
  animation-delay: -2s;
}

/* Frosted Glass Overlay */
.frosted-overlay {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.frosted-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Loading Glass */
.loading-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
  padding: 2rem;
}

/* Interactive Glass Elements */
.glass-interactive {
  cursor: pointer;
  user-select: none;
}

.glass-interactive:active {
  transform: scale(0.98);
}

.glass-interactive:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Animated Glass Border */
.glass-border-animated {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2px;
}

.glass-border-animated::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  border-radius: inherit;
  animation: border-spin 3s linear infinite;
  z-index: -1;
}

@keyframes border-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Glass Morphism on Scroll */
.glass-scroll {
  transition: all 0.3s ease;
}

.glass-scroll.scrolled {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.4);
}

/* Mobile Glass Optimizations */
@media (max-width: 768px) {
  .glass-card {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }
  
  .hero-glass-card {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem 1.5rem;
  }
  
  .service-card {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 1.5rem;
  }
}

/* High Performance Mode */
@media (prefers-reduced-motion: reduce) {
  .glass-card::before,
  .glass-btn::after,
  .hero-glass-card::before,
  .glass-border-animated::before {
    animation: none;
  }
  
  .glass-card:hover::before,
  .glass-btn:hover::after {
    transition: none;
  }
}

/* Dark Mode Glass */
@media (prefers-color-scheme: dark) {
  .glass-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .glass-header {
    background: rgba(0, 0, 0, 0.15);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
}