/* ==========================================
   Questionnaire Specific Styles
   ========================================== */

/* Hero Section */
.questionnaire-hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 120px 20px 80px;
    text-align: center;
}

.questionnaire-hero .hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.questionnaire-hero .hero-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.questionnaire-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.questionnaire-hero .hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.questionnaire-hero .hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.questionnaire-hero .stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.questionnaire-hero .stat i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* Progress Bar */
.progress-container {
    background: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 70px;
    z-index: 999;
}

.progress-bar {
    height: 8px;
    background: var(--light-bg);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 50px;
    transition: width 0.5s ease;
    width: 33%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

/* Form Container */
.questionnaire-form {
    padding: 4rem 0;
    background: var(--light-bg);
    min-height: calc(100vh - 400px);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow);
}

/* Form Sections */
.form-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-section.active {
    display: block;
}

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

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--light-bg);
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Form Groups */
.form-group {
    margin-bottom: 2.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.form-group .required {
    color: var(--secondary-color);
    font-weight: 700;
}

.form-group .optional {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.875rem;
}

/* Input Fields */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

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

/* Character Count */
.char-count {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: rgba(108, 99, 255, 0.02);
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

.radio-label span {
    font-size: 1rem;
    color: var(--text-dark);
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.checkbox-label:hover {
    border-color: var(--primary-color);
    background: rgba(108, 99, 255, 0.02);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

.checkbox-label span {
    font-size: 0.9375rem;
    color: var(--text-dark);
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-bg);
}

.form-navigation .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.form-navigation .btn-next,
.form-navigation .btn-submit {
    margin-left: auto;
}

.btn-submit {
    background: var(--gradient-2);
    color: var(--white);
    border: none;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

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

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 5rem;
    color: #10b981;
    margin-bottom: 2rem;
}

.success-message h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.success-message p {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.success-note {
    background: var(--light-bg);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.success-note i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.success-message .btn {
    margin-top: 1rem;
}

/* Error Messages */
.error-message {
    background: #fee;
    border: 2px solid #fcc;
    color: #c33;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-message i {
    font-size: 1.25rem;
}

/* Validation Errors */
.form-group.error input,
.form-group.error textarea {
    border-color: var(--secondary-color);
}

.form-group .error-text {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error .error-text {
    display: block;
}

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

    .questionnaire-hero .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
        border-radius: 10px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column;
    }

    .form-navigation .btn {
        width: 100%;
    }

    .form-navigation .btn-next,
    .form-navigation .btn-submit {
        margin-left: 0;
    }

    .radio-group {
        gap: 0.75rem;
    }

    .radio-label,
    .checkbox-label {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .questionnaire-hero {
        padding: 100px 20px 60px;
    }

    .questionnaire-hero h1 {
        font-size: 1.75rem;
    }

    .questionnaire-hero .hero-subtitle {
        font-size: 1rem;
    }

    .form-container {
        padding: 1.5rem 1rem;
    }

    .section-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Logo Link Styling */
.logo a {
    text-decoration: none;
    color: inherit;
}

.logo a:hover h1 {
    opacity: 0.8;
}