/* =========================================================
   LEDGERS — CONTACT PAGE
   File: css/public/contact.css
========================================================= */

/* =========================================================
   HEADER
========================================================= */

.contact-header {
  background: #1f1f57;
  padding: 35px 90px;
}

.contact-header .navbar {
  max-width: 1400px;
  margin: 0 auto;
}

/* =========================================================
   PAGE LAYOUT
========================================================= */

.contact-page {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(480px, 0.85fr);
  align-items: center;
  gap: 70px;

  min-height: calc(100vh - 120px);
  padding: 64px 80px;

  background:
    linear-gradient(
      rgba(255, 255, 255, 0.94),
      rgba(255, 255, 255, 0.94)
    ),
    url("../../assets/map-bg.jpg") center / cover no-repeat;
}

/* =========================================================
   LEFT CONTENT
========================================================= */

.contact-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 610px;
}

.contact-left h1 {
  margin: 0 0 26px;

  color: #0a0a4f;

  font-family: Georgia, serif;
  font-size: clamp(50px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.05;
}

.contact-left h1 span {
  color: #f7dd83;
}

.contact-left > p {
  max-width: 560px;
  margin: 0 0 20px;

  color: #0a0a4f;

  font-size: 18px;
  line-height: 1.75;
}

/* =========================================================
   HELP BOX
========================================================= */

.help-box {
  width: fit-content;
  margin-top: 16px;
  padding: 27px 32px;

  background: rgba(255, 255, 255, 0.92);

  border-radius: 16px;

  box-shadow:
    0 16px 40px rgba(10, 10, 79, 0.08);
}

.help-box h2 {
  margin: 0 0 6px;

  color: #0a0a4f;

  font-size: 26px;
  font-weight: 700;
}

.help-box p {
  margin: 0 0 18px;

  color: #0a0a4f;

  font-size: 15px;
}

.help-box a {
  display: flex;
  align-items: center;
  gap: 11px;

  margin-bottom: 13px;

  color: #0a0a4f;

  font-size: 15px;
  font-weight: 600;
  text-decoration: none;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.help-box a:last-child {
  margin-bottom: 0;
}

.help-box a:hover {
  color: #caa73d;
  transform: translateX(5px);
}

/* =========================================================
   FORM CARD
========================================================= */

.contact-form-card {
  width: 100%;
  max-width: 570px;
  margin-left: auto;
  padding: 38px 40px;

  background: rgba(255, 255, 255, 0.96);

  border-radius: 20px;

  box-shadow:
    0 20px 55px rgba(10, 10, 79, 0.1);
}

.contact-form-card h2 {
  margin: 0 0 27px;

  color: #0a0a4f;

  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

.contact-form-card h2 span {
  color: #f7dd83;
}

/* =========================================================
   FORM STRUCTURE
========================================================= */

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.phone-grid {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 14px;
}

/* =========================================================
   FORM CONTROLS
========================================================= */

#contact-form input:not([type="checkbox"]),
#contact-form select,
#contact-form textarea {
  width: 100%;
  padding: 13px 15px;

  color: #0a0a4f;
  background: #fafafa;

  border: 1px solid #d7d7df;
  border-radius: 10px;

  font-family: inherit;
  font-size: 15px;

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: #777783;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
  outline: none;

  background: #ffffff;
  border-color: #f7dd83;

  box-shadow:
    0 0 0 3px rgba(247, 221, 131, 0.24);
}

.country-code {
  cursor: pointer;
}

#message {
  min-height: 110px;
  resize: vertical;
}

/* =========================================================
   BUSINESS NAME FIELD
========================================================= */

.business-name-field {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.business-name-field.is-required input {
  border-color: rgba(247, 221, 131, 0.9);
}

.business-name-field.is-required input::placeholder {
  color: #0a0a4f;
}

/* =========================================================
   SERVICES
========================================================= */

.contact-services {
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-services legend {
  margin-bottom: 13px;
  padding: 0;

  color: #0a0a4f;

  font-size: 16px;
  font-weight: 700;
}

.service-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 14px;
}

.service-options label {
  display: flex;
  align-items: center;
  gap: 10px;

  min-height: 42px;
  padding: 9px 12px;

  color: #0a0a4f;
  background: #ffffff;

  border: 1px solid rgba(247, 221, 131, 0.85);
  border-radius: 9px;

  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;

  cursor: pointer;
  user-select: none;

  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.service-options label:hover {
  transform: translateY(-1px);

  background: rgba(247, 221, 131, 0.12);

  box-shadow:
    0 7px 16px rgba(10, 10, 79, 0.06);
}

#contact-form .service-options input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;

  position: relative;

  width: 17px;
  height: 17px;
  min-width: 17px;
  margin: 0;
  padding: 0;

  flex: 0 0 17px;

  background: #ffffff;
  border: 1.5px solid #a9a9b2;
  border-radius: 2px;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#contact-form .service-options input[type="checkbox"]:checked {
  background: #f7dd83;
  border-color: #f7dd83;
}

#contact-form .service-options input[type="checkbox"]:checked::after {
  content: "";

  position: absolute;
  top: 1px;
  left: 5px;

  width: 4px;
  height: 9px;

  border-right: 2px solid #0a0a4f;
  border-bottom: 2px solid #0a0a4f;

  transform: rotate(45deg);
}

#contact-form .service-options input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(247, 221, 131, 0.45);
  outline-offset: 3px;
}

