:root {
  --bg: #202220;
  --shadow-dark: #121312;
  --shadow-light: #2e312e;
  --text-main: #e9eae5;
  --text-dim: #a7a9a2;
  --gold: #d9b872;
  --gold-soft: #ecd9a8;
  --green: #25d366;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 16px 60px;
}

.neu-panel {
  width: min(100%, 430px);
  padding: 26px 20px 30px;
  background: var(--bg);
  border-radius: 48px;
  box-shadow: 20px 20px 42px var(--shadow-dark), -14px -14px 32px var(--shadow-light);
}

.widgets-shell {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Base neumórfica ---------- */
.w-card {
  background: var(--bg);
  border-radius: 28px;
  box-shadow: 9px 9px 18px var(--shadow-dark), -9px -9px 18px var(--shadow-light);
}

.w-row {
  display: flex;
  gap: 16px;
}

.w-row > * {
  flex: 1;
  min-width: 0;
}

.w-row--top {
  align-items: stretch;
}

.w-row--social {
  align-items: flex-start;
}

/* ---------- Widget 1: marca ---------- */
.w-brand {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
}

.w-brand-pill {
  flex: 0 0 auto;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
  color: var(--gold);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.w-brand-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 600;
}

.w-brand-lines li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.w-brand-lines .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-main);
  flex: 0 0 auto;
}

/* ---------- Widget 2: buscador + acciones ---------- */
.w-search {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text-main);
}

.w-search-text {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.w-search-divider {
  width: 1px;
  height: 26px;
  background: var(--shadow-dark);
  margin-left: auto;
}

.w-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.w-quick-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
}

.w-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}

.w-circle svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.w-circle--whatsapp {
  background: var(--green);
}

.w-circle--mail {
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
}

/* ---------- Widget 3: perfil ---------- */
.w-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 14px;
}

.w-avatar {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg);
  display: grid;
  place-items: center;
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
}

.w-avatar img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.w-avatar--wide {
  width: 108px;
  height: 46px;
  border-radius: 14px;
  background: none;
  box-shadow: none;
}

.w-avatar--wide img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgb(184 146 79 / 0.55)) drop-shadow(0 2px 4px rgb(0 0 0 / 0.18));
}

.w-profile-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
}

.w-profile-text strong {
  font-size: 1rem;
  color: var(--gold);
}

