/*
========================================
MODERN REGISTER PAGE STYLES - FINAL CORRECTED VERSION
========================================
*/



body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--clr-bg-page);
    color: var(--clr-text-primary);
}

@keyframes slideInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.register-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 85vh;/**/
    padding: 50px 0 100px 0;
}

.register-card {
    display: flex;
    width: 100%;
	max-width: 1500px;
    background: var(--clr-bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: slideInUp 0.6s ease-out forwards;
}

.register-image-panel {
    flex-basis: 60%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
}
.register-image-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}
.image-overlay-text { position: relative; z-index: 1; color: white; }
.image-overlay-text h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.image-overlay-text p { font-size: 1.1rem; opacity: 0.9; }

.register-form-panel {
    flex-basis: 40%;
    padding: 3rem 4.5rem ;
    overflow-y: auto;
}
.form-content h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.form-content p { color: var(--clr-text-secondary); margin-bottom: 2rem; }

/* -- START: FORM SPACING FIX --- */
.form-group {
    margin-bottom: 1.5rem;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}
/* This first grid holds the labels */
.form-group .form-grid:first-of-type {
    margin-bottom: 0.5rem;
}
.form-group .form-grid label {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
	padding-bottom: 8px;
}
/* This only targets labels not in a grid */
.form-group > label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}
/* -- END: FORM SPACING FIX --- */

.form-control, select.form-control {
    width: 100%;
    height: 40px;
   /* padding: 0 1rem; */
    border: 1px solid var(--clr-border);
    border-radius: 0.5rem;
    background: #fdfdfd;
    font-size: 1rem;
    transition: all 0.2s;
	box-sizing: border-box; 
}
select.form-control {
    appearance: none;
    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='%23888ea8' 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 1rem center;
    background-size: 16px 12px;
}
.form-control:focus, select.form-control:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(183, 33, 38, 0.1);
}
.is-invalid {
    border-color: #dc3545;
}
.invalid-feedback {
    font-size: 0.8rem;
    color: #dc3545;
    display: block;
    margin-top: 0.25rem;
}
/* Utility to display multiple feedbacks below a grid */
.invalid-feedback.d-block {
    grid-column: 1 / -1; /* Make it span the full width */
    margin-top: 0.5rem;
}


/* Custom Checkbox */
.custom-checkbox { display: inline-flex; align-items: center; cursor: pointer; user-select: none; font-size: 0.9rem; margin-top: 0.5rem;}
.custom-checkbox input { display: none; }
.custom-checkbox span { position: relative; padding-left: 1.75rem; color: var(--clr-text-primary); }
.custom-checkbox span::before, .custom-checkbox span::after { content: ''; position: absolute; transition: all .25s ease; }
.custom-checkbox span::before {
    left: 0; top: 50%; transform: translateY(-50%); width: 20px;
    height: 20px; border: 2px solid var(--clr-border); border-radius: 4px;
}
.custom-checkbox span::after {
    left: 7px; top: 50%; transform: translateY(-60%) rotate(45deg); width: 6px;
    height: 12px; border: solid white; border-width: 0 3px 3px 0; opacity: 0;
}
.custom-checkbox input:checked + span::before { background: var(--clr-primary); border-color: var(--clr-primary); }
.custom-checkbox input:checked + span::after { opacity: 1; }
.custom-checkbox a { color: var(--clr-primary); text-decoration: none; font-weight: 600; }
.custom-checkbox a:hover { text-decoration: underline; }

.form-check{
    display: flex;
}
.form-check a{
    color: black;
}
#registerForm a {
    text-decoration: none;
}
.form-check-input{
	margin-top: 0;
    margin-right: 10px;
}

/* Button and Links */
.btn-register {
    width: 100%;
    height: 52px;
    background: linear-gradient(45deg, var(--clr-primary-dark), var(--clr-primary));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all .25s ease;
    box-shadow: 0 4px 15px -5px rgba(183, 33, 38, 0.5);
}
.btn-register:hover { transform: translateY(-2px); box-shadow: 0 6px 20px -5px rgba(183, 33, 38, 0.7); }
.links { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }
.links a { color: var(--clr-primary); text-decoration: none; font-weight: 500; }
.links a:hover { text-decoration: underline; }

/* Responsive Design */
@media (max-width: 992px) {
    .register-card { flex-direction: column; }
    .register-image-panel { flex-basis: auto; height: 250px; }
    .register-form-panel { padding: 3rem 2rem; }
}
@media (max-width: 576px) {
    .register-page-container { padding: 0; }
    .register-card { border-radius: 0; min-height: 100vh; }
    .register-image-panel { display: none; }
    .register-form-panel { padding: 2rem 1.5rem; }
    .form-grid { grid-template-columns: 1fr; }
}