/* ==========================================================================
   CONTACT PAGE STYLES
   ========================================================================== */

/* Layout wrapper inside <main> for contact grid */
main > section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin: 40px 0;
  padding: 0 10px;
}

/* Desktop layout: Side-by-side arrangement */
@media (min-width: 768px) {
  main > section:first-of-type {
    grid-template-columns: 1fr 1fr; /* Info on left, Form on right */
    align-items: start;
  }
}

/* Contact text and list adjustments */
main h2 {
  grid-column: 1 / -1; /* Makes "Contact Me" span full width */
  font-size: 2rem;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

main p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 25px;
}

main ul {
  list-style: none;
  padding: 0;
}

main ul li {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--color-light);
}

main ul li a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  margin-left: 5px;
  transition: color 0.3s ease;
}

main ul li a:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

/* --- Form Elements Styling --- */
form {
  background-color: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #222;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

form div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-light);
  letter-spacing: 0.5px;
}

form input[type='text'],
form input[type='email'],
form textarea {
  width: 100%;
  padding: 12px;
  background-color: var(--dark-color);
  border: 1px solid #333;
  border-radius: 4px;
  color: var(--color-light);
  font-size: 15px;
  outline: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Dynamic highlighting matching your main accent color */
form input:focus,
form textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(255, 122, 0, 0.2);
}

form button[type='submit'] {
  align-self: flex-start;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.1s ease;
}

form button[type='submit']:hover {
  background-color: var(--hover-color);
}

form button[type='submit']:active {
  transform: scale(0.98);
}

/* --- Map container box responsive constraints --- */
main section:last-of-type div {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #222;
}

main iframe {
  width: 100% !important; /* Forces layout wrapper adaptation overriding static attributes */
  display: block;
}
