/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --success-bg: #d1fae5;
    --error-bg: #fee2e2;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Main content */
main {
    padding: 3rem 0;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Intro section */
.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.intro p {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Service grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* How it works */
.steps {
    list-style: none;
    counter-reset: step-counter;
    max-width: 700px;
    margin: 2rem auto;
}

.steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 2rem;
}

.steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
}

.steps strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.steps p {
    color: var(--text-light);
}

/* Apply section */
.apply-section {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.apply-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Form styles */
.apply-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input[type="email"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Captcha */
.captcha-instruction {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.captcha-item {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.captcha-item:hover {
    background: #f3f4f6;
}

.captcha-item.selected {
    border-color: var(--primary-color);
    background: #dbeafe;
}

.captcha-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.captcha-item p {
    font-size: 0.875rem;
    color: var(--text-light);
}

.captcha-feedback {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
}

.captcha-feedback.success {
    color: #059669;
    background: var(--success-bg);
}

.captcha-feedback.error {
    color: #dc2626;
    background: var(--error-bg);
}

/* Honeypot field - hide from users */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-primary.loading {
    position: relative;
    color: transparent;
}

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

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

.form-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

/* Message container */
#message-container {
    margin-bottom: 1.5rem;
}

.message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.message.success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #10b981;
}

.message.error {
    background: var(--error-bg);
    color: #991b1b;
    border: 1px solid var(--danger-color);
}

/* FAQ */
.faq {
    max-width: 800px;
    margin: 0 auto;
}

details {
    background: var(--bg-light);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    cursor: pointer;
}

summary {
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

summary:hover {
    color: var(--primary-color);
}

details p {
    margin-top: 1rem;
    color: var(--text-light);
}

/* Footer */
footer {
    background: var(--text-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .captcha-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .apply-section {
        padding: 1.5rem;
    }
}
