/* Reset default styles and make form full screen */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  /* Fallback background color */
  background-color: #f8e5e5;
  /* Background image settings */
  background-image: url("/img/sr-logo-3d_c.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.google-form-section {
  width: 100%;
  height: 100vh;
  position: relative;
}

.google-form-section iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  /* Make iframe semi-transparent */
  opacity: 0.95;
}

/* Responsive Design - Mobile First */
@media screen and (max-width: 768px) {
  body {
    /* Adjust background for mobile */
    background-position: center top;
    background-size: cover;
    background-attachment: scroll; /* Better performance on mobile */
  }

  .google-form-section iframe {
    /* Better readability on mobile */
    opacity: 0.98;
  }
}

/* Tablet styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  body {
    background-position: center center;
  }

  .google-form-section iframe {
    opacity: 0.96;
  }
}

/* Large Desktop styles */
@media screen and (min-width: 1440px) {
  .google-form-section {
    /* Center the form on very large screens */
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
  }
}

/* Ultra-wide screens */
@media screen and (min-width: 2560px) {
  .google-form-section {
    max-width: 1920px;
  }
}

/* Landscape orientation optimizations */
@media screen and (orientation: landscape) and (max-height: 600px) {
  .google-form-section iframe {
    /* Ensure form is fully visible on landscape mobile */
    opacity: 0.98;
  }
}

/* High DPI screens */
@media screen and (-webkit-min-device-pixel-ratio: 2),
  screen and (min-resolution: 192dpi) {
  body {
    /* Ensure crisp background on retina displays */
    background-size: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated; /* Modern browsers */
  }
}

/* Print styles */
@media print {
  body {
    background: white !important;
  }

  .google-form-section iframe {
    opacity: 1 !important;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #2d1b1b;
  }

  .google-form-section iframe {
    /* Keep form readable in dark mode */
    opacity: 0.97;
  }
}
