/* Contact Page Enhancements - Optimized Layout and Styling */

/* Enhanced Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Enhanced Animation Classes with Staggered Delays */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-left {
  animation: fadeInLeft 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-right {
  animation: fadeInRight 0.6s ease-out forwards;
  opacity: 0;
}

/* Enhanced Contact Hero Section */
.contact-hero {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

.contact-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite;
}

.contact-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.contact-hero p {
  font-size: 1.2rem;
  line-height: 1.6;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Enhanced Stats Cards */
.g-bg-white-opacity-0_1 {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 16px;
}

.g-bg-white-opacity-0_1:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Enhanced Sidebar Cards */
.contact-sidebar-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(165, 195, 60, 0.15);
  border-radius: 16px;
  overflow: hidden;
}

.contact-sidebar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-color: rgba(165, 195, 60, 0.3);
}

.contact-sidebar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(165, 195, 60, 0.1), transparent);
  transition: left 0.6s ease;
}

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

/* Enhanced QR Code Styling */
.contact-qr-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contact-qr-hover:hover {
  transform: scale(1.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border-color: rgba(165, 195, 60, 0.8);
}

/* Enhanced Process Steps */
.process-step {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
  overflow: hidden;
}

.process-step:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.process-step .g-bg-primary {
  transition: all 0.4s ease;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(165, 195, 60, 0.3);
}

.process-step:hover .g-bg-primary {
  transform: scale(1.15);
  box-shadow: 0 12px 30px rgba(165, 195, 60, 0.4);
}

/* Enhanced Button Styles */
.btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50px;
  font-weight: 600;
  padding: 12px 28px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(55, 125, 255, 0.3);
}

.btn-outline-success {
  border-width: 2px;
  border-color: #28a745;
  color: #28a745;
}

.btn-outline-success:hover {
  background: #28a745;
  border-color: #28a745;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

/* Enhanced Form Controls */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.95);
}

.form-control:focus {
  border-color: #a5c33c;
  box-shadow: 0 0 0 0.3rem rgba(165, 195, 60, 0.2);
  background: #ffffff;
  transform: translateY(-2px);
}

/* Enhanced Loading Animation */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  display: flex;  /* show when active */
  opacity: 1;
}

.loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(165, 195, 60, 0.1);
  border-top: 3px solid #a5c33c;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

/* Enhanced Status Indicators */
.response-status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.status-dot.status-online {
  background: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.status-dot.status-away {
  background: #ffc107;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

.status-dot::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.1; }
}

/* Enhanced Section Spacing and Layout */
.g-py-100 {
  padding: 80px 0;
}

.g-mb-60 {
  margin-bottom: 50px;
}

.g-mb-30 {
  margin-bottom: 25px;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
  .contact-hero h1 {
    font-size: 2.5rem;
  }
  
  .contact-hero p {
    font-size: 1.1rem;
  }
}

@media (max-width: 992px) {
  .contact-hero {
    padding: 80px 0;
  }
  
  .contact-hero h1 {
    font-size: 2.2rem;
  }
  
  .g-py-100 {
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  .contact-hero {
    padding: 60px 0;
    text-align: center;
  }
  
  .contact-hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .contact-hero p {
    font-size: 1rem;
  }
  
  .g-bg-white-opacity-0_1 {
    margin-bottom: 20px;
  }
  
  .contact-sidebar-card {
    margin-bottom: 25px;
  }
  
  .process-step {
    margin-bottom: 30px;
  }
  
  .btn {
    padding: 10px 24px;
    font-size: 14px;
  }
  
  .form-control {
    padding: 12px 16px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .contact-hero h1 {
    font-size: 1.8rem;
  }
  
  .contact-hero p {
    font-size: 0.95rem;
  }
  
  .g-py-100 {
    padding: 50px 0;
  }
}

/* Enhanced Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 3px solid rgba(165, 195, 60, 0.4);
  outline-offset: 2px;
}

/* Enhanced Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Enhanced Image Optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

img[loading="lazy"] {
  transition: opacity 0.3s ease;
}

img[loading="lazy"]:not(.loaded) {
  opacity: 0.8;
}

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

/* Enhanced Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .loading-spinner {
    animation: none;
  }
  
  .status-dot::before {
    animation: none;
  }
}

/* Enhanced Validation Styles */
.is-valid {
  border-color: #28a745 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.88-1.88.94-.94L7.07 2 6.13 1.06 3.24 3.95 1.77 2.47.83 3.41l1.47 1.47z'/%3e%3c/svg%3e");
}

.is-invalid {
  border-color: #dc3545 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M7.2 4.6l-1.4 1.4'/%3e%3c/svg%3e");
}

.invalid-feedback {
  color: #dc3545;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

/* Enhanced Alert Messages */
.alert-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  border: 2px solid #c3e6cb;
  color: #155724;
  border-radius: 12px;
  padding: 15px 20px;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  border: 2px solid #f5c6cb;
  color: #721c24;
  border-radius: 12px;
  padding: 15px 20px;
}

/* Enhanced Text Contrast */
.g-color-white {
  color: #ffffff !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.g-color-white-opacity-0_8 {
  color: rgba(255, 255, 255, 0.9) !important;
}

.g-color-white-opacity-0_9 {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Enhanced Card Hover Effects */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}