/* Página de inicio (views/pages/home.php): hero, carrusel, franja de confianza, categorías y fila de destacados. */

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 36px 0 60px; color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(155, 208, 16, .28), transparent 60%),
    radial-gradient(700px 400px at -5% 110%, rgba(56, 189, 248, .14), transparent 60%),
    linear-gradient(160deg, #0b1324 0%, #111c33 55%, #16243f 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: center; }
.hero h1 { margin-top: .6rem; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.06; letter-spacing: -.035em; color: #fff; }
.hero .kicker { padding: .3rem .8rem; background: rgba(155, 208, 16, .1); border: 1px solid rgba(155, 208, 16, .25); border-radius: 999px; color: var(--brand); }
.hero .lead { max-width: 38ch; margin-top: .7rem; font-size: 1.1rem; color: #cbd5e1; }
.hero .sublead { color: #94a3b8; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 1rem 0 .9rem; }
.hero .pills { gap: 6px; }
.hero .pills li { padding: .2rem .6rem; font-size: .78rem; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #e2e8f0; }

/* ---------- Carrusel ---------- */
.slider {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #fff; border-radius: 28px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .12);
}
.slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.slider img.is-on { opacity: 1; }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .6); cursor: pointer; }
.dots button.is-on { width: 24px; border-radius: 6px; background: #fff; }

/* ---------- Franja de confianza ---------- */
.trust {
  position: relative; z-index: 2; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: -30px 0 0; padding: 0;
  background: #fff; border: 1px solid rgba(15, 23, 42, .05); border-radius: 22px; box-shadow: var(--shadow-lg);
}
.trust li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.trust li + li { border-left: 1px solid var(--line); }
.trust span { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); font-size: 1.3rem; }
.trust strong { display: block; font-size: .95rem; line-height: 1.2; }
.trust small { display: block; font-size: .8rem; line-height: 1.2; color: var(--muted); }

/* ---------- Categorías (cada una con su tono: --h) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.cat {
  --h: 100; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; overflow: hidden;
  background: var(--surface); border: 1px solid rgba(15, 23, 42, .06); border-radius: 22px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cat::before { content: ""; position: absolute; right: -34px; top: -34px; width: 84px; height: 84px; border-radius: 50%; background: hsl(var(--h) 85% 82% / .85); transition: transform .4s; }
.cat:hover { transform: translateY(-3px); border-color: hsl(var(--h) 65% 50%); box-shadow: 0 18px 30px -14px hsl(var(--h) 60% 40% / .35); }
.cat:hover::before { transform: scale(1.6); }
.cat-icon { position: relative; width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 14px; background: hsl(var(--h) 85% 82%); font-size: 1.4rem; }
.cat strong { position: relative; font-size: .95rem; }

/* ---------- Destacados: fila deslizable ---------- */
.rail-wrap { position: relative; }
.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 2px; padding: 2px 2px 10px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > .card { flex: 0 0 clamp(210px, 22vw, 250px); scroll-snap-align: start; }
.rail-btn { position: absolute; top: 42%; width: 40px; height: 40px; display: grid; place-items: center; padding: 0 0 3px; border: 1px solid rgba(15, 23, 42, .1); border-radius: 50%; background: #fff; box-shadow: var(--shadow-lg); font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer; }
.rail-btn[hidden] { display: none; }
.rail-btn:hover { background: var(--brand-soft); }
.rail-prev { left: -14px; }
.rail-next { right: -14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) {
  .hero { padding: 28px 0 52px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .trust { grid-template-columns: 1fr 1fr; }
  .trust li:nth-child(3) { border-left: 0; }
  .trust li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .hero { padding: 16px 0 44px; }
  .hero-grid { gap: 16px; }
  .hero h1 { font-size: 1.9rem; }
  .hero .kicker { font-size: .68rem; letter-spacing: .03em; }
  .hero .lead { margin-top: .6rem; font-size: 1.05rem; }
  .hero-cta { gap: 8px; margin: .9rem 0; }
  .hero .btn { flex: 1 1 auto; justify-content: center; padding: .6rem .8rem; font-size: .9rem; }
  .hero .pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .hero .pills::-webkit-scrollbar { display: none; }
  .hero .pills li { flex: none; }
  .trust { margin-top: -28px; }
  .trust li { gap: 10px; padding: 10px 12px; }
  .trust span { width: 38px; height: 38px; }
  .trust small { font-size: .74rem; }
  .rail { gap: 10px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scroll-padding-left: 14px; }
  .rail > .card { flex-basis: 44vw; }
  .rail-btn { display: none; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat { padding: 10px; }
  .cat strong { font-size: .85rem; }
  .cat-icon { width: 38px; height: 38px; margin-bottom: 2px; font-size: 1.2rem; }
}
