/* e:/001_Antigravity/ClaseMaestria_001/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colores principales */
  --color-bg-navy: #1E3A8A;
  --color-mustard-soft: #F1B333;
  --color-mustard-hover: #D8981A;
  --color-blue-accent: #3B82F6;
  
  /* Colores de soporte para tema oscuro navy */
  --bg-dark-900: #0a163a; /* Navy extra oscuro para fondos profundos */
  --bg-dark-800: #102154; /* Navy medio */
  --bg-dark-700: #162c6d; /* Navy claro */
  --text-light: #F8FAFC;  /* Blanco suave */
  --text-muted: #CBD5E1;  /* Gris claro */
  --border-glass: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(10, 22, 58, 0.7);
  
  /* Fuentes */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--color-bg-navy);
  background-image: 
    radial-gradient(at 0% 0%, #102154 0px, transparent 50%),
    radial-gradient(at 100% 100%, #0a163a 0px, transparent 50%),
    radial-gradient(at 50% 50%, #1e3a8a 0px, transparent 60%);
  background-attachment: fixed;
  color: var(--text-light);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

/* Glassmorphism card */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.35);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(241, 179, 51, 0.25);
  box-shadow: 0 15px 45px 0 rgba(241, 179, 51, 0.1);
  transform: translateY(-2px);
}

/* Premium Gradient Border Card */
.gradient-border-card {
  border: 2px solid transparent;
  border-radius: 20px;
  background-image: linear-gradient(rgba(10, 22, 58, 0.95), rgba(10, 22, 58, 0.95)), 
                    linear-gradient(135deg, var(--color-mustard-soft) 0%, var(--color-blue-accent) 50%, var(--color-mustard-soft) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gradient-border-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 45px rgba(241, 179, 51, 0.15);
  background-image: linear-gradient(rgba(16, 32, 80, 0.95), rgba(16, 32, 80, 0.95)), 
                    linear-gradient(135deg, var(--color-blue-accent) 0%, var(--color-mustard-soft) 50%, var(--color-blue-accent) 100%);
}

/* Background Blobs for Hero */
.hero-glow-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
}

.hero-glow-blob-1 {
  position: absolute;
  top: -10%;
  left: 5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(241, 179, 51, 0.12) 0%, transparent 70%);
  filter: blur(90px);
  animation: floatAnimation1 12s infinite alternate ease-in-out;
}

.hero-glow-blob-2 {
  position: absolute;
  top: 40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  filter: blur(100px);
  animation: floatAnimation2 15s infinite alternate ease-in-out;
}

@keyframes floatAnimation1 {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(30px) scale(1.1); }
}

@keyframes floatAnimation2 {
  0% { transform: translate(0px, 0px) scale(1.1); }
  100% { transform: translate(-40px, 20px) scale(0.9); }
}

/* Navbar */
.navbar-custom {
  background: rgba(10, 22, 58, 0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
}

.navbar-brand {
  font-family: var(--font-title);
  font-weight: 800;
  color: #FFFFFF !important;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 40px;
  margin-right: 12px;
}

.nav-link {
  font-weight: 600;
  color: var(--text-muted) !important;
  opacity: 0.8;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  opacity: 1;
  color: var(--color-mustard-soft) !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-mustard-soft), var(--color-blue-accent));
  border-radius: 2px;
}

/* Hero Section */
.hero-section {
  padding: 80px 0;
  position: relative;
}

.hero-badge {
  background: rgba(241, 179, 51, 0.1);
  border: 1px solid rgba(241, 179, 51, 0.4);
  color: var(--color-mustard-soft);
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 25px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.15;
  color: #FFFFFF;
  margin-bottom: 25px;
  font-weight: 800;
}

