/* 
 * Contact Page Styles - Production Ready
 * 
 * This CSS file has been optimized for production with:
 * - Vendor prefixes for cross-browser compatibility
 * - Mobile-first responsive design
 * - Accessibility improvements
 * - Performance optimizations
 * 
 * When building for production, this file should be minified and combined with other CSS files.
 * 
 * @media queries have been organized to reduce duplication
 * !important declarations have been minimized
 * Animations respect user preferences
 */

/* Bootstrap Compatibility Layer */
:root {
  --primary-blue: #0a4d75;
  --secondary-blue: #1a6b9a;
  --accent-teal: #4ecdc4;
  --light-bg: #e6e6e6;  /* 10% more silver background color */
  --white: #ffffff;     /* Pure white for better contrast */
  --text-dark: #333333;
  --text-medium: #555555;
  --bs-primary: var(--primary-blue);
  --bs-primary-rgb: 10, 77, 117;
  --bs-secondary: var(--secondary-blue);
  --bs-secondary-rgb: 26, 107, 154;
  --bs-success: var(--accent-teal);
  --bs-success-rgb: 78, 205, 196;
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --form-element-height: 42px;      /* Reduced from default ~48px */
  --form-spacing: 0.75rem;          /* Reduced spacing between elements */
  --form-padding: 0.5rem 0.75rem;   /* Reduced internal padding */
  --form-font-size: 0.9rem;         /* Slightly smaller font size */
  --label-font-size: 0.85rem;       /* Smaller label font size */
  --button-padding: 0.4rem 1rem;    /* Smaller button padding */
  --container-padding-mobile: 15px; /* New variable for mobile container padding */
  --transition: all 0.3s ease;      /* Standard transition for animations */
}

/* Form and button styles for Bootstrap compatibility */
.btn-primary {
  background: -webkit-linear-gradient(315deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  border: none;
  padding: var(--button-padding);
  font-weight: 600;
  letter-spacing: 0.5px;
  -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  min-width: 200px; /* Ensure consistent width across all screen sizes */
  color: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 12px 24px;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  -webkit-animation: fadeIn 0.5s ease-out 0.8s forwards;
  animation: fadeIn 0.5s ease-out 0.8s forwards;
  will-change: transform, box-shadow, opacity; /* Optimize animations */
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn-primary:hover {
  -webkit-transform: translateY(-3px);
  transform: translateY(-3px);
  -webkit-box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
  background: -webkit-linear-gradient(315deg, #0a5585 0%, #1a7baa 100%);
  background: linear-gradient(135deg, #0a5585 0%, #1a7baa 100%);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:active,
.btn-primary:focus {
  background: var(--primary-blue) !important;
  box-shadow: 0 0 0 0.25rem rgba(10, 77, 117, 0.5) !important;
  border-color: var(--primary-blue) !important;
}

.form-control, .form-select {
  height: var(--form-element-height);
  padding: var(--form-padding);
  font-size: var(--form-font-size);
  border-radius: var(--radius-sm);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  background-color: var(--white);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
  -webkit-box-shadow: var(--shadow-sm);
  box-shadow: var(--shadow-sm);
  will-change: transform, box-shadow; /* Optimize animations */
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent-teal);
  -webkit-box-shadow: 0 0 0 0.25rem rgba(78, 205, 196, 0.15);
  box-shadow: 0 0 0 0.25rem rgba(78, 205, 196, 0.15);
  outline: none;
  background-color: var(--white);
  -webkit-animation: pulse 0.3s ease-out;
  animation: pulse 0.3s ease-out;
  border-color: var(--accent-teal) !important;
  box-shadow: 0 0 0 0.25rem rgba(78, 205, 196, 0.15) !important;
}

/* Page Header Redesign */
.page-header {
  position: relative;
  min-height: 48vh;
  background-image: url('../images/phygital-cover.png'), linear-gradient(135deg, rgba(10, 77, 117, 0.95) 0%, rgba(26, 107, 154, 0.85) 100%);
  background-position: center;
  background-size: cover;
  background-attachment: scroll; /* Default to scroll for mobile compatibility */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5%;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.35;
  background-color: rgba(0, 0, 0, 0.15);
}

.header-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 80%;
  opacity: 1;
  animation: fadeInUp 0.8s ease-out forwards;
}

.page-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.2);
  letter-spacing: -0.031rem;
}

.page-header .tagline {
  font-size: 1.25rem;
  color: var(--white);
  max-width: 90%;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 0.063rem 0.313rem rgba(0, 0, 0, 0.2);
}

/* Contact Section */
.contact-section {
  padding: 30px 0 50px;
  position: relative;
  z-index: 1;
  background-image: url('../images/consulting.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Add an overlay to ensure form content is readable */
.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 77, 117, 0.25); /* Brand color with opacity */
  z-index: -1;
}

/* Ensure container has proper width */
.contact-section .container {
  max-width: 1000px;
  margin: 0 auto;
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  width: 100%;
}

@keyframes fadeInUp {
  0% {
    opacity: 0.8; /* Start with higher opacity to prevent disappearing */
    transform: translateY(5%); /* Changed from 20px to 5% for responsive scaling */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Container */
.contact-form-container {
  padding: 3.5rem;
  background-color: var(--light-bg);
  position: relative;
  overflow: hidden;
  animation: slideInRight 0.8s ease-out forwards;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--white);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* Decorative Elements */
.contact-form-container::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.05) 0%, rgba(78, 205, 196, 0) 70%);
  z-index: 0;
}

