/* ─── CONTACT FORM CARD ─── */
.contact-form-section {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(91, 154, 174, 0.18);
  border-radius: 20px;
  padding: 48px;
  margin-bottom: 60px;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.contact-form-section h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
  text-align: center;
}

.form-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
  text-align: center;
  line-height: 1.7;
}

/* ─── CTA CARD (contact page) ─── */
.contact-button-section {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(91, 154, 174, 0.18);
  border-radius: 20px;
  padding: 48px;
  margin-bottom: 60px;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.4s ease,
    transform 0.4s ease;
}

.contact-button-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary),
    rgba(146, 205, 207, 0.8),
    transparent
  );
  animation: scanLine 3s ease-in-out infinite;
}

@keyframes scanLine {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.contact-button-section:hover {
  box-shadow:
    var(--shadow-lg),
    var(--shadow-glow),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  transform: translateY(-2px);
}

.contact-button-section h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 12px;
}

.contact-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ─── FORM FIELDS ─── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.required-star {
  color: #e74c3c;
  cursor: default;
  position: relative;
}

.required-star::after {
  content: 'Required';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a4a63;
  color: white;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
}

.required-star:hover::after {
  opacity: 1;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea,
.form-field select {
  padding: 14px 18px;
  border: 1.5px solid var(--slate-300);
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--font-primary);
  transition: var(--transition-base);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-color);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 154, 174, 0.12);
  transform: translateY(-1px);
}

.form-field input:hover,
.form-field textarea:hover,
.form-field select:hover {
  border-color: var(--primary-light);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--slate-400);
}

.form-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235b9aae' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-color: rgba(255, 255, 255, 0.8);
  padding-right: 40px;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* ─── GDPR NOTICE ─── */
.gdpr-notice {
  font-size: 12px;
  color: var(--slate-400);
  line-height: 1.6;
  margin-top: -4px;
}

/* ─── BUTTON: SUBMIT ─── */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 16px 36px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 4px 20px rgba(91, 154, 174, 0.35);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.btn-submit::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100%;
  top: 0;
  left: -120px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn-submit:hover::after {
  left: 120%;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 28px rgba(91, 154, 174, 0.45),
    0 0 0 4px rgba(91, 154, 174, 0.1);
}

.btn-submit:active {
  transform: translateY(-1px);
}

.btn-submit svg {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-submit:hover svg {
  transform: translateX(4px);
}

/* ─── SUCCESS MESSAGE ─── */
.success-message {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.06),
    rgba(34, 197, 94, 0.03)
  );
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 48px 32px;
  border-radius: 16px;
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-message.show {
  display: flex;
}

@keyframes successPop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.success-message svg {
  color: #22c55e;
  animation: checkDraw 0.6s ease 0.2s both;
}

@keyframes checkDraw {
  from {
    opacity: 0;
    transform: scale(0) rotate(-20deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.success-message h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color);
}

.success-message p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.7;
}

/* ─── SUCCESS POPUP ─── */
.success-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.success-popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.success-popup {
  background: white;
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 420px;
  width: calc(100% - 48px);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-popup-overlay.show .success-popup {
  transform: scale(1) translateY(0);
}

.success-popup-icon {
  color: #22c55e;
}

.success-popup-icon svg {
  animation: checkDraw 0.6s ease 0.15s both;
}

.success-popup h4 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.success-popup p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  max-width: 320px;
}

.success-popup-close {
  margin-top: 8px;
  padding: 14px 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 4px 16px rgba(91, 154, 174, 0.35);
}

.success-popup-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 154, 174, 0.45);
}

/* ─── CONTACT RESPONSIVE ─── */
@media (max-width: 768px) {
  .contact-form-section,
  .contact-button-section {
    padding: 32px 24px;
  }

  .contact-form-section h3,
  .contact-button-section h3 {
    font-size: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .contact-form-section,
  .contact-button-section {
    padding: 24px 16px;
  }

  .contact-form-section h3,
  .contact-button-section h3 {
    font-size: 21px;
  }
}