/* ==========================================================================
   CONTACT PAGE (contact.html) — loads after css/global.css
   Contact details card, message form, side image.
   ========================================================================== */

.contact-section {
  padding: 55px 0;
}

.contact-container-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 0.85fr;
  gap: 26px;
  align-items: stretch;
}

.contact-left-info,
.contact-form-wrapper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.contact-left-info h3,
.contact-form-wrapper h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 8px;
}

.contact-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.c-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e0f2fe;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.c-icon.c-green { background-color: #dcfce7; color: #16a34a; }
.c-icon.c-red   { background-color: #fee2e2; color: #dc2626; }
.c-icon.c-navy  { background-color: #e0e7ff; color: var(--primary-navy); }

.c-details strong {
  display: block;
  font-size: 0.85rem;
  color: var(--primary-navy);
}

.c-details a,
.c-details span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.c-details a:hover {
  color: var(--accent-blue);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.86rem;
  outline: none;
  background-color: #f8fafc;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.1);
}

.send-message-btn {
  background-color: var(--accent-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.send-message-btn:hover {
  background-color: #0056b3;
}

.form-feedback-message {
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 18px;
  margin-top: 4px;
}

.form-feedback-message.success { color: #16a34a; }
.form-feedback-message.error   { color: #dc2626; }

.contact-image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.contact-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 1024px) {
  .contact-container-grid { grid-template-columns: 1fr 1fr; }
  .contact-image-wrapper { display: none; }
}

/* ==========================================================================
   MOBILE & TABLET (≤ 991px) — desktop (≥ 992px) layout unchanged
   ========================================================================== */
@media (max-width: 991px) {

  /* ---- 1. Stack details + form, each full width (no skinny slivers) ---- */
  .contact-section { padding: 36px 0 48px; }

  .contact-container-grid {
    grid-template-columns: minmax(0, 1fr);   /* one full-width column */
    gap: 20px;
  }
  .contact-left-info,
  .contact-form-wrapper {
    width: 100%;
    min-width: 0;            /* grid children may shrink to the container, never overflow it */
    flex-shrink: 0;
  }

  /* ---- 2. Info cards: uniform 2-column grid, equal heights ---- */
  .contact-subtitle { margin-bottom: 18px; }

  .contact-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;     /* every card the same height */
    gap: 14px;
  }

  .contact-card {
    height: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    min-width: 0;
    padding: 20px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
  }

  .contact-card .c-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .c-details {
    min-width: 0;
    max-width: 100%;
  }
  .c-details strong { margin-bottom: 2px; }
  .c-details a,
  .c-details span {
    display: block;
    overflow-wrap: anywhere;  /* long email address wraps instead of overflowing */
    line-height: 1.5;
  }

  /* ---- 3. Form: full width, inputs never overflow ---- */
  .contact-form-wrapper { padding: 24px; }

  .contact-form .form-group { width: 100%; min-width: 0; }

  .contact-form input,
  .contact-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 16px;          /* stops iPhone Safari zooming in on focus */
  }
  .contact-form textarea { resize: vertical; }

  .send-message-btn { width: 100%; }
}

/* Small phones: info cards in one full-width column */
@media (max-width: 576px) {
  .contact-left-info,
  .contact-form-wrapper { padding: 20px 16px; }

  .contact-cards { grid-template-columns: minmax(0, 1fr); }

  .contact-card { padding: 18px 14px; }
}