.contact-form-container::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 77, 117, 0.05) 0%, rgba(10, 77, 117, 0) 70%);
  z-index: 0;
}

.contact-form-container h2 {
  color: var(--primary-blue);
  margin-bottom: 30px;
  font-size: 2rem;
  font-weight: 700;
  position: relative;
}

.contact-form-container h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-teal);
  margin-top: 15px;
  border-radius: 2px;
}

/* Form Layout */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--form-spacing);
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Form Title */
.form-title {
  color: white;
  margin-bottom: 30px;
  font-size: 2.2rem;
  font-weight: 700;
  position: relative;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.form-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-teal);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* Form Groups */
.mb-3 {
  margin-bottom: var(--form-spacing);
}

/* Form Labels */
.form-label {
  font-size: var(--label-font-size);
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

/* Textarea Height */
textarea.form-control {
  height: auto;
  min-height: 15vh;
  max-height: 30vh;
}

/* Multi-select Styling */
.form-group select[multiple] {
  height: 220px;
  padding: 0;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  border: 1px solid #e0e0e0;
  /* Add will-change for smoother scrolling */
  will-change: transform;
}

.form-group select[multiple] option {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.form-group select[multiple] option:hover {
  background-color: #f0f8ff;
}

.form-group select[multiple] option:checked {
  background-color: rgba(78, 205, 196, 0.15);
  color: var(--primary-blue);
  font-weight: 500;
}

.form-group select[multiple] option:disabled {
  padding: 10px 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 13px;
}

/* Select Help Text */
.select-help {
  font-size: 14px;
  color: var(--primary-blue);
  margin-top: 10px;
  font-weight: 500;
  background-color: rgba(78, 205, 196, 0.1);
  padding: 12px 15px;
  border-radius: 6px;
  border-left: 4px solid var(--accent-teal);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0.8;
  transform: translateY(0);
}

/* Add space before the emoji */
.select-help::before {
  content: "⚠️";
  margin-right: 8px;
  font-size: 16px;
}

/* Optimize shine animation for mobile */
.select-help::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%; /* Reduced width for better performance */
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 4s infinite; /* Slower animation for better performance */
}

@keyframes shine {
  0% { left: -50%; }
  20% { left: 100%; }
  100% { left: 100%; }
}

/* Form Feedback Messages */
.form-feedback {
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  line-height: 1.5;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-feedback.success {
  background-color: rgba(46, 213, 115, 0.15);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.form-feedback.success::before {
  content: "✅";
  margin-right: 10px;
  font-size: 18px;
}

.form-feedback.error {
  background-color: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.form-feedback.error::before {
  content: "❌";
  margin-right: 10px;
  font-size: 18px;
}

/* Contact Info Panel */
.contact-info {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background-color: var(--primary-blue);
  color: var(--white);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  padding: 40px;
  justify-content: center;
  overflow: hidden;
  animation: slideInLeft 0.8s ease-out forwards;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.contact-info h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  color: var(--white);
  font-weight: 600;
}

.info-items-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.info-item {
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards;
}

.info-item:nth-child(1) {
  animation-delay: 0.2s;
}

.info-item:nth-child(2) {
  animation-delay: 0.3s;
}

.info-item:nth-child(3) {
  animation-delay: 0.4s;
}

.info-item:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.info-item h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--white);
  font-weight: 500;
}

.info-item p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
}

.contact-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* FAQ Section */
.faq-section {
  padding: 2rem 0;
  background-color: var(--light-bg);
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--primary-blue);
  font-weight: 600;
}

