
/* =========================================
   MAS AVIATION - CONTACT US PAGE
========================================= */

.contact-page {
  --contact-navy: #061632;
  --contact-red: #c71930;
  --contact-silver: #f4f5f7;
}

/* BACKGROUND AND LAYOUT */

.contact-hero {
  position: relative;
  min-height: 680px;
  padding: 95px 0 110px;

  background-color: #f4f5f7;

  background-image:
    linear-gradient(
      90deg,
      rgba(255,255,255,0.98) 0%,
      rgba(255,255,255,0.94) 40%,
      rgba(244,245,247,0.72) 100%
    ),
    url("assets/hero-thumbnail.png");

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  overflow: hidden;
}

.contact-inner {
  width: min(1250px, calc(100% - 56px));
}

/* PAGE HEADING */

.contact-title {
  margin-bottom: 55px;
}

.contact-title h1 {
  font-size: clamp(55px, 7vw, 95px);
  line-height: 1.08;
  letter-spacing: -3px;
  font-weight: 800;
  color: #061632;
}

.contact-title h1 span {
  color: #c71930;
}

.contact-title p {
  margin-top: 22px;
  max-width: 590px;
  color: #586579;
  font-size: 17px;
  line-height: 1.8;
}

/* OFFICE CARDS */

.contact-offices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}

.office-card {
  position: relative;
  min-width: 0;
  min-height: 250px;
  padding: 42px;

  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);

  border: 1px solid #e1e5ec;
  border-radius: 16px;

  box-shadow: 0 15px 45px rgba(6,22,50,0.04);

  overflow: hidden;

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.office-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: #061632;
}

.office-card:nth-child(2)::before {
  background: #c71930;
}

.office-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(6,22,50,0.09);
}

.office-number {
  position: absolute;
  right: 27px;
  top: 18px;

  font-size: 68px;
  font-weight: 800;
  color: #eff1f5;
  line-height: 1;
}

.office-card h2 {
  position: relative;
  font-size: 28px;
  font-weight: 800;
  color: #061632;
}

.office-divider {
  width: 44px;
  height: 3px;
  background: #c71930;
  margin: 18px 0 28px;
}

.office-details {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.office-detail {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.office-detail > span {
  color: #7a8798;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.office-detail a {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #c71930;
  font-size: 16px;
  font-weight: 700;
  transition: color 0.25s ease;
}

.office-detail a:hover {
  color: #061632;
  text-decoration: underline;
}

/* CONTACT CALL-TO-ACTION */

.contact-action {
  margin-top: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.contact-action p {
  color: #586579;
  font-size: 16px;
}

/* ANIMATED LOADING BORDER */

.contact-open {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 210px;
  padding: 19px 32px;

  border: none;
  border-radius: 10px;
  background: #061632;
  color: white;

  cursor: pointer;
  font-size: 15px;
  font-weight: 800;

  transition: transform 0.3s ease;
}

/* Rotating aviation-red highlight */

.contact-open::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -200%;

  background: conic-gradient(
    transparent 0deg,
    transparent 265deg,
    #c71930 295deg,
    #ff7180 320deg,
    #c71930 340deg,
    transparent 360deg
  );

  animation: contact-border-spin 4s linear infinite;
}

/* Navy center inside animated border */

.contact-open::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 3px;

  background: #061632;
  border-radius: 7px;

  transition: background 0.3s ease;
}

.contact-open > span {
  position: relative;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  gap: 26px;
}

.contact-open:hover {
  transform: translateY(-4px);
}

.contact-open:hover::after {
  background: #102e54;
}

@keyframes contact-border-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
   CONTACT MODAL
========================================= */

.contact-dialog {
  position: fixed;
  margin: auto;

  width: min(560px, calc(100% - 28px));
  max-height: calc(100dvh - 30px);

  padding: 0;
  border: 1px solid #e2e7ee;
  border-radius: 18px;

  background: white;
  color: #061632;

  box-shadow: 0 25px 90px rgba(6,22,50,0.25);
  overflow-y: auto;
}

.contact-dialog::backdrop {
  background: rgba(6,22,50,0.72);
  backdrop-filter: blur(5px);
}

.dialog-panel {
  padding: 38px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;

  margin-bottom: 30px;
}

.dialog-header h2 {
  font-size: 39px;
  letter-spacing: -1.4px;
  line-height: 1.1;
}

.dialog-header h2 span {
  color: #c71930;
}

.dialog-close {
  display: flex;
  justify-content: center;
  align-items: center;

  flex-shrink: 0;
  width: 38px;
  height: 38px;

  background: #f4f5f7;
  color: #061632;
  border: none;
  border-radius: 8px;

  font-size: 28px;
  cursor: pointer;

  transition: background 0.2s ease;
}

.dialog-close:hover {
  background: #e2e7ee;
}

/* FORM */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.form-field label {
  color: #061632;
  font-size: 13px;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;

  padding: 14px 15px;

  border: 1px solid #dce2eb;
  border-radius: 8px;

  background: #f7f8fa;
  color: #061632;

  font: inherit;
  font-size: 14px;

  outline: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 125px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  background: white;
  border-color: #c71930;
  box-shadow: 0 0 0 3px rgba(199,25,48,0.10);
}

.contact-submit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;

  width: 100%;
  padding: 16px;

  border: none;
  border-radius: 8px;

  color: white;
  background: #061632;

  font-size: 14px;
  font-weight: 800;
  cursor: pointer;

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.contact-submit:hover {
  background: #c71930;
  transform: translateY(-2px);
}

.form-notice {
  color: #7b8796;
  text-align: center;
  font-size: 12px;
}

.form-status {
  padding: 13px;
  border: 1px solid #e2e7ee;
  background: #f4f5f7;
  color: #061632;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.form-status[hidden] {
  display: none;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 750px) {

  .contact-hero {
    padding: 70px 0 85px;
    min-height: auto;
  }

  .contact-inner {
    width: calc(100% - 40px);
  }

  .contact-title {
    margin-bottom: 35px;
  }

  .contact-title h1 {
    font-size: clamp(48px, 10vw, 68px);
    letter-spacing: -2px;
  }

  .contact-title p {
    font-size: 15px;
  }

  .contact-offices {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .office-card {
    min-height: auto;
    padding: 32px 25px;
  }

  .office-card h2 {
    font-size: 25px;
  }

  .office-detail a {
    font-size: 14px;
  }

  .contact-action {
    margin-top: 45px;
  }

  .dialog-panel {
    padding: 28px 22px;
  }

  .dialog-header h2 {
    font-size: 33px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-open::before {
    animation: none;
  }
}
