/* ============================================
   DIGITAL CHECK - TEST DE EVALUACIÓN PYME
   ============================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --accent-light: #cffafe;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ============================================
   COOKIE BANNER (GDPR)
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--secondary);
    color: var(--white);
    z-index: 1000;
    padding: 16px 0;
    box-shadow: var(--shadow-lg);
}

.cookie-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-content p {
    font-size: 14px;
    flex: 1;
    min-width: 250px;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-cookie-accept {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cookie-accept:hover {
    background: var(--primary-dark);
}

.btn-cookie-more {
    color: var(--gray-300);
    text-decoration: underline;
    font-size: 14px;
    padding: 10px 0;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-cookie-more:hover {
    color: var(--white);
}

/* ============================================
   HEADER
   ============================================ */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--primary);
}

.lang-selector {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius);
}

.lang-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--gray-700);
}

.lang-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--gray-800) 100%);
    color: var(--white);
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero p {
    font-size: 18px;
    color: var(--gray-300);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 40px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--gray-400);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.45);
}

.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

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

.btn-large {
    padding: 18px 48px;
    font-size: 18px;
    border-radius: var(--radius-lg);
}

/* ============================================
   TEST SECTION
   ============================================ */
.test-section {
    padding: 60px 0 80px;
    flex: 1;
}

.test-header {
    margin-bottom: 40px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
    min-width: 120px;
    text-align: right;
}

.area-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
    border: 1px solid var(--gray-100);
}

.question-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 32px;
    line-height: 1.4;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.answer-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.answer-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.answer-radio {
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.answer-option.selected .answer-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.answer-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--white);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
}

.answer-option.selected .answer-radio::after {
    opacity: 1;
}

.answer-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
}

.answer-option.selected .answer-text {
    color: var(--primary-dark);
    font-weight: 600;
}

.test-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

/* ============================================
   RESULTS SECTION
   ============================================ */
.results-section {
    padding: 60px 0 80px;
    flex: 1;
}

.results-header {
    text-align: center;
    margin-bottom: 60px;
}

.results-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 40px;
}

.global-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

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

.score-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 2s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value span:first-child {
    display: block;
    font-size: 42px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.score-label {
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.score-level {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-level.inicial { background: #fee2e2; color: #991b1b; }
.score-level.basico { background: #fef3c7; color: #92400e; }
.score-level.intermedio { background: #dbeafe; color: #1e40af; }
.score-level.avanzado { background: #d1fae5; color: #065f46; }
.score-level.experto { background: #ecfdf5; color: #047857; border: 2px solid #10b981; }

/* Areas Grid */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.area-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.area-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.area-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.area-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.area-card-score {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.area-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.area-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease;
}

.area-status {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Recommendations */
.recommendations {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    margin-bottom: 40px;
}

.recommendations h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 28px;
}

.rec-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-100);
}

.rec-item:last-child {
    border-bottom: none;
}

.rec-priority {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.rec-priority.alta { background: #fee2e2; color: #dc2626; }
.rec-priority.media { background: #fef3c7; color: #d97706; }
.rec-priority.baja { background: #dbeafe; color: #2563eb; }

.rec-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.rec-content p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.6;
}

.results-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: var(--secondary);
    color: var(--gray-300);
    padding: 48px 0 24px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-brand .logo-text {
    color: var(--white);
    margin-bottom: 12px;
    display: block;
}

.footer-brand p {
    font-size: 14px;
    color: var(--gray-400);
    max-width: 300px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--gray-500);
}

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal-page {
    background: var(--white);
    padding: 60px 0;
}

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

.legal-content h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 32px;
}

.legal-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-100);
}

.legal-content p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-content li {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 8px;
}

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

.legal-content a:hover {
    text-decoration: underline;
}

.legal-nav {
    margin-bottom: 32px;
}

.legal-nav a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.legal-nav a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 80px;
    }
    .hero h1 {
        font-size: 28px;
    }
    .hero p {
        font-size: 16px;
    }
    .hero-stats {
        gap: 24px;
    }
    .stat-number {
        font-size: 32px;
    }
    .question-card {
        padding: 28px;
    }
    .question-text {
        font-size: 18px;
    }
    .areas-grid {
        grid-template-columns: 1fr;
    }
    .recommendations {
        padding: 24px;
    }
    .footer-content {
        flex-direction: column;
        gap: 24px;
    }
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .results-actions {
        flex-direction: column;
    }
    .btn-large {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .question-card {
        padding: 20px;
    }
    .test-nav {
        flex-direction: column;
    }
    .test-nav button {
        width: 100%;
        justify-content: center;
    }
}

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

.question-card {
    animation: fadeIn 0.4s ease;
}

.area-card {
    animation: fadeIn 0.5s ease backwards;
}

.rec-item {
    animation: fadeIn 0.4s ease backwards;
}
