/* style/contact.css */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --bg-light: #f9f9f9;
}

/* Base styles for the contact page content */
.page-contact {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light background */
  background-color: #ffffff; /* Explicitly setting for clarity */
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  box-sizing: border-box;
}

/* Hero Section */
.page-contact__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--secondary-color), #5a0000); /* Dark red gradient */
  color: var(--text-color-light); /* Light text on dark background */
  overflow: hidden; /* For image positioning */
}

.page-contact__hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2; /* Ensure text is above image */
}

.page-contact__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color); /* Gold title */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-contact__hero-description {
  font-size: 18px;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-contact__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-contact__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-contact__btn-primary {
  background: var(--primary-color);
  color: var(--text-color-dark); /* Dark text on gold button for contrast */
}

.page-contact__btn-primary:hover {
  background: #e6b800; /* Slightly darker gold */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-contact__btn-secondary {
  background: #ffffff;
  color: var(--secondary-color); /* Dark red text on white button */
  border: 2px solid var(--secondary-color);
}

.page-contact__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--text-color-light); /* White text on dark red hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-contact__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Subtle background image */
  z-index: 1;
  filter: none; /* No filter to change color */
}

/* General Section Styles */
.page-contact__info-section,
.page-contact__form-section,
.page-contact__location-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-contact__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--secondary-color); /* Dark red title */
  position: relative;
}

.page-contact__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Info Section */
.page-contact__info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-contact__info-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark); /* Dark text on light background */
}

.page-contact__info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.page-contact__info-icon {
  width: 100%; /* Ensure large image fills card width */
  height: auto;
  max-height: 200px; /* Constraint height for visual balance */
  object-fit: contain; /* Ensure image fits without cropping */
  margin-bottom: 20px;
  filter: none; /* No filter to change color */
  border-radius: 5px;
}

.page-contact__card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-contact__card-text {
  font-size: 16px;
  margin-bottom: 20px;
  color: #555555;
}

.page-contact__card-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 3px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-contact__card-link:hover {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Form Section */
.page-contact__form-container {
  max-width: 800px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 10px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  color: var(--text-color-dark); /* Dark text on light background */
}

.page-contact__form-description {
  text-align: center;
  margin-bottom: 30px;
  font-size: 17px;
  color: #555555;
}

.page-contact__contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-contact__form-group {
  display: flex;
  flex-direction: column;
}

.page-contact__form-label {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333333;
}

.page-contact__form-input,
.page-contact__form-textarea {
  padding: 12px 15px;
  border: 1px solid #cccccc;
  border-radius: 5px;
  font-size: 16px;
  color: #333333;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
  outline: none;
}

.page-contact__form-textarea {
  resize: vertical;
  min-height: 120px;
}

.page-contact__submit-button {
  align-self: center;
  width: auto;
  min-width: 200px;
  padding: 15px 30px;
  background: var(--primary-color);
  color: var(--text-color-dark);
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-contact__submit-button:hover {
  background: #e6b800;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Location Section */
.page-contact__location-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.page-contact__location-description {
  margin-bottom: 30px;
  font-size: 17px;
  color: #555555;
}

.page-contact__map-wrapper {
  width: 100%;
  padding-bottom: 75%; /* 4:3 aspect ratio for map */
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.page-contact__map-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  filter: none; /* No filter to change color */
}

.page-contact__address-details {
  background: #ffffff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: inline-block; /* To center the block */
  text-align: left;
  color: var(--text-color-dark); /* Dark text on light background */
}

.page-contact__address-text {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333333;
}

.page-contact__address-text:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-contact__main-title {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .page-contact {
    padding-top: var(--header-offset, 120px) !important; /* Ensure content is below fixed header on mobile */
    font-size: 16px;
    line-height: 1.6;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-contact__hero-section {
    padding: 60px 15px;
  }

  .page-contact__main-title {
    font-size: 32px;
  }

  .page-contact__hero-description {
    font-size: 16px;
  }

  .page-contact__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .page-contact__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box !important;
  }

  .page-contact__info-section,
  .page-contact__form-section,
  .page-contact__location-section {
    padding: 40px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-contact__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-contact__info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-contact__info-card {
    padding: 25px;
  }

  .page-contact__info-icon {
    max-height: 150px;
  }

  .page-contact__card-title {
    font-size: 20px;
  }

  .page-contact__form-container {
    padding: 30px 20px;
  }

  .page-contact__form-label {
    font-size: 15px;
  }

  .page-contact__form-input,
  .page-contact__form-textarea {
    padding: 10px 12px;
    font-size: 15px;
  }

  .page-contact__submit-button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box !important;
  }

  .page-contact__map-wrapper {
    padding-bottom: 100%; /* Square map for mobile */
    border-radius: 5px;
  }

  .page-contact__map-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain; /* Ensure image fits without cropping */
    filter: none; /* No filter to change color */
  }

  /* Universal image, video, button mobile responsive rules */
  .page-contact img,
  .page-contact video,
  .page-contact__cta-button,
  .page-contact__submit-button,
  .page-contact a[class*="button"],
  .page-contact a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* For img/video */
    display: block !important; /* For img/video */
    box-sizing: border-box !important;
    white-space: normal !important; /* For buttons */
    word-wrap: break-word !important; /* For buttons */
  }

  .page-contact__info-card .page-contact__info-icon {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: 150px !important; /* Maintain a max-height */
    object-fit: contain !important;
  }

  .page-contact__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .page-contact__info-section .page-contact__info-container,
  .page-contact__form-section .page-contact__form-container,
  .page-contact__location-section .page-contact__location-container,
  .page-contact__hero-section .page-contact__hero-container,
  .page-contact__map-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0; /* Handled by section padding */
    padding-right: 0; /* Handled by section padding */
    overflow: hidden !important;
  }

  .page-contact__cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to the button container itself */
  }
}

/* Color Contrast Check */
/* Text on primary color background should be dark for better contrast */
.page-contact__btn-primary {
  color: var(--text-color-dark);
}
.page-contact__btn-primary:hover {
  color: var(--text-color-dark); /* Ensure text stays dark on hover */
}

/* Text on secondary color background (hero section) should be light */
.page-contact__hero-section {
  color: var(--text-color-light);
}

/* Text on white/light backgrounds should be dark */
.page-contact__info-card,
.page-contact__form-container,
.page-contact__address-details {
  color: var(--text-color-dark);
}

/* Link colors on white/light backgrounds */
.page-contact__card-link {
  color: var(--primary-color);
}
.page-contact__card-link:hover {
  color: var(--secondary-color);
}