@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);

html {
  font-family: 'Montserrat', Arial, sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
button {
  overflow: visible;
}

button, select {
  text-transform: none;
}

button, input, select, textarea {
  color: white;
  font: inherit;
}

input {
  line-height: normal;
}

textarea {
  overflow: auto;
}

#container {
  border: solid 0.5px white;
  max-width: 600px; /* Reduced the max-width for a smaller form */
  margin: 40px auto; /* Reduced the top margin */
  position: relative;
}

form {
  padding: 20px; /* Reduced padding */
  margin: 30px 0; /* Reduced the margin around the form */
}

h1 {
  color: white;
  font-size: 28px; /* Reduced the font size */
  font-weight: 700;
  letter-spacing: 7px;
  text-align: center;
  text-transform: uppercase;
}

.underline {
  border-bottom: solid 0px white;
  margin: -0.512em auto;
  width: 80px;
}

.icon_wrapper {
  margin: 50px auto 0;
  width: 100%;
}

.iconn {
  display: block;
  fill: white;
  height: 50px;
  margin: 0 auto;
  width: 50px;
}

.email {
  float: right;
  width: 45%;
}

input[type='text'], [type='email'], select, textarea {
  background: none;
  border: none;
  border-bottom: solid 2px white;
  color: white;
  font-size: 0.875em; /* Reduced font size */
  font-weight: 400;
  letter-spacing: 1px;
  margin: 0em 0 1.875em 0;
  padding: 0 0 0.5em 0; /* Reduced padding */
  text-transform: uppercase;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s;
}

input[type='text']:focus, [type='email']:focus, textarea:focus {
  outline: none;
  padding: 0 0 0.5em 0; /* Reduced padding */
}

.message {
  float: none;
}

.name {
  float: left;
  width: 45%;
}

select {
  background: url('https://cdn4.iconfinder.com/data/icons/ionicons/512/icon-ios7-arrow-down-32.png') no-repeat right;
  outline: none;
  appearance: none; /* Updated for better cross-browser compatibility */
}

.subject {
  width: 100%;
}

.telephone {
  width: 100%;
}

textarea {
  line-height: 150%;
  height: 80px;
  resize: none;
  width: 100%;
}

::-webkit-input-placeholder {
  color: white;
}

:-moz-placeholder { 
  color: white;
  opacity: 1;
}

::-moz-placeholder {
  color: white;
  opacity: 1;
}

:-ms-input-placeholder {
  color: white;
}

#form_button {
  background: none;
  border: solid 2px white;
  color: white;
  cursor: pointer;
  display: inline-block;
  font-family: 'Helvetica', Arial, sans-serif;
  font-size: 0.75em; /* Reduced button font size */
  font-weight: bold;
  outline: none;
  padding: 15px 25px; /* Reduced button padding */
  text-transform: uppercase;
  transition: all 0.3s;
}

#form_button:hover {
  background: white;
  color: #F2F3EB;
}

@media screen and (max-width: 768px) {
  #container {
    margin: 20px auto;
    width: 90%; /* Adjusted the width for smaller screens */
  }
}

@media screen and (max-width: 480px) {
  h1 {
    font-size: 22px; /* Adjusted heading size for smaller screens */
  }
}

@media screen and (max-width: 420px) {
  h1 {
    font-size: 18px; /* Adjusted heading size further for very small screens */
  }
  
  input[type='text'], [type='email'], select, textarea {
    font-size: 0.75em; /* Further reduced font size */
  }
}