.faq-item {
  background-color: var(--white);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  border-left: 3px solid var(--primary-blue);
  opacity: 0;
  animation: slideInUp 0.4s ease-out forwards;
}

.faq-item:nth-child(1) {
  animation-delay: 0.1s;
}

.faq-item:nth-child(2) {
  animation-delay: 0.2s;
}

.faq-item:nth-child(3) {
  animation-delay: 0.3s;
}

.faq-item:nth-child(4) {
  animation-delay: 0.4s;
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-blue);
  font-weight: 600;
}

.faq-item p {
  font-size: 0.9rem;
  color: var(--text-medium);
  margin-bottom: 0;
  line-height: 1.5;
}

/* General Animations - Optimized for Mobile */
@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Form group animations */
.form-group {
  opacity: 0;
  animation: slideInUp 0.4s ease-out forwards;
}

.form-group:nth-child(1) {
  animation-delay: 0.2s;
}

.form-group:nth-child(2) {
  animation-delay: 0.25s;
}

.form-group:nth-child(3) {
  animation-delay: 0.3s;
}

.form-group:nth-child(4) {
  animation-delay: 0.35s;
}

.form-group:nth-child(5) {
  animation-delay: 0.4s;
}

/* Form Feedback Styling */
#form-feedback {
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

#form-feedback.alert-success {
  background-color: rgba(46, 213, 115, 0.15);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

#form-feedback.alert-danger {
  background-color: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}

/* Form Field Focus Animation */
.input-focused .form-control,
.input-focused .form-select {
  border-color: var(--accent-teal);
  -webkit-box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
  background-color: var(--white);
  transform: translateY(-2px);
}

/* Valid/Invalid State Styling */
.form-control.is-valid,
.form-select.is-valid {
  border-color: #2ed573;
  background-color: rgba(46, 213, 115, 0.05);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #ff4757;
  background-color: rgba(255, 71, 87, 0.05);
}

/* Fix for Bootstrap form validation styles */
.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Improved Form Layout */
.contact-form .row {
  margin-left: -10px;
  margin-right: -10px;
}

.contact-form .row > [class*="col-"] {
  padding-left: 10px;
  padding-right: 10px;
}

/* Improved Spacing */
.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