.w-profile-text span {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.w-divider {
  width: 1px;
  height: 34px;
  background: var(--shadow-dark);
  flex: 0 0 auto;
}

.w-bell {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.w-bell svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.w-badge {
  position: absolute;
  top: 0;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Widget 4: servicio destacado ---------- */
.w-service {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.w-service-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.w-service--qr {
  align-items: center;
}

.w-service-text--center {
  align-items: center;
  text-align: center;
}

.w-service-text--center strong {
  font-weight: 700;
}

.w-service-qr {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.w-service-qr img {
  width: 100%;
  height: auto;
  max-width: 175px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -2px -2px 6px var(--shadow-light);
}

.w-service-text strong {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
}

.w-progress {
  margin-top: 4px;
  height: 7px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
  overflow: hidden;
}

.w-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
}

/* ---------- Widget 5: estadísticas ---------- */
.w-stats {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.w-stats-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.w-stats-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.w-stats-top span {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.w-stats-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-main);
}

.w-stats-bottom span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.w-stats-logo {
  width: 100%;
  height: auto;
  max-width: 175px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  align-self: center;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 2px 2px 6px var(--shadow-dark), inset -2px -2px 6px var(--shadow-light);
}

.w-stats-bottom svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ---------- Widget 6: nuestros servicios ---------- */
.w-toggles-wrap {
  padding: 18px 16px 20px;
}


.w-section-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.w-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.w-service-tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 4px;
  border-radius: 18px;
  text-decoration: none;
  background: var(--bg);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  color: var(--text-dim);
  transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.w-service-tile:hover {
  transform: translateY(-2px);
  box-shadow: 7px 7px 14px var(--shadow-dark), -7px -7px 14px var(--shadow-light);
}

.w-service-tile.is-open {
  transform: translateY(-2px);
  box-shadow: 7px 7px 14px var(--shadow-dark), -7px -7px 14px var(--shadow-light);
}

.w-service-tile:active {
  transform: translateY(0);
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.w-service-tile--active:active {
  box-shadow: inset 2px 2px 5px rgb(0 0 0 / 0.25), inset -2px -2px 5px rgb(255 255 255 / 0.15);
}

.w-service-tile svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.w-service-tile span {
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.w-service-tile--active {
  color: #fff;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
  box-shadow: inset 2px 2px 5px rgb(0 0 0 / 0.15), 4px 4px 10px var(--shadow-dark);
}

.w-service-tile--row {
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
}

.w-service-tile--row svg {
  flex: 0 0 auto;
}

.w-service-tile--row span {
  flex: 0 1 auto;
  text-transform: none;
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ---------- Widget 6b: toggles redes ---------- */
.w-toggles {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.w-toggle {
  aspect-ratio: 1;
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-decoration: none;
  background: var(--bg);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  color: var(--text-dim);
  transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.w-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 7px 7px 14px var(--shadow-dark), -7px -7px 14px var(--shadow-light);
}

.w-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.w-toggle--on {
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
  color: #fff;
  box-shadow: inset 2px 2px 5px rgb(0 0 0 / 0.15), 4px 4px 10px var(--shadow-dark);
}

.w-toggle--whatsapp.w-toggle--on {
  background: linear-gradient(145deg, #34e07a, var(--green));
}

.w-toggle:active {
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

/* ---------- Widget 7: accesos (mismo estilo que toggles) ---------- */
.w-bars {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

/* ---------- Widget 8: dock inferior ---------- */
.w-dock {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.w-dock-btn {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--bg);
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  color: var(--text-dim);
  text-decoration: none;
}

.w-dock-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.w-dock-btn:active {
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

/* ---------- Firma / footer ---------- */
.w-footer-card {
  padding: 16px 20px;
  text-align: center;
}

.w-signature-copy {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.7rem;
  line-height: 1.6;
}

.w-signature-copy a {
  color: var(--text-main);
  font-weight: 700;
}

.w-signature-copy a:hover {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Popover de información por servicio ---------- */
.w-service-tile {
  position: relative;
}

.w-service-tile:hover,
.w-service-tile.is-open {
  z-index: 70;
}

.w-info-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 220px;
  max-width: 70vw;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 60;
}

.w-service-tile--pop-left .w-info-pop {
  left: 0;
  transform: translateX(0) translateY(6px);
}

.w-service-tile--pop-right .w-info-pop {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(6px);
}

.w-service-tile--pop-up .w-info-pop {
  top: auto;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(-6px);
}

.w-service-tile--pop-up.w-service-tile--pop-left .w-info-pop,
.w-service-tile--pop-up.w-service-tile--pop-right .w-info-pop {
  transform: translateX(0) translateY(-6px);
}

.w-service-tile .w-info-pop-desc {
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-main);
  text-align: left;
}

@media (hover: hover) and (pointer: fine) {
  .w-service-tile:hover .w-info-pop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .w-service-tile--pop-left:hover .w-info-pop,
  .w-service-tile--pop-right:hover .w-info-pop {
    transform: translateX(0) translateY(0);
  }
}

.w-service-tile.is-open .w-info-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.w-service-tile--pop-left.is-open .w-info-pop,
.w-service-tile--pop-right.is-open .w-info-pop {
  transform: translateX(0) translateY(0);
}

/* ---------- Responsive: pantallas angostas (<=380px) ---------- */
@media (max-width: 380px) {
  .w-service-tile span {
    font-size: 0.5rem;
  }

  .w-profile {
    gap: 6px;
    padding: 14px 10px;
  }

  .w-bell {
    width: 32px;
    height: 32px;
  }

  .w-bell svg {
    width: 20px;
    height: 20px;
  }

  .w-divider {
    height: 28px;
  }
}
