* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Login Page Styles */
.login-container {
  background-image: url('../images/bcso_recruiting_app_background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  width: 100%;
  padding: 20px;
  overflow-y: auto;
}

.login-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  z-index: 0;
}

.login-box {
  background: white;
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  padding: 40px;
  max-width: 500px;
  width: 100%;
  position: relative;
  z-index: 1;
  border-top: 5px solid #C1440E;
  margin: 20px 0;
}

.recruiting-header {
  text-align: center;
  margin: -40px -40px 0 -40px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.recruiting-header img {
  width: 100%;
  height: auto;
  display: block;
}

.facility-info {
  text-align: center;
  margin-bottom: 30px;
  padding-top: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #D4A574;
}

.facility-address {
  font-size: 16px;
  font-weight: bold;
  color: #C1440E;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.facility-hours {
  font-size: 14px;
  color: #8B6F47;
  font-weight: 500;
}

.app-process {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #FFF8F0;
  border-left: 5px solid #C1440E;
  border-radius: 4px;
}

.app-process h3 {
  color: #C1440E;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.app-process p {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 10px;
}

.app-process p:last-child {
  margin-bottom: 0;
}

.login-box h2 {
  text-align: center;
  color: #C1440E;
  margin-bottom: 25px;
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #8B6F47;
  font-weight: bold;
  font-size: 14px;
  text-transform: capitalize;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select {
  width: 100%;
  padding: 10px;
  border: 2px solid #E8D4C4;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s;
  background-color: #FFFAF5;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus {
  outline: none;
  border-color: #C1440E;
  box-shadow: 0 0 8px rgba(193, 68, 14, 0.2);
  background-color: white;
}

.login-form button {
  background-color: #C1440E;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  display: block;
}

.login-form button:hover {
  background-color: #B73E1D;
  box-shadow: 0 5px 15px rgba(193, 68, 14, 0.3);
  transform: translateY(-2px);
}

.form-links {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #555;
}

.form-links a {
  color: #C1440E;
  text-decoration: none;
  font-weight: bold;
  margin: 0 5px;
}

.form-links a:hover {
  text-decoration: underline;
  color: #B73E1D;
}

.messages {
  margin-bottom: 20px;
}

.message {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  font-size: 14px;
}

.message.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.message.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.message.warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.error-message {
  color: #C1440E;
  font-size: 12px;
  margin-top: 4px;
}

.help-text {
  display: block;
  font-size: 12px;
  color: #8B6F47;
  margin-top: 4px;
}

/* Other page styles */
header {
  background-color: #8B6F47;
  color: white;
  padding: 20px;
  text-align: center;
  border-bottom: 4px solid #C1440E;
}

header h1 {
  margin: 0;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #FFFAF5;
}

/* Responsive Design */
@media (max-width: 600px) {
  .login-box {
    padding: 20px 15px;
    margin: 10px;
  }

  .login-box h2 {
    font-size: 18px;
  }

  .recruiting-header {
    margin: -20px -15px 0 -15px;
  }

  .facility-address {
    font-size: 14px;
  }

  .facility-hours {
    font-size: 12px;
  }

  .app-process {
    padding: 12px;
    margin-bottom: 15px;
  }

  .app-process h3 {
    font-size: 15px;
  }

  .app-process p {
    font-size: 13px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 12px;
  }

  .login-form button {
    padding: 14px;
    font-size: 16px;
  }

  .password-requirements {
    padding: 12px;
  }

  .password-requirements ul {
    font-size: 0.85em;
  }
}

/* Enhanced Mobile Styles for Questionnaires */
@media (max-width: 768px) {
  .questionnaire-container {
    padding: 10px;
  }

  .questionnaire-container h2 {
    font-size: 20px;
    text-align: center;
  }

  .section {
    padding: 15px;
    margin-bottom: 15px;
  }

  .section h3 {
    font-size: 16px;
    padding-bottom: 8px;
    margin-bottom: 15px;
  }

  .question-block {
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  .question-label {
    font-size: 14px;
    line-height: 1.4;
  }

  .radio-group {
    flex-direction: column;
    gap: 12px;
  }

  .radio-group label {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #ddd;
  }

  .radio-group input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
  }

  .form-control {
    font-size: 16px;
    padding: 12px;
  }

  .pagination-controls {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .pagination-controls button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }

  #section-indicator {
    order: -1;
    margin-bottom: 5px;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .form-actions .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    text-align: center;
  }

  .notice {
    padding: 12px;
    font-size: 13px;
  }

  .class-info {
    padding: 10px 12px;
    font-size: 14px;
  }

  .checkbox-label {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
  }

  .checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    flex-shrink: 0;
  }

  .follow-up-field input,
  .explanation-field textarea {
    font-size: 16px;
    padding: 12px;
  }
}

/* Validation Styles */
.field-error {
  border-color: #dc3545 !important;
  background-color: #fff8f8 !important;
}

.validation-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

.section-error {
  border-left: 4px solid #dc3545 !important;
}

.validation-summary {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.validation-summary ul {
  margin: 10px 0 0 20px;
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 48px;
  }

  .radio-group label,
  .checkbox-label {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    min-height: 48px;
  }
}
