/* === Universidad Langosta — Global Styles === */

:root {
  --lobster: #E85D35;
  --lobster-light: #FF8A65;
  --navy: #1B2A4A;
  --navy-light: #2C3E6B;
  --cream: #FFF8F0;
  --white: #FFFFFF;
  --gray-100: #F5F5F5;
  --gray-200: #E8E8E8;
  --gray-400: #999;
  --gray-600: #666;
  --gray-800: #333;
  --green: #2E7D32;
  --green-light: #E8F5E9;
  --red: #C62828;
  --red-light: #FFEBEE;
  --yellow: #F57F17;
  --yellow-light: #FFF8E1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --max-width: 960px;
  --transition: 0.2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--lobster); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }

/* === Layout === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* === Navigation === */
nav {
  background: var(--navy);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

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

nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
}

nav .logo img { height: 40px; border-radius: 6px; mix-blend-mode: screen; }

nav .nav-links { display: flex; gap: 24px; }

nav .nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

nav .nav-links a:hover,
nav .nav-links a.active { color: var(--white); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  nav .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 16px 24px;
    gap: 12px;
  }
  nav .nav-links.open { display: flex; }
}

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 80px 0 60px;
  text-align: center;
}

.hero img.hero-logo { height: 100px; margin-bottom: 24px; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero .btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.btn-primary { background: var(--lobster); color: var(--white); }
.btn-primary:hover { background: #D14E28; color: var(--white); }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { border-color: var(--white); color: var(--white); }

.btn-secondary { background: var(--navy); color: var(--white); }
.btn-secondary:hover { background: var(--navy-light); color: var(--white); }

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

/* === Sections === */
section { padding: 64px 0; }

section.alt { background: var(--gray-100); }

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-600);
  margin-bottom: 40px;
}

/* === Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; }
.card p { color: var(--gray-600); font-size: 0.95rem; }

.card .card-tag {
  display: inline-block;
  background: var(--cream);
  color: var(--lobster);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* === Course Detail === */
.course-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 60px 0 40px;
}

.course-header h1 { font-size: 2rem; margin-bottom: 8px; }
.course-header .course-meta { opacity: 0.7; font-size: 0.95rem; }

.module-list { list-style: none; }

.module-list li {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 16px;
}

.module-list li:last-child { border-bottom: none; }

.module-num {
  background: var(--lobster);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.module-info h4 { font-size: 1rem; color: var(--navy); }
.module-info p { font-size: 0.85rem; color: var(--gray-600); margin-top: 2px; }

/* === Certification Page === */
.test-container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 32px;
}

.test-header {
  background: var(--navy);
  color: var(--white);
  padding: 20px 24px;
}

.test-header h3 { font-size: 1.1rem; }
.test-header .test-tag { opacity: 0.6; font-size: 0.85rem; }

.test-body { padding: 24px; }

.scenario-box {
  background: var(--cream);
  border-left: 4px solid var(--lobster);
  padding: 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.response-area {
  width: 100%;
  min-height: 160px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition);
}

.response-area:focus {
  outline: none;
  border-color: var(--lobster);
}

.response-area::placeholder { color: var(--gray-400); }

.test-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

/* Rubric reveal */
.rubric {
  display: none;
  margin-top: 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.rubric.visible { display: block; }

.rubric-header {
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
}

.rubric-body { padding: 20px; }

.rubric-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}

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

.rubric-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-200);
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.75rem;
}

.rubric-check.checked {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.rubric-item.obligatorio .rubric-label::after {
  content: "Obligatorio";
  background: var(--red-light);
  color: var(--red);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 8px;
}

.rubric-item.deseable .rubric-label::after {
  content: "Deseable";
  background: var(--yellow-light);
  color: var(--yellow);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 8px;
}

.error-grave {
  background: var(--red-light);
  border-left: 4px solid var(--red);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--red);
  font-weight: 500;
}

/* Score display */
.score-box {
  background: var(--green-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 20px;
  text-align: center;
}

.score-box.fail { background: var(--red-light); }

.score-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
}

.score-box.fail .score-value { color: var(--red); }

/* === Agent Section === */
.code-block {
  background: var(--gray-800);
  color: #E0E0E0;
  padding: 20px;
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  line-height: 1.8;
}

.code-block .comment { color: #7C8DA0; }
.code-block .cmd { color: var(--lobster-light); }

/* === How it Works === */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 24px;
  padding: 32px 0;
}

.step-num {
  background: var(--lobster);
  color: var(--white);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-content h3 { color: var(--navy); margin-bottom: 4px; }
.step-content p { color: var(--gray-600); font-size: 0.95rem; }

/* === Stats === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
  padding: 40px 0;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--lobster);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr; gap: 16px; }
}

/* === Footer === */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 40px 0;
  text-align: center;
  font-size: 0.85rem;
}

footer a { color: rgba(255,255,255,0.8); }
footer a:hover { color: var(--white); }

footer .footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 16px;
}

/* === Tab Switcher (for agent/human views) === */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 32px;
}

.tab {
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray-400);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 1rem;
}

.tab:hover { color: var(--gray-800); }

.tab.active {
  color: var(--lobster);
  border-bottom-color: var(--lobster);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* === Certification Summary === */
.cert-summary {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  text-align: center;
  margin-top: 40px;
}

.cert-summary h2 { color: var(--navy); margin-bottom: 8px; }

.cert-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--lobster), #D14E28);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 16px 0;
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.8rem; }
  .hero img.hero-logo { height: 80px; }
  section { padding: 40px 0; }
  .section-title { font-size: 1.4rem; }
  .step { gap: 16px; }
}
