/* Contact Section Styles - Optimized for Performance */
/* Force hardware acceleration and avoid repaints */
.contact-section {
  background-color: var(--bg-light);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
  /* Performance optimizations */
  transform: translateZ(0);
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://iili.io/Kc3WprQ.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.08;
  z-index: 1;
}

.contact-section .container {
  position: relative;
  z-index: 2;
}

/* Contact Cards Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0 5rem 0;
}

.contact-card {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  /* Use GPU-accelerated properties for better performance */
  transform: translateZ(0);
  will-change: transform, box-shadow;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Prevent layout shifts */
  contain: layout style paint;
}

/* Use transform for animation as it's GPU-accelerated */
.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.contact-card h3 {
  margin: 1.5rem 0 0.5rem;
  font-weight: 600;
  font-size: 1.3rem;
}

.contact-card p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.contact-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  margin-top: 0.5rem;
  display: block;
  font-size: 1.05rem;
}

.contact-card a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Contact Icons */
.contact-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 1.8rem;
  color: white;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  box-shadow: 0 10px 20px rgba(13, 110, 253, 0.2);
}

.contact-icon-blue {
  background: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
  box-shadow: 0 10px 20px rgba(13, 110, 253, 0.2);
}

.contact-icon-green {
  background: linear-gradient(135deg, #198754 0%, #0f5132 100%);
  box-shadow: 0 10px 20px rgba(25, 135, 84, 0.2);
}

.contact-icon-purple {
  background: linear-gradient(135deg, #6f42c1 0%, #4b2c84 100%);
  box-shadow: 0 10px 20px rgba(111, 66, 193, 0.2);
}

.contact-card-blue {
  border-top: 4px solid #0d6efd;
}

.contact-card-green {
  border-top: 4px solid #198754;
}

.contact-card-purple {
  border-top: 4px solid #6f42c1;
}

/* Contact Form Styles */
/* Optimize layout rendering */
.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
  /* Optimize rendering */
  contain: layout;
  /* Force hardware acceleration */
  transform: translateZ(0);
}

.form-container {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  /* Optimize rendering */
  contain: content;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #dce1e9;
  border-radius: 8px;
  background-color: #f8f9fa;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
  outline: none;
}

/* Set fixed height to prevent layout shifts */
textarea.form-control {
  height: 120px;
  resize: vertical;
  /* Prevent layout shift during typing */
  contain: strict;
}

.btn-submit {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 15px rgba(13, 110, 253, 0.2);
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(13, 110, 253, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(13, 110, 253, 0.2);
}

/* Contact Information Cards */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-box {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  border-left: 5px solid;
}

.info-box h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.info-box p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-body);
}

.info-box ul {
  padding-left: 0;
  list-style: none;
}

.info-box li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-body);
}

.info-box-green {
  border-left-color: #198754;
}

.info-box-purple {
  border-left-color: #6f42c1;
}

.info-box-orange {
  border-left-color: #fd7e14;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info {
    order: -1;
  }
}

@media (max-width: 768px) {
  .contact-section {
    padding: 4rem 0;
  }

  .form-container {
    padding: 1.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 1.25rem;
  }

  .btn-submit {
    width: 100%;
  }
}