.hero-title span {
  background: linear-gradient(135deg, var(--color-mustard-soft) 0%, #FFFFFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Buttons using Soft Mustard */
.btn-primary-custom {
  background: var(--color-mustard-soft);
  border: none;
  color: var(--color-bg-navy);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 5px 20px rgba(241, 179, 51, 0.3);
}

.btn-primary-custom:hover {
  background: var(--color-mustard-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(241, 179, 51, 0.5);
  color: var(--color-bg-navy);
}

.btn-secondary-custom {
  background: transparent;
  border: 1.5px solid var(--color-mustard-soft);
  color: var(--color-mustard-soft);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary-custom:hover {
  background: rgba(241, 179, 51, 0.1);
  color: var(--color-mustard-soft);
  transform: translateY(-3px);
}

/* Card simulation modules */
.module-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 35px;
  border-radius: 20px;
  background: rgba(10, 22, 58, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.module-icon {
  width: 65px;
  height: 65px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 30px;
  background: rgba(241, 179, 51, 0.15);
  border: 1.5px solid rgba(241, 179, 51, 0.35);
  color: var(--color-mustard-soft);
  box-shadow: 0 0 20px rgba(241, 179, 51, 0.15);
}

/* Pulse animation for hero graphic icon */
.animate-pulse {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% { opacity: 0.8; transform: scale(1); filter: drop-shadow(0 0 2px rgba(241, 179, 51, 0.2)); }
  50% { opacity: 1; transform: scale(1.04); filter: drop-shadow(0 0 10px rgba(241, 179, 51, 0.5)); }
  100% { opacity: 0.8; transform: scale(1); filter: drop-shadow(0 0 2px rgba(241, 179, 51, 0.2)); }
}

/* Simulation General Framework */
.simulation-container {
  display: none;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.simulation-container.active {
  display: block;
}

/* Progress bar customization */
.progress-custom {
  background: var(--bg-dark-600);
  height: 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-cost {
  background: linear-gradient(90deg, var(--color-mustard-soft), var(--color-blue-accent));
}

.progress-bar-satisfaction {
  background: linear-gradient(90deg, var(--color-blue-accent), var(--color-mustard-soft));
}

/* Decision Cards for Design Thinking */
.decision-btn {
  background: rgba(10, 22, 58, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-light);
  width: 100%;
}

.decision-btn:hover {
  background: rgba(241, 179, 51, 0.08);
  border-color: var(--color-mustard-soft);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(241, 179, 51, 0.15);
}

.decision-btn h5 {
  color: #FFFFFF;
}

/* Timeline / Roadmaps steps */
.timeline-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 40px;
}

.timeline-steps::before {
  content: '';
  position: absolute;
  top: 25px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg-dark-600);
  z-index: 1;
  border-radius: 10px;
}

.timeline-progress-line {
  position: absolute;
  top: 25px;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-mustard-soft), var(--color-blue-accent));
  z-index: 2;
  transition: width 0.5s ease;
  width: 0%;
}

.step-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50px;
}

.step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-dark-700);
  border: 3px solid var(--bg-dark-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: all 0.4s ease;
}

.step-node.active .step-circle {
  border-color: var(--color-mustard-soft);
  background: var(--bg-dark-800);
  color: white;
  box-shadow: 0 0 18px rgba(241, 179, 51, 0.4);
}

.step-node.completed .step-circle {
  border-color: var(--color-blue-accent);
  background: var(--color-mustard-soft);
  color: var(--color-bg-navy);
}

.step-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.step-node.active .step-label {
  color: var(--color-mustard-soft);
}

.step-node.completed .step-label {
  color: var(--color-blue-accent);
}

/* Drag and Drop - Risk Matrix */
.drag-container {
  min-height: 120px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 5px;
}

.risk-card {
  background: linear-gradient(135deg, rgba(16, 32, 80, 0.8) 0%, rgba(10, 22, 58, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  cursor: grab;
  user-select: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.risk-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-blue-accent);
}

.risk-card h6 {
  color: #FFFFFF;
}

.risk-card:active {
  cursor: grabbing;
}

.risk-card.dragging {
  opacity: 0.6;
  border-color: var(--color-mustard-soft);
  transform: scale(0.97);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.risk-card.matched {
  cursor: default;
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

.risk-card.matched::before {
  background: #10B981;
}

/* Matrix Styling */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 8px;
}

.matrix-cell {
  background: rgba(10, 22, 58, 0.4);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 24px;
  min-height: 230px;
  transition: all 0.3s ease;
  position: relative;
}

.matrix-cell.drag-over {
  background: rgba(241, 179, 51, 0.08);
  border-color: var(--color-mustard-soft);
  box-shadow: inset 0 0 25px rgba(241, 179, 51, 0.1);
}

.matrix-cell-header {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.02em;
}

.cell-danger {
  border-color: rgba(255, 255, 255, 0.2);
}
.cell-warning {
  border-color: rgba(241, 179, 51, 0.3);
}

/* Mitigation Cards */
.mitigation-card {
  background: linear-gradient(135deg, rgba(16, 32, 80, 0.8) 0%, rgba(10, 22, 58, 0.95) 100%);
  border: 1px solid rgba(241, 179, 51, 0.2);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  cursor: grab;
  transition: all 0.3s ease;
  position: relative;
}

.mitigation-card h6 {
  color: #FFFFFF;
}

.mitigation-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-mustard-soft);
}

.mitigation-card.dragging {
  opacity: 0.6;
  border-color: var(--color-mustard-soft);
}

.mitigation-card.matched {
  cursor: default;
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

.mitigation-card.matched::before {
  background: #10B981;
}

.dropzone-mitigation {
  border: 1.5px dashed rgba(241, 179, 51, 0.4);
  background: rgba(241, 179, 51, 0.04);
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dropzone-mitigation.drag-over {
  background: rgba(241, 179, 51, 0.15);
  border-color: var(--color-mustard-soft);
  color: var(--text-light);
}

/* Consequence Popups/Notification */
.consequence-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 10, 30, 0.85);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.consequence-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.consequence-content {
  max-width: 580px;
  width: 100%;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid #EF4444;
  box-shadow: 0 0 45px rgba(239, 68, 68, 0.25);
  background: #0f1c48;
}

.consequence-modal.active .consequence-content {
  transform: scale(1);
}

.consequence-modal .alert-dark {
  background-color: rgba(5, 10, 30, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Results panel */
.result-badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
}

.result-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
}

.path-card {
  background: rgba(10, 22, 58, 0.5);
  border-radius: 14px;
  padding: 20px;
  border-left: 4px solid var(--text-muted);
}

.path-card.path-optimal {
  border-left-color: var(--color-mustard-soft);
}

.path-card.path-worst {
  border-left-color: #EF4444;
}

.path-card.path-user {
  border-left-color: var(--color-blue-accent);
  background: rgba(59, 130, 246, 0.05);
}

/* Compare bar charts */
.chart-bar-container {
  margin-top: 18px;
  margin-bottom: 18px;
}

.chart-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 6px;
  font-weight: 700;
}

.chart-bar-bg {
  background: var(--bg-dark-800);
  height: 26px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.chart-bar-fill {
  height: 100%;
  transition: width 1s ease-out;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  color: white;
}

/* Alert boxes inside simulators */
.alert-dark {
  background-color: rgba(10, 22, 58, 0.5);
  border: 1px solid var(--border-light) !important;
  color: var(--text-light);
}

.bg-dark-800 {
  background-color: rgba(10, 22, 58, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Color Helpers */
.text-navy { color: var(--color-bg-navy) !important; }
.text-blue { color: var(--color-blue-accent) !important; }
.text-mustard { color: var(--color-mustard-soft) !important; }
.bg-navy { background-color: var(--color-bg-navy) !important; }
.bg-blue { background-color: var(--color-blue-accent) !important; }
.bg-mustard { background-color: var(--color-mustard-soft) !important; }
.text-pink { color: var(--color-mustard-soft) !important; }

/* Footer styling */
footer.custom-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 50px 0 30px;
  background: rgba(10, 22, 58, 0.6);
}

footer.custom-footer h5 {
  color: var(--color-mustard-soft);
  font-weight: 700;
  margin-bottom: 20px;
}

footer.custom-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
}

footer.custom-footer a:hover {
  color: var(--color-mustard-soft);
}

.social-links-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  margin-right: 12px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.social-links-footer a:hover {
  background: var(--color-mustard-soft);
  color: var(--color-bg-navy) !important;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(241, 179, 51, 0.3);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 3.2rem;
  }
  
  .matrix-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline-steps {
    overflow-x: auto;
    padding-bottom: 20px;
  }
  
  .step-node {
    margin-right: 20px;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .timeline-steps::before, .timeline-progress-line {
    display: none;
  }
  .timeline-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .step-node {
    flex-direction: row;
    width: 100%;
    gap: 15px;
  }
  .step-label {
    margin-top: 0;
  }
}

/* Overrides for Bootstrap colors on dark theme to prevent black/dark texts */
.text-dark { color: var(--text-light) !important; }
.text-success { color: #10B981 !important; }
.text-danger { color: #EF4444 !important; }
.text-warning { color: var(--color-mustard-soft) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-success-subtle { background-color: rgba(16, 185, 129, 0.15) !important; color: #10B981 !important; }
.bg-danger-subtle { background-color: rgba(239, 68, 68, 0.15) !important; color: #EF4444 !important; }
.bg-warning-subtle { background-color: rgba(241, 179, 51, 0.15) !important; color: var(--color-mustard-soft) !important; }

.btn-close { filter: invert(1); }

/* Estilos para el Árbol de Archivos de Riesgos */
.file-tree-container {
  font-family: var(--font-body);
}
.file-tree-container .text-secondary {
  color: rgba(255, 255, 255, 0.35) !important;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}

/* Scrollbars para los decks de cartas y la matriz */
.matrix-grid::-webkit-scrollbar, .drag-container::-webkit-scrollbar {
  width: 8px;
}
.matrix-grid::-webkit-scrollbar-track, .drag-container::-webkit-scrollbar-track {
  background: rgba(10, 22, 58, 0.4);
  border-radius: 10px;
}
.matrix-grid::-webkit-scrollbar-thumb, .drag-container::-webkit-scrollbar-thumb {
  background: rgba(241, 179, 51, 0.45);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.matrix-grid::-webkit-scrollbar-thumb:hover, .drag-container::-webkit-scrollbar-thumb:hover {
  background: var(--color-mustard-soft);
}
