/* Apple-style Contact Page for HMD FK UM */

/* Contact Section */
.apple-contact-section {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.apple-contact-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.apple-contact-header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInUp 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.apple-contact-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--apple-blue), var(--apple-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.apple-contact-subtitle {
  font-size: 18px;
  color: var(--apple-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Contact Content */
.apple-contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  position: relative;
}

/* Contact Info */
.apple-contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeInUp 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

.apple-contact-card {
  background: rgba(44, 44, 46, 0.5);
  backdrop-filter: var(--apple-blur);
  -webkit-backdrop-filter: var(--apple-blur);
  border-radius: var(--apple-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
  display: flex;
  gap: 20px;
  transition: var(--apple-transition-base);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.apple-contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--apple-shadow-md);
  border-color: rgba(100, 100, 110, 0.3);
  background: rgba(50, 50, 52, 0.6);
}

.apple-contact-icon {
  width: 56px;
  height: 56px;
  background: var(--apple-blue);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  transition: var(--apple-transition-fast);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(10, 132, 255, 0.3);
}

.apple-contact-card:hover .apple-contact-icon {
  transform: scale(1.1) rotate(-5deg);
}

.apple-contact-card:nth-child(2) .apple-contact-icon {
  background: var(--apple-pink);
  box-shadow: 0 4px 10px rgba(255, 55, 95, 0.3);
}

.apple-contact-card:nth-child(3) .apple-contact-icon {
  background: var(--apple-green);
  box-shadow: 0 4px 10px rgba(48, 209, 88, 0.3);
}

.apple-contact-card:nth-child(4) .apple-contact-icon {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  box-shadow: 0 4px 10px rgba(220, 39, 67, 0.3);
}

.apple-contact-detail {
  flex-grow: 1;
}

.apple-contact-detail h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--apple-text);
}

.apple-contact-detail p {
  font-size: 15px;
  color: var(--apple-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Contact Form - REDESIGNED */
.apple-contact-form-container {
  background: rgba(30, 30, 32, 0.6);
  backdrop-filter: var(--apple-blur);
  -webkit-backdrop-filter: var(--apple-blur);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  animation-delay: 0.4s;
  animation-fill-mode: both;
  position: relative;
  overflow: hidden;
}

.apple-contact-form-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at top right, rgba(10, 132, 255, 0.05), transparent 50%),
              radial-gradient(circle at bottom left, rgba(191, 90, 242, 0.05), transparent 50%);
  z-index: -1;
  opacity: 0.8;
  animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.apple-contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
}

.apple-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.apple-form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--apple-text-secondary);
  margin-left: 8px;
  transition: var(--apple-transition-fast);
}

/* NEW ELEGANT INPUTS */
.apple-input-wrapper {
  position: relative;
  width: 100%;
}

.apple-input-wrapper i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--apple-text-tertiary);
  transition: var(--apple-transition-fast);
  pointer-events: none;
}

.apple-input-wrapper.textarea i {
  top: 18px;
  transform: none;
}

.apple-input-wrapper input,
.apple-input-wrapper textarea {
  width: 100%;
  background: rgba(15, 15, 16, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 14px 14px 48px;
  font-size: 15px;
  color: var(--apple-text);
  transition: var(--apple-transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) inset;
}

.apple-input-wrapper textarea {
  min-height: 140px;
  resize: vertical;
  padding-top: 14px;
  line-height: 1.6;
}

.apple-input-wrapper input:focus,
.apple-input-wrapper textarea:focus {
  background: rgba(22, 22, 23, 0.8);
  border-color: rgba(10, 132, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.2) inset;
  outline: none;
}

.apple-input-wrapper.focus i {
  color: var(--apple-blue);
}

.apple-input-wrapper input:focus + i,
.apple-input-wrapper textarea:focus + i {
  color: var(--apple-blue);
}

.apple-input-wrapper.has-value i {
  color: var(--apple-text-secondary);
}

.apple-submit-btn {
  width: 100%;
  padding: 16px;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--apple-blue);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 16px rgba(10, 132, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
}

.apple-submit-btn:hover {
  transform: translateY(-2px);
  background: #0095ff;
  box-shadow: 0 8px 20px rgba(10, 132, 255, 0.3);
}

.apple-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(10, 132, 255, 0.2);
}

.apple-btn-content,
.apple-btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--apple-transition-base);
}

.apple-btn-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--apple-blue);
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

.apple-contact-form.loading .apple-btn-content {
  opacity: 0;
  transform: translateY(-100%);
}

.apple-contact-form.loading .apple-btn-loading {
  opacity: 1;
  transform: translateY(0);
}

/* Success Modal */
.apple-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: var(--apple-blur);
  -webkit-backdrop-filter: var(--apple-blur);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.apple-success-modal.open {
  opacity: 1;
  visibility: visible;
}

