/* Mobile Background Fixed Alternative */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari specific styles */
  .intro,
  .info {
    background-attachment: scroll !important;
    position: relative;
  }
  
  /* Create fixed background effect using pseudo-element */
  .intro::before,
  .info::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: inherit;
    background-size: cover;
    background-position: center center;
    z-index: -1;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

/* Alternative: Disable fixed background on all touch devices */
@media (hover: none) and (pointer: coarse) {
  .intro,
  .info {
    background-attachment: scroll !important;
  }
}

/* Contact Form Improvements */
#contact {
  padding-bottom: 3em !important; /* Add space before footer */
}

/* Form field visibility improvements */
input[type="text"],
input[type="password"], 
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
select,
textarea {
  border-color: #2c5aa0 !important; /* More visible blue border */
  color: #2d3748 !important; /* Darker text color */
  background: rgba(255, 255, 255, 0.95) !important; /* Slightly more opaque background */
}

/* Placeholder text improvements */
input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="search"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
  color: #4a5568 !important; /* Darker placeholder text */
  opacity: 0.7 !important; /* More visible than 0.375 */
}

/* Focus state improvements */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: #1a365d !important; /* Darker blue on focus */
  box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.2) !important;
}

/* Contact section background enhancement */
#contact .box {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(26, 54, 93, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Fix mobile menu visibility */
#header {
  position: fixed !important;
  z-index: 10000 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
}

#menu {
  z-index: 10001 !important;
}

/* Mobile menu toggle button */
.navPanelToggle {
  z-index: 10002 !important;
  position: fixed !important;
  top: 1em !important;
  right: 1em !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure menu button is visible on mobile */
@media screen and (max-width: 980px) {
  .navPanelToggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #2c5aa0 !important;
  }
}

/* Ensure backgrounds stay behind content */
.mobile-bg-fix,
.parallax-bg,
.parallax-container {
  z-index: -1 !important;
}

/* Ensure section content is above backgrounds */
section > *:not(.mobile-bg-fix):not(.parallax-bg):not(.parallax-container) {
  position: relative;
  z-index: 1;
}