/* ==========================================================
   DEMO INTERACTIVA
========================================================== */
.ghost-demo-wrapper {
  max-width: 1100px;
  margin: 40px auto;
  background: #eef2ff;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(11,28,45,0.1);
  border: 1px solid #cbd5e1;
  display: flex;
  overflow: hidden;
  min-height: 650px;
  font-family: Poppins, system-ui, sans-serif;
  position: relative;
}

.demo-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 4px 15px rgba(16,185,129,0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulseDemo 2s infinite;
}

@keyframes pulseDemo {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.demo-sidebar {
  width: 250px;
  background: #ffffff;
  padding: 30px 20px;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
}

.demo-logo {
  text-align: center;
  margin-bottom: 30px;
  font-weight: 800;
  font-size: 20px;
  color: #2b7cff;
}

.demo-nav-btn {
  background: transparent;
  border: none;
  text-align: left;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-nav-btn:hover { background: #f8fafc; color: #0b1c2d; }

.demo-nav-btn.active {
  background: #2b7cff;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(43,124,255,0.3);
}

.demo-content-area {
  flex: 1;
  padding: 40px;
  position: relative;
  overflow-y: auto;
  max-height: 650px;
}

.demo-section { animation: fadeInDemo 0.4s ease; }

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

.demo-section.sf-hidden { display: none; }

/* Profile */
.profile-dashboard { color: #0b1c2d; }
.profile-title { font-size: 28px; font-weight: 700; margin-bottom: 30px; margin-top: 0; }
.profile-title span { color: #2b7cff; }
.profile-grid { display: flex; gap: 30px; align-items: flex-start; flex-wrap: wrap; }
.profile-left { flex: 2; display: flex; flex-direction: column; gap: 20px; min-width: 300px; }

.white-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
}
.white-card h3 { margin-top: 0; font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 20px; }

.profile-right { flex: 1; display: flex; flex-direction: column; gap: 15px; min-width: 280px; }

.tu-tarjeta {
  background: #809bf2;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(128,155,242,0.4);
}
.tu-tarjeta h3 { color: #ffffff; font-size: 24px; margin-top: 0; margin-bottom: 24px; font-weight: 700; }
.tarjeta-item { margin-bottom: 16px; }
.tarjeta-item p { color: #ffffff; font-size: 14px; margin: 0 0 8px 0; font-weight: 500; }
.tarjeta-badge {
  display: inline-block;
  background: #ffffff;
  color: #0b1c2d;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-right {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s, opacity 0.2s;
}
.btn-right:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-password { background: #b9cbf5; color: #ffffff; }
.btn-delete   { background: #e8b6c1; color: #000000; }

/* Notifications */
.notif-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 8px;
}
.notif-list::-webkit-scrollbar { width: 6px; }
.notif-list::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.notif-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  border-radius: 8px;
}
.notif-item:hover { background: #f8fafc; transform: translateX(4px); }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.notif-unread .notif-dot { background: #2b7cff; box-shadow: 0 0 8px rgba(43,124,255,0.4); }
.notif-read .notif-dot   { background: #cbd5e1; }
.notif-text { font-size: 14px; color: #0f172a; }
.notif-unread .notif-text { font-weight: 700; }
.notif-read .notif-text   { font-weight: 500; color: #64748b; }

/* Demo modals */
.notif-modal-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(11,28,45,0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

.notif-modal-overlay.modal-active {
  opacity: 1;
  visibility: visible;
}

.notif-modal-overlay.modal-active .notif-modal-box {
  transform: translateY(0);
}

.notif-modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  padding: 30px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-modal-close {
  position: absolute;
  top: 15px; right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #64748b;
  transition: color 0.2s;
}
.notif-modal-close:hover { color: #ef4444; }

.pwd-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  margin-bottom: 10px;
}
.pwd-input:focus { border-color: #2b7cff; box-shadow: 0 0 0 3px rgba(43,124,255,0.1); }

.pwd-btn-submit {
  width: 100%;
  background: #2b7cff;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.pwd-btn-submit:hover { opacity: 0.9; }

/* Placeholder sections */
.demo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: #64748b;
  gap: 12px;
}
.demo-placeholder i { font-size: 48px; color: #cbd5e1; }
.demo-placeholder p { font-size: 15px; font-weight: 600; margin: 0; }

/* ==========================================================
   SECCIÓN "NUESTRA TECNOLOGÍA"
========================================================== */
.mh-tech-intro {
  max-width: 800px;
  margin: 80px auto 20px;
  text-align: center;
  padding: 0 20px;
  font-family: 'Poppins', system-ui, sans-serif;
}

.mh-tech-intro h2 {
  font-size: 38px;
  font-weight: 800;
  color: #0b1c2d;
  margin: 0 0 16px;
  line-height: 1.2;
}

.mh-tech-intro p {
  font-size: 17px;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================
   FEATURES GRID CON SCROLL STICKY
========================================================== */
.mh-scroll-container {
  position: relative;
  height: 250vh;
  width: 100%;
}

.mh-sticky-section {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mh-features-wrapper {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  padding: 20px;
  box-sizing: border-box;
}

.mh-features-grid {
  position: relative;
  width: 100%;
  height: 600px;
}

.mh-feature-card {
  background: #ffffff;
  border-radius: 36px;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  cursor: pointer;
  position: absolute;
  width: calc(46% - 15px);
  height: calc(46% - 15px);
  transition: box-shadow 0.3s ease;
  will-change: transform, opacity;
  box-sizing: border-box;
}

.mh-feature-card:hover { box-shadow: 0 25px 45px rgba(0,0,0,0.08); }

#card-tl { top: 0; left: 0; }
#card-tr { top: 0; right: 0; }
#card-bl { bottom: 0; left: 0; }
#card-br { bottom: 0; right: 0; }

#card-center {
  top: 50%;
  left: 50%;
  width: 38%;
  height: auto;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
  border: 2px solid #2b7cff;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  z-index: 10;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease, box-shadow 0.3s ease;
}

#card-center.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Cuando las esquinas se han dispersado y la central queda sola:
   crece un poco más y gana un halo azul. */
#card-center.visible.solo {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 30px 70px rgba(43,124,255,0.28), 0 0 0 6px rgba(43,124,255,0.08);
}

/* Halo radial detrás de la rejilla, se intensifica con .solo en la central */
.mh-features-grid::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 60%; height: 60%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(43,124,255,0.10) 0%, rgba(43,124,255,0) 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 0;
}
.mh-features-grid:has(#card-center.solo)::before { opacity: 1; }

.mh-feature-content { flex: 1; }

.mh-feature-title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #0b1c2d !important;
  margin: 0 0 10px 0 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.5px !important;
}

.mh-feature-text {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #334155 !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

.mh-feature-visual {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.mh-center-icons { display: flex; gap: 20px; margin-top: 15px; font-size: 35px; }
.mh-icon-large   { font-size: 50px; color: #4c8cfc; }
.mh-icon-medium  { font-size: 40px; }

.mh-icon-shield-wrapper {
  position: relative;
  color: #0b1c2d;
  font-size: 50px;
  line-height: 1;
}

.mh-icon-check-badge {
  position: absolute;
  bottom: -5px; right: -10px;
  background-color: #4ade80;
  color: #ffffff;
  border-radius: 50%;
  font-size: 14px;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #ffffff;
}

/* Feature modals */
.mh-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(11,28,45,0.4);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mh-modal-overlay.modal-active {
  opacity: 1;
  visibility: visible;
}

.mh-modal-content.info-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 40px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  font-family: 'Poppins', sans-serif;
  text-align: left;
  box-sizing: border-box;
}

.mh-modal-overlay.modal-active .mh-modal-content.info-modal {
  transform: translateY(0);
}

.mh-modal-close {
  position: absolute;
  top: 15px; right: 15px;
  background: #f1f5f9;
  color: #0b1c2d;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}
.mh-modal-close:hover { background: #e2e8f0; }

.info-modal-title {
  font-size: 22px;
  color: #0b1c2d;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #eef2ff;
  padding-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-modal-body-text {
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 950px) {
  .ghost-demo-wrapper { flex-direction: column; }
  .demo-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .demo-logo { width: 100%; margin-bottom: 10px; }
  .profile-left { flex-direction: column; }
}

@media (max-width: 900px) {
  .mh-scroll-container { height: auto !important; }
  .mh-sticky-section { position: relative !important; height: auto !important; overflow: hidden !important; padding: 20px 0 !important; }
  .mh-features-grid { height: auto !important; display: flex !important; flex-direction: column !important; gap: 20px !important; }
  .mh-feature-card {
    position: relative !important;
    top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    width: 100% !important; height: auto !important;
    transform: none !important; flex-direction: column-reverse !important;
    align-items: center !important; text-align: center !important;
    padding: 30px 20px !important;
    opacity: 1 !important;
    border-radius: 24px !important;
  }
  #card-center { order: -1 !important; }
  .mh-feature-visual { flex-direction: row !important; width: 100% !important; justify-content: center !important; margin-top: 0 !important; margin-bottom: 15px !important; }
  .mh-center-icons { margin-top: 0 !important; margin-bottom: 15px !important; justify-content: center !important; }
  .mh-modal-content.info-modal { padding: 30px 20px !important; width: 95% !important; }
  .info-modal-title { font-size: 18px !important; flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }
  .mh-tech-intro h2 { font-size: 28px; }
}

/* =====================================================
   Fix: la clase .demo-section colisiona con la sección
   demo OSCURA de la home (definida en styles.css). Aquí
   los .demo-section son paneles de pestañas claros, así
   que neutralizamos el fondo/padding heredados.
   ===================================================== */
.ghost-demo-wrapper .demo-section {
  background: transparent !important;
  padding: 0 !important;
  overflow: visible !important;
}
.ghost-demo-wrapper .demo-section::before,
.ghost-demo-wrapper .demo-section::after {
  display: none !important;
}