.apple-success-container {
  display: none;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.apple-success-container.show {
  display: block;
}

.apple-success-animation {
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, rgba(50, 215, 75, 0.1), rgba(10, 132, 255, 0.05));
  border-radius: 20px;
  border: 1px solid rgba(50, 215, 75, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  animation: successPulse 2s ease-in-out;
}

.apple-success-animation .apple-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #32D74B, #30D158);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
  animation: iconBounce 0.8s ease-out 0.3s both;
  box-shadow: 0 8px 24px rgba(50, 215, 75, 0.4);
}

.apple-success-animation .apple-success-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--apple-text);
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease-out 0.6s both;
}

.apple-success-animation .apple-success-message {
  font-size: 16px;
  color: var(--apple-text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease-out 0.8s both;
}

.apple-send-another-btn {
  background: linear-gradient(135deg, #0A84FF, #007AFF);
  color: white;
  border: none;
  border-radius: var(--apple-radius-pill);
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 0.6s ease-out 1s both;
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.3);
}

.apple-send-another-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.4);
  background: linear-gradient(135deg, #007AFF, #0056CC);
}

.apple-send-another-btn:active {
  transform: translateY(0);
}

/* Confetti Animation */
.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #0A84FF;
  animation: confettiFall linear infinite;
  z-index: 10;
  border-radius: 2px;
}

/* Confetti Animation - Mobile Optimized */
.confetti-piece {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #0A84FF;
  animation: confettiFall linear infinite;
  z-index: 10;
  border-radius: 1px;
  top: -10px; /* Start from slightly above */
  pointer-events: none; /* Prevent touch interference */
  will-change: transform; /* Optimize for animations */
}

/* Form transition styles */
.apple-contact-form {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animations */
@keyframes successPulse {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes iconBounce {
  0% {
    transform: scale(0) rotate(180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(360deg);
  }
  100% {
    transform: scale(1) rotate(360deg);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) translateX(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(calc(100vh + 50px)) translateX(20px) rotate(360deg) scale(0.8);
    opacity: 0;
  }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .apple-contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .apple-contact-info {
    order: 2;
  }
  
  .apple-contact-form-container {
    order: 1;
  }
}

@media (max-width: 768px) {
  .apple-contact-section {
    padding: 100px 0 60px;
  }
  
  .apple-contact-title {
    font-size: 36px;
  }
  
  .apple-contact-form-container {
    padding: 30px;
  }
  
  .apple-success-animation {
    padding: 40px 24px;
  }
  
  .apple-success-animation .apple-success-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
  
  .apple-success-animation .apple-success-title {
    font-size: 24px;
  }
  
  .apple-success-animation .apple-success-message {
    font-size: 15px;
  }
}

@media (max-width: 576px) {
  .apple-contact-title {
    font-size: 30px;
  }
  
  .apple-contact-subtitle {
    font-size: 16px;
  }
  
  .apple-contact-form-container {
    padding: 24px;
    border-radius: 16px;
  }
  
  .apple-form-group {
    gap: 6px;
  }
  
  .apple-input-wrapper input,
  .apple-input-wrapper textarea {
    padding: 12px 12px 12px 42px;
    border-radius: 10px;
  }
  
  .apple-input-wrapper i {
    left: 14px;
  }
  
  .apple-submit-btn {
    padding: 14px;
    border-radius: 12px;
  }
  
  .apple-success-container {
    padding: 40px 24px;
  }
  
  .apple-success-icon {
    font-size: 60px;
    margin-bottom: 20px;
  }
  
  .apple-send-another-btn {
    padding: 12px 24px;
    font-size: 15px;
  }
}

/* Mobile optimizations for confetti */
@media (max-width: 768px) {
  .confetti-piece {
    width: 4px;
    height: 4px;
    border-radius: 1px;
  }
  
  @keyframes confettiFall {
    0% {
      transform: translateY(-15px) translateX(0) rotate(0deg) scale(1);
      opacity: 1;
    }
    10% {
      opacity: 1;
    }
    90% {
      opacity: 0.8;
    }
    100% {
      transform: translateY(calc(100vh + 30px)) translateX(15px) rotate(270deg) scale(0.6);
      opacity: 0;
    }
  }
  
  .apple-success-container {
    position: relative;
    overflow: hidden; /* Prevent confetti from going outside container */
  }
  
  .apple-success-animation {
    position: relative;
    overflow: hidden; /* Additional containment */
  }
}

@media (max-width: 576px) {
  .confetti-piece {
    width: 3px;
    height: 3px;
  }
  
  @keyframes confettiFall {
    0% {
      transform: translateY(-10px) translateX(0) rotate(0deg) scale(1);
      opacity: 1;
    }
    15% {
      opacity: 1;
    }
    85% {
      opacity: 0.6;
    }
    100% {
      transform: translateY(calc(100vh + 20px)) translateX(10px) rotate(180deg) scale(0.4);
      opacity: 0;
    }
  }
}