/* ===== CSS Variables ===== */
:root {
    /* Light theme colors inspired by i4a.mx - Can be overridden dynamically */
    --primary-color: #2196F3;
    --accent-color: #00BCD4;
    --primary-dark: #1976D2;
    --primary-light: #BBDEFB;

    --secondary-color: #FF9800;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;

    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #BDBDBD;

    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-card: #FFFFFF;

    --border-color: #E0E0E0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);

    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0e27;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== Particle Background ===== */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* ===== Header ===== */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-idea {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.logo-link:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== Main Container ===== */
.main-container {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

/* ===== Client Data Section ===== */
.client-data-section {
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease;
}

.client-data-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.logo-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-center {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.client-data-card h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

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

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

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

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.required {
    color: var(--danger-color);
}

.optional {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.85rem;
}

.form-input {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

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

.form-input::placeholder {
    color: var(--text-light);
}

.field-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.value-preview {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.value-preview h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    flex-shrink: 0;
}

.privacy-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
    background: #e3f2fd;
    border-radius: 8px;
}

/* ===== Introduction Section ===== */
.intro-section {
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease;
}

.intro-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.intro-card h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.intro-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.intro-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.intro-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.feature-item .icon {
    font-size: 1.5rem;
}

/* ===== Buttons ===== */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
}

.btn-large {
    font-size: 1.2rem;
    padding: 1.25rem 2.5rem;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
}

.btn-whatsapp:hover {
    background: #1eab52;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Progress Bar ===== */
.progress-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.progress-company {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.progress-company strong {
    color: var(--primary-color);
    font-size: 1.05rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-percentage {
    color: var(--primary-color);
}

/* ===== Survey Sections ===== */
.survey-section {
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-number {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 2rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ===== Question Cards ===== */
.question-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.question-card:hover {
    box-shadow: var(--shadow-md);
}

.question-card.critical {
    border-left: 4px solid var(--danger-color);
}

.question-label {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.question-number {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* ===== Tooltip ===== */
.tooltip-btn {
    background: var(--primary-light);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.tooltip-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.tooltip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.tooltip-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    margin: 1rem;
    position: relative;
    animation: slideUp 0.3s ease;
}

.tooltip-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* ===== Options ===== */
.options-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.option-label {
    flex: 1;
    min-width: 140px;
    position: relative;
}

.option-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.option-text {
    display: block;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.option-label input[type="radio"]:checked+.option-text {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    transform: scale(1.05);
}

.option-label:hover .option-text {
    border-color: var(--primary-color);
}

/* ===== Navigation ===== */
.survey-navigation {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

/* ===== Results Section ===== */
.results-section {
    animation: fadeIn 0.5s ease;
}

.results-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== Results Header ===== */
.results-header {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.results-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.results-header h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.results-client-info {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.results-client-info strong {
    color: var(--primary-color);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.25rem;
}

/* ===== Alert Banner ===== */
.alert {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    animation: slideDown 0.5s ease;
}

.alert-critical {
    background: #ffebee;
    border-left: 4px solid var(--danger-color);
    color: #c62828;
}

/* ===== Score Card ===== */
.score-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.score-card h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.score-gauge {
    position: relative;
    width: 200px;
}

.gauge-svg {
    width: 100%;
    height: auto;
}

.score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -20%);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.score-max {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.score-info {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.score-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.score-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.industry-comparison {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ===== Chart Card ===== */
.chart-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.chart-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.chart-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

#radar-chart {
    max-height: 400px;
    margin: 2rem auto;
}

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

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* ===== Recommendations Card ===== */
.recommendations-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.recommendations-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.recommendation-item {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.recommendation-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.recommendation-item.critical {
    border-left-color: var(--danger-color);
    background: #ffebee;
}

.recommendation-item.critical h4 {
    color: var(--danger-color);
}

/* ===== CTA Card ===== */
.cta-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.cta-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-card p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-card .btn {
    background: white;
    color: var(--primary-color);
    font-size: 1.2rem;
    padding: 1.25rem 2.5rem;
}

.cta-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.cta-card.critical {
    background: linear-gradient(135deg, var(--danger-color), #c62828);
}

.cta-card.warning {
    background: linear-gradient(135deg, var(--secondary-color), #f57c00);
}

.cta-card.success {
    background: linear-gradient(135deg, var(--success-color), #388E3C);
}

/* ===== Email Capture ===== */
.email-capture-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.email-capture-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.email-form {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.email-input {
    flex: 1;
    min-width: 250px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

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

.email-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* ===== Download Card ===== */
.download-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.download-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ===== WhatsApp CTA ===== */
.whatsapp-cta {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

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

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

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

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .intro-card {
        padding: 2rem 1.5rem;
    }

    .intro-card h2 {
        font-size: 1.5rem;
    }

    .intro-features {
        grid-template-columns: 1fr;
    }

    .score-display {
        flex-direction: column;
    }

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

    .options-container {
        flex-direction: column;
    }

    .option-label {
        min-width: 100%;
    }

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

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

    .cta-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .question-card {
        padding: 1.5rem;
    }

    .question-label {
        font-size: 1rem;
    }
}

/* ===== Critical CTA Pulse Animation ===== */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
    }
}

.cta-card.critical .btn {
    animation: pulse 2s ease-in-out infinite;
    position: relative;
}

.btn-critical {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== Alert Badge ===== */
.alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 0.5rem;
    position: relative;
    top: -2px;
}

/* ===== Business Hours Display ===== */
.business-hours {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 0.9rem;
    display: inline-block;
}

.business-hours .icon {
    margin-right: 0.25rem;
}

/* ===== WhatsApp Button Enhancement ===== */
.btn-whatsapp {
    position: relative;
}

.whatsapp-meta {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}