/* Reset and base styles */
:root {
    --primary-color: #3498db; /* Blue */
    --secondary-color: #8e44ad; /* Purple */
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    text-align: center;
    padding: 2rem 0;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 400;
}

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

.intro-section {
    text-align: center;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.intro-section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.intro-text {
    font-size: 1.2rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.feature-icon {
    font-size: 1.2rem;
}

/* Form Section */
.form-section {
    padding: 60px 20px;
    background: #f8f9fa;
}

.form-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.form-header h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.form-header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

.form-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

/* Custom Form Styles */
.custom-form {
    padding: 40px;
}

.form-loading,
.form-success {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner,
.submit-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.submit-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 20px;
}

.form-group {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-label.required::after {
    content: ' *';
    color: #e74c3c;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input:invalid {
    border-color: #e74c3c;
}

.form-hint {
    font-size: 0.875rem;
    color: #666;
    margin-top: 4px;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Checkbox Styles */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-item:hover,
.radio-item:hover {
    border-color: var(--primary-color);
    background-color: #f8f9ff;
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
    display: none;
}

.checkbox-custom,
.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-custom {
    border-radius: 50%;
}

.checkbox-item input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-item input[type="checkbox"]:checked + .checkbox-custom,
.radio-item input[type="radio"]:checked + .radio-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.radio-item input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.other-input {
    margin-left: 12px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 200px;
}

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

/* Submit Section */
.form-submit {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e1e8ed;
}

.submit-btn {
    /* High-contrast solid style for reliability across browsers */
    background-color: #2563eb; /* blue-600 */
    color: #ffffff;
    border: 2px solid #1e40af; /* blue-800 */
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.submit-btn:hover {
    background-color: #1d4ed8; /* blue-700 */
    border-color: #1e40af; /* blue-800 */
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(29, 78, 216, 0.35);
}

.submit-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 0 6px rgba(52, 152, 219, 0.6);
}

.submit-btn:disabled {
    background-color: #9ca3af; /* gray-400 */
    border-color: #6b7280; /* gray-500 */
    color: #ffffff;
    opacity: 1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.required-note {
    margin-top: 16px;
    color: #666;
    font-size: 0.9rem;
}

/* Info section */
.info-section {
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-card h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.info-card ol,
.info-card ul {
    padding-left: 1.5rem;
}

.info-card li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* Footer */
.footer {
    background: rgba(45, 55, 72, 0.95);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .intro-section h2 {
        font-size: 2rem;
    }
    
    .intro-text {
        font-size: 1.1rem;
    }
    
    .features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .feature {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }
    
    .form-header {
        padding: 1.5rem;
    }
    
    .form-header h3 {
        font-size: 1.5rem;
    }
    
    .embedded-form {
        height: 2800px; /* Shorter height for mobile */
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .intro-section {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 1.5rem 0;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .intro-section h2 {
        font-size: 1.8rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .form-header {
        padding: 1rem;
    }
    
    .form-header h3 {
        font-size: 1.3rem;
    }
    
    .embedded-form {
        height: 2600px; /* Even shorter for very small screens */
    }
}

/* Loading and accessibility improvements */
.embedded-form {
    transition: opacity 0.3s ease;
}

.embedded-form:not([src]) {
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 1.1rem;
}

/* Smooth animations */
.info-card,
.form-container,
.intro-section {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Hover effects for better interactivity */
.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.form-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Additional Mobile Styles for Custom Form */
@media (max-width: 768px) {
    .custom-form {
        padding: 30px 20px;
    }

    .form-group {
        margin-bottom: 25px;
    }

    .checkbox-group,
    .radio-group {
        gap: 10px;
    }

    .checkbox-item,
    .radio-item {
        padding: 10px;
        font-size: 0.95rem;
    }

    .other-input {
        width: 150px;
        font-size: 0.85rem;
    }

    .submit-btn {
        padding: 14px 36px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }

    .form-label {
        font-size: 0.95rem;
    }

    .form-input {
        padding: 10px 14px;
    }

    .form-wrapper {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .form-header h3 {
        font-size: 2rem;
    }

    .custom-form {
        padding: 20px 15px;
    }

    .checkbox-item,
    .radio-item {
        padding: 8px;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .other-input {
        width: 120px;
        margin-left: 8px;
        margin-top: 5px;
    }

    .checkbox-custom,
    .radio-custom {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }

    .submit-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .form-wrapper {
        margin: 0 5px;
    }
}
