/* General Body Styling */
body {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    margin: 0;
    padding: 0; /* Remove old padding */
    
    /* Removed background-image and set color to transparent */
    background-color: #ffffff; 

    /* These lines are no longer needed but don't hurt */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* --- THIS IS THE LAYOUT FIX --- */
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
    box-sizing: border-box;
}
/* --- NEW STYLES FOR HEADER, FOOTER, AND LAYOUT --- */

header {
    width: 100%;
    background-color: #ffffff; /* Solid white background */
    padding: 1.25rem 0; /* 20px */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
    color: #7A1E1E; /* Dark blue text to match your form */
    flex-shrink: 0; /* Prevents header from shrinking */
    /* We add box-sizing here in case you add borders/padding */
    box-sizing: border-box; 
}

header h1 {
    margin: 0;
    font-size: 1.75rem; /* 28px */
    font-weight: 600;
}

/* This is the div that holds your form card. */
/* It will grow to fill the space and center the form. */
.form-container {
    flex-grow: 1; /* Fills the space between header and footer */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem; /* Adds spacing for the form */
    box-sizing: border-box;
    background-color: #fff;
}

footer {
    width: 100%;
    background-color: #f8f9fa; /* Light grey background */
    padding: 1.5rem 0; /* 24px */
    text-align: center;
    color: #6c757d; /* Muted text color */
    border-top: 1px solid #e9ecef; /* Light top border */
    flex-shrink: 0; /* Prevents footer from shrinking */
    box-sizing: border-box;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* --- YOUR EXISTING STYLES BELOW --- */
/* (No changes needed from here down) */

/* The main white form container */
.form-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}
/* --- CSS for Step-by-Step Form --- */
.step {
    display: none; /* Hide all steps by default */
}

.step.active {
    display: block; /* Show only the active step */
}

/* Back button from screenshot */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(122, 30, 30, 0.85), rgba(90, 15, 15, 0.95));
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.back-btn:hover {
   transform: scale(1.1);
  background-color: #7a0000; /* Slightly darker light blue on hover */
}

/* Profile Icon at the top */
.profile-icon {
    width: 60px;
    height: 60px;
    background: #7A1E1E; /* Dark blue from screenshot buttons */
    border-radius: 50%;
    margin: 0 auto 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    /* This negative margin pulls it "up" slightly, overlapping the padding */
    margin-top: -10px; 
}

h2 {
    color: #000000; /* Dark navy blue */
    margin-bottom: 5px;
}

.subtitle {
    color: #000000;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Styling for form fields */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box; /* Important for correct padding */
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #7A1E1E;
    box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.2);
}

/* Button Group */
.button-group {
    display: flex;
    justify-content: space-between;
    gap: 15px; /* Adds space between buttons */
    margin-top: 25px;
}

.btn {
    flex: 1; /* Makes both buttons share the space equally */
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}
/* --- Button Group Fix --- */

/* This is your NEW Primary "Continue" Button */
.btn-primary {
    background:maroon; /* Deep Maroon Red */
    color:white;
    text-align: center;
    border: 1px solid #990000;
    text-decoration: none; 
    padding-bottom: -40px;
}
.btn-primary:hover {
    background: #a12a2a; /* A slightly darker red */
    
}

/* This is your NEW Secondary "Register" Button */
.btn-secondary {
    background: maroon;      /* Make background see-through */
    color: white;           /* Set text to maroon */
    border: 1px solid #990000;
    text-decoration: none; /* Add a maroon border */
}

.btn-secondary:hover {
    background: #a12a2a;      /* Fill with maroon on hover */           /* Make text white on hover */
}

/* Error Message Styling */
#error-message {
    color: #d93025; /* Red for errors */
    font-size: 14px;
    margin-top: 15px;
    text-align: left;
    display: none; /* Hidden by default */
}
/* Custom Modal CSS */
.hidden {
    display: none;
}

#custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 1001;
}

#custom-alert-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 340px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 1002;
    font-family: Arial, sans-serif;
    animation: fadeIn 0.3s ease-out;
}

#custom-alert-box .success-icon {
    margin-bottom: 10px;
}

#custom-alert-box h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

#custom-alert-box p {
    color: #666;
    font-size: 16px;
    margin-top: 10px;
}

#custom-alert-box button {
    /* Styled to match your "Continue" button */
    background: linear-gradient(135deg, rgba(122, 30, 30, 0.85), rgba(90, 15, 15, 0.95));
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: background-color 0.2s;
}

#custom-alert-box button:hover {
    background-color: #8f3333;
}

/* Simple fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
/* --- Styles for Radio Buttons --- */
.radio-button-group {
  display: flex;
  flex-wrap: wrap; /* Allows buttons to wrap to the next line */
  gap: 10px; /* Spacing between buttons */
  margin-top: 10px;
}

/* Hide the actual radio button circle */
.radio-button-group input[type="radio"] {
  display: none;
}

/* Style the label (our new button) */
.radio-button-group label {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #990000;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;  /* Prevents text from wrapping */
  text-align: center;   /* Centers the text in the button */
}

/* Style for the label on hover */
.radio-button-group label:hover {
  border: 1px solid #990000;
 background: #7a0000;
 color: #ffffff;
}

/* Style for the label when its radio button is checked */
.radio-button-group input[type="radio"]:checked + label {
  background: #7a0000;
  color: white;
  border: 1px solid #990000;
}
/* --- New rule for 3-column button grid --- */
.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* This creates 3 equal columns */
}
/* --- Mobile Responsive Styles --- */

@media (max-width: 500px) {

    /* Makes the form container have less side padding */
    .form-container {
        padding: 1rem 0.5rem;
    }

    /* Reduces padding inside the white form card */
    .form-card {
        padding: 20px;
    }

    /* This is the main fix:
       Changes the 3-column grid to a 2-column grid on small screens */
    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}