/* CSS Variables */
:root {
    --primary: #1e40af; /* Deep corporate blue */
    --primary-hover: #1e3a8a;
    --primary-light: #eff6ff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-focus: #3b82f6;
    --error: #ef4444;
    --success: #10b981;
    
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 20px;
    min-height: 35vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 64, 175, 0.7) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    width: 100%;
}

.company-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Container */
.main-container {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    transform: translateY(-40px);
    z-index: 10;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Card Styling */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin-bottom: 40px;
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Layout */
.form-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

/* Form Controls */
label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* File Upload Custom UI */
.file-upload-wrapper {
    position: relative;
    width: 100%;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-upload-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-page);
    text-align: center;
    transition: all 0.2s ease;
}

.file-input:focus + .file-upload-ui,
.file-input:hover + .file-upload-ui {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.file-upload-ui svg {
    color: var(--primary);
    margin-bottom: 12px;
}

.file-name {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 4px;
}

.file-helper {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.file-selected {
    border-color: var(--success) !important;
    background-color: rgba(16, 185, 129, 0.05) !important;
}
.file-selected svg {
    color: var(--success) !important;
}

/* Checkbox */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input {
    margin-top: 4px;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Buttons */
.form-actions {
    margin-top: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 32px;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 64, 175, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

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

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

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

/* Error Message */
.error-message {
    background-color: #fef2f2;
    color: #b91c1c;
    padding: 16px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--error);
    margin-bottom: 24px;
    font-weight: 500;
}

/* Result Section */
#result-section {
    padding: 60px 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: #d1fae5;
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

#result-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

#result-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Powered by slot centering */
#wbx-powered-by-slot {
    margin-top: auto;
    padding: 20px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .card {
        padding: 24px 20px;
    }
    
    .hero {
        padding: 60px 20px;
    }
}