.contact-section {
  padding: 50px 0;
  background: linear-gradient(to bottom, #f9f9f9, #f0f4f8);
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle,
      rgba(0, 51, 102, 0.05) 0%,
      rgba(0, 51, 102, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

.contact-section::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle,
      rgba(248, 195, 0, 0.05) 0%,
      rgba(248, 195, 0, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #00509d;
  position: relative;
  display: inline-block;
}

.section-title:after {
  content: "";
  position: absolute;
  width: 70px;
  height: 4px;
  background: linear-gradient(to right, #f8c300, #ffd700);
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.25rem;
  color: #555;
  margin-bottom: 3.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.contact-info {
  background: linear-gradient(135deg, #003366 0%, #004c99 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 30px;
  height: 100%;
  box-shadow: 0 10px 30px rgba(0, 51, 102, 0.25);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.contact-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><rect fill="rgba(255,255,255,0.03)" width="50" height="50"/><rect fill="rgba(255,255,255,0.03)" x="50" y="50" width="50" height="50"/></svg>');
  background-size: 20px;
  opacity: 0.5;
  z-index: -1;
}

.contact-info:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 51, 102, 0.3);
}

.contact-info .row {
  margin-bottom: 1.8rem;
  position: relative;
  z-index: 2;
}

.contact-info h3 {
  margin-bottom: 2rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 15px;
  font-size: 1.8rem;
  letter-spacing: 0.5px;
}

.contact-info i {
  font-size: 1.6rem;
  color: #f8c300;
  margin-right: 1.2rem;
  margin-top: 0.3rem;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px rgba(248, 195, 0, 0.3);
}

.contact-info .row:hover i {
  transform: scale(1.2) rotate(5deg);
  color: #ffd700;
}

.contact-info h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.contact-info p {
  margin-bottom: 0;
  opacity: 0.95;
  line-height: 1.7;
  font-size: 1.05rem;
}

.contact-form {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  height: 100%;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-form:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: #333;
}

.contact-form h3:after {
  content: "";
  position: absolute;
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), #0066cc);
  bottom: 0;
  left: 0;
  border-radius: 2px;
}

.form-label {
  font-weight: 500;
  color: #555;
  margin-bottom: 8px;
}

.form-control {
  border: 2px solid #e8eef3;
  border-radius: 8px;
  padding: 12px 18px;
  transition: all 0.3s ease;
  font-size: 1rem;
  background-color: #f8fafc;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 51, 102, 0.15);
  background-color: #fff;
}

.form-control::placeholder {
  color: #aab5c0;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.send {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #003366;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 51, 102, 0.1);
}

@media (max-width: 991px) {

  .contact-info,
  .contact-form {
    margin-bottom: 30px;
  }
}

@media (max-width: 767px) {
  .section-title {
    font-size: 2.2rem;
  }

  .contact-info,
  .contact-form {
    padding: 2rem;
  }
}

/* ปุ่มกลับขึ้นด้านบน */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  width: 55px;
  height: 55px;
  background-color: rgba(255, 255, 255, 0.25);
  /* สีใส */
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 80, 157, 0.2);
  box-shadow: 0 8px 20px rgba(0, 80, 157, 0.10);
  color: #00509d;
  border-radius: 50%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

#back-to-top:hover {
  transform: translateY(-5px);
  background-color: rgba(0, 80, 157, 0.15);
  /* สีใสเข้มขึ้น */
  box-shadow: 0 12px 25px rgba(0, 80, 157, 0.18);
  color: #003366;
}

#back-to-top i {
  font-size: 1.2rem;
}

#recaptcha.invalid iframe {
  border: 2px solid #ff0c0c;
}