/* =========================
   BASE VARIABLES
========================= */
:root {
  --primary-color: #4361ee;
  --primary-hover: #3a56d4;
  --secondary-color: #6c757d;
  --success-color: #2ec4b6;
  --warning-color: #ff9f1c;
  --danger-color: #e71d36;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  
  /* Custom scrollbar variables */
  --scrollbar-width: 8px;
  --scrollbar-track: #f1f1f1;
  --scrollbar-thumb: #c1c1c1;
  --scrollbar-thumb-hover: #a1a1a1;
}

/* =========================
   CUSTOM SCROLLBAR STYLES
========================= */
/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Hide the arrow buttons on scrollbar */
::-webkit-scrollbar-button {
  display: none;
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Make all slide titles and step labels bold and black */
.register-card h2,
.register-card h4,
.register-card h3,
.register-card h5 {
  font-weight: bold;
  color: #1a1a1a; /* darker for better visibility */
}

/* Make all form labels bold and black */
.form-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem; /* Reduced bottom margin */
  font-size: 0.9rem; /* Slightly smaller */
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
}

/* Required field indicator */
.required::after {
  content: "*";
  color: #e71d36;
  margin-left: 4px;
  font-weight: bold;
}

/* =========================
   GLOBAL STYLES
========================= */

/* =========================
   UNIFIED CONTAINER STYLES
========================= */
.register-card {
  width: 100%;
  max-width: 800px; /* Slightly reduced width */
  min-width: 350px;
  margin: auto;
  padding: 1.75rem; /* Reduced padding */
  box-sizing: border-box;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(67, 97, 238, 0.1);
  min-height: 580px; /* Adjusted minimum height */
  max-height: calc(100vh - 120px); /* Maximum height */
  overflow-y: auto; /* Add scrolling if content is too tall */
}

/* =========================
   STEP INDICATORS
========================= */
.step-indicators {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
  padding-top: 5px;
  padding-bottom: 5px;
}

/* Step line and progress bar */
.step-line {
  position: absolute;
  top: 2rem;
  left: 15%;
  width: 70%;
  height: 4px;
  background-color: #e9ecef;
  z-index: 1;
  border-radius: 4px;
}

.step-progress-bar {
  position: absolute;
  top: 2rem;
  left: 15%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #4895ef);
  z-index: 2;
  transition: width 0.3s ease;
  border-radius: 4px;
}

/* Step circles and styling */
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 33.33%;
  position: relative;
  z-index: 3;
}

.step-circle {
  width: 3.5rem; /* Reduced size */
  height: 3.5rem; /* Reduced size */
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem; /* Smaller font size */
  color: #6c757d;
  margin-bottom: 0.5rem; /* Reduced margin */
  transition: var(--transition);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 5; /* Ensure circles appear above lines */
}

.step.active .step-circle {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 5px rgba(67, 97, 238, 0.2), 0 8px 20px rgba(67, 97, 238, 0.3);
  transform: scale(1.05);
}

.step.completed .step-circle {
  border-color: var(--success-color);
  background: linear-gradient(135deg, var(--success-color), #20a69a);
  color: white;
  box-shadow: 0 8px 15px rgba(46, 196, 182, 0.2);
}

.step-text {
  font-weight: 600;
  font-size: 0.9rem;
  color: #6c757d;
  text-align: center;
  transition: var(--transition);
}

.step.active .step-text {
  color: var(--primary-color);
  transform: scale(1.05);
}

.step.completed .step-text {
  color: var(--success-color);
}

/* =========================
   MULTI-STEP FORM
========================= */
.form-steps-container {
  position: relative;
}

.form-step {
  display: none;
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.form-step.active {
  display: block;
  opacity: 1;
  visibility: visible;
  height: auto;
  overflow: visible;
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   FORM STYLING
========================= */
/* Enhanced Form Controls */
.form-control.input-dark,
.form-select,
.form-control {
  background-color: #f8f9fa;
  border: 1px solid #e7e9f0;
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  height: 2.8rem; /* Reduced height */
  font-size: 0.95rem;
  color: #495057;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02) inset;
  width: 100%; /* Ensure it takes up full width */
}

.form-control.input-dark:focus,
.form-select:focus,
.form-control:focus {
  background-color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15), 0 2px 5px rgba(0, 0, 0, 0.02) inset;
  outline: none;
  transform: translateY(-1px);
}

/* Form control states */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger-color);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15);
}

