/*********************************
 Contact Form Styling Improvements
*********************************/

.contact_form_teach {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Larger font size and adjusted spacing for the form title */
.contact_form_teach h3 {
    font-size: 26px; /* Increased size for better heading visibility */
    font-weight: bold;
    margin-bottom: 20px;
    color: #384158;
}

h2 {
    margin-bottom: 20px;
}

/* Input, select, and textarea improvements */
.contact_form_teach input[type="text"],
.contact_form_teach input[type="email"],
.contact_form_teach input[type="tel"],
.contact_form_teach input[type="date"],
.contact_form_teach textarea,
.contact_form_teach select {
    width: 100%;
    padding: 12px 15px; /* Increased padding for better focus */
    margin-bottom: 20px;
    font-size: 18px; /* Larger font for more accessible inputs */
    line-height: 1.6; /* Added better line height for readability */
    color: #656668;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background: #fafafa;
    transition: border 200ms ease;
}

/* Adjusted textarea height */
.contact_form_teach textarea {
    height: 120px; /* Increased height for comfortable typing */
}

/* Focus effect for inputs, matches style while being noticeable */
.contact_form_teach input[type="text"]:focus,
.contact_form_teach input[type="email"]:focus,
.contact_form_teach input[type="tel"]:focus,
.contact_form_teach input[type="date"]:focus,
.contact_form_teach textarea:focus,
.contact_form_teach select:focus {
    border-color: #db5246;
    outline: none;
}

/* Fieldset adjustments */
.contact_form_teach fieldset {
    margin-bottom: 30px;
    border: 1px solid #dddddd;
    padding: 20px; /* Increased padding */
    border-radius: 6px;
    background: #f9f9f9;
}

/* Larger font size for fieldset legends */
.contact_form_teach fieldset legend {
    font-size: 20px; /* Larger legend font size */
    font-weight: bold;
    padding: 0 10px;
    color: #384158;
}

/* Label improvements */
.contact_form_teach label {
    font-size: 16px; /* Increased label font size */
    font-weight: 600; /* Made labels slightly more prominent */
    color: #384158;
    display: block;
    margin-bottom: 10px;
}

/* Checkbox and radio labels */
.contact_form_teach input[type="checkbox"] + label,
.contact_form_teach input[type="radio"] + label {
    font-size: 16px; /* Adjusted font size */
    display: inline-block;
    margin-right: 15px;
    color: #656668;
}

/* Submit button adjustments */
.contact_form_teach button[type="submit"],
.contact_form_teach .form_button {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 25px; /* Increased button size */
    font-size: 18px; /* Enlarged button text */
    font-weight: bold;
    color: #ffffff;
    background-color: #db5246;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 200ms ease;
}

.contact_form_teach button[type="submit"]:hover,
.contact_form_teach .form_button:hover {
    background-color: #a9392b;
}

/* Notes or helper text styling */
.contact_form_teach .note {
    font-size: 15px; /* Slightly larger for legibility */
    color: #747474;
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact_form_teach {
        padding: 20px;
    }

    .contact_form_teach h3 {
        font-size: 24px;
    }

    .contact_form_teach input[type="text"],
    .contact_form_teach input[type="email"],
    .contact_form_teach input[type="tel"],
    .contact_form_teach textarea,
    .contact_form_teach select {
        font-size: 16px; /* Slightly smaller for mobile */
    }

    .contact_form_teach label {
        font-size: 15px; /* Adjust for smaller screens */
    }

    .contact_form_teach fieldset legend {
        font-size: 18px; /* Adjust for smaller screens */
    }
}

/* Apply grid layout for checkbox groups */
.contact_form_teach .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjust column width */
    gap: 10px; /* Space between checkboxes */
    margin-bottom: 20px;
}

/* Ensure individual checkbox and label are aligned properly */
.contact_form_teach .checkbox-grid label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #656668; /* Matches main style */
}

/* Reduce vertical space for inline checkboxes */
.contact_form_teach .checkbox-grid input[type="checkbox"] {
    margin-right: 8px; /* Space between checkbox and label text */
}

/* Ensure select inputs have adequate height and alignment */
.contact_form_teach select {
    width: 100%;
    padding: 12px 15px; /* Same as other inputs */
    margin-bottom: 20px;
    font-size: 18px;
    color: #656668;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background: #fafafa;
    line-height: normal; /* Reset any inherited line-height issue */
    height: 50px; /* Explicit height to prevent clipping */
    box-sizing: border-box; /* Ensure padding doesn’t affect box dimensions */
    appearance: none; /* To control custom styling across browsers */
}

/* Style for placeholder options (e.g., --Select--) */
.contact_form_teach select option {
    font-size: 18px;
    line-height: 1.5; /* Makes option text consistent across browsers */
}

/* Allow for box expansion if necessary */
.contact_form_teach select:focus {
    border-color: #db5246;
    outline: none;
}

/* Add a fix for placeholder-like options to ensure better readability */
.contact_form_teach select option:disabled {
    color: #a5a5a5; /* Grey out the placeholder text */
}

