/* Base Styles */
:root {
  --primary-dark: #26225b;
  --primary: #4d7dbf;
  --primary-light: #03949b;
  --secondary: #b2b435;
  --dark-gray: #414142;
  --light-gray: #f5f5f5;
  --white: #ffffff;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-color: var(--light-gray);
  color: var(--dark-gray);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background-color: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  margin-top: 30px;
  margin-bottom: 50px;
}

/* Header Styles */
.header {
  text-align: center;
  padding: 30px 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  border-radius: 10px 10px 0 0;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.05)" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>');
  opacity: 0.1;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
}

.header h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: -5px;
  margin-bottom: 5px;
  position: relative;
}

.header p {
  font-size: 16px;
  opacity: 0.9;
  position: relative;
  margin-bottom: -15px;
}

.logo-container {
  margin-top: -30px;
  margin-bottom: -30px;
}

.logo {
  max-height: 135px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Form Container */
.form-container {
  padding: 0 30px 30px;
}

.section-title {
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 600;
  margin: 30px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100px;
  height: 2px;
  background-color: var(--primary-light);
}

/* Form Elements */
.form-group {
  margin-bottom: 25px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-gray);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(3, 148, 155, 0.2);
  outline: none;
}

/* Radio and Checkbox Styles */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.checkbox-group {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  gap: 40px !important;
}

.checkbox-group .file-upload-group {
  flex: 1 1 calc(50% - 40px) !important; /* Two per row with spacing */
  box-sizing: border-box !important;
  max-width: calc(50% - 40px) !important;
  min-width: 300px;
  padding: 10px;
}

.file-upload-wrapper {
  width: 100% !important;
}

.checkbox-groupp {
  display: inline-grid;
  flex-wrap: wrap;
  gap: 15px;
  padding-right: 25px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  position: relative;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"],
.checkbox-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radio-option label,
.checkbox-option label {
  padding-left: 32px;
  cursor: pointer;
  position: relative;
  margin-bottom: 0;
}

.radio-option label::before,
.checkbox-option label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.checkbox-option label::before {
  border-radius: 5px;
}

.radio-option input[type="radio"]:checked + label::after,
.checkbox-option input[type="checkbox"]:checked + label::after,
.checkbox-option input[type="radio"]:checked + label::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-color: var(--primary);
  border-radius: 50%;
}

.checkbox-option input[type="checkbox"]:checked + label::after,
.checkbox-option input[type="radio"]:checked + label::after {
  background-color: transparent;
  width: 6px;
  height: 12px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: translateY(-60%) rotate(45deg);
  left: 7px;
}

.radio-option input[type="radio"]:focus + label::before,
.checkbox-option input[type="checkbox"]:focus + label::before,
.checkbox-option input[type="radio"]:focus + label::before {
  box-shadow: 0 0 0 3px rgba(3, 148, 155, 0.2);
}

/* Button Styles */
.btn {
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  padding: 14px 30px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(77, 125, 191, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background: linear-gradient(to right, var(--primary-dark), var(--primary));
  box-shadow: 0 6px 20px rgba(77, 125, 191, 0.4);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.text-center {
  text-align: center;
}

/* Declaration Section */
.declaration {
  background-color: rgba(178, 180, 53, 0.1);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--secondary);
}

.declaration p {
  margin-bottom: 15px;
  font-style: italic;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .header h1 {
    font-size: 22px;
  }

  .header h2 {
    font-size: 20px;
  }

  .section-title {
    font-size: 20px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-container {
  animation: fadeIn 0.6s ease-out;
}

/* Floating Labels Effect */
.form-group {
  position: relative;
}

.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
  transform: translateY(-30px) scale(0.9);
  color: var(--primary);
}

/* Custom Select Arrow */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23414142' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 15px;
}

/* File Input Customization */
input[type="file"] {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

input[type="file"] + label {
  display: inline-block;
  padding: 12px 20px;
  background-color: var(--light-gray);
  border: 2px dashed #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  width: 90%;
}

input[type="file"]:focus + label,
input[type="file"] + label:hover {
  border-color: var(--primary-light);
  background-color: rgba(3, 148, 155, 0.05);
}

/* Tooltip for Help Text */
small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #777;
  position: relative;
}

small::before {
  content: "ℹ";
  margin-right: 5px;
  color: var(--primary-light);
}

/* Validation Styles */
input:required:invalid {
  border-color: #ff6b6b;
}

input:required:valid {
  border-color: #51cf66;
}

/* Date Input Placeholder Color */
input[type="text"][placeholder="DD/MM/YYYY"]::placeholder {
  color: #aaa;
}

/* Add this to your CSS */
.file-upload-group {
  margin-bottom: 25px;
}

.file-upload-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.file-upload-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.file-upload-label {
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: rgba(178, 180, 53, 0.05);
  border: 2px dashed var(--secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 15px;
}

.file-upload-label:hover {
  background-color: rgba(178, 180, 53, 0.1);
  border-color: var(--primary-light);
}

.file-upload-icon {
  font-size: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.file-upload-text {
  flex-grow: 1;
}

.file-upload-text strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.file-upload-hint {
  font-size: 14px;
  color: #777;
}

.file-name-display {
  margin-top: 10px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  display: none;
}

.file-error {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

/* File Upload Error State */
.file-upload-wrapper.error .file-upload-label {
  border-color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.05);
}

.file-upload-required {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

/* Show error when input is invalid */
.file-upload-input:invalid ~ .file-upload-required {
  display: block;
}

.file-upload-input:invalid ~ .file-upload-label {
  border-color: #e74c3c;
}
/* Add to your existing CSS */
.academic-history-entry {
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
  position: relative;
}

#add-academic-history {
  margin-top: 10px;
  background-color: #4d7dbf;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#add-academic-history:hover {
  background-color: #3a6ea5;
}

.remove-entry {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.remove-entry:hover {
  background-color: #c0392b;
}
img[src*="logo.png"],
.logo {
  max-width: 90% !important;
  height: auto !important;
  object-fit: contain !important;
}
