/*
 * CSS Consolidado para Herramientas Interactivas de Robot Companion
 * Compatible con tema WordPress robot-companion
 */

/* Variables CSS para consistencia */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-background: #f8f9fa;
    --dark-text: #333;
    --border-color: #dee2e6;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Reset para herramientas interactivas */
.interactive-tool {
    box-sizing: border-box;
}

.interactive-tool *,
.interactive-tool *::before,
.interactive-tool *::after {
    box-sizing: inherit;
}

/* Contenedores principales */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 0;
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-section .lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Cards y opciones */
.option-card,
.budget-card,
.tech-option,
.living-card,
.mobility-card,
.answer-option,
.checkbox-option,
.radio-item {
    background: var(--light-background);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
}

.option-card:hover,
.budget-card:hover,
.tech-option:hover,
.living-card:hover,
.mobility-card:hover,
.answer-option:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.option-card.selected,
.budget-card.selected,
.tech-option.selected,
.living-card.selected,
.mobility-card.selected,
.answer-option.selected {
    border-color: var(--success-color);
    background: #e8f5e8;
    color: #2e7d32;
}

/* Iconos */
.option-icon,
.answer-icon,
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

/* Grids y layouts */
.options-grid,
.budget-options,
.tech-level-options,
.answers-grid,
.checkbox-group,
.radio-group {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.options-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.budget-options {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.tech-level-options {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.answers-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Progreso */
.progress-container {
    background: var(--light-background);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.progress-bar {
    background: var(--border-color);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Botones */
.nav-button,
.nav-btn,
.check-button,
.submit-btn,
.cta-button,
.action-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
}

.nav-button:hover,
.nav-btn:hover,
.check-button:hover,
.submit-btn:hover,
.cta-button:hover,
.action-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
    color: white;
    text-decoration: none;
}

.nav-button:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn.secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.action-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Navegación entre pasos */
.navigation-buttons,
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    gap: 1rem;
}

/* Contenedores de herramientas */
.calculator-container,
.quiz-container,
.checker-container,
.selector-container {
    max-width: 1000px;
    margin: 2rem auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Formularios */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-background);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Sliders */
.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

/* Resultados */
.results-container,
.results-section {
    padding: 2rem;
    text-align: center;
}

.robot-compatibility,
.recommendation-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    border-left: 5px solid var(--border-color);
    margin-bottom: 1.5rem;
    text-align: left;
}

.robot-compatibility.excellent,
.recommendation-card.excellent {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05), rgba(32, 201, 151, 0.05));
}

.robot-compatibility.good {
    border-left-color: var(--info-color);
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.05), rgba(40, 167, 69, 0.05));
}

.robot-compatibility.fair {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(23, 162, 184, 0.05));
}

.robot-compatibility.poor {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05), rgba(255, 193, 7, 0.05));
}

/* Badges y indicadores */
.match-badge,
.compatibility-score {
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.compatibility-score.score-good {
    background: var(--info-color);
}

.compatibility-score.score-fair {
    background: var(--warning-color);
    color: var(--dark-text);
}

.compatibility-score.score-poor {
    background: var(--danger-color);
}

/* Estadísticas y características */
.quiz-stats,
.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item,
.feature-item {
    background: rgba(255,255,255,0.2);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    color: #ffd700;
}

/* Breakdowns y detalles */
.compatibility-breakdown {
    margin-top: 1.5rem;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.breakdown-bar {
    flex: 1;
    background: var(--border-color);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.breakdown-fill.fill-excellent {
    background: var(--success-color);
}

.breakdown-fill.fill-good {
    background: var(--info-color);
}

.breakdown-fill.fill-fair {
    background: var(--warning-color);
}

.breakdown-fill.fill-poor {
    background: var(--danger-color);
}

/* Compatibility Checker Específico */
.compatibility-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.radio-group {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.radio-item:hover {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.05);
}

.radio-item input[type="radio"] {
    margin: 0;
}

.radio-item input[type="radio"]:checked + label,
.radio-item:has(input[type="radio"]:checked) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.radio-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: white;
    transition: var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.check-button {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 200px;
}

.check-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.check-button:active {
    transform: translateY(0);
}

/* Estilos para Resultados */
.results-container {
    margin-top: 3rem;
    animation: fadeIn 0.5s ease;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.results-intro {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.results-grid {
    display: grid;
    gap: 2rem;
}

.result-item {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.result-excellent {
    border-left: 5px solid var(--success-color);
}

.result-good {
    border-left: 5px solid var(--info-color);
}

.result-fair {
    border-left: 5px solid var(--warning-color);
}

.result-limited {
    border-left: 5px solid var(--danger-color);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light-background);
    border-bottom: 1px solid var(--border-color);
}

.result-rank {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.result-info {
    flex: 1;
}

.result-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.3rem;
    color: var(--dark-text);
}

.result-tagline {
    margin: 0;
    color: var(--secondary-color);
    font-style: italic;
}

.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: relative;
}

.score-excellent {
    background: var(--success-color);
}

.score-good {
    background: var(--info-color);
}

.score-fair {
    background: var(--warning-color);
}

.score-limited {
    background: var(--danger-color);
}

.score-number {
    font-size: 0.9rem;
    font-weight: 700;
}

.score-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
    text-align: center;
}

.result-breakdown {
    padding: 1.5rem;
}

.result-breakdown h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.breakdown-label {
    flex: 0 0 140px;
    font-weight: 500;
    font-size: 0.9rem;
}

.breakdown-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.breakdown-excellent {
    background: var(--success-color);
}

.breakdown-good {
    background: var(--info-color);
}

.breakdown-fair {
    background: var(--warning-color);
}

.breakdown-limited {
    background: var(--danger-color);
}

.breakdown-score {
    flex: 0 0 40px;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
}

.result-recommendations {
    padding: 1.5rem;
    background: var(--light-background);
}

.result-recommendations h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.result-recommendations ul {
    margin: 0;
    padding-left: 1.5rem;
}

.result-recommendations li {
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.result-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.price-info {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.result-button {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.result-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-step,
.question-container {
    display: none;
}

.quiz-step.active,
.question-container.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .options-grid,
    .budget-options,
    .tech-level-options,
    .answers-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-stats,
    .hero-features {
        gap: 1rem;
    }
    
    .navigation-buttons,
    .quiz-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .calculator-container,
    .quiz-container,
    .checker-container,
    .selector-container {
        margin: 1rem;
    }
    
    .form-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 30px 0;
    }
    
    .option-card,
    .budget-card,
    .tech-option,
    .answer-option {
        padding: 1rem;
    }
    
    .option-icon,
    .answer-icon {
        font-size: 2rem;
    }
}

/* Compatibilidad con tema WordPress */
.wp-site-blocks .interactive-tool {
    max-width: none;
}

.wp-block-post-content .interactive-tool {
    margin: 2rem 0;
}

/* Ensure tools don't conflict with theme styles */
.interactive-tool h1,
.interactive-tool h2,
.interactive-tool h3,
.interactive-tool h4 {
    color: inherit;
}

.interactive-tool a {
    text-decoration: none;
}

.interactive-tool a:hover {
    text-decoration: none;
}