/* Fix for select elements */
.form-select {
  appearance: none; /* Hide default dropdown arrow */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

/* Required indicator note */
.required-note {
  display: block;
  font-size: 0.75rem;
  color: #777;
  margin-top: 1.25rem;
  text-align: right;
}

.required-note span {
  color: #e71d36;
  font-weight: bold;
  margin-right: 2px;
}

/* Enhanced Button Styling */
.btn-next, 
.btn-prev, 
.btn-submit {
  padding: 0.6rem 1.75rem;
  border-radius: 50px; /* Rounded buttons */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  margin-top: 0; /* Removed margin-top */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  font-size: 0.85rem;
  height: 42px; /* Reduced height */
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-next, .btn-submit {
  background: linear-gradient(135deg, #4361ee, #3a56d4);
  border: none;
  color: white;
}

.btn-next:hover, .btn-submit:hover {
  background: linear-gradient(135deg, #3a56d4, #304ac1);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
  color: white !important;
}

.btn-next i, .btn-submit i {
  transition: transform 0.3s ease;
  margin-left: 8px;
}

.btn-next:hover i, .btn-submit:hover i {
  transform: translateX(4px);
}

.btn-next:after, .btn-submit:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: -1;
}

.btn-next:hover:after, .btn-submit:hover:after {
  transform: translate(-50%, -50%) scale(2);
}

.btn-prev {
  background: #f0f4ff;
  border: none;
  color: var(--primary-color);
  font-weight: 500;
}

.btn-prev i {
  transition: transform 0.3s ease;
  margin-right: 8px;
}

.btn-prev:hover i {
  transform: translateX(-4px);
}

.btn-prev:hover {
  background: #e1e8ff;
  color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.btn-secondary {
  background: linear-gradient(135deg, #2ec4b6, #26a79a);
  border: none;
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #26a79a, #1e8a80);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(46, 196, 182, 0.3);
}

/* Add error message styling */
.field-error {
  font-size: 0.8rem;
  color: #dc3545;
  margin-top: 0.25rem;
}

/* Enhanced row spacing */
.row.g-3 {
  margin-bottom: 0.5rem;
  row-gap: 0.75rem !important; /* More compact spacing between rows */
}

/* Hero container with background styling from index.php */
.container-fluid.hero-landing {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh; /* Fixed height instead of min-height */
  position: relative;
  overflow: hidden;
  background: url('img/about-2.png') center center/cover no-repeat;
  background-color: rgba(0, 0, 0, 0.5);
  background-blend-mode: overlay;
  padding: 80px 0 20px; /* Add padding top for navbar space */
  box-sizing: border-box;
  margin-top: 0; /* Remove any top margin */
}

/* Fix for navbar overlap */
body {
  padding-top: 0 !important; /* Override any padding-top that might be set */
  margin: 0;
  overflow-x: hidden;
}

/* Handle the navbar */
.modern-navbar.transparent-navbar {
  background-color: transparent !important;
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 70px; /* Set explicit height for navbar */
}

/* Make navbar text/links more visible on the dark background */
.modern-navbar.transparent-navbar .navbar-brand,
.modern-navbar.transparent-navbar .nav-link {
  color: white !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Adjust brand logo for better visibility */
.modern-navbar.transparent-navbar .navbar-logo {
  filter: brightness(1.2);
}

/* =========================
   FORM NAVIGATION
========================= */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem;
  align-items: center;
}

/* =========================
   REVIEW SECTION
========================= */
#reviewSection {
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
}

#reviewTable {
  font-size: 0.95rem;
  margin-bottom: 0;
}

#reviewTable td:first-child {
  width: 40%;
  font-weight: bold;
}

.scrollable-review {
  max-height: 400px;
  overflow-y: auto;
  background: #f8f9fa; /* brighter background */
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}

/* List group for review */
.list-group-item {
  background-color: transparent;
  padding: 0.75rem 1rem;
  border-color: #e9ecef;
}

.list-group-item:first-child {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.list-group-item:last-child {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* =========================
   GUIDELINES BOX
========================= */
.guidelines-box {
  background-color: #fff;
  padding: 1.75rem; /* Reduced padding to match register card */
  border-radius: 1.25rem;
  max-width: 450px; /* Adjusted width */
  min-width: 320px;
  margin-bottom: 0; /* Remove bottom margin */
  border: 1px solid rgba(67, 97, 238, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
  min-height: 580px; /* Match height with register-card */
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Add scroll if content gets too tall */
}

.guidelines-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.guidelines-box h3 {
  font-size: 1.5rem; /* Reduced font size */
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem; /* Reduced margin */
  padding-bottom: 0.75rem; /* Reduced padding */
  border-bottom: 2px solid #f0f4ff;
  text-align: center;
}

.guideline-list {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 12px; /* Equal spacing between items */
}

.guideline-list li {
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  background-color: #f8f9ff;
}

.guideline-list li:hover {
  background-color: #f0f4ff;
  transform: translateX(5px);
}

.guideline-list li i {
  background: linear-gradient(135deg, var(--primary-color), #4895ef);
  color: white;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
  transition: transform 0.2s ease;
  flex-shrink: 0; /* Prevent icon from shrinking */
  font-size: 0.9rem; /* Slightly smaller icons */
}

.guideline-list li span {
  display: flex;
  flex-direction: column;
}

.guideline-list li:hover i {
  transform: scale(1.1);
}

/* =========================
   LAYOUT: SIDE BY SIDE
========================= */
.form-layout {
  display: flex;
  justify-content: center;
  align-items: stretch; /* Make sure items stretch to equal height */
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
  padding: 0 20px;
  height: calc(100% - 20px);
}

/* Add an overlay similar to index.php */
.container-fluid.hero-landing:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(20, 30, 48, 0.85), rgba(36, 59, 85, 0.9));
  z-index: 1;
}

/* Add a subtle pattern overlay */
.container-fluid.hero-landing:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: 1;
}

/* Adjust box proportions */
.form-layout .guidelines-box {
  flex: 1 1 400px;
  max-width: 450px;
}

.form-layout .register-card {
  flex: 2 1 650px;
}

/* Checkboxes and radio buttons */
.form-check-input {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.5em;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 102, 202, 0.25);
  border-color: var(--primary-color);
}

/* Make it stack on small screens */
@media (max-width: 992px) {
  .form-layout {
    flex-direction: column;
    gap: 20px;
    padding: 70px 15px 20px; /* Adjusted padding for navbar */
    height: auto;
  }
  
  /* Adjust for smaller screens */
  .container-fluid.hero-landing {
    height: auto;
    min-height: 100vh;
    padding: 80px 0 30px; /* More space for navbar and bottom */
  }
  
  .guidelines-box {
    max-height: 300px; /* Limit height on mobile */
    width: 100%;
    margin-bottom: 20px; /* Add margin between stacked elements */
  }
  
  .register-card {
    max-height: none; /* Let the form take needed space on mobile */
    width: 100%;
  }
}

/* =========================
   RESPONSIVE DESIGN
========================= */
@media (max-width: 576px) {
  .register-card h2 {
    font-size: 1.5rem;
  }
  .register-card h4 {
    font-size: 1.2rem;
  }
  .form-navigation {
    flex-direction: column;
    gap: 0.5rem;
  }
  .btn-prev, .btn-next, .btn-submit {
    width: 100%;
  }
  
  .step-text {
    font-size: 0.75rem;
  }
  
  /* Adjust container height and padding for very small screens */
  .container-fluid.hero-landing {
    padding-top: 70px; /* Space for navbar */
  }
  
  .form-step {
    min-height: auto;
  }
  
  .step-circle {
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .step-text {
    font-size: 0.85rem;
  }
}