/* style.css */
/* Mentalidad Web Assessment - Ley 21.719 */

:root {
  --mw-blue: #374556;
  --mw-green: #a1d700;
  --mw-green-hover: #baf306;
  --mw-red: #ef4444;
  --mw-orange: #f97316;
  --mw-yellow: #eab308;
  --bg-color: #F5F7FA;
  --text-main: #2d3748;
  --text-muted: #718096;
  --card-bg: #ffffff;
  --card-shadow: 0 10px 30px rgba(55, 69, 86, 0.08);
  --border-light: #e2e8f0;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--mw-blue);
  margin: 0 0 1rem 0;
}

/* Background Decoration */
body::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(161, 215, 0, 0.1) 0%, rgba(245, 247, 250, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* Container Layout */
.app-container {
  width: 100%;
  max-width: 800px;
  padding: 2rem;
  box-sizing: border-box;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeInDown 0.6s ease-out;
}

.app-logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.app-logo span {
  color: var(--mw-green);
}

.app-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Main Card */
.main-card {
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  animation: fadeIn 0.8s ease-out;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  height: 8px;
  background-color: var(--border-light);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--mw-green);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(161, 215, 0, 0.5);
}

/* Viewport Containers */
.view-section {
  padding: 3rem;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.view-section.active {
  display: block;
  opacity: 1;
  animation: slideInUp 0.5s forwards;
}

/* Assessment Questions */
.section-meta {
  margin-bottom: 2rem;
}

.section-indicator {
  font-size: 0.75rem;
  color: var(--mw-green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.question-block {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: all 0.2s ease;
}

.question-block:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

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

/* Custom Radio & Select */
.option-label {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.option-label:hover {
  border-color: #cbd5e1;
}

.option-label.selected {
  border-color: var(--mw-green);
  background-color: rgba(161, 215, 0, 0.05);
}

.option-input {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.option-label.selected .option-input {
  border-color: var(--mw-green);
}

.option-label.selected .option-input::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--mw-green);
  border-radius: 50%;
}

.select-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
  background-color: white;
  cursor: pointer;
}

.select-input:focus {
  border-color: var(--mw-green);
}

/* Contact Form */
.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--mw-blue);
}

.form-input {
  padding: 0.8rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--mw-green);
  box-shadow: 0 0 0 3px rgba(161, 215, 0, 0.2);
}

/* Footer & Buttons */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--mw-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(55, 69, 86, 0.2);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(55, 69, 86, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background-color: #64748b;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-secondary:hover {
  color: var(--mw-blue);
  background-color: #f1f5f9;
}

/* Results View */
.results-header {
  background-color: var(--mw-blue);
  color: white;
  margin: -3rem -3rem 2rem -3rem;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.results-header h2 {
  color: white;
  position: relative;
  z-index: 2;
}

.results-header p {
  color: rgba(255,255,255,0.8);
  position: relative;
  z-index: 2;
}

.score-circle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

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

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

.score-circle-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 3;
}

.score-circle-prog {
  fill: none;
  stroke: var(--mw-green);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 1.5s ease-out;
}

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

.score-text span.percent {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--mw-blue);
  display: block;
}

.score-text span.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.risk-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.message-box {
  background-color: rgba(55, 69, 86, 0.05);
  border-left: 4px solid var(--mw-blue);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  margin-top: 2rem;
}

.message-box h4 {
  margin: 0 0 0.5rem 0;
}

.message-box p {
  margin: 0;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

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

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

/* Responsive */
@media (max-width: 640px) {
  .view-section { padding: 2rem 1.5rem; }
  .grid-form { grid-template-columns: 1fr; }
  .results-header { margin: -2rem -1.5rem 2rem -1.5rem; padding: 2rem 1rem; }
}

/* Loader */
.loader-spinner {
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top: 3px solid white;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
