* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #F8FAFC;
    --primary: #4361EE;
    --secondary: #3A0CA3;
    --accent: #4CC9F0;
    --text-main: #2D3748;
    --text-muted: #718096;
    --card-bg: #FFFFFF;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --hero-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --light-accent: #7209B7;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/*-----------------------------------------------------------------------------------*/
/* Apply Hero Section */
.apply-hero {
    padding: 8rem 0 6rem; /* Increased bottom padding from 4rem to 6rem */
    background: 
        url('../assets/applyhero.jpg') center/cover no-repeat;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 70vh; /* Increased min-height to accommodate more image */
    display: flex;
    align-items: center;
}

.apply-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Enhanced background image positioning */
.apply-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -4rem; /* Extends the image 2rem further down */
    background: 
        url('../assets/applyhero.jpg') center/cover no-repeat;
    z-index: -1; /* Places it behind the overlay */
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-bottom: -2rem; /* Compensates for the extended background */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .apply-hero {
        padding: 7rem 0 5rem; /* Increased bottom padding */
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .apply-hero {
        padding: 6rem 0 4rem; /* Increased bottom padding */
        min-height: 50vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        max-width: 400px;
        padding: 0 1rem;
    }
    
    .apply-hero::after {
        bottom: -1.5rem; /* Slightly less extension on mobile */
    }
}

@media (max-width: 480px) {
    .apply-hero {
        padding: 5rem 0 3rem; /* Increased bottom padding */
        min-height: 45vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        max-width: 300px;
    }
    
    .apply-hero::after {
        bottom: -1rem; /* Even less extension on very small screens */
    }
}

/* Loading state for background image */
.apply-hero.loading {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.apply-hero.loaded {
    background: url('../assets/applyhero.jpg') center/cover no-repeat;
    transition: back-ground 0.5s ease-in-out;
}

.apply-hero.loaded::after {
    background: url('../assets/applyhero.jpg') center/cover no-repeat;
}
/*------------------------------------------------------------------------------*/
/* Application Section - Centered Layout */
.application-section {
    padding: 5rem 0;
    background: var(--bg-main);
}

.form-center-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
}

.form-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-container h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    text-align: center;
}

.form-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
}

.application-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input {
    margin-top: 0.25rem;
}

.checkbox-group label {
    font-weight: normal;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.checkbox-group a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.error-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-full {
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 2px solid rgba(67, 97, 238, 0.3);
}

.btn-outline:hover {
    background: rgba(67, 97, 238, 0.1);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    color: #38a169;
    margin-bottom: 1.5rem;
}

.form-success h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.form-success p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--text-main);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding-top: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

/* Support Section */
.support-section {
    padding: 5rem 0;
    background: var(--bg-main);
    text-align: center;
}

.support-content {
    max-width: 600px;
    margin: 0 auto;
}

.support-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.support-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.support-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.support-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Contact Info */
.contact-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-number,
.contact-email {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-number {
    color: var(--primary);
}

.contact-email {
    color: var(--secondary);
}

/* WhatsApp Button */
.btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--primary);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .support-section {
        padding: 4rem 0;
    }
    
    .support-icon {
        font-size: 3rem;
    }
    
    .support-content h2 {
        font-size: 1.8rem;
    }
    
    .support-content p {
        font-size: 1rem;
    }
    
    .support-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .support-buttons .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    /*
    .contact-info {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
        
    
    .contact-number,
    .contact-email {
        font-size: 1rem;
    }
        */
}

@media (max-width: 480px) {
    .support-section {
        padding: 3rem 0;
    }
    
    .support-icon {
        font-size: 2.5rem;
    }
    
    .support-content h2 {
        font-size: 1.5rem;
    }
    
    .support-content p {
        font-size: 0.9rem;
    }
    
    .contact-number,
    .contact-email {
        font-size: 0.9rem;
    }
}

/*-------------------------------------------------------------------------------------------------------*/
/* Add these styles to your existing Apply.css */

/* Form error states */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e53e3e !important;
    background-color: #fff5f5;
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2) !important;
}

/* Debug panel (optional) */
.debug-panel {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 9999;
    max-width: 300px;
    max-height: 200px;
    overflow: auto;
}

/* Form success animation */
.form-success {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Loading state improvements */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mobile form improvements */
@media (max-width: 768px) {
    .form-container {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .support-buttons {
        flex-direction: column;
    }
    
    .support-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
}