/* Resetting default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f2f4f8;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.form-container {
  max-width: 700px;
  width: 90%;
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
  border-bottom: 2px solid #4CAF50;
  padding-bottom: 5px;
}

h2 {
  font-size: 20px;
  color: #4CAF50;
  margin-top: 20px;
  margin-bottom: 10px;
}

section {
  margin-bottom: 20px;
}

label {
  font-size: 14px;
  color: #555;
  margin-top: 10px;
  display: block;
}

input[type="text"],
input[type="date"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

textarea {
  resize: vertical;
}

.year-details {
  display: flex;
  gap: 10px;
}

button {
  width: 100%;
  padding: 12px;
  background-color: #4CAF50;
  color: #fff;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 20px;
}

button:hover {
  background-color: #45a049;
}

/* Year-wise Details container styling */
.year-details {
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* Allows items to wrap */
}

.year-details label {
  flex: 1 1 100%; /* Labels take full width */
}

.year-details input {
  flex: 1 1 100%; /* Inputs take full width */
}

/* Responsive adjustments for mobile devices */
@media (max-width: 600px) {
  .year-details {
    flex-direction: column; /* Stack items vertically on small screens */
  }

  .year-details input {
    width: 100%; /* Ensure inputs take full width on mobile */
  }
}

/* Style for select menus */
select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  background-color: #f9f9f9;
  appearance: none; /* Ensures consistent dropdown in most browsers */
  -webkit-appearance: none; /* Safari and Chrome */
  -moz-appearance: none; /* Firefox */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="%23333" d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* Fix for select menus on Chrome and Safari */
select::-webkit-appearance {
  none;
}

select:-moz-appearance {
  none;
}

/* Focus style */
select:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* Style for required asterisk */
.required {
  color: red;
  font-weight: bold;
}
