/* =========================
   TrustHub – styles.css
   Limpio y optimizado
   ========================= */

/* ---------- Variables ---------- */
:root{
  --bg:#0f1115; --panel:#151822; --muted:#9aa4b2; --text:#e7eaf0;
  --accent:#7c5cff; --accent-2:#16a34a;
  --card:#141729; --card-2:#101423; --card-hover:#1a1f31;
  --border:#232a3a; --danger:#ef4444;
  --gold:#eab308; --diamond:#60a5fa; --rainbow:#f472b6; --galaxy:#a78bfa;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --font-sans:"Space Grotesk",Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  --page-pad: clamp(12px, 4vw, 20px);
  --nav-z: 50;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box }
html,body{ height:100%; overflow-x:hidden }
body{
  margin:0; color:var(--text); font-family:var(--font-sans);
  background:
    radial-gradient(1000px 700px at 15% 0,#1c1140 0,rgba(28,17,64,0) 55%),
    radial-gradient(900px 600px at 85% 20%,#2a165a 0,rgba(42,22,90,0) 60%),
    linear-gradient(180deg,#0f1115 0,#141224 100%);
  background-attachment:fixed;
}
@media (max-width:1100px){ body{ background-attachment:scroll } }

a{ color:inherit; text-decoration:none }
.title{ font-family:var(--font-sans) }
.badge,.btn{ font-variant-numeric:tabular-nums }
#userLabel,.progress-counter{ font-family:var(--font-mono); font-variant-numeric:tabular-nums }

/* ---------- Botones ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:0; color:#fff; font-weight:700;
  padding:10px 14px; border-radius:12px;
  background:linear-gradient(180deg,#7c5cff,#6a49ff);
  box-shadow:0 10px 20px rgba(124,92,255,.25);
}
.btn.secondary{
  color:var(--text);
  background:linear-gradient(180deg,#1b2033,#151b2a);
  border:1px solid var(--border);
}

/* ---------- Utilidades ---------- */
.back-btn{
  width:36px; height:36px; border-radius:10px; border:1px solid var(--border);
  background:#121622; color:var(--text);
  display:inline-grid; place-items:center; cursor:pointer;
  transition:background .15s,border-color .15s;
}
.back-btn:hover{ background:linear-gradient(180deg,#172032,#111829); border-color:#2a344b }

/* =========================================================
   HEADER + MENÚ
   ========================================================= */
.site-nav{
  width:100%; border-bottom:1px solid var(--border); background:rgba(15,17,21,.75);
}
.site-nav .row{
  width:100%; max-width:1100px; margin:0 auto;
  padding:12px var(--page-pad);
  padding-left:max(var(--page-pad), env(safe-area-inset-left));
  padding-right:max(var(--page-pad), env(safe-area-inset-right));
  display:flex; align-items:center; gap:14px;
}

/* Marca */
.site-brand{ display:flex; align-items:center; gap:10px; font-weight:800 }
.site-logo{
  width:28px; height:28px; border-radius:8px; display:block;
  background:url("images/logo.webp") center / contain no-repeat;
}
.site-text .trust{ color:#fff }
.site-text .hub{ color:var(--accent) }

/* Links */
.nav-links{ display:flex; gap:8px; margin-left:auto }
.nav-links .link{
  padding:8px 12px; border-radius:10px; border:1px solid transparent; color:var(--text);
  display:inline-flex; align-items:center; justify-content:center; white-space:nowrap;
}
.nav-links .link i{ margin-right:6px }
.nav-links .link.active{ border-color:var(--border); background:#101523 }

/* Hamburguesa */
.nav-toggle{ display:none }

/* Desktop */
@media (min-width:761px){
  .nav-links{ margin-left:auto; justify-content:flex-end }
}

/* Mobile */
@media (max-width:760px){
  .site-nav .row{
    display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  }
  .site-brand{ grid-column:2; justify-self:center }
  .nav-toggle{
    grid-column:3; justify-self:end; display:inline-grid; place-items:center;
    width:36px; height:36px; border-radius:10px; border:1px solid var(--border);
    background:#121622; color:var(--text); z-index:var(--nav-z);
  }
  .nav-links{
    position:fixed; left:var(--page-pad); right:var(--page-pad);
    top:calc(56px + env(safe-area-inset-top));
    display:none; flex-direction:column; gap:8px;
    background:#101523; border:1px solid var(--border); border-radius:12px;
    padding:10px; box-shadow:var(--shadow); z-index:var(--nav-z);
  }
  .site-nav.open .nav-links{ display:flex }
  .nav-links .link i{ display:none } /* texto centrado en móvil */
  .nav-links .link{ justify-content:center; text-align:center; padding:10px 12px }
}

/* Enlaces especiales */
a.badge, a.badge:visited, a.badge:hover, a.badge:active{ color:inherit; text-decoration:none }
a.site-brand, a.site-brand:visited, a.site-brand:hover, a.site-brand:focus, a.site-brand:active{
  color:inherit; text-decoration:none
}

/* =========================================================
   HOME / HERO
   ========================================================= */
.home{ padding:0 0 28px }
.home .container{ width:min(1100px,92vw); margin:0 auto; padding:0 }
.hero{
  display:grid; grid-template-columns:1.15fr .85fr; gap:22px; align-items:center; margin-top:26px;
}
.hero h1{ font-size:40px; line-height:1.1; margin:0 }
.lede{ color:var(--muted); font-size:18px; margin:10px 0 0 }
.hero-ctas{ display:flex; gap:10px; flex-wrap:wrap; margin:14px 0 }
.micro{ margin-top:6px; color:var(--muted); font-size:13px }
.hero-art{
  height:360px; border-radius:24px; overflow:hidden;
  border:1px solid rgba(124,92,255,.18);
  background:linear-gradient(180deg,rgba(124,92,255,.06),transparent),linear-gradient(180deg,var(--card),var(--card-2));
  box-shadow:0 8px 22px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.03);
}
@media (max-width:900px){
  .hero{ grid-template-columns:1fr }
  .hero h1{ font-size:32px }
  .hero-art{ height:260px; order:-1 }
}

/* =========================================================
   CAROUSEL BASE
   ========================================================= */
.carousel{ position:relative; height:100%; overflow:hidden; touch-action:pan-y; user-select:none }
.carousel-track{ display:flex; height:100%; transition:transform .45s ease; gap:0; will-change:transform }
.carousel-slide{ height:100%; display:grid; place-items:center }
.carousel-slide img{ display:block; width:100%; height:100%; object-fit:cover; object-position:center }
.carousel-btn{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:32px; height:32px; padding:0; border-radius:999px; border:1px solid var(--border);
  background:#0f1422bb; color:#fff; display:grid; place-items:center;
}
.carousel-btn.prev{ left:10px } .carousel-btn.next{ right:10px }
.carousel-dots{ position:absolute; left:0; right:0; bottom:10px; display:flex; justify-content:center; gap:6px }
.carousel-dot{ width:8px; height:8px; border-radius:999px; background:#a78bfa55 }
.carousel-dot.active{ background:#a78bfa }

/* =========================================================
   FEATURES
   ========================================================= */
.features{
  display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:24px 0;
}
.features .card{
  position:relative; overflow:hidden; border-radius:16px; padding:18px 20px;
  background:linear-gradient(180deg,rgba(124,92,255,.06),transparent),linear-gradient(180deg,var(--card),var(--card-2));
  border:1px solid rgba(124,92,255,.18); box-shadow:0 8px 22px rgba(0,0,0,.28),inset 0 0 0 1px rgba(255,255,255,.03);
}
.features .card h3{ margin:0 0 10px; font-size:18px; display:flex; align-items:center; gap:10px }
.features .card h3 .bx{ font-size:28px; line-height:1; color:var(--accent); filter:drop-shadow(0 0 6px rgba(124,92,255,.45)) }
.features .card p{ margin:8px 0 0; line-height:1.45 }
@media (max-width:900px){ .features{ grid-template-columns:1fr } }

/* =========================================================
   CABECERAS DE SECCIÓN
   ========================================================= */
.section-block{ margin:28px 0 }
.section-head{
  display:grid; gap:8px; justify-items:center; text-align:center;
  margin:0 auto 14px; width:min(900px,92vw);
}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-weight:700; font-size:13px; letter-spacing:.12em; text-transform:uppercase; color:#dcd7ff;
  background:linear-gradient(180deg,rgba(124,92,255,.15),rgba(124,92,255,.06));
  border:1px solid rgba(124,92,255,.25); border-radius:999px; padding:6px 10px;
}
.section-title-xl{ margin:4px 0 0; font-size:28px; line-height:1.2; font-weight:800 }
.section-copy{ color:var(--muted); font-size:15px; line-height:1.55; margin:0; max-width:720px }
.section-meta{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center }
.badge{
  display:inline-flex; align-items:center; gap:6px;
  font-size:14px; font-weight:600; padding:6px 10px; border-radius:999px;
  background:rgba(124,92,255,.12); border:1px solid rgba(124,92,255,.25);
}
.badge i{ font-size:20px; color:#bda7ff }
.section-divider{
  width:min(680px,90%); height:1px; opacity:.7;
  background:linear-gradient(90deg,rgba(0,0,0,0),#2a2f4a,rgba(0,0,0,0)); margin-top:6px;
}

/* =========================================================
   CLIENTES (carousel)
   ========================================================= */
.card.gallery{ padding:0 }
#clientsCarousel{ display:block; width:100%; aspect-ratio:16/9; min-height:280px }
#clientsCarousel .carousel-track, #clientsCarousel .carousel-slide{ height:100% }
#clientsCarousel .carousel-slide img{ width:100%; height:100%; object-fit:contain; display:block }

/* Desktop: imágenes un poco más chicas y con bordes redondeados */
@media (min-width:761px){
  #clientsCarousel .carousel-slide{ padding:8px 0 }
  #clientsCarousel .carousel-slide img{ max-width:88%; max-height:88%; border-radius:14px; object-fit:contain }
}

/* =========================================================
   RESEÑAS (Discord) — BLOQUE COMPLETO
   ========================================================= */

/* Altura auto para no cortar por textos largos */
#reviewsCarousel { height: auto; }

/* ------- Desktop: avatar a la izquierda, pegado al globo ------- */
#reviewsCarousel .carousel-slide{
  display: grid;
  grid-template-columns: max-content max-content; /* avatar + globo */
  justify-content: center;
  align-items: start;
  justify-items: start;
  column-gap: 10px;
  padding: 12px 14px;
  box-sizing: border-box;
}

#reviewsCarousel .review-avatar{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  align-self: start;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

#reviewsCarousel .discord-msg{
  display: inline-block;
  width: fit-content;
  max-width: min(900px, 92vw);
  background: linear-gradient(180deg,#111625,#0c1220);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Tipografías del bloque Discord */
.discord-header{ font-size: 13px; margin-bottom: 4px; color: #cbd5e1; }
.discord-name{ font-weight: 800; color: #e6eaf7; }
.discord-tag{ color: #94a3b8; margin-left: 4px; }
.discord-timestamp{ color: var(--muted); margin-left: 6px; }
.discord-content{
  font-size: 15px; line-height: 1.45; color: #d7dce6;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}

/* ------- Móvil: avatar 50% dentro / 50% fuera del globo ------- */
@media (max-width: 560px){
  /* Parámetros ajustables */
  #reviewsCarousel{
    --av-size: 56px;          /* tamaño del avatar (52–64px si querés) */
    --overlap: calc(var(--av-size) / 2); /* parte que entra al globo (50%) */
    --head-gap: 6px;          /* separación mínima desde el tope del slide */
  }

  /* El slide no mete padding arriba: lo controlamos con la caja */
  #reviewsCarousel .carousel-slide{
    position: relative;
    display: block;
    padding: 0 12px 14px;  /* arriba = 0; controlamos con el margen del globo */
    box-sizing: border-box;
  }

  /* Avatar centrado; su "centro" coincide con el borde superior del globo */
  #reviewsCarousel .review-avatar{
    position: absolute;
    left: 50%;
    top: var(--head-gap);                /* cuanto más chico, más arriba queda todo */
    transform: translateX(-50%);
    width: var(--av-size);
    height: var(--av-size);
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
  }

  /* El borde superior del globo está a:
     head-gap + (av-size / 2)  → avatar queda mitad fuera/mitad dentro */
  #reviewsCarousel .discord-msg{
    margin: calc(var(--head-gap) + var(--overlap)) 12px 0; /* top, lados, bottom */
    width: auto;
    max-width: calc(100% - 24px);
    padding-top: var(--overlap);          /* el texto empieza debajo de la mitad del avatar */
    border-radius: 14px;
  }

  /* Si hubiera otras imágenes dentro del slide (no el avatar), que se estiren */
  #reviewsCarousel .carousel-slide img:not(.review-avatar){
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}



/* =========================================================
   DISCORD BANNER (CTA)
   ========================================================= */
.discord-banner{
  display:flex; align-items:center; gap:14px;
  margin:18px 0; padding:16px; border-radius:16px;
  background:rgba(20,22,35,.55); border:1px dashed var(--border);
}
.discord-banner i{ font-size:28px; color:#5865F2 }
.discord-banner .db-title{ font-weight:800 }
.discord-banner .db-sub{ color:var(--muted); font-size:14px }
.discord-banner .spacer{ flex:1 }
.discord-banner a.btn{ margin-left:auto }
@media (max-width:560px){
  .discord-banner{ display:grid; grid-template-columns:1fr; justify-items:center; text-align:center; gap:10px; padding:14px }
  .discord-banner .spacer{ display:none }
  .discord-banner .db-sub{ display:none }
  .discord-banner a.btn{
    width:100%; max-width:320px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:center;
    padding:10px 12px; font-size:14px;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */
.home-footer{ color:var(--muted); font-size:13px; text-align:center; margin:28px 0 }

/* =========================================================
   COUNTDOWN (sección propia, tema violeta)
   ========================================================= */
#galaxy-deadline .section-head{ margin-bottom:6px }
.countdown{
  width:min(900px,92vw);
  margin:10px auto 0;
  display:grid; grid-template-columns:repeat(4, minmax(78px, 1fr));
  gap:12px; align-items:stretch;
}
.cd-box{
  background:#101523; border:1px solid var(--border); border-radius:14px;
  padding:14px 10px; text-align:center;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}
.cd-num{
  font-family:var(--font-mono); font-size:34px; font-weight:800; letter-spacing:.02em; line-height:1;
  color:#bda7ff; text-shadow:
    0 0 8px rgba(124,92,255,.85),
    0 0 18px rgba(124,92,255,.55),
    0 0 32px rgba(124,92,255,.35),
    0 0 48px rgba(124,92,255,.25);
}
.cd-lbl{ display:block; color:#d8d0ff; font-size:12px; margin-top:6px }
@media (max-width:560px){
  .countdown{ grid-template-columns:repeat(4,1fr); gap:10px }
  .cd-box{ padding:12px 8px; border-radius:12px }
  .cd-num{ font-size:26px }
  .cd-lbl{ font-size:11px; margin-top:4px }
}

/* =========================================================
   TEXTO DEGRADADO (Galaxy/Oro/Diamond/Rainbow)
   ========================================================= */
/* fallback sólidos */
.galaxy{ color:#a78bfa } .gold{ color:#ffd76a } .diamond{ color:#9ceeff } .rainbow{ color:#ff5cf0 }
/* degradados */
.galaxy,.gold,.diamond,.rainbow{
  background-clip:text; -webkit-background-clip:text; color:transparent; -webkit-text-fill-color:transparent;
}
.galaxy{  background-image:linear-gradient(90deg,#7c5cff 0%,#a78bfa 50%,#7c5cff 100%) }
.gold{    background-image:linear-gradient(90deg,#f9e16b 0%,#f6c453 35%,#ffb400 65%,#ffe388 100%) }
.diamond{ background-image:linear-gradient(90deg,#6ad8ff 0%,#a3f7ff 40%,#e3feff 100%) }
.rainbow{
  background-image:linear-gradient(90deg,#ff4d4d,#ffa64d,#ffee4d,#4dff88,#4dd9ff,#7a5cff,#ff4dff,#ff4d4d);
  background-size:300% 300%; animation:rainbowShift 6s linear infinite;
}
@keyframes rainbowShift{
  0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%}
}
@media (prefers-reduced-motion:reduce){ .rainbow{ animation:none } }

/* --- back-home y contenedor izquierdo de la topbar --- */
.left-tools{
  display:flex;
  align-items:center;
  gap:8px;
}

.back-home{
  width:40px; height:40px;
  display:inline-grid; place-items:center;
  border-radius:10px;
  background:#121622;
  color:var(--text);
  border:1px solid var(--border);
  transition:background .15s,border-color .15s,transform .08s;
}
.back-home:hover{ background:linear-gradient(180deg,#172032,#111829); border-color:#2a344b }
.back-home:active{ transform:translateY(1px) }

/* En móvil, la zona izquierda de la topbar es el área "menu":
   aquí posicionamos juntos la flecha y la hamburguesa */
@media (max-width:680px){
  .left-tools{ grid-area: menu; justify-self:start }
}

/* ===== Clients (carousel): marco fijo + bordes redondeados en todos los casos ===== */
#clientsCarousel{
  width:100%;
  aspect-ratio:16 / 9;       /* alto uniforme, también puedes usar 4/3 o 1/1 */
  min-height:280px;
}

#clientsCarousel .carousel-track,
#clientsCarousel .carousel-slide{
  height:100%;
}

#clientsCarousel .carousel-slide{
  position:relative;
  display:block;
  border-radius:14px;         /* el marco tiene el radio */
  overflow:hidden;            /* recorta cualquier desborde */
}

/* La imagen ocupa TODO el marco y nunca se sale; el radio se ve siempre */
#clientsCarousel .carousel-slide img{
  position:absolute;
  inset:0;                    /* top/right/bottom/left = 0 */
  width:100%;
  height:100%;
  object-fit:cover;           /* llena el marco; puede recortar un poco */
  border-radius:14px;         /* redundante, hereda el del contenedor, pero asegura consistencia */
  display:block;
}

/* Opcional: si preferís SIN recorte (barras negras, pero nunca se estira) */
/*
#clientsCarousel .carousel-slide img{
  object-fit:contain;         /* no recorta */
  background:#0f1422;         /* color de “letterbox” */
}
*/
