body {
  font-family: 'Montserrat', sans-serif;
  background-color: rgb(250, 245, 238);
  color: #333;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  height: 100vh; /* Ensure body takes full viewport height */
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit; /* Inherit the background from body */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1; /* Place behind content */
}

.survey-container {
  max-width: 850px;
  margin: 30px auto;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.survey-header {
  color: #fff;
  padding: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.survey-header img {
  width: 200px;
  height: 209px;
  -webkit-filter: drop-shadow(5px 5px 5px #222);
  filter: drop-shadow(5px 5px 5px #222);
}

.survey-header img:hover {
  transform: rotate(360deg);
}

.survey-header h1 {
  font-family: 'Garamond', serif;
  font-size: 1.8rem;
  margin: 0;
  line-height: 1.2;
}

.slide {
  padding: 30px;
  display: none;
  min-height: 350px;
  text-align: center;
  position: relative;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  display: block;
  opacity: 1;
}

.slide > * {
  position: relative;
  z-index: 1;
}

.slide h2 {
  font-family: 'Garamond', serif;
  font-size: 2.1rem;
  color: #fafafa;
  margin-bottom: 25px;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.form-control {
  max-width: 400px;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 12px 18px;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(to right, #fff, #f9f9f9);
  color: #333;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  background-clip: padding-box;
  position: relative;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  resize: vertical;
}

.form-control::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 10px;
  padding: 1px;
  background: linear-gradient(90deg, #a68a64, #6b4e31);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

.form-control:hover {
  box-shadow: 0 5px 15px rgba(107, 78, 49, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.form-control:focus {
  box-shadow: 0 6px 18px #aa8453, inset 0 1px 2px #aa8453;
  transform: translateY(-2px);
  outline: none;
}

.form-control::placeholder {
  color: #aaa;
  font-style: italic;
}

.number-rating {
  display: flex;
  justify-content: center;
  margin: 25px 0;
}

.radio-label {
  font-size: 20px; /* Increase size */
  padding: 10px 20px;
  display: inline-block;
  cursor: pointer;
}

.rating-table {
  border-collapse: collapse;
}

.rating-table td {
  text-align: center;
  padding: 0;
}

.rating-table input {
  display: none;
}

.rating-table label {
  display: inline-block;
  width: 61px;
  height: 61px;
  line-height: 61px;
  background: #fff;
  border: 1px solid #ddd;
  border-right: none; /* Remove right border for all except the last */
  font-size: 1.2rem;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Ensure the first label has rounded left corners */
.rating-table tr td:first-child label {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

/* Ensure the last label has rounded right corners and right border */
.rating-table tr td:last-child label {
  border-right: 1px solid #ddd;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.rating-table label:hover {
  background: #f5e9d8;
  border-color: #6b4e31;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(107, 78, 49, 0.2);
}

.rating-table input:checked + label {
  background: linear-gradient(90deg, #6b4e31 0%, #a68a64 100%);
  color: #fff;
  border-color: #6b4e31;
}

.conditional-input {
  display: none;
  margin-top: 20px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.conditional-input.active {
  display: block;
  opacity: 1;
}

.conditional-input label {
  display: block;
  font-size: 1rem;
  color: #fafafa;
  margin-bottom: 10px;
}

.conditional-input textarea {
  max-width: 400px;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.conditional-input textarea:focus {
  border-color: #6b4e31;
  box-shadow: 0 0 5px rgba(107, 78, 49, 0.3);
  outline: none;
}

/* Navigation Buttons */
.nav-buttons {
  position: fixed;
  bottom: 60px; /* Adjusted to be above the progress bar */
  right: 20px;
  display: flex;
  gap: 10px; /* Space between buttons */
  background: none; /* Remove background */
  border-top: none; /* Remove border */
  padding: 0; /* Remove padding */
}

/* Progress Bar Container */
.progress-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0px 0px;
  z-index: 1000; /* Ensure it stays above other elements */
}

.progress {
  height: 12px;
  width: 100%; /* Full width */
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #6b4e31 0%, #a68a64 100%);
  border-radius: 10px;
  transition: width 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 400;
  color: #fff;
}

.btn-primary {
  background: linear-gradient(90deg, #6b4e31 0%, #a68a64 100%);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
}

.nav-buttons .btn-primary {
  padding: 10px; /* Smaller padding for chevron buttons */
  width: 40px; /* Fixed width for symmetry */
  height: 40px; /* Fixed height for symmetry */
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #a68a64 0%, #6b4e31 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(107, 78, 49, 0.3);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Style the Font Awesome icons */
.nav-buttons .btn-primary i {
  color: #fff; /* Icon color */
}

/* Action Buttons (Submit and Go to Home) */
.action-buttons {
  text-align: center;
  margin-top: 30px; /* Increased spacing for better alignment */
}

.action-button {
  text-align: center;
  margin-top: 30px; /* Increased spacing for better alignment */
  margin-left: 42%; /* Increased spacing for better alignment */
}

.action-buttons .btn-primary {
  padding: 12px 30px; /* Larger padding for Submit button */
  font-size: 1.1rem;
}

/* Thank You Slide */
.thank-you {
  text-align: center;
  padding: 40px;
}

.thank-you h2 {
  font-family: 'Garamond', serif;
  font-size: 1.8rem;
  color: #fafafa;
  margin-bottom: 15px;
}

.thank-you p {
  font-size: 1rem;
  color: #fafafa;
  margin: 5px 0;
}

/* Responsive Design with Bootstrap Breakpoints */
@media (max-width: 576px) { /* Bootstrap's xs breakpoint (mobile) */
  .survey-container {
    margin: 10px; /* Reduced margin for smaller screens */
    border-radius: 10px;
  }

  .survey-header {
    padding: 10px;
    gap: 8px;
  }

  .survey-header img {
    width: 250px; /* Smaller logo for mobile */
    height: auto;
  }

  .survey-header h1 {
    font-size: 1.4rem;
  }

  .slide {
    padding: 50px;
    min-height: 250px; /* Reduced height for mobile */
    margin-top: 150px;;
  }

  .slide h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  .form-control {
    max-width: 100%; /* Full width on mobile */
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .number-rating {
    margin: 15px 0;
  }

  .radio-label {
    font-size: 16px;
    padding: 8px 15px;
  }

  .rating-table label {
    width: 45px; /* Smaller rating buttons */
    height: 45px;
    line-height: 45px;
    font-size: 1rem;
  }

  .conditional-input {
    margin-top: 15px;
  }

  .conditional-input label {
    font-size: 0.9rem;
  }

  .conditional-input textarea {
    max-width: 100%; /* Full width on mobile */
    font-size: 0.9rem;
  }

  .nav-buttons {
    bottom: 40px; /* Adjusted for mobile */
    right: 10px;
    gap: 8px;
  }

  .nav-buttons .btn-primary {
    width: 35px;
    height: 35px;
    padding: 8px;
  }

  .progress-container {
    padding: 5px 0; /* Adjusted padding */
  }

  .progress {
    height: 10px;
  }

  .progress-bar {
    font-size: 0.4rem;
  }

  .btn-primary {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .action-buttons {
    margin-top: 20px;
  }

  .action-buttons .btn-primary {
    padding: 10px 25px;
    font-size: 1rem;
  }

  .thank-you {
    padding: 20px;
  }

  .thank-you h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .thank-you p {
    font-size: 0.9rem;
  }
}

@media (min-width: 577px) and (max-width: 768px) { /* Bootstrap's sm-md breakpoint (tablet) */
  .survey-container {
    margin: 15px;
    border-radius: 12px;
  }

  .survey-header {
    padding: 15px;
    gap: 10px;
  }

  .survey-header img {
    width: 150px; /* Slightly smaller logo for tablet */
    height: auto;
  }

  .survey-header h1 {
    font-size: 1.6rem;
  }

  .slide {
    padding: 20px;
    min-height: 300px;
  }

  .slide h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .form-control {
    max-width: 350px; /* Slightly smaller than desktop */
    padding: 11px 15px;
    font-size: 0.95rem;
  }

  .number-rating {
    margin: 20px 0;
  }

  .radio-label {
    font-size: 18px;
    padding: 9px 18px;
  }

  .rating-table label {
    width: 55px; /* Slightly smaller than desktop */
    height: 55px;
    line-height: 55px;
    font-size: 1.1rem;
  }

  .conditional-input {
    margin-top: 18px;
  }

  .conditional-input label {
    font-size: 0.95rem;
  }

  .conditional-input textarea {
    max-width: 350px;
    font-size: 0.95rem;
  }

  .nav-buttons {
    bottom: 50px;
    right: 15px;
    gap: 9px;
  }

  .nav-buttons .btn-primary {
    width: 38px;
    height: 38px;
    padding: 9px;
  }

  .progress-container {
    padding: 6px 0;
  }

  .progress {
    height: 11px;
  }

  .progress-bar {
    font-size: 0.45rem;
  }

  .btn-primary {
    padding: 9px 18px;
    font-size: 0.95rem;
  }

  .action-buttons {
    margin-top: 25px;
  }

  .action-buttons .btn-primary {
    padding: 11px 28px;
    font-size: 1.05rem;
  }

  .thank-you {
    padding: 30px;
  }

  .thank-you h2 {
    font-size: 1.7rem;
    margin-bottom: 12px;
  }

  .thank-you p {
    font-size: 0.95rem;
  }
}

@media (min-width: 769px) { /* Bootstrap's lg and up (desktop) */
  /* Default styles above are for desktop, so minimal changes needed */
  .survey-container {
    margin: 30px auto;
  }

  .survey-header img {
    width: 250px; /* Original size */
    height: 240px;
  }

  .form-control {
    max-width: 400px; /* Original size */
  }

  .rating-table label {
    width: 61px; /* Original size */
    height: 61px;
    line-height: 61px;
  }

  .conditional-input textarea {
    max-width: 400px; /* Original size */
  }
}