/* =========================================================
   Laptop que se desarma en 3D (vista explosionada) — portada
   Cada pieza es una capa en el espacio: al pasar el cursor
   las capas se separan hacia arriba, abajo y a los lados.
   ========================================================= */
.lap__stage {
  position: relative; width: 520px; height: 470px; margin-inline: auto;
  perspective: 1700px; perspective-origin: 50% 20%;
}
.lap__base {
  position: absolute; left: 110px; top: 225px; width: 300px; height: 200px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-28deg);
}
.lap__part {
  position: absolute; transform-style: preserve-3d;
  transform: translate3d(0, 0, var(--z0, 0px));
  transition: transform .85s cubic-bezier(.2,.8,.2,1);
}
.lap__part > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pc.is-open .lap__part { transform: translate3d(var(--x, 0px), var(--y, 0px), var(--z1, 0px)); }

/* Sombra en la mesa */
.lap__base::before {
  content: ""; position: absolute; inset: -6% -4% -10% -4%; border-radius: 30px;
  background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent);
  transform: translateZ(-2px); transition: transform .85s cubic-bezier(.2,.8,.2,1), opacity .85s;
}
.pc.is-open .lap__base::before { transform: translateZ(-150px) scale(1.15); opacity: .6; }

/* Posición de cada pieza (armada) y hacia dónde sale (desarmada) */
.lap__bottom  { left: 0;     top: 0;    width: 300px; height: 200px; --z0: 0px;  --y: 30px;  --z1: -88px; }
.lap__battery { left: 25px;  top: 112px; width: 250px; height: 76px; --z0: 2px;  --y: 40px;  --z1: -40px; }
.lap__board   { left: 30px;  top: 12px; width: 240px; height: 88px; --z0: 4px;  --y: 60px;  --z1: 12px; }
.lap__cpu     { left: 100px; top: 36px; width: 30px;  height: 30px; --z0: 6px;  --x: -24px; --y: 70px; --z1: 58px; }
.lap__ram     { left: 40px;  top: 34px; width: 48px;  height: 44px; --z0: 6px;  --x: -128px; --y: 50px; --z1: 34px; }
.lap__ssd     { left: 150px; top: 80px; width: 70px;  height: 18px; --z0: 6px;  --x: 96px;  --y: 132px; --z1: 30px; }
.lap__wifi    { left: 96px;  top: 72px; width: 22px;  height: 26px; --z0: 6px;  --x: -112px; --y: 120px; --z1: 30px; }
.lap__cooler  { left: 92px;  top: 18px; width: 196px; height: 72px; --z0: 9px;  --x: 96px;  --y: 92px; --z1: 40px; }
.lap__deck    { left: 0;     top: 0;    width: 300px; height: 200px; --z0: 14px; --y: -60px; --z1: 80px; }

