/* --- Application Page Specific Styles --- */

body {
    background-color: #EDEBE3; /* Consistent off-white background */
}

.application-container {
    max-width: 800px; /* Optimal width for a form */
    margin: 0 auto;
    padding-top: 120px; /* Space from fixed nav */
    padding-bottom: 5rem;
}

/* --- NEW: Availability Notice Panel --- */
.availability-notice {
    background-color: #ffffff;
    border: 1px solid #d8d6cf;
    border-left: 4px solid #4a5ff7; /* Accent color */
    padding: 1.5rem;
    margin-bottom: 3rem;
    border-radius: 4px;
}

.availability-notice p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.availability-notice a {
    color: #4a5ff7;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.availability-notice a:hover {
    color: #272F47;
}


/* --- Preamble --- */
.application-preamble {
    text-align: center;
    margin-bottom: 3rem;
}

.application-preamble p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555; /* Dark, readable grey */
    max-width: 700px;
    margin: 0 auto 1rem;
}

.application-preamble p.emphasis {
    font-style: italic;
    font-weight: 600;
    color: #2c3e50;
}


/* --- Form Panel Styling --- */
.application-form {
    background: #ffffff;
    padding: 3rem;
    border-radius: 6px; /* Sharper corners */
    border: 1px solid #d8d6cf;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
}

.form-section {
    margin-bottom: 2.5rem;
    /* === ADDED: Properties for hide/show animation === */
    max-height: 1000px; /* High value to not clip content */
    overflow: hidden;
    opacity: 1;
    transition: all 0.4s ease-out;
}

/* === ADDED: More robust hidden class for sections === */
.form-section.hidden {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
}


.form-section-title {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    color: #2c3e50;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

/* --- Form Field Styling --- */
.form-field {
    margin-bottom: 1.5rem;
    max-height: 300px; 
    overflow: hidden;
    opacity: 1;
    transition: all 0.4s ease-out;
}

.form-field.hidden {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
}


.form-field label,
.form-field-checkbox label {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.required-asterisk {
    color: #e63946;
    margin-left: 2px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px; /* Sharper corners */
    background-color: #f8f9fa;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #4a5ff7;
    box-shadow: 0 0 0 3px rgba(74, 95, 247, 0.15);
}

.form-field textarea {
    min-height: 150px;
    resize: vertical;
}

.field-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Radio Buttons */
.radio-group { display: flex; gap: 1.5rem; }
.radio-option { display: flex; align-items: center; }
.radio-option input[type="radio"] { margin-right: 0.5rem; }
.radio-option label { margin-bottom: 0; font-weight: 400; }

/* Checkbox */
.form-field-checkbox { display: flex; align-items: flex-start; }
.form-field-checkbox input[type="checkbox"] { margin-top: 4px; margin-right: 0.75rem; }
.form-field-checkbox label { font-weight: 400; }


/* --- Submission Button --- */
.submit-button {
    display: block;
    width: 100%;
    padding: 0.85rem 2.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #4a5ff7, #6b7fff);
    color: white;
    border: none;
    cursor: pointer;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 95, 247, 0.4);
}

.submit-button:disabled {
    background: #ced4da;
    cursor: not-allowed;
}

/* --- Messages and Panels --- */
.error-message {
    color: #e63946;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.success-panel {
    background: #ffffff;
    padding: 3rem;
    border-radius: 6px; /* Sharper corners */
    border: 1px solid #d8d6cf;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
    text-align: center;
}
.success-panel h2 {
    font-family: 'Lora', serif;
    color: #2c3e50;
    margin-bottom: 1rem;
}
.success-panel p {
    color: #555;
    line-height: 1.6;
}

.honeypot-field {
    display: none;
}

/* --- Return Home Button Style --- */
.return-home-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: transparent;
    color: #272F47;
    border: 1px solid #272F47;
}

.return-home-btn:hover {
    background-color: #272F47;
    color: #ffffff;
    transform: translateY(-2px);
}