/*
 * File: public\css\contact.css
 * Purpose: Defines presentation styles for the contact interface.
 */
/* ==================== BASE FONT CONSISTENCY ==================== */
:root {
  --blue: rgb(30, 42, 87);
  --light-blue: rgb(30, 42, 87);
  --grey: #eaf0fa;
  --orange: #ff9f45;
  --orange-hover: #ffb366;
}

body, input, select, textarea, button {
  font-family: 'Open Sans', sans-serif;
  color: #2c3e50;
}

/* Placeholder consistency */
::placeholder {
  color: #555;
  opacity: 0.9;
  font-size: 17px;
}

/* ==================== CONTACT SECTION BACKGROUND ==================== */
.contact-section {
  background: rgb(30, 42, 87);
  min-height: auto;
  padding: 0; /* touches header */
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ==================== FLEX CONTAINER ==================== */
.contact-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ==================== LEFT (INFO) & RIGHT (FORM) BOXES ==================== */
.contact-info,
.contact-form {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 2px solid black;
  overflow: hidden;
  color: #2c3e50;
  min-height: auto;
}

.contact-info {
  background: #ffffff;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.contact-form {
  background: #cfcfcf;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: 750px;
}

/* ==================== HEADERS ==================== */
.contact-info h2,
.contact-form h2 {
  background: rgb(30, 42, 87);
  color: white;
  margin: 0;
  padding: 18px;
  font-size: 26px;
  text-align: center;
  font-weight: 700;
}

/* ==================== INFO ROW ==================== */
.info-row {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
  text-align: center;
  padding: 10px 0;
  margin: 0;
}

.info-item {
  flex: 1;
  padding: 25px 15px;
  border-right: 1px solid #ccc;
  border-top: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.info-item:last-child {
  border-right: none;
}

.info-item h3 {
  font-size: 22px;
  margin: 8px 0;
  color: rgb(30, 42, 87);
  font-weight: 700;
}

/* ==================== FORM ==================== */
.contact-form form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px 60px;
  box-sizing: border-box;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
}

.form-row input {
  flex: 1;
  min-width: 0;
  padding: 16px;
  border: 1px solid #555;
  border-radius: 6px;
  font-size: 18px;
  transition: all 0.3s ease;
}

/* ==================== REASON DROPDOWN ==================== */
.form-row select {
  flex: 1;
  min-width: 0;
  padding: 16px;
  border: 1px solid #555;
  border-radius: 6px;
  font-size: 18px;
  background: white;
  color: #2c3e50;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%231e2a57' height='24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  cursor: pointer;
}

.form-row select:focus {
  outline: none;
  border-color: rgb(30, 42, 87);
}

/* RESPONSIVE INPUT LAYOUT */
@media (max-width: 1000px) {
  .form-row {
    flex-wrap: wrap;
  }

  .form-row input,
  .form-row select {
    flex: 1 1 48%;
  }
}

@media (max-width: 700px) {
  .form-row input,
  .form-row select {
    flex: 1 1 100%;
  }
}

/* ==================== TEXTAREA ==================== */
textarea {
  width: 100%;
  padding: 16px;
  height: 220px;
  border: 1px solid #555;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 18px;
  resize: vertical;
  flex-grow: 1;
  box-sizing: border-box;
}

/* ==================== SUBMIT BUTTON (EXACTLY LIKE FOOTER CONNECT BUTTON) ==================== */
.contact-form .btn {
  position: relative;              /* for shine effect */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* match footer width/height behavior */
  width: 500px;
  padding: 10px 0;

  background: #1e2a57 !important;
  color: white !important;
  border-radius: 6px;
  font-weight: 600;
  border: 2px solid #1e2a57 !important;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 16px;
  overflow: hidden;                /* keep shine inside */
  text-align: center;

  margin-top: 30px;
  margin-left: auto;
  margin-right: auto;              /* centers the button in the form */
}

.contact-form .btn:hover {
  background: white !important;
  color: #1e2a57 !important;
  border-color: #1e2a57 !important;
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(30, 42, 87, 0.35);
}

/* Shine effect (same as footer) */
.contact-form .btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
}

/* ==================== INFO ICONS (BACK TO ORIGINAL LOOK) ==================== */
.info-item .info-icon {
  width: 40px !important;
  height: 40px !important;
  margin-bottom: 8px;
  object-fit: contain;
  display: block;
  /* no color filter so they use their original colors */
  filter: none !important;
}

/* ==================== RATE LIMIT MESSAGE ==================== */
.rate-limit-message {
  margin-top: 12px;
  text-align: center;
  color: red;
  font-weight: bold;
  font-size: 16px;
}

/* ==================== SPINNER ==================== */
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid rgb(30, 42, 87);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== RESPONSIVE FIXES ==================== */
@media (max-width: 900px) {
  .info-row {
    flex-wrap: wrap;
  }

  .info-item {
    flex: 1 1 45%;
    border-right: none;
    border-bottom: 1px solid #ccc;
    padding: 25px 20px;
  }

  .info-item:last-child {
    border-bottom: none;
  }
}

@media (max-width: 600px) {
  .info-item {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: 1px solid #ccc;
  }

  .info-item:last-child {
    border-bottom: none;
  }
}

/* ==================== MOBILE SUBMIT BUTTON==================== */
@media (max-width: 600px) {
  .contact-form .btn {
    width: 100%;        
    max-width: 320px;   
  }
}
