/* ================================
   Contact Section Styling
   ================================ */
.contact {
  background: linear-gradient(120deg, #0077b6, #ff6f91);
  padding: 80px 20px 100px;
  color: #fff;
  margin-top: 20px;
  animation: fadeIn 1.2s ease-out forwards;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Decorative background circles */
.contact::before,
.contact::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  z-index: 0;
}

.contact::before {
  width: 400px;
  height: 400px;
  background: #ff6f91;
  top: -100px;
  left: -100px;
}

.contact::after {
  width: 600px;
  height: 600px;
  background: #0077b6;
  bottom: -250px;
  right: -200px;
}

.content {
  text-align: center;
  margin-bottom: 50px;
  opacity: 0;
  animation: fadeInHeader 2s ease-out forwards;
  position: relative;
  z-index: 2;
}

.content h2 {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4);
  opacity: 0;
  animation: bounceInLeft 1.2s ease-out forwards;
  margin-bottom: 12px;
  line-height: 1.1;
}

.content p {
  font-size: 20px;
  max-width: 600px;
  margin: 0 auto;
  color: #eee;
  letter-spacing: 0.8px;
  opacity: 0;
  animation: fadeInText 1.5s ease-out forwards;
}

/* Container */
.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 35px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Contact Information Boxes */
.contactInfo {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.contactInfo::-webkit-scrollbar {
  display: none;
}

/* Individual contact box style */
.box {
  background: rgba(0, 0, 0, 0.75);
  border-radius: 16px;
  padding: 35px 30px 40px;
  text-align: center;
  flex: 0 0 280px;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 1;
  animation: bounceInUp 1.3s ease-out forwards;
  cursor: default;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.box:hover {
  transform: translateY(-15px) scale(1.1);
  box-shadow: 0px 12px 32px rgba(0, 0, 0, 0.65);
  animation: shake 0.7s ease-out infinite;
}

.box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 111, 145, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: 16px;
  z-index: 0;
}

.box:hover::before {
  opacity: 1;
}

.icon {
  font-size: 54px;
  margin-bottom: 22px;
  transition: transform 0.4s ease, color 0.4s ease;
  animation: pulse 1.8s infinite alternate;
  color: #ff6f91;
  filter: drop-shadow(0 0 6px #ff6f91);
  position: relative;
  z-index: 1;
}

.icon:hover {
  transform: rotate(20deg) scale(1.15);
  color: #fff;
  filter: drop-shadow(0 0 12px #ff4b8e);
}

.text h3 {
  font-size: 26px;
  margin-bottom: 14px;
  color: #fff;
  opacity: 1;
  animation: fadeInUp 1.2s ease-out forwards;
  transform: translateY(0);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.5px;
}

.text p {
  font-size: 18px;
  color: #ddd;
  opacity: 1;
  animation: fadeInUp 1.4s ease-out forwards;
  transform: translateY(0);
  line-height: 1.6;
  margin-bottom: 18px;
  min-height: 70px;
}

.text a {
  color: #ff6f91;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
  cursor: pointer;
}

.text a:hover {
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 6px #ff4b8e;
}

/* Contact form */
.contact-form {
  background: rgba(255, 255, 255, 0.07);
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  margin-top: 50px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInForm 2s ease forwards;
}

.contact-form h3 {
  font-size: 28px;
  margin-bottom: 24px;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
}

.contact-form label {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
  color: #eee;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 24px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 8px #ff6f91;
}

.contact-form textarea {
  min-height: 130px;
}

.contact-form button {
  background-color: #ff6f91;
  color: #fff;
  border: none;
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255, 111, 145, 0.7);
  transition: background-color 0.4s ease, transform 0.3s ease;
}

.contact-form button:hover {
  background-color: #ff4b8e;
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(255, 75, 142, 0.9);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
  0% {opacity: 0;}
  100% {opacity: 1;}
}

@keyframes fadeInHeader {
  0% {opacity: 0; transform: translateY(-60px);}
  100% {opacity: 1; transform: translateY(0);}
}

@keyframes bounceInLeft {
  0% {opacity: 0; transform: translateX(-80px) scale(0.7);}
  100% {opacity: 1; transform: translateX(0) scale(1);}
}

@keyframes bounceInUp {
  0% {opacity: 0; transform: translateY(40px) scale(0.8);}
  100% {opacity: 1; transform: translateY(0) scale(1);}
}

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

@keyframes pulse {
  0% {transform: scale(1);}
  100% {transform: scale(1.3);}
}

@keyframes shake {
  0%, 100% {transform: translateX(0);}
  20%, 60% {transform: translateX(-7px);}
  40%, 80% {transform: translateX(7px);}
}

@keyframes fadeInForm {
  0% {opacity: 0; transform: translateY(40px);}
  100% {opacity: 1; transform: translateY(0);}
}

/* ===========================
   Responsive Styles
   =========================== */
@media (max-width: 1024px) {
  .content h2 {
    font-size: 44px;
  }

  .content p {
    font-size: 18px;
    max-width: 100%;
    padding: 0 20px;
  }

  .icon {
    font-size: 46px;
    margin-bottom: 18px;
  }

  .text h3 {
    font-size: 22px;
  }

  .text p {
    font-size: 15px;
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .contact-form {
    max-width: 90%;
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .content h2 {
    font-size: 36px;
  }

  .content p {
    font-size: 16px;
  }

  .icon {
    font-size: 40px;
    margin-bottom: 15px;
  }

  .text h3 {
    font-size: 20px;
  }

  .text p {
    font-size: 14px;
  }

  .contact-form button {
    padding: 14px 30px;
    font-size: 18px;
  }
}

/* ===========================
   Utilities
   =========================== */
.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

html {
  scroll-behavior: smooth;
}

.gradient-text {
  background: linear-gradient(45deg, #ff6f91, #0077b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-hover:hover {
  text-shadow:
    0 0 8px #ff6f91,
    0 0 15px #ff6f91,
    0 0 20px #ff4b8e,
    0 0 30px #ff4b8e;
}

.bounce {
  animation: bounce 2s infinite;
}

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

/* Scroll Animations */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility Helpers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

@media (max-width: 768px) {
  .contactInfo {
    flex-direction: column;
    overflow-x: unset;
    gap: 20px;
    align-items: center;
  }

  .box {
    flex: 1 1 auto;
    width: 100%;
    max-width: 90%;
  }
}