/* Checkbox grid styling – ensure text size is adjusted for checkboxes */
.contact_form_teach .checkbox-grid label {
    font-size: 16px; /* Increased font size to match form labels */
    color: #384158; /* Use a clearer color for better readability */
    font-weight: 500; /* Match the boldness of other labels */
    display: flex;
    align-items: center; /* Proper alignment of checkbox and text */
}

/* Ensure adequate spacing between checkboxes and their labels */
.contact_form_teach .checkbox-grid input[type="checkbox"] {
    margin-right: 10px; /* Adjust spacing between checkbox and text */
}

/* General Checkbox and Radio Label Styling */
.contact_form_teach input[type="checkbox"] + label,
.contact_form_teach input[type="radio"] + label {
    font-size: 16px; /* Ensure it matches the grid font size */
    font-weight: 500; /* Make it consistent with labels */
    color: #384158; /* Sharper text color for better visibility */
}

/* Custom checkbox styling: Hide the default checkbox */
.contact_form_teach input[type="checkbox"] {
    appearance: none; /* Remove default styling */
    -webkit-appearance: none; /* Safari compatibility */
    -moz-appearance: none; /* Firefox compatibility */
    width: 20px;
    height: 20px;
    border: 2px solid #cccccc; /* Default border for unchecked state */
    border-radius: 4px; /* Optional: Rounded corners */
    background-color: transparent; /* Set background to transparent */
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover effect for the checkbox */
.contact_form_teach input[type="checkbox"]:hover {
    border-color: #f26513; /* Highlight border on hover */
}

/* Style the checkbox when it's checked */
.contact_form_teach input[type="checkbox"]:checked {
    background-color: #ffffff; /* Background stays white */
    border-color: #f26513; /* Orange border as visual cue for "checked" */
}

/* Custom tick inside the checkbox */
.contact_form_teach input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 5px; /* Width of the tick's stroke */
    height: 10px; /* Height of the tick's vertical stroke */
    border: solid #f26513; /* Tick color */
    border-width: 0 2px 2px 0; /* Make the tick using borders */
    transform: rotate(45deg); /* Rotate to create the checkmark */
    left: 7px; /* Position horizontally */
    top: 3px; /* Position vertically */
}

/* Proper alignment for checkboxes with their labels */
label > input[type="checkbox"] {
    vertical-align: middle; /* Align checkbox with the middle of the label text */
    margin-top: 0; /* Remove any additional margin that might push the checkbox */
    margin-right: 10px; /* Space between checkbox and text */
}

/* Label text alignment fix */
label {
    display: inline-flex; /* Allows checkbox and text to align inline */
    align-items: center; /* Ensures both checkbox and text are vertically centered */
}

/* Highlight input fields with errors */
.error {
    border: 2px solid red;
}

.error-message {
    color: red;
    font-size: 0.85em;
    margin-top: 5px;
    display: block; /* Ensure spans are visible */
}

/* Features Section Icon Styling */
.features_row .feature img {
    width: 80px; /* Decrease the width */
    height: 80px; /* Ensure height matches width for consistent sizing */
    margin-bottom: 15px; /* Add some spacing between icon and title */
}

/* Steps Section Icon Styling */
.faq_section .step img {
    width: 70px; /* Adjust dimensions for smaller step icons */
    height: 70px;
    margin-bottom: 15px; /* Ensure spacing between icon and text */
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 768px) {
    /* Features Section - Reduce Gap Between Cards */
    .features_row {
        display: flex;
        flex-direction: column; /* Stack features vertically */
        align-items: center; /* Center-align content */
        gap: 8px; /* Reduce the gap between feature cards */
    }

    .features_row .feature_col {
        margin-bottom: 10px; /* Minimized margin at the bottom of each card */
    }

    .features_row .feature img {
        width: 60px; /* Icon adjustments maintained for mobile */
        height: 60px;
        margin-bottom: 8px; /* Less space between icon and title */
    }

    .features_row .feature_title {
        font-size: 18px; /* Consistent readable font size */
        margin-bottom: 6px; /* Tighter spacing below title */
    }

    .features_row .feature_text {
        font-size: 14px;
        line-height: 1.4; /* Good readability while saving space */
        text-align: center;
        margin-bottom: 8px; /* Reduced bottom margins for text */
    }
}

/* Button Container Styling */
.apply-teacher-container {
    margin: 30px 0; /* Add margin to create separation */
}

/* Attractive Button Styling */
.apply-teacher-btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff; /* White text color */
    background-color: #f26513; /* Harmonious base color aligning with theme */
    border: 2px solid #384158; /* Border to match button color */
    border-radius: 50px; /* Rounded button styling */
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    transition: all 200ms ease; /* Smooth hover transition */
}

/* Hover Effects */
.apply-teacher-btn:hover {
    color: #ffffff;
    background-color: #db5246; /* Highlight hover color */
    border-color: #db5246;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Slightly deeper shadow */
    transform: translateY(-2px); /* Subtle lift effect */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .apply-teacher-btn {
        font-size: 16px; /* Slightly smaller text for mobile */
        padding: 12px 25px;
        border-radius: 40px; /* Maintain rounded edges for smaller buttons */
    }
}
