/* =========================================
   CONTACT PAGE STYLES (contact.css)
========================================= */

/* --- Hero Section --- */
.contact-hero {
  margin-top: 80px;
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 60vw;
  background: var(--glow-primary);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.contact-hero h1 {
  font-size: 3rem;
  color: var(--color-primary);
  text-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.contact-hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.contact-container {
  padding: var(--spacing-xl) 5%;
}

/* --- Contact Grid Layout --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Left Column: Info & Map --- */
.contact-info-section h2 {
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
}

.info-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--spacing-lg);
}

.info-cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  background: rgba(255, 255, 255, 0.03);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.info-card:hover {
  transform: translateX(5px);
  border-color: var(--color-accent);
}

.info-icon {
  font-size: 2rem;
  background: rgba(255, 209, 102, 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.info-text h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 5px;
}

.info-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Map Container */
.map-container {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- Right Column: FormSubmit Form --- */
.form-wrapper {
  background: linear-gradient(
    145deg,
    var(--bg-card) 0%,
    rgba(11, 15, 25, 1) 100%
  );
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(230, 57, 70, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  height: 100%;
}

.form-wrapper h2 {
  color: var(--color-accent);
  margin-bottom: var(--spacing-xs);
}

.form-wrapper p {
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: var(--text-main);
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.2);
}

/* Native Select Styling mimicking donate.css dropdown */
/* --- Custom Dropdown Styling --- */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
}

.custom-select-trigger {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.custom-select-trigger:hover,
.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--color-primary); /* Crimson glow for contact page */
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

/* The Gold Arrow */
.custom-arrow {
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffd166%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-arrow {
  transform: rotate(180deg);
}

/* The Popup Options List */
.custom-options {
  position: absolute;
  display: block;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--color-primary); /* Crimson border */
  border-radius: var(--radius-md);
  margin-top: 5px;
  z-index: 100;

  /* Animation hidden state */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Individual Options */
.custom-option {
  padding: 12px 15px;
  color: var(--text-main);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    padding-left var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.custom-option:last-child {
  border-bottom: none;
}

/* The beautiful hover state (No more default blue!) */
.custom-option:hover,
.custom-option.selected {
  background: rgba(230, 57, 70, 0.1); /* Subtle crimson background */
  color: var(--color-accent); /* Gold text */
  padding-left: 20px; /* Indent animation */
}
/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-wrapper {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  /* -----------------------------------
       8. CONTACT PAGE TWEAKS
       ----------------------------------- */

  /* Force the two columns to stack into a single vertical column */
  .contact-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-lg);
  }

  /* Stop long emails/addresses from breaking the screen width */
  .info-card {
    flex-direction: column; /* Stacks the icon on top of the text */
    align-items: center;
    text-align: center;
    word-break: break-word;
  }

  .info-icon {
    margin-bottom: 10px;
  }

  /* Ensure the Google Map shrinks perfectly */
  .map-container {
    width: 100%;
    max-width: 100%;
  }

  /* Reduce the massive desktop padding on the form box */
  .contact-form-section .form-wrapper {
    padding: var(--spacing-lg) var(--spacing-sm);
    width: 100%;
    box-sizing: border-box;
  }

  /* Allow long dropdown text to wrap to a second line instead of pushing off-screen */
  .custom-select-text,
  .custom-option {
    white-space: normal;
    word-wrap: break-word;
  }
}
