/**
 * Sistema de Diagnóstico RMSA - Estilos CSS
 * Versão com Gráfico Radar
 */

/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, #f8fafc, #f1f5f9),
        radial-gradient(circle at bottom right, #e2e8f0, #f1f5f9);
    background-attachment: fixed;
    color: #334155;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background-color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.logo-circle.small {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.logo-circle span {
    color: white;
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
}

.logo-circle.small span {
    font-size: 16px;
}

.company-info {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.company-logo-img {
    max-height: 60px;
    /* Limit height */
    max-width: 180px;
    /* Limit width */
    width: auto;
    height: auto;
    object-fit: contain;
}

.company-details {
    margin-left: 15px;
    border-left: 1px solid #ddd;
    /* Optional separator */
    padding-left: 15px;
}

.company-name {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 2px;
}

.company-subtitle {
    font-size: 12px;
    color: #666;
    margin: 0;
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Screen */
.welcome-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}

.welcome-icon {
    font-size: 64px;
    color: #2c5aa0;
}

.welcome-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.welcome-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.welcome-description {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-features {
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

.feature-item i {
    font-size: 32px;
    color: #2c5aa0;
    margin-bottom: 10px;
}

.feature-item span {
    font-weight: 600;
    color: #333;
}

/* Form Styles */
.form-container {
    max-width: 650px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 50px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.form-header h2 {
    color: #1a1a1a;
    font-weight: 700;
}

.form-header p {
    color: #666;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* Questionnaire Styles */
.questionnaire-container {
    max-width: 850px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.question-fade {
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.progress-container {
    position: relative;
}

.progress {
    height: 10px;
    background-color: rgba(44, 90, 160, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    background: linear-gradient(90deg, #2c5aa0, #4a90e2);
    box-shadow: 0 0 15px rgba(44, 90, 160, 0.4);
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #666;
}

.question-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-number {
    font-weight: 600;
    color: #666;
}

.question-pillar {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(44, 90, 160, 0.2);
}

.question-text {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.question-options {
    margin: 30px 0;
}

.form-check {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.form-check:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(44, 90, 160, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.form-check-input {
    width: 22px;
    height: 22px;
    margin-top: 0;
    margin-right: 15px;
    border: 2px solid #cbd5e1;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
    transform: scale(1.1);
}

.form-check:has(.form-check-input:checked) {
    background: rgba(44, 90, 160, 0.08);
    border-color: #2c5aa0;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.15);
}

.form-check-label {
    font-size: 17px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    width: 100%;
    margin-bottom: 0;
    transition: color 0.2s ease;
}

.form-check-input:checked+.form-check-label {
    color: #1e3f73;
    font-weight: 600;
}

.question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

/* Results Styles */
.results-container {
    max-width: 1200px;
    margin: 0 auto;
}

.results-header h2 {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 36px;
}

.results-header p {
    color: #666;
    font-size: 18px;
}

.result-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.result-chart-container {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-summary h3 {
    color: #0f172a;
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 24px;
}

.result-score {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.05) 0%, rgba(74, 144, 226, 0.05) 100%);
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
    border: 1px solid rgba(44, 90, 160, 0.1);
}

.percentage {
    font-size: 56px;
    font-weight: 800;
    color: #2c5aa0;
    display: block;
    line-height: 1;
}

.grade {
    font-size: 20px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-comment {
    font-size: 16px;
    color: #64748b;
    line-height: 1.7;
}

/* Gráfico Radar */
.radar-chart-container {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Pillar Results */
.pillar-result {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    transition: transform 0.3s ease;
}

.pillar-result:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pillar-name {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 18px;
}

.pillar-score {
    margin-bottom: 15px;
}

.pillar-percentage {
    font-size: 32px;
    font-weight: 700;
    color: #2c5aa0;
    display: block;
}

.pillar-grade {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    display: block;
    margin-top: 5px;
}

.pillar-comment {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Pillar Details - Cards Premium */
.pillar-detail-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px !important;
    padding: 25px !important;
    margin-bottom: 20px !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.pillar-detail-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.06);
    background: white;
}

.pillar-detail-item h5 {
    color: #1e3f73;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 15px;
}

.pillar-detail-item p {
    margin-bottom: 8px;
    color: #475569;
}

.pillar-detail-item strong {
    color: #0f172a;
}

/* Suggestion Box Premium */
.suggestion-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 6px solid #2c5aa0;
    padding: 30px;
    border-radius: 12px 24px 24px 12px;
    position: relative;
    overflow: hidden;
}

.suggestion-box::before {
    content: '\f0eb';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 60px;
    color: rgba(44, 90, 160, 0.05);
    transform: rotate(15deg);
}

#suggestion-text {
    font-size: 17px;
    color: #334155;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* Premium Buttons & Actions */
.result-actions {
    margin-top: 50px;
    padding: 30px;
    background: rgba(44, 90, 160, 0.03);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e3f73 0%, #152d52 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.4);
    color: white;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #64748b;
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-2px);
}

.btn i {
    font-size: 18px;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-info {
    display: flex;
    align-items: center;
}

.footer-text h5 {
    color: white;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

.footer-text p {
    color: #ccc;
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.contact-info h6 {
    color: white;
    font-weight: 700;
    margin-bottom: 15px;
}

.contact-info p {
    color: #ccc;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .company-name {
        font-size: 18px;
    }

    .company-subtitle {
        font-size: 10px;
    }

    .welcome-title {
        font-size: 28px;
    }

    .welcome-subtitle {
        font-size: 20px;
    }

    .question-text {
        font-size: 20px;
    }

    .question-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .question-navigation .btn {
        width: 100%;
    }

    .result-chart-container {
        height: 250px;
        margin-bottom: 30px;
    }

    .radar-chart-container {
        height: 400px;
        padding: 20px;
    }

    .percentage {
        font-size: 36px;
    }

    .grade {
        font-size: 20px;
    }

    .footer-info {
        flex-direction: column;
        text-align: center;
        margin-bottom: 30px;
    }

    .contact-info {
        text-align: center;
    }
}

@media (max-width: 576px) {

    .form-container,
    .questionnaire-container,
    .result-section {
        padding: 20px;
        margin: 0 15px;
    }

    .welcome-container {
        padding: 40px 20px;
    }

    .question-meta {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .radar-chart-container {
        height: 350px;
        padding: 15px;
    }
}

/* Animações adicionais */
.pillar-result {
    animation: slideInUp 0.6s ease-out;
}

.pillar-result:nth-child(1) {
    animation-delay: 0.1s;
}

.pillar-result:nth-child(2) {
    animation-delay: 0.2s;
}

.pillar-result:nth-child(3) {
    animation-delay: 0.3s;
}

.pillar-result:nth-child(4) {
    animation-delay: 0.4s;
}

.pillar-result:nth-child(5) {
    animation-delay: 0.5s;
}

.pillar-result:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias visuais para o gráfico radar */
.radar-chart-container canvas {
    max-width: 100%;
    height: auto;
}

/* Estilo para destacar o resultado geral */
.result-summary {
    text-align: center;
}

@media (min-width: 768px) {
    .result-summary {
        text-align: left;
    }
}

.consent {
    margin: 10px 0;
    font-size: 14px;
}

.consent a {
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}

dialog {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    margin: auto;
    /* centraliza */
}

dialog::backdrop {
    background: rgba(0, 0, 0, .5);
}

.modal-header,
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.4;
}