/* Ensure page header content is visible immediately */
.page-header,
.page-header h1,
.page-header .tagline {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Improved Multi-select Styling */
select[multiple].form-select {
  height: 50vh !important;
  min-height: 50vh !important;
  padding: 2%;
}

select[multiple].form-select option {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
  font-size: 0.95rem;
}

select[multiple].form-select option:hover {
  background-color: rgba(78, 205, 196, 0.1);
}

select[multiple].form-select option:checked {
  background-color: rgba(78, 205, 196, 0.2);
  color: var(--primary-blue);
  font-weight: 500;
}

select[multiple].form-select option:disabled {
  padding: 10px 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
  background-color: #1a5b9a !important;
  color: white !important;
}

/* ===== CONSOLIDATED MEDIA QUERIES ===== */

/* Large Screens and up (min-width: 992px) */
@media (min-width: 992px) {
  .page-header {
    background-attachment: fixed;
  }
  
  .contact-form-container {
    padding: 3rem;
    max-width: 80%;
  }
  
  .contact-form {
    max-width: 900px;
  }
  
  .btn-primary {
    min-width: 200px;
  }
  
  .text-center .btn-primary {
    min-width: 200px;
  }
}

/* Large Screens or smaller (max-width: 992px) */
@media (max-width: 992px) {
  .contact-grid {
    transform: translateY(-30px);
  }
  
  .contact-info, 
  .contact-form-container {
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
  }
  
  .contact-form-container h2, 
  .contact-info h2 {
    font-size: 1.8rem;
  }
  
  .contact-grid {
    row-gap: 0;
  }
}

/* Medium Screens or smaller (max-width: 768px) */
@media (max-width: 768px) {
  /* Page header */
  .page-header {
    min-height: 30vh;
    background-attachment: scroll;
    padding: 0 15px;
    padding-bottom: 40px;
  }
  
  .page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
  }
  
  .page-header .tagline {
    font-size: 1rem;
  }
  
  /* Contact section */
  .contact-section {
    padding: 60px 0;
    background-attachment: scroll; /* Better performance on mobile */
    /* background-position: center center; */
  }
  
  .contact-section::before {
    background-color: rgba(10, 77, 117, 0.25); /* Slightly darker overlay for mobile */
  }
  
  /* Form title */
  .form-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    text-align: center;
    color: white;
  }
  
  .form-title::after {
    margin: 0.5rem auto 0;
  }
  
  /* Contact grid */
  .contact-grid {
    transform: translateY(-20px);
    border-radius: var(--radius-sm);
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  
  /* Contact info */
  .contact-info, 
  .contact-form-container {
    padding: 30px 20px;
  }
  
  /* Center content on mobile */
  .contact-info {
    text-align: center;
    align-items: center;
  }
  
  .contact-info h2::after {
    margin: 15px auto 0; /* Center the underline */
  }
  
  .info-item {
    padding-left: 0;
    padding-top: 40px; /* Move icon above text */
    margin-bottom: 25px;
    /* Center content */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .info-item h3 {
    font-size: 0.95rem;
  }
  
  .info-item p {
    font-size: 0.8rem;
  }
  
  /* Container adjustments */
  .container {
    padding-left: var(--container-padding-mobile);
    padding-right: var(--container-padding-mobile);
    width: 100%;
    max-width: 100%;
  }
  
  /* Form layout */
  .contact-form {
    padding: 1.5rem;
    margin: 0 15px;
    background-color: rgba(255, 255, 255, 0.9);
  }
  
  .contact-form .row {
    margin-left: -5px;
    margin-right: -5px;
  }
  
  .contact-form .row > [class*="col-"] {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  .contact-form .row.g-2 {
    display: block;
  }
  
  .contact-form .row.g-2 .col-md-6 {
    width: 100%;
    padding: 0;
    margin-bottom: 1rem;
  }
  
  /* Mobile form controls */
  .form-control,
  .form-select {
    -webkit-appearance: none; /* Remove default iOS styling */
    -moz-appearance: none;
    appearance: none;
    border-radius: var(--radius-sm);
    height: 50px;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 0.75rem;
    border-radius: 8px;
  }
  
  /* Improve touch feedback */
  .form-control:focus,
  .form-select:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
    transform: translateY(-2px);
  }
  
  /* Add active state for touch */
  .form-control:active,
  .form-select:active {
    background-color: rgba(78, 205, 196, 0.05);
  }
  
  /* Improve select multiple on touch devices */
  .form-select[multiple] {
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
  
  .form-select[multiple] option {
    padding: 16px; /* Larger touch targets */
  }
  
  /* Make the submit button more touch-friendly */
  .btn-primary {
    padding: 16px 24px;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
    width: 100%;
    height: 54px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* Add visual feedback for active state */
  .btn-primary:active {
    transform: scale(0.98);
    background: var(--primary-blue);
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  .btn-primary:hover,
  .btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  }
  
  /* Improve form group spacing */
  .mb-3, .mb-2 {
    margin-bottom: 1rem !important;
  }
  
  .mb-4 {
    margin-bottom: 1rem !important;
  }
  
  /* Adjust label size for better touch */
  .form-label {
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 14px;
  }
  
  /* Ensure proper text size to prevent zoom */
  input, select, textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
  }
  
  /* Fix for iOS input zoom and fixed background */
  .page-header {
    background-attachment: scroll !important;
  }
  
  /* Select multiple */
  select[multiple].form-select {
    height: 45vh !important;
    min-height: 45vh !important;
    height: 405px !important;
    min-height: 405px !important;
    padding: 10px;
  }
  
  select[multiple].form-select option {
    padding: 2% 3%;
    font-size: 0.9rem;
    padding: 12px 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: all 0.2s ease;
  }
  
  select[multiple].form-select option:checked {
    background-color: rgba(78, 205, 196, 0.2);
    color: var(--primary-blue);
    font-weight: 500;
    border-left: 3px solid var(--accent-teal);
  }
  
  .select-help {
    font-size: 0.8rem;
    padding: 2% 2.5%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    margin-top: 5px;
    margin-bottom: 15px;
  }
  
  /* Textarea */
  textarea.form-control {
    height: auto;
    min-height: 120px;
    padding: 15px;
  }
  
  /* FAQ section */
  .faq-section {
    padding: 1.5rem 0;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }
  
  .faq-item {
    padding: 0.75rem;
    padding: 15px;
  }
  
  .faq-item h3 {
    font-size: 0.95rem;
    font-size: 1.1rem;
  }
  
  .faq-item p {
    font-size: 0.85rem;
  }
  
  /* Hide/show elements based on screen size */
  .d-sm-none {
    display: none !important;
  }
  
  .d-sm-block {
    display: block !important;
  }
  
  /* Simplify animations on mobile */
  .contact-info,
  .contact-form-container {
    animation-duration: 0.4s;
  }
  
  .form-group,
  .info-item,
  .faq-item {
    animation-duration: 0.3s;
  }
  
  /* Reduce animation delays on mobile */
  .form-group:nth-child(n+3),
  .info-item:nth-child(n+2),
  .faq-item:nth-child(n+3) {
    animation-delay: 0.2s;
  }
  
  /* Add active state for touch devices */
  .faq-item:active {
    background-color: rgba(78, 205, 196, 0.05);
  }
  
  .info-item a:active {
    color: var(--accent-teal);
  }
  
  /* Bootstrap responsive utilities */
  select[multiple] {
    height: 160px !important;
  }
  
  /* Form container for mobile */
  .contact-form-container {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 20px !important;
    margin: 0 !important;
  }
  
  .contact-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
    max-width: 100% !important;
  }
  
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }
  
  .col-lg-8.col-md-12.contact-form-container,
  .col-lg-8 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 25px 20px;
    width: 100%;
  }
  
  /* Form layout */
  .contact-form {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
}

