/* =========================
   CONTACT HERO - ENHANCED
========================= */
.contact-hero {
  padding: 20px 0 20px;
  background: radial-gradient(circle at 30% 40%, rgba(37, 99, 235, 0.18) 0%, #ffffff 70%),
              linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
  animation: heroPulse 15s ease infinite;
  min-height: 100px;
  display: flex;
  align-items: center;
}

/* Animated background particles */
.contact-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 40% 80%, rgba(249, 115, 22, 0.05) 0%, transparent 40%);
  animation: particleFloat 20s ease-in-out infinite;
  pointer-events: none;
}

/* Floating envelope icon */
.contact-hero::after {
  content: '✉️';
  position: absolute;
  font-size: 120px;
  opacity: 0.03;
  bottom: 10px;
  right: 10%;
  transform: rotate(10deg);
  animation: floatIcon 15s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes particleFloat {
  0%, 100% { transform: scale(1) translate(0, 0); }
  33% { transform: scale(1.1) translate(2%, 2%); }
  66% { transform: scale(0.95) translate(-2%, -2%); }
}

@keyframes floatIcon {
  0%, 100% { transform: rotate(10deg) translate(0, 0); }
  50% { transform: rotate(15deg) translate(-20px, -20px); }
}

.container {
  position: relative;
  z-index: 2;
}
.contact-form-box::before {
  pointer-events: none;
  z-index: 0;
}

.contact-form-box > * {
  position: relative;
  z-index: 1;
}


.contact-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  animation: fadeInDown 1s ease;
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #2563eb);
  border-radius: 2px;
  animation: titleUnderline 1s ease 0.5s both;
}

@keyframes titleUnderline {
  from { width: 0; opacity: 0; }
  to { width: 80px; opacity: 1; }
}

.contact-sub {
  font-size: 1.3rem;
  color: #475569;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 1s ease 0.2s both;
  position: relative;
  display: inline-block;
  padding: 0 20px;
}

.contact-sub::before,
.contact-sub::after {
  content: '✨';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  animation: sparkle 2s ease 1s infinite;
}

.contact-sub::before {
  left: -10px;
}

.contact-sub::after {
  right: -10px;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: translateY(-50%) scale(0.5); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   CONTACT MAIN SECTION
========================= */
.contact-main {
  padding: 60px 0;
  background: linear-gradient(135deg, #ffffff 0%, #fafcff 100%);
  position: relative;
}

/* =========================
   INFO BOX - ENHANCED
========================= */
.contact-info-box {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  padding: 30px;
  border-radius: 24px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  animation: slideInLeft 0.8s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.contact-info-box:nth-child(1) { animation-delay: 0.1s; }
.contact-info-box:nth-child(2) { animation-delay: 0.2s; }

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.contact-info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #2563eb);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.contact-info-box::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 70%);
  border-radius: 50%;
  transition: all 0.5s ease;
}

.contact-info-box:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 45px rgba(37, 99, 235, 0.12);
  border-color: transparent;
}

.contact-info-box:hover::before {
  transform: translateX(0);
}

.contact-info-box:hover::after {
  width: 150px;
  height: 150px;
  opacity: 0.8;
}

.contact-info-box h5 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0f172a;
  position: relative;
  display: inline-block;
}

.contact-info-box h5::before {
  content: '📬';
  position: absolute;
  left: -30px;
  opacity: 0;
  transition: all 0.3s ease;
}

.contact-info-box:hover h5::before {
  opacity: 1;
  left: -25px;
}

.contact-email {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2563eb;
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
}

.contact-email:hover {
  transform: scale(1.05);
  color: #1d4ed8;
  cursor: pointer;
}

.contact-email::after {
  content: '📧';
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.contact-email:hover::after {
  opacity: 1;
  right: -30px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.2); }
}

.contact-info-box small {
  color: #64748b;
  font-size: 0.9rem;
  display: block;
  margin-top: 0.5rem;
}

