/* ============================================================
   PAGE — contact.html
   Figma: node 19:38073 (page 10)
   Two-column layout: left contact info | right #f2f2f2 form panel
   ============================================================ */

/* ============================================================
   SECTION WRAPPER
   ============================================================ */
.contact-section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

/* ============================================================
   HEADING + DIVIDER
   ============================================================ */
.contact-section .section-heading {
  margin-bottom: var(--space-md);
}

.contact-header {
  text-align: center;
  padding-inline: var(--space-lg);
  margin-bottom: var(--space-xl);
}

/* ============================================================
   TWO-COLUMN LAYOUT
   Proportional: info ~46% | form panel ~54%
   Both columns stretch to the same height so the grey panel
   never ends before the info column.
   ============================================================ */
.contact-layout {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  max-width: calc(var(--container-inner) + 2 * var(--space-lg));
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* ============================================================
   LEFT COLUMN — contact info
   ============================================================ */
.contact-info {
  flex: 0 0 46%;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding-right: var(--space-2xl);
  min-width: 0;
}

.contact-info__intro {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-text-dark);
  line-height: 1.6;
}

.contact-info__intro a {
  color: var(--color-text-dark);
}

.contact-info__intro a:hover {
  color: var(--color-red);
  text-decoration: none;
}

.contact-info__offices {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-info__city {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-dark);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.contact-info__details {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-med);
  line-height: 1.6;
}

.contact-info__email {
  display: block;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-med);
}

.contact-info__email:hover {
  color: var(--color-red);
  text-decoration: none;
}

/* Tight spacing to email, matching the city→address gap (6px) */
.contact-info__social {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: calc(6px - var(--space-lg));
}

.contact-info__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  color: var(--color-text-dark);
  transition: color 0.2s ease;
}

.contact-info__social-link:hover {
  color: var(--color-red);
}

.contact-info__social-link svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* ============================================================
   RIGHT COLUMN — form panel (grey background)
   ============================================================ */
.contact-form-panel {
  flex: 0 0 54%;
  min-width: 0;
  background-color: var(--color-footer-bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   CONTACT FORM — inputs use full box borders (Figma spec)
   Spacing is uniform: panel padding, row gap, column gap, and
   the gap before the submit button are all 32px and fixed.

   .contact-form-panel is stretched (align-items: stretch on
   .contact-layout) to match the left column's height, which is
   often taller than the form's own content. .contact-form fills
   that full stretched height; the message field (a separate flex
   row, not part of the input grid) grows to absorb any extra
   stretched space, so the 32px gaps around the button never
   change — they stay fixed no matter how tall the panel gets
   stretched.
   ============================================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1;
  min-height: 0;
}

.contact-form__grid {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 383fr 392fr;
  gap: 32px;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
}

.contact-form__message-group {
  flex: 1;
  min-height: 0;
  display: flex;
}

.contact-form__input,
.contact-form__textarea,
.contact-form__select {
  font-family: var(--font-primary);
  font-size: var(--text-footer);
  font-weight: 400;
  color: var(--color-text-gray);
  background-color: var(--color-white);
  border: 1px solid var(--color-bg-light);
  height: 52px;
  padding: 0 18px;
  width: 100%;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: var(--color-text-gray);
}

.contact-form__input:focus,
.contact-form__textarea:focus,
.contact-form__select:focus {
  border-color: var(--color-text-dark);
  color: var(--color-text-dark);
}

.contact-form__textarea {
  flex: 1;
  height: auto;
  min-height: 159px;
  padding: 14px 18px;
  resize: vertical;
}

/* Category — custom dropdown (native select can't be styled cross-browser) */
.contact-form__select-wrap {
  position: relative;
}

.contact-form__select-wrap::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-gray);
  border-bottom: 2px solid var(--color-text-gray);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.contact-form__custom-select.is-open::after {
  transform: translateY(-50%) rotate(225deg);
}

/* Button inherits all .contact-form__input styles (height, padding, border, bg, font).
   Only add flex alignment on top — do NOT override padding/border/background. */
.contact-form__select-btn {
  display: flex;
  align-items: center;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.contact-form__select-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

/* When open: keep light border and drop bottom so button + options form one container */
.contact-form__custom-select.is-open .contact-form__select-btn {
  border-color: var(--color-bg-light);
  border-bottom-color: transparent;
  color: var(--color-text-gray);
}

.contact-form__select-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--color-white);
  border: 1px solid var(--color-bg-light);
  border-top: none;
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-form__custom-select.is-open .contact-form__select-options {
  display: block;
}

.contact-form__select-option {
  padding: 10px 18px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: var(--text-footer);
  font-weight: 400;
  color: var(--color-text-gray);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.contact-form__select-option + .contact-form__select-option {
  border-top: 1px solid var(--color-bg-light);
}

.contact-form__select-option:hover,
.contact-form__select-option.is-selected {
  background-color: var(--color-red);
  color: var(--color-white);
  border-top-color: var(--color-red);
}

.contact-form__select-option + .contact-form__select-option:hover,
.contact-form__select-option + .contact-form__select-option.is-selected {
  border-top-color: var(--color-red);
}

/* Hide the divider above a hovered item's previous sibling isn't possible in CSS,
   but making the hovered item's own top border match red keeps it clean */

/* SEND MESSAGE — centered below the form */
.contact-form__submit {
  flex-shrink: 0;
  text-align: center;
}

/* ============================================================
   FORM FEEDBACK — success + field errors
   ============================================================ */
.form-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 16px 20px;
  font-size: var(--text-footer);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.field-error {
  font-size: 14px;
  color: var(--color-red);
  margin-top: 4px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
  .contact-info {
    padding-right: var(--space-lg);
  }
}

@media (max-width: 1024px) {
  .contact-layout {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-lg);
    padding-inline: var(--space-md);
  }

  .contact-info {
    flex: none;
    padding-right: 0;
  }

  .contact-form-panel {
    flex: none;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
  }

  .contact-form {
    gap: var(--space-md);
    flex: 1;
  }

  .contact-form__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  .contact-section {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-xl);
  }

  .contact-header {
    padding-inline: var(--space-md);
    margin-bottom: var(--space-lg);
  }

  .contact-layout {
    padding-inline: var(--space-md);
  }

  .contact-form__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .contact-form__input,
  .contact-form__select {
    height: 48px;
  }

  .contact-info__intro,
  .contact-info__city,
  .contact-info__details,
  .contact-info__email {
    font-size: var(--text-body);
  }
}

@media (max-width: 375px) {
  .contact-header {
    padding-inline: var(--space-sm);
  }

  .contact-layout {
    padding-inline: var(--space-sm);
  }

  .contact-form-panel {
    padding: var(--space-sm);
  }

  .contact-form {
    gap: var(--space-sm);
  }

  .contact-form__grid {
    gap: var(--space-sm);
  }
}
