@import url('https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Condensed');

body {
  font-family: Roboto, sans-serif;
  margin: 0;
  background-color: #fff;
  color: #142e47;
}

header {
    color: #fff;
    display: flex;
    background-color: #fff;
    border-bottom: 2px solid #e12121;
    box-shadow: rgba(0, 0, 0, .5) 0 -1px 10px 0;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

header > div, footer > div {
  max-width: 1290px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 20px;
}

header a, footer a {
  color: inherit;
  text-decoration: none;
  font-size: 18px;
  font-family: 'Roboto Condensed', sans-serif;
}

header a {
  color: #142e47; /* Branding color */
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

header img {
  margin-right: 8px;
}


footer {
  background-color: #142e47;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  flex-direction: column;
}

main {
  background-image: url(../img/lines-overlay.png);
  background-color: #001e3a;
  background-repeat: repeat-x;
  background-position: center left;
  background-size: cover;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

main h1 {
  color: #fff;
  font-size: 40px;
  font-family: 'Roboto Condensed', sans-serif;
  margin-bottom: 30px;
}

form {
  background: white;
  padding: 40px;
  border-radius: 15px;
  max-width: 1000px; /* increased from 900px */
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 5px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

#tracking-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* changed from 2 to 4 columns */
  gap: 16px;
}

#tracking-options label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px; /* slightly reduced for space */
  border: 2px solid #ddd;
  border-radius: 10px;
  background-color: #f5f7f9;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

#tracking-options input[type="checkbox"] {
  display: none;
}

#tracking-options img {
  width: 50px; /* smaller icon to fit single row */
  height: auto;
}

#tracking-options label.selected {
  border: 2px solid #142e47 !important;
  background-color: #e6f0ff !important;
  box-shadow: 0 0 5px rgba(20, 46, 71, 0.3);
}

input[type="text"],
input[type="email"],
select,
textarea {
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  background-color: #f5f7f9;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type="submit"] {
  padding: 15px 40px;
  background-color: #142e47;
  color: white;
  border: none;
  font-size: 18px;
  border-radius: 50px;
  cursor: pointer;
  align-self: center;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
  background-color: #0e1f34;
}

ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

ul li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4em;
}

ul li input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
}


#errorText, #errortext {
  display: none;
  background: #fff9f9;
  color: #c02b0a;
  border: 1px solid #c02b0a;
  padding: 15px;
  font-weight: bold;
  font-size: 15px;
  border-radius: 5px;
}

.error {
  border-color: red !important;
}

.button-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

/* Fix layout overflow on mobile */
body, html {
  width: 100%;
  overflow-x: hidden;
}

main, form {
  width: 100%;
  box-sizing: border-box;
}

header > div, footer > div {
  flex-wrap: wrap;
  overflow-x: hidden;
}

#tracking-options {
  width: 100%;
  box-sizing: border-box;
}

.grid-2 {
  width: 100%;
  box-sizing: border-box;
}
/* Overflow Fixes End */

.email-wrapper, .phone-wrapper {
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .row {
    flex-direction: column;
  }
  #tracking-options {
    grid-template-columns: 1fr;
  }
}