/* ===== CONTACT PAGE SPECIFIC STYLES ===== */

/* Page Header Height fix */
.contact-page .page-header {
  background:
    linear-gradient(135deg, rgba(107, 70, 193, 0.9), rgba(114, 47, 55, 0.8)),
    url("../images/contact-banner.jpg") center/cover no-repeat;
  color: var(--primary-white);
  position: relative;
  padding: 8rem 0 4rem;
  /* Adjusted padding to account for fixed header */
  text-align: center;
  min-height: 400px;
  display: flex;
  align-items: center;
}

.contact-page .page-header h1 {
  color: var(--primary-white);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.contact-page .page-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Contact Cards Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.contact-card {
  background: var(--primary-white);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.contact-icon {
  width: 64px;
  height: 64px;
  background: rgba(107, 70, 193, 0.1);
  color: var(--primary-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
  background: var(--primary-purple);
  color: var(--primary-white);
  transform: scale(1.1);
}

.contact-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-wine);
}

.contact-info-item {
  margin-bottom: 1rem;
  color: var(--primary-purple);
  font-weight: 500;
}

.contact-info-item strong {
  color: var(--primary-wine);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Contact Form Section */
.contact-section {
  background: var(--background-light);
  padding: 5rem 0;
}

.form-wrapper {
  background: var(--primary-white);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  /* Changed to flex for desktop layout */
  max-width: 1000px;
  margin: 0 auto;
}

.form-content {
  flex: 3;
  padding: 4rem;
  /* Increased padding */
}

.form-sidebar {
  flex: 2;
  background: linear-gradient(135deg,
      var(--primary-wine) 0%,
      var(--primary-purple) 100%);
  padding: 4rem;
  /* Increased padding */
  color: var(--primary-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.form-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/pattern-overlay.png");
  /* Add a subtle pattern if available */
  opacity: 0.1;
}

.sidebar-content {
  position: relative;
  z-index: 1;
}

.sidebar-content h3 {
  color: var(--secondary-gold);
  /* Gold for contrast on dark bg */
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  /* More space between FAQs */
}

.faq-item h4 {
  color: var(--secondary-gold);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.faq-item p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* Form Styles */
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  /* Increased gap */
}

.contact-form .form-group {
  margin-bottom: 2rem;
  /* Increased spacing */
}

.contact-form label {
  display: block;
  margin-bottom: 0.75rem;
  /* More space below label */
  font-weight: 600;
  color: var(--primary-wine);
  font-size: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  /* Larger padding for inputs */
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--primary-purple);
  /* Text color inside input */
  transition: all 0.3s ease;
  background: #fafafa;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.1);
  /* Larger shadow */
  background: #fff;
  transform: translateY(-2px);
  /* Subtle lift */
}

.contact-form textarea {
  resize: vertical;
  min-height: 180px;
  /* Taller textarea */
}

.checkbox-label {
  display: flex;
  align-items: center;
  /* Center alignment */
  gap: 1rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--primary-wine);
  margin-bottom: 0;
  padding: 0.5rem;
  /* Touch target */
  border-radius: 8px;
  transition: background 0.2s ease;
}

.checkbox-label:hover {
  background: rgba(107, 70, 193, 0.05);
  /* Subtle hover bg */
}

.checkbox-custom {
  width: 26px;
  /* Slightly larger */
  height: 26px;
  min-width: 26px;
  border: 2px solid var(--border-medium);
  /* Softer border initially */
  border-radius: 6px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Bouncy transition */
  background: white;
}

.checkbox-label:hover .checkbox-custom {
  border-color: var(--primary-purple);
  transform: scale(1.05);
}

.checkbox-label input {
  display: none;
}

.checkbox-label input:checked+.checkbox-custom {
  background: var(--primary-purple);
  /* Active color */
  border-color: var(--primary-purple);
  transform: scale(1.1);
  /* Pop effect */
  box-shadow: 0 4px 10px rgba(107, 70, 193, 0.3);
  /* Glow */
}

.checkbox-label input:checked+.checkbox-custom::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: white;
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
}

.btn-submit {
  width: 100%;
  margin-top: 1.5rem;
  background: linear-gradient(135deg, var(--primary-wine), var(--primary-purple));
  color: white;
  font-weight: 700;
  padding: 1.25rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(107, 70, 193, 0.4);
}

/* Map Section */
.map-section {
  position: relative;
  height: 450px;
  background: #e2e8f0;
}

.map-container {
  width: 100%;
  height: 100%;
}

.map-card {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-width: 350px;
  z-index: 10;
  border-top: 4px solid var(--primary-wine);
}

.map-card h3 {
  color: var(--primary-wine);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.office-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.office-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.office-header {
  background: var(--primary-wine);
  padding: 1.5rem;
  border-bottom: none;
}

.office-header h3 {
  margin: 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary-white);
}

.office-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-left: auto;
}

.office-details {
  padding: 2rem;
}

.office-details p {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--primary-wine);
  /* Client requested brand color */
  font-weight: 500;
}

.office-details i {
  color: var(--secondary-gold);
  margin-top: 4px;
  font-size: 1.1rem;
}

.office-actions {
  padding: 0 2rem 2rem;
  display: flex;
  gap: 1rem;
}

.office-actions .btn {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.office-actions .btn-outline {
  color: var(--primary-wine);
  border-color: var(--primary-wine);
  font-weight: 600;
}

.office-actions .btn-outline:hover {
  background: var(--primary-wine);
  color: white;
}

.link-direction {
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.link-direction:hover {
  color: var(--primary-wine);
}

.section-title {
  color: var(--primary-wine) !important;
}

.section-subtitle,
.section-header p {
  color: var(--primary-wine) !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .form-wrapper {
    flex-direction: column;
  }

  .form-sidebar {
    padding: 2rem;
    order: -1;
    /* Sidebar on top for mobile context or keep bottom? usually top intro is better */
  }

  .form-content {
    padding: 2rem;
  }

  .map-card {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    margin: -4rem auto 2rem;
    width: 90%;
    max-width: 500px;
  }

  .map-section {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .contact-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-page .page-header {
    padding: 7rem 1.5rem 3rem;
    /* Increase top padding for mobile navbar */
    min-height: auto;
  }

  .contact-page .page-header h1 {
    font-size: 2.25rem;
  }

  .form-content {
    padding: 1.5rem;
  }
}

/* Specific fix for iPhone SE and small screens */
@media (max-width: 375px) {
  .contact-page .page-header {
    padding-top: 6rem;
    /* Ensures no white gap under navbar */
    padding-bottom: 2rem;
  }

  .contact-card {
    padding: 1.5rem;
  }

  .form-content,
  .form-sidebar {
    padding: 1.25rem;
  }

  .section {
    padding: 3rem 0;
  }
}