/* Bordes laterales (grosor de la laptop) */
.lap__edge { position: absolute; background: linear-gradient(90deg, #c2c7ce, #9aa0a9); }
.lap__edge--front { left: 6px; right: 6px; top: 100%; height: 8px; transform-origin: top; transform: rotateX(-90deg); background: linear-gradient(#b8bdc5, #8a9099); }
.lap__edge--left  { left: 0; top: 6px; bottom: 6px; width: 8px; transform-origin: left; transform: rotateY(90deg); background: linear-gradient(90deg, #a9afb8, #7f858e); }
.lap__edge--dark.lap__edge--front { height: 6px; background: linear-gradient(#9ca2ab, #6f757e); }
.lap__edge--dark.lap__edge--left  { width: 6px; background: linear-gradient(90deg, #8d939c, #62686f); }

/* Tapa con pantalla (bisagra en el borde trasero) */
.lap__lid {
  --lid: -74deg;
  position: absolute; left: 0; bottom: 100%; width: 300px; height: 190px;
  transform-style: preserve-3d; transform-origin: 50% 100%;
  transform: translate3d(0, 0, 14px) rotateX(var(--lid));
  transition: transform .85s cubic-bezier(.2,.8,.2,1);
}
.pc.is-open .lap__lid { --lid: -84deg; transform: translate3d(0, -60px, 94px) rotateX(var(--lid)); }
.lap__frame   { left: 0; top: 0; width: 300px; height: 190px; --z0: 0px; --z1: 0px; }
.lap__display { left: 8px; top: 11px; width: 284px; height: 168px; --z0: 1px; --x: 0px; --y: -14px; --z1: 46px; }
.lap__display > svg { box-shadow: 0 0 0 1px rgba(255,255,255,.05); }
.pc.is-open .lap__display > svg { box-shadow: 0 0 30px rgba(96,165,250,.55); }

/* Ventilador girando más rápido al desarmarse */
.lap .spin { animation: pcSpin 1.2s linear infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.pc.is-open.lap .spin { animation-duration: .35s; }

/* Globitos con nombre y función.
   Dentro de cada pieza solo queda un punto de anclaje invisible; el script
   dibuja el globito en una capa plana encima de todo (texto nítido y nunca tapado). */
.lap__part .lap__tag { position: absolute; left: var(--ax, 50%); top: var(--ay, 50%); width: 0; height: 0; overflow: hidden; visibility: hidden; }
.lap__labels { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.lap__label {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; gap: 1px; width: max-content; max-width: 160px;
  padding: .28rem .58rem .32rem; border-radius: 9px;
  font-size: .68rem; line-height: 1.2; color: #fff;
  background: rgba(29,78,216,.95); border: 1px solid rgba(147,197,253,.6);
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.7);
  opacity: 0; transition: opacity .3s ease;
}
.lap__label::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #93c5fd; box-shadow: 0 0 0 3px rgba(147,197,253,.3); left: var(--dotx, 50%); top: var(--doty, 100%); transform: translate(-50%, 4px); }
.lap__label.is-below::after { transform: translate(-50%, -10px); top: 0; }
.lap__label b { font-size: .72rem; font-weight: 800; letter-spacing: .01em; }
.lap__label small { font-size: .62rem; font-weight: 500; color: #dbeafe; }
.lap__labels.is-on .lap__label { opacity: 1; }

/* Punto de anclaje de cada globito (--ty: 6px = globito debajo de la pieza) */
.lap__frame .lap__tag   { display: none; }
.lap__display .lap__tag { --ax: 96%;  --ay: 8%;  --tx: -10%; }
.lap__deck .lap__tag    { --ax: 4%;   --ay: 20%; --tx: -85%; }
.lap__cooler .lap__tag  { --ax: 96%;  --ay: 30%; --tx: -10%; }
.lap__cpu .lap__tag     { --ax: 30%;  --ay: 0%;  --tx: -70%; }
.lap__ram .lap__tag     { --ax: 30%;  --ay: 0%;  --tx: -80%; }
.lap__board .lap__tag   { --ax: 50%;  --ay: 100%; --tx: -50%; --ty: 4px; }
.lap__wifi .lap__tag    { --ax: 20%;  --ay: 0%;  --tx: -90%; }
.lap__ssd .lap__tag     { --ax: 60%;  --ay: 100%; --tx: -20%; --ty: 4px; }
.lap__battery .lap__tag { --ax: 30%;  --ay: 100%; --tx: -70%; --ty: 2px; }
.lap__bottom .lap__tag  { --ax: 96%;  --ay: 100%; --tx: -20%; --ty: 0px; }

/* Responsivo */
@media (max-width: 1180px) and (min-width: 1081px) { .lap__stage { transform: scale(.9); transform-origin: center top; margin-bottom: -47px; } }
@media (max-width: 640px) {
  .lap__stage { transform: scale(.64); transform-origin: center top; margin-bottom: -170px; left: 50%; margin-left: -260px; }
}
@media (prefers-reduced-motion: reduce) {
  .lap__part, .lap__lid { transition-duration: .01s; }
  .lap .spin { animation: none; }
}

/* =========================================================
   Recuadro "Noticias del día · Top 5 de tecnología"
   ========================================================= */
.news {
  position: relative; z-index: 6; width: 100%; max-width: 500px; margin: 14px auto 0; overflow: hidden;
  border-radius: 18px; color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.news[hidden] { display: none; }
.news__head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem .55rem; }
.news__badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .6rem; border-radius: 999px;
  font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(239,68,68,.16); color: #fecaca; border: 1px solid rgba(248,113,113,.35);
}
.news__live { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.7); animation: newsLive 1.8s ease-out infinite; }
@keyframes newsLive { to { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
.news__title { font-size: .9rem; font-weight: 800; letter-spacing: -.01em; }
.news__count { margin-left: auto; font-size: .78rem; color: rgba(225,234,255,.7); font-variant-numeric: tabular-nums; }
.news__count b { color: #fff; }

.news__viewport { overflow: hidden; touch-action: pan-y; }
.news__track { display: flex; list-style: none; margin: 0; padding: 0; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.news__item { flex: 0 0 100%; min-width: 0; }
.news__link, .news__item--loading {
  display: grid; grid-template-columns: 84px 1fr; gap: .85rem; align-items: center;
  padding: .35rem 1rem .7rem; color: inherit; text-decoration: none;
}
.news__thumb {
  width: 84px; height: 84px; border-radius: 12px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #1d4ed8, #0b1f6b); display: grid; place-items: center;
}
.news__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news__thumb svg { width: 34px; height: 34px; color: #bfdbfe; }
.news__num { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; font-weight: 800; background: rgba(11,18,41,.82); color: #fff; }
.news__body { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.news__meta { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #93c5fd; }
.news__meta span { color: rgba(225,234,255,.6); font-weight: 600; letter-spacing: .02em; text-transform: none; }
.news__headline {
  font-size: .95rem; font-weight: 700; line-height: 1.32; color: #fff; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news__read { font-size: .74rem; font-weight: 700; color: #bfdbfe; display: inline-flex; align-items: center; gap: .3rem; }
.news__link:hover .news__headline { text-decoration: underline; text-decoration-color: rgba(147,197,253,.6); text-underline-offset: 3px; }
.news__skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.18), rgba(255,255,255,.08)); background-size: 200% 100%; animation: newsSkel 1.2s linear infinite; }
.news__skel--short { width: 60%; }
@keyframes newsSkel { to { background-position: -200% 0; } }

.news__foot { display: flex; align-items: center; gap: .4rem; padding: 0 .7rem .65rem; }
.news__nav {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s;
}
.news__nav:hover { background: rgba(255,255,255,.16); }
.news__nav svg { width: 16px; height: 16px; }
.news__dots { display: flex; gap: 6px; }
.news__dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255,255,255,.3); cursor: pointer; transition: width .3s, background .3s; }
.news__dots button[aria-current="true"] { width: 22px; background: #60a5fa; }
.news__date { margin-left: auto; font-size: .7rem; color: rgba(225,234,255,.6); }
.news__progress { height: 3px; background: rgba(255,255,255,.08); }
.news__progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #60a5fa, #a5b4fc); }
.news__progress i.run { animation: newsBar var(--dur, 7s) linear forwards; }
.news.is-paused .news__progress i.run { animation-play-state: paused; }
@keyframes newsBar { to { width: 100%; } }

@media (max-width: 640px) {
  .news { margin-top: 18px; border-radius: 16px; }
  .news__link, .news__item--loading { grid-template-columns: 72px 1fr; gap: .75rem; }
  .news__thumb { width: 72px; height: 72px; }
  .news__headline { font-size: .92rem; }
  .news__nav { width: 40px; height: 40px; }
  .news__dots button { height: 10px; width: 10px; }
  .news__dots button[aria-current="true"] { width: 24px; }
}
@media (prefers-reduced-motion: reduce) { .news__track { transition: none; } .news__live { animation: none; } }

/* Letreros blancos: arriba de la laptop para dejar libre el recuadro de noticias */
.hero__visual .float-card--a { left: -64px; top: 40%; bottom: auto; }
.hero__visual .float-card--b { right: 0; top: 2%; }
.hero__visual .pc__hint { margin-top: -8px; }

/* Evita que la portada se ensanche en celular */
.hero__inner > * { min-width: 0; }
.news, .news__viewport { min-width: 0; }

/* Noticias: tarjeta blanca sólida para que sobresalga sobre el azul */
.news {
  background: #fff; color: #0b1f6b; border: 1px solid #e3e9f7;
  box-shadow: 0 28px 60px -22px rgba(2,8,40,.75), 0 0 0 6px rgba(255,255,255,.08);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.news__head { border-bottom: 1px solid #eef2fb; padding-bottom: .65rem; margin-bottom: .55rem; }
.news__badge { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.news__title { color: #0b1f6b; }
.news__count { color: #64748b; }
.news__count b { color: #1d4ed8; }
.news__meta { color: #1d4ed8; }
.news__meta span { color: #64748b; }
.news__headline { color: #0f172a; }
.news__read { color: #1d4ed8; }
.news__link:hover .news__headline { text-decoration-color: rgba(29,78,216,.5); }
.news__skel { background: linear-gradient(90deg, #eef2f7, #e2e8f0, #eef2f7); background-size: 200% 100%; }
.news__nav { background: #f1f5fd; border-color: #dbe4f5; color: #1d4ed8; }
.news__nav:hover { background: #e0e9fb; }
.news__dots button { background: #cbd5e1; }
.news__dots button[aria-current="true"] { background: #1d4ed8; }
.news__date { color: #64748b; text-transform: capitalize; }
.news__progress { background: #eef2fb; }
.news__progress i { background: linear-gradient(90deg, #1d4ed8, #60a5fa); }

@media (max-width: 640px) {
  .hero__visual .float-card--a { left: 0; top: 34%; }
  .hero__visual .float-card--b { right: 0; top: 0; }
}
.news__badge, .news__title, .news__count, .news__date { white-space: nowrap; }
@media (max-width: 640px) {
  .news__head { gap: .45rem; padding: .7rem .8rem .55rem; }
  .news__badge { font-size: .6rem; padding: .2rem .5rem; letter-spacing: .06em; }
  .news__title { font-size: .82rem; }
  .news__link, .news__item--loading { padding: .3rem .8rem .65rem; }
  .news__foot { padding: 0 .6rem .6rem; }
  .news__date { font-size: .66rem; }
}
@media (max-width: 640px) {
  .lap__label { max-width: 128px; padding: .22rem .45rem .26rem; border-radius: 8px; }
  .lap__label b { font-size: .64rem; }
  .lap__label small { font-size: .56rem; }
}
@media (max-width: 640px) { .lap__label small { display: none; } .lap__label b { font-size: .66rem; } }

/* Solo los componentes útiles llevan globito, bien repartidos */
.lap__deck .lap__tag, .lap__wifi .lap__tag, .lap__bottom .lap__tag, .lap__display .lap__tag, .lap__frame .lap__tag { display: none; }
.lap__cooler .lap__tag  { --ax: 82%; --ay: 0%;   --tx: -30%; --ty: calc(-100% - 6px); }
.lap__cpu .lap__tag     { --ax: 20%; --ay: 0%;   --tx: -100%; --ty: calc(-100% - 6px); }
.lap__ram .lap__tag     { --ax: 20%; --ay: 100%; --tx: -60%; --ty: 4px; }
.lap__board .lap__tag   { --ax: 30%; --ay: 100%; --tx: -50%; --ty: 4px; }
.lap__ssd .lap__tag     { --ax: 90%; --ay: 100%; --tx: -10%; --ty: 4px; }
.lap__battery .lap__tag { --ax: 70%; --ay: 100%; --tx: -30%; --ty: 4px; }
.lap__ram .lap__tag     { --ax: 10%; --ay: 0%;   --tx: -75%; --ty: calc(-100% - 6px); }
.lap__battery .lap__tag { --ax: 50%; --ay: 100%; --tx: -50%; --ty: 8px; }
.lap__ssd .lap__tag     { --ax: 100%; --ay: 0%;  --tx: 0%;   --ty: 8px; }

/* Noticias: franja propia debajo de la portada, de lado a lado */
.hero__news { position: relative; z-index: 3; margin-top: 34px; }
.hero__news .news { max-width: none; margin: 0; }
@media (min-width: 900px) {
  .hero__news .news__head { padding: .9rem 1.4rem .7rem; }
  .hero__news .news__title { font-size: 1rem; }
  .hero__news .news__link, .hero__news .news__item--loading { grid-template-columns: 150px 1fr; gap: 1.3rem; padding: .4rem 1.4rem .9rem; }
  .hero__news .news__thumb { width: 150px; height: 96px; }
  .hero__news .news__headline { font-size: 1.15rem; -webkit-line-clamp: 2; }
  .hero__news .news__foot { padding: 0 1.2rem .8rem; }
}
@media (max-width: 640px) { .hero__news { margin-top: 26px; } }