.service-options label:has(input:checked) {
  background: rgba(247, 221, 131, 0.22);
  border-color: #e5bd42;
}

.service-options label:has(input:focus-visible) {
  outline: 3px solid rgba(247, 221, 131, 0.5);
  outline-offset: 2px;
}

/* =========================================================
   ERRORS
========================================================= */

.field-error {
  min-height: 0;
  margin-top: 5px;

  color: #d02b2b;

  font-size: 12px;
  line-height: 1.35;
}

.field-error:empty {
  display: none;
}

.field-error:not(:empty) {
  display: block;
}

#contact-form .is-invalid {
  border-color: #dc4141;

  box-shadow:
    0 0 0 3px rgba(220, 65, 65, 0.09);
}

.contact-services.is-invalid .service-options label {
  border-color: rgba(220, 65, 65, 0.55);
}

/* =========================================================
   SUBMIT BUTTON
========================================================= */

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: fit-content;
  min-width: 135px;

  margin-top: 2px;
  padding: 12px 24px;

  color: #0a0a4f;
  background: #f7dd83;

  border: 1px solid #f7dd83;
  border-radius: 8px;

  font-family: inherit;
  font-size: 15px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.contact-submit:hover {
  transform: translateY(-2px);

  box-shadow:
    0 10px 22px rgba(247, 221, 131, 0.28);
}

.contact-submit:active {
  transform: translateY(0);
}

.contact-submit:focus-visible {
  outline: 3px solid #0a0a4f;
  outline-offset: 4px;
}

.contact-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   STATUS MESSAGE
========================================================= */

.form-status {
  min-height: 0;
  margin: 0;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.form-status:empty {
  display: none;
}

.form-status.success {
  display: block;
  color: #24733e;
}

.form-status.error {
  display: block;
  color: #d02b2b;
}

/* =========================================================
   ENTRANCE ANIMATION
========================================================= */

.contact-left,
.contact-form-card {
  opacity: 0;
  transform: translateY(22px);

  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.contact-left.show,
.contact-form-card.show {
  opacity: 1;
  transform: translateY(0);
}

.contact-form-card {
  transition-delay: 0.1s;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {
  .contact-header {
    padding: 30px 45px;
  }

  .contact-page {
    grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1fr);
    gap: 45px;
    padding: 60px 45px;
  }

  .contact-left h1 {
    font-size: 54px;
  }

  .contact-form-card {
    padding: 35px;
  }
}

/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 900px) {
  .contact-page {
    grid-template-columns: 1fr;
  }

  .contact-left {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
  }

  .contact-left > p {
    margin-right: auto;
    margin-left: auto;
  }

  .help-box {
    margin-right: auto;
    margin-left: auto;
    text-align: left;
  }

  .contact-form-card {
    max-width: 680px;
    margin: 0 auto;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {
  .contact-header {
    padding: 24px 20px;
  }

  .contact-page {
    gap: 38px;
    padding: 46px 20px;
  }

  .contact-left h1 {
    font-size: 44px;
  }

  .contact-left > p {
    font-size: 16px;
    line-height: 1.7;
  }

  .help-box {
    width: 100%;
    padding: 24px;
  }

  .contact-form-card {
    padding: 30px 23px;
    border-radius: 17px;
  }

  .contact-form-card h2 {
    font-size: 30px;
  }

  .contact-grid,
  .service-options {
    grid-template-columns: 1fr;
  }

  .phone-grid {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 11px;
  }

  .contact-submit {
    width: 100%;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 440px) {
  .contact-left h1 {
    font-size: 38px;
  }

  .help-box a {
    align-items: flex-start;
    overflow-wrap: anywhere;
  }

  .contact-form-card {
    padding: 27px 18px;
  }

  .contact-form-card h2 {
    font-size: 27px;
  }

  .phone-grid {
    grid-template-columns: 1fr;
  }

  #contact-form input:not([type="checkbox"]),
  #contact-form select,
  #contact-form textarea {
    padding: 12px 14px;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .contact-left,
  .contact-form-card,
  .help-box a,
  .service-options label,
  .contact-submit,
  .business-name-field {
    transition: none;
  }

  .contact-left,
  .contact-form-card {
    opacity: 1;
    transform: none;
  }
}