:root {
  --warm-dark: #3a3226;
  --gold: #c4a86f;
  --dusty-rose: #d8b4a0;
  --beige: #f5f0e6;
  --text-light: #f8f8f8;
}

/* Contact Section */
.contact-section {
  position: relative;
  padding: 6rem 1.5rem;
  background: var(--warm-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contact Header */
.contact-header {
  margin-bottom: 2rem;
}

.contact-header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--gold);
  margin-bottom: 1rem;
  font-family: "Dancing Script", cursive;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(196, 168, 111, 0.2);
}

.contact-header p {
  color: var(--text-light);
  opacity: 0.8;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 500px;
}

/* Contact Info */
.contact-info {
  color: var(--text-light);
}

.contact-method {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateX(-20px);
}

.contact-method:nth-child(1) {
  animation: fadeInRight 0.8s ease forwards 0.5s;
}

.contact-method:nth-child(2) {
  animation: fadeInRight 0.8s ease forwards 0.7s;
}

.contact-method:nth-child(3) {
  animation: fadeInRight 0.8s ease forwards 0.9s;
}

@keyframes fadeInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--gold);
  margin-right: 1.5rem;
  margin-top: 0.3rem;
}

.contact-details h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.contact-details a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: var(--gold);
}

/* Contact Form */
.contact-form {
  background: var(--beige);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--gold),
    var(--dusty-rose),
    var(--gold)
  );
  background-size: 200% 200%;
  animation: gradientBG 8s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.form-group {
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateX(20px);
}

.form-group:nth-child(1) {
  animation: fadeInLeft 0.8s ease forwards 0.5s;
}

.form-group:nth-child(2) {
  animation: fadeInLeft 0.8s ease forwards 0.7s;
}

.form-group:nth-child(3) {
  animation: fadeInLeft 0.8s ease forwards 0.9s;
}

.form-group:nth-child(4) {
  animation: fadeInLeft 0.8s ease forwards 1.1s;
}

@keyframes fadeInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--warm-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 95%; /* Ensure all input fields have the same width */
  display: block;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 168, 111, 0.2);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--gold);
  color: var(--warm-dark);
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.submit-btn:hover {
  background: var(--dusty-rose);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.submit-btn i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.submit-btn:hover i {
  transform: translateX(3px);
}

/* Error Message Styling */
.error-message {
  color: #d32f2f;
  font-size: 0.9rem;
  margin-top: 0.3rem;
  display: none;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

.form-group.error .error-message {
  display: block;
}

/* Decorative Elements */
.contact-watercolor {
  position: absolute;
  top: -50px;
  left: -50px;
  width: 300px;
  height: 300px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="%23d8b4a0" opacity="0.08" d="M45,5c25,15,40,50,60,80s45,65,70,70s45-30,20-80S90,10,45,5z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
  animation: float 12s ease-in-out infinite;
}

.contact-flourish {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="%23c4a86f" opacity="0.1" d="M30,30c10,5,25-5,40,15s35,45,60,30s35-40,15-60S60,10,30,30z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
  animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  50% {
    transform: translate(10px, 10px) rotate(2deg);
  }
}

/* Success Message */
.success-message {
  display: none;
  text-align: center;
  padding: 2rem;
  background: var(--beige);
  border-radius: 8px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.5s ease;
}

.success-message.show {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.success-message i {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
  display: inline-block;
}

.success-message h3 {
  font-size: 1.8rem;
  color: var(--warm-dark);
  margin-bottom: 1rem;
  font-family: "Dancing Script", cursive;
}

.success-message p {
  color: var(--warm-dark);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info {
    order: 2;
  }

  .contact-form {
    order: 1;
  }
}

@media (max-width: 768px) {
  .contact-section {
    padding: 4rem 1rem;
  }

  .contact-watercolor,
  .contact-flourish {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 576px) {
  .contact-form {
    padding: 1.5rem;
  }

  .contact-header h1 {
    font-size: 2.5rem;
  }

  .contact-header p {
    font-size: 1rem;
  }
}

/* Motion Sensitivity Preference */
@media (prefers-reduced-motion) {
  .contact-container,
  .contact-method,
  .form-group {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .contact-form::before {
    animation: none;
    background: var(--gold);
  }

  .contact-watercolor,
  .contact-flourish {
    animation: none;
  }

  .submit-btn:hover {
    transform: none;
  }
}

/* Terms and Conditions Modal */
.terms-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(58, 50, 38, 0.9);
  backdrop-filter: blur(3px);
}

.terms-modal-content {
  background-color: var(--beige);
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terms-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(196, 168, 111, 0.3);
}

.terms-modal-header h2 {
  color: var(--warm-dark);
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  margin: 0;
}

.close-terms {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--warm-dark);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-terms:hover {
  color: var(--gold);
}

.terms-modal-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 1rem;
  margin-bottom: 1.5rem;
}

.terms-content {
  color: var(--warm-dark);
  line-height: 1.6;
}

.terms-content h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.terms-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(196, 168, 111, 0.3);
}

.terms-modal-footer .submit-btn {
  width: auto;
  padding: 0.8rem 1.5rem;
}

.terms-modal-footer .decline {
  background-color: var(--warm-dark);
  color: var(--text-light);
}

.terms-modal-footer .decline:hover {
  background-color: #2a241c;
}

/* Scrollbar styling for terms */
.terms-modal-body::-webkit-scrollbar {
  width: 8px;
}

.terms-modal-body::-webkit-scrollbar-track {
  background: rgba(196, 168, 111, 0.1);
  border-radius: 4px;
}

.terms-modal-body::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

.terms-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--dusty-rose);
}