* {
  box-sizing: border-box;
}

/* Style the body */
body, html {
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8em;
  color: #666;
}

/* Header/logo Title */
.header {
  padding: 10px;
  text-align: center;
  background: none;
  /* Changed color to visible black instead of transparent */
  color: #000;
}

/* Increase the font size of the heading */
.header h1 {
  font-size: 40px;
}

/* Sticky navbar using flexbox */
.navbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background-color: rgb(252, 2, 2);
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 1000;
  padding: 0 20px;
  overflow: hidden;
  height: 100px;
}

.navbar a {
  display: block;
  color: rgb(7, 7, 7);
  padding: 14px 20px;
  text-decoration: none;
  text-align: center;
}

.navbar a.right {
  /* Removed float: right to avoid conflict with flexbox */
}

.navbar a:hover {
  background-color: #ddd;
  color: black;
}

.navbar a.active {
  background-color: #666;
  color: white;
}

.navbar a:focus {
  outline: 3px solid #ff6f61; /* Accessible focus outline */
  outline-offset: 2px;
}

/* Navigation menu styles */
#menu ul {
  margin: 0;
  padding: 30px 0 0 0;
  list-style: none;
  line-height: normal;
  text-align: center;
}

#menu li {
  display: inline-block;
}

/* Column container */
.row {
  display: -ms-flexbox; /* IE10 */
  display: flex;
  -ms-flex-wrap: wrap; /* IE10 */
  flex-wrap: wrap;
}

/* Sidebar/left column */
.side {
  -ms-flex: 30%; /* IE10 */
  flex: 30%;
  background-color: #f1f1f1;
  padding: 20px;
}

/* Main column */
.main {
  -ms-flex: 70%; /* IE10 */
  flex: 70%;
  background-color: white;
  padding: 20px;
}

/* Background images with improved sizing and responsive heights */
.pimg1, .pimg2, .pimg3, .pimg4 {
  position: relative;
  opacity: 0.7;
  background-position: center center;
  background-size: cover; /* Changed from 100% to cover */
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 50vh; /* Changed from 50% to 50vh for better responsiveness */
}

.pimg1 {
  background-image: url(../images/snugaplug1.jpg);
  background-position: top center;
}

.pimg2 {
  background-image: url(../images/image2.jpg);
}

.pimg3 {
  background-image: url(../images/image1.jpg);
}

.pimg4 {
  background-image: url(../images/snugaplug1.jpg);
  background-position: bottom center;
}

/* Section styles */
.section {
  text-align: center;
  padding: 20px;
}

.section-light {
  background-color: #f1f1f1;
  color: #666;
}

.section-dark {
  background-color: black;
  color: white;
}

/* Text overlay on images */
.ptext {
  position: absolute;
  top: 35%;
  width: 100%;
  text-align: center;
  color: crimson;
  font-size: 27px;
  letter-spacing: 8px;
  text-transform: uppercase;
}

.ptext .border {
  background-color: #111;
  color: #fff;
  padding: 20px;
}

.ptext .border .trans {
  background-color: transparent;
}

/* Contact input */
input[type=text], select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
}

/* Submit button */
input[type=submit] {
  background-color: #4CAF50;
  color: white;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
}

input[type=submit]:hover, input[type=submit]:focus {
  background-color: #45a049;
  outline: none;
}

/* Container for forms */
.container {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 10px;
}

/* Two columns side by side */
.column {
  float: left;
  width: 50%;
  margin-top: 6px;
  padding: 20px;
}

/* Clear floats */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Footer */
.footer {
  padding: 20px;
  text-align: center;
  background: #ddd;
}

/* Error handling */
.form-message {
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.form-error {
  color: red;
}

.form-success {
  color: green;
}

.input-error {
  box-shadow: 0 0 5px red;
}

/* Responsive layout - small devices */
@media screen and (max-width: 700px) {
  .row {
    flex-direction: column;
  }

  .column, input[type=submit] {
    width: 100%;
    margin-top: 0;
  }
}

@media screen and (max-width: 400px) {
  .navbar a {
    float: none;
    width: 100%;
  }
}

/* Larger screen adjustment */
@media (max-width: 1000px) {
  .border {
    line-height: 80px;
  }
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}