/* Small Screens (max-width: 480px) */
@media (max-width: 480px) {
  .page-header h1 {
    font-size: 2rem;
  }
  
  .contact-section {
    padding: 20px 0 40px;
    /* background-position: center top; Focus on top part of image for smaller screens */
  }
  
  .contact-section::before {
    background-color: rgba(10, 77, 117, 0.25); /* Even darker overlay for smallest screens */
  }
  
  .form-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
  }
  
  .contact-form {
    padding: 1.25rem;
    margin: 0 10px;
    padding: 1rem;
    margin: 0 8px;
    background-color: rgba(255, 255, 255, 0.80); /* More opaque for smallest screens */
  }
  
  .contact-grid {
    transform: translateY(-15px);
    border-radius: 8px;
  }
  
  .contact-info, 
  .contact-form-container {
    padding: 25px 15px;
    padding: 20px 15px;
  }
  
  .contact-form-container h2, 
  .contact-info h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .form-control, 
  .form-select {
    height: 48px;
    padding: 10px 12px;
  }
  
  /* FAQ section */
  .faq-section {
    padding: 1.25rem 0;
  }
  
  .section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  .faq-item {
    padding: 0.6rem;
  }
  
  .faq-item h3 {
    font-size: 0.9rem;
  }
  
  .faq-item p {
    font-size: 0.8rem;
  }
  
  /* Select and form adjustments */
  select[multiple].form-select {
    height: 340px !important;
    min-height: 340px !important;
  }
  
  select[multiple].form-select option {
    padding: 8px 12px;
  }
  
  textarea.form-control {
    min-height: 100px;
  }
  
  .btn-primary {
    height: 50px;
  }
  
  .form-label {
    font-size: 14px;
    margin-bottom: 5px;
  }
}

/* Accessibility Media Queries */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
  
  /* Remove animations for users who prefer reduced motion */
  .btn-primary::before,
  .select-help::after,
  .form-control:focus,
  .form-select:focus {
    animation: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  
  /* Add subtle animations for form elements */
  .form-control:focus,
  .form-select:focus {
    transition: all 0.3s ease;
  }
  
  .btn-primary:hover {
    transition: all 0.3s ease;
  }
}

/* End of production-ready contact styles */
/* Last updated: 2023 */
/* This file is optimized for production and should be minified before deployment */