:root {
  --primary-color: #4A90E2;
  --primary-hover: #357ABD;
  --secondary-color: #F5F7FA;
  --text-primary: #2C3E50;
  --text-secondary: #7F8C8D;
  --border-color: #E1E8ED;
  --bg-color: #E8F0FE;
  --error-color: #E74C3C;
  --card-bg: #FFFFFF;
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.registration-container {
  width: 100%;
  max-width: 800px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 3rem;
  overflow: hidden;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-color), #8E44AD);
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header-row h2 {
  margin-bottom: 0;
}

.section-header-row span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: none;
  font-weight: 400;
  margin-left: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.row {
  display: flex;
  gap: 1.5rem;
}

.input-container {
  display: flex;
  flex-direction: column;
}

.half-width {
  flex: 1;
}

.full-width {
  width: 100%;
}

label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.required {
  color: var(--error-color);
}

input[type="text"],
input[type="tel"],
input[type="date"],
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
  background-color: var(--secondary-color);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* File Upload Custom Styling */
.file-upload-wrapper {
  position: relative;
  width: 100%;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background-color: var(--secondary-color);
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
}

.file-upload-wrapper:hover {
  border-color: var(--primary-color);
  background-color: #f0f4f8;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-upload-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1;
}

.small-upload .file-upload-visual {
  padding: 0.8rem;
  flex-direction: row;
  gap: 0.5rem;
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.small-upload .upload-icon {
  font-size: 1.2rem;
  margin-bottom: 0;
}

.upload-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked+.slider {
  background-color: var(--primary-color);
}

input:checked+.slider:before {
  transform: translateX(24px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Hidden Section Animation */
.hidden-section {
  max-height: 500px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.hidden-section.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

/* Custom Radio Buttons */
.sacrament-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.sacrament-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sacrament-header h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
}

.radio-group {
  display: flex;
  gap: 1.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 400;
  margin: 0;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  background: #fff;
  transition: var(--transition);
}

.radio-label input[type="radio"]:checked+.radio-custom {
  border-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked+.radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
}

/* Buttons */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 3rem;
}

.btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(74, 144, 226, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #E1E8ED;
}

/* Responsive */
@media (max-width: 768px) {
  .row {
    flex-direction: column;
    gap: 1rem;
  }

  .card {
    padding: 2rem 1.5rem;
  }

  .sacrament-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}