.contact-info-box p {
  color: #334155;
  line-height: 1.6;
  margin-bottom: 0;
}

/* =========================
   RESPONSE BOX - ENHANCED
========================= */
.response-box {
  background: linear-gradient(135deg, #eef6ff, #e0f2fe);
  padding: 25px;
  border-radius: 20px;
  border-left: 5px solid #2563eb;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  animation: slideInLeft 0.8s ease 0.3s both;
}

.response-box::before {
  content: '⚡';
  position: absolute;
  font-size: 60px;
  right: 10px;
  bottom: -10px;
  opacity: 0.1;
  transform: rotate(15deg);
  transition: all 0.4s ease;
}

.response-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px rgba(37, 99, 235, 0.15);
}

.response-box:hover::before {
  transform: rotate(25deg) scale(1.2);
  opacity: 0.15;
}

.response-box h6 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.8rem;
  position: relative;
  display: inline-block;
}

.response-box h6::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 30px;
  height: 2px;
  background: #2563eb;
  transition: width 0.3s ease;
}

.response-box:hover h6::after {
  width: 100%;
}

.response-box p {
  color: #334155;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.response-box strong {
  color: #2563eb;
  font-size: 1rem;
  display: inline-block;
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  animation: pulseGlow 2s ease infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3); }
  50% { box-shadow: 0 0 15px 5px rgba(37, 99, 235, 0.2); }
}

/* =========================
   FORM - ENHANCED
========================= */
.contact-form-box {
  background: linear-gradient(135deg, #ffffff, #fafcff);
  padding: 45px;
  border-radius: 30px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.1);
  position: relative;
  overflow: hidden;
  animation: slideInRight 0.8s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.contact-form-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.03), transparent 50%);
  animation: formGlow 15s ease infinite;
}

@keyframes formGlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(5%, 5%) rotate(5deg); }
  66% { transform: translate(-5%, -5%) rotate(-5deg); }
}

.contact-form-box h4 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  position: relative;
  display: inline-block;
  margin-bottom: 2rem !important;
}

.contact-form-box h4::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border-radius: 2px;
  animation: formUnderline 1s ease 0.5s both;
}

@keyframes formUnderline {
  from { width: 0; }
  to { width: 50px; }
}

/* Form controls */
.contact-form-box .form-control,
.contact-form-box .form-select {
  border-radius: 14px;
  padding: 12px 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.contact-form-box .form-control:focus,
.contact-form-box .form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
  background: #ffffff;
}

.contact-form-box .form-control:hover,
.contact-form-box .form-select:hover {
  border-color: #94a3b8;
  background: #fafcff;
}

/* Floating label effect */
.contact-form-box .form-group {
  position: relative;
}

.contact-form-box .form-control:focus + label,
.contact-form-box .form-control:not(:placeholder-shown) + label {
  transform: translateY(-25px) scale(0.85);
  color: #2563eb;
}

/* Button */
.contact-form-box .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8, #2563eb);
  background-size: 200% 200%;
  border: none;
  padding: 14px 40px !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.contact-form-box .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.contact-form-box .btn-primary:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 35px rgba(37, 99, 235, 0.4);
}

.contact-form-box .btn-primary:hover::before {
  left: 100%;
}

.contact-form-box .btn-primary:active {
  transform: translateY(-2px) scale(0.98);
}

/* Form validation styling */
.contact-form-box .form-control:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  background: #fef2f2;
}

.contact-form-box .form-control:valid:not(:placeholder-shown) {
  border-color: #10b981;
  background: #f0fdf4;
}

/* =========================
   FEATURE SECTION - ENHANCED
========================= */
.contact-features {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}

.contact-features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
}

.feature-box {
  padding: 35px 25px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(37, 99, 235, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  height: 100%;
  animation: featureFadeIn 0.8s ease;
  animation-fill-mode: both;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
}

.feature-box:nth-child(1) { animation-delay: 0.1s; }
.feature-box:nth-child(2) { animation-delay: 0.2s; }
.feature-box:nth-child(3) { animation-delay: 0.3s; }

@keyframes featureFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #2563eb);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.feature-box::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 70%);
  border-radius: 50%;
  transition: all 0.5s ease;
}

.feature-box:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 30px 45px rgba(37, 99, 235, 0.12);
  border-color: transparent;
}

.feature-box:hover::before {
  transform: translateX(0);
}

.feature-box:hover::after {
  width: 150px;
  height: 150px;
  opacity: 0.8;
}

.feature-box h5 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0f172a;
  transition: all 0.3s ease;
}

.feature-box:hover h5 {
  color: #2563eb;
  transform: scale(1.05);
}

.feature-box p {
  color: #475569;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.feature-box:hover p {
  color: #334155;
}

/* Emoji animations */
.feature-box h5 {
  position: relative;
  display: inline-block;
}

.feature-box h5::before {
  content: attr(data-emoji);
  position: absolute;
  left: -30px;
  opacity: 0;
  transition: all 0.3s ease;
}

.feature-box:hover h5::before {
  opacity: 1;
  left: -35px;
  animation: emojiBounce 1s ease infinite;
}

@keyframes emojiBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(10deg); }
}

/* =========================
   LOADING STATES
========================= */
@keyframes submitLoading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  animation: submitLoading 1s linear infinite;
}

/* =========================
   SUCCESS MESSAGE
========================= */
@keyframes successPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.form-success {
  text-align: center;
  padding: 30px;
  animation: fadeInUp 0.5s ease;
}

.form-success i {
  font-size: 60px;
  color: #10b981;
  margin-bottom: 20px;
  animation: successPop 0.5s ease;
}

/* =========================
   RESPONSIVE DESIGN
========================= */
@media (max-width: 991px) {
  .contact-hero {
    padding: 100px 0 60px;
  }

  .contact-title {
    font-size: 2.8rem;
  }

  .contact-sub {
    font-size: 1.1rem;
  }

  .contact-form-box {
    padding: 35px;
  }

  .contact-form-box h4 {
    font-size: 1.6rem;
  }

  .feature-box {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .contact-hero {
    padding: 80px 0 50px;
  }

  .contact-title {
    font-size: 2.2rem;
  }

  .contact-title::after {
    width: 60px;
  }

  .contact-sub {
    font-size: 1rem;
    padding: 0 15px;
  }

  .contact-info-box,
  .response-box,
  .contact-form-box {
    padding: 25px;
  }

  .contact-email {
    font-size: 1rem;
    word-break: break-all;
  }

  .contact-form-box .btn-primary {
    width: 100%;
    padding: 12px 20px !important;
  }

  .feature-box {
    margin-bottom: 1rem;
  }

  .feature-box h5 {
    font-size: 1.2rem;
  }

  .feature-box p {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .contact-hero::after {
    font-size: 80px;
    bottom: 20px;
    right: 5%;
  }

  .contact-title {
    font-size: 1.8rem;
  }

  .contact-sub::before,
  .contact-sub::after {
    display: none;
  }

  .contact-info-box h5::before,
  .contact-email::after {
    display: none;
  }

  .contact-form-box {
    padding: 20px;
  }

  .contact-form-box h4 {
    font-size: 1.4rem;
  }

  .contact-form-box .form-control,
  .contact-form-box .form-select {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .response-box strong {
    font-size: 0.9rem;
    padding: 4px 12px;
  }

  .feature-box {
    padding: 20px;
  }
}

/* =========================
   PRINT STYLES
========================= */
@media print {
  .contact-hero::before,
  .contact-hero::after,
  .feature-box::before,
  .feature-box::after {
    display: none;
  }

  .contact-form-box {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* =========================
   ACCESSIBILITY
========================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}