/* Telegram community promo — 4 touchpoint (topbar / home-card / detail-cta / download-card).
   Colore: blu brand #0894D6 (coincide col blu Telegram ufficiale → zero frizione cromatica).
   Accent arancione #f97316 solo per pulse "live" nella topbar. */

/* ============ TOP BAR GLOBALE ============ */
.tg-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 40px;
  padding: .4rem 2.8rem .4rem 1rem;
  background: linear-gradient(90deg, #000 0%, #001a2a 50%, #000 100%);
  border-bottom: 1px solid rgba(8,148,214,0.18);
  color: #e9ecef;
  font-size: .88rem;
  letter-spacing: .01em;
  line-height: 1.3;
  text-align: center;
  overflow: hidden;
}
.tg-topbar::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 100%;
  background: radial-gradient(ellipse at 50% 100%, rgba(8,148,214,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.tg-topbar-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 0 0 rgba(249,115,22,0.55);
  animation: tg-pulse 2s infinite;
  flex-shrink: 0;
  vertical-align: middle;
}
@keyframes tg-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(249,115,22,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(249,115,22,0); }
  100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
}
.tg-topbar-text { position: relative; z-index: 1; }
.tg-topbar-text b { color: #fff; font-weight: 700; }
.tg-topbar-cta {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-left: .4rem;
  padding: .18rem .7rem;
  background: #0894D6;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  text-decoration: none;
  border-radius: 999px;
  transition: background .15s, transform .15s;
  position: relative; z-index: 1;
}
.tg-topbar-cta:hover { background: #0aa8f0; transform: translateY(-1px); }
.tg-topbar-cta svg { width: 12px; height: 12px; flex-shrink: 0; }
.tg-topbar-close {
  position: absolute;
  right: .6rem; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  border-radius: 50%;
  transition: color .15s, background .15s;
  z-index: 2;
}
.tg-topbar-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.tg-topbar-close svg { width: 14px; height: 14px; }

/* Easter-egg toast dopo dismiss */
.tg-topbar-toast {
  position: fixed;
  top: 1rem; left: 50%; transform: translateX(-50%) translateY(-20px);
  padding: .6rem 1.1rem;
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(8,148,214,0.3);
  border-radius: 999px;
  color: #e9ecef;
  font-size: .85rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}
.tg-topbar-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .tg-topbar { font-size: .8rem; padding: .4rem 2.4rem .4rem .8rem; }
  .tg-topbar-cta { font-size: .76rem; padding: .15rem .55rem; }
  .tg-topbar-close { right: .4rem; }
}
@media (max-width: 400px) {
  .tg-topbar-hide-mobile { display: none; }
}

/* ============ CARD HOME (tra i caroselli) ============ */
.tg-card {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1.6rem 1.8rem;
  background: linear-gradient(135deg, rgba(8,148,214,0.14) 0%, rgba(8,148,214,0.04) 45%, rgba(0,0,0,0) 100%);
  border: 1px solid rgba(8,148,214,0.25);
  border-left: 4px solid #0894D6;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.tg-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(8,148,214,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.tg-card-avatar {
  position: relative;
  flex-shrink: 0;
  width: 96px; height: 96px;
}
.tg-card-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(8,148,214,0.3), 0 0 0 3px rgba(8,148,214,0.2);
}
.tg-card-avatar::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(8,148,214,0.25);
  pointer-events: none;
  animation: tg-ring 3s ease-in-out infinite;
}
@keyframes tg-ring {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.08); opacity: 0.25; }
}
.tg-card-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.tg-card-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #0894D6;
  margin: 0 0 .4rem;
}
.tg-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 .6rem;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.tg-card-desc {
  margin: 0 0 1rem;
  color: #cfd4da;
  font-size: .95rem;
  line-height: 1.55;
}
.tg-card-desc b { color: #fff; font-weight: 700; }
.tg-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.4rem;
  background: #0894D6;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border-radius: 8px;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(8,148,214,0.25);
}
.tg-card-cta:hover {
  background: #0aa8f0;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(8,148,214,0.4);
}
.tg-card-cta svg { width: 16px; height: 16px; }

@media (max-width: 720px) {
  .tg-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    margin: 1.25rem .75rem;
    padding: 1.3rem 1.1rem;
  }
  .tg-card-avatar { width: 80px; height: 80px; }
  .tg-card-title { font-size: 1.2rem; }
  .tg-card-desc { font-size: .9rem; }
}

/* ============ 5° BOTTONE DETAIL (sotto .dp-actions) ============ */
.tg-detail-cta {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  margin-top: .75rem;
  padding: .75rem 1rem;
  background: linear-gradient(135deg, #0894D6 0%, #056a9b 100%);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(8,148,214,0.22);
}
.tg-detail-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(8,148,214,0.35);
}
.tg-detail-cta::after {
  content: '';
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: tg-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tg-shimmer {
  0%, 70% { left: -60%; }
  100%    { left: 140%; }
}
.tg-detail-cta svg { width: 18px; height: 18px; flex-shrink: 0; position: relative; z-index: 1; }
.tg-detail-cta span { position: relative; z-index: 1; }
.tg-detail-cta b { font-weight: 800; }

@media (max-width: 600px) {
  .tg-detail-cta { font-size: .88rem; padding: .7rem .8rem; }
}
@media (max-width: 380px) {
  .tg-detail-cta { font-size: .82rem; padding: .65rem .6rem; gap: .4rem; }
  .tg-detail-cta svg { width: 16px; height: 16px; }
}

/* ============ CARD PAGINA DOWNLOAD ============ */
.tg-dl-card {
  max-width: 380px;
  margin: 1.5rem auto 0;
  padding: 1.1rem 1.3rem;
  background: rgba(8,148,214,0.06);
  border: 1px solid rgba(8,148,214,0.22);
  border-radius: 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: .95rem;
  animation: tg-dl-in .6s ease-out .3s both;
}
@keyframes tg-dl-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tg-dl-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #0894D6;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(8,148,214,0.3);
}
.tg-dl-icon svg { width: 26px; height: 26px; color: #fff; }
.tg-dl-body { flex: 1; min-width: 0; }
.tg-dl-kicker {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 0 0 .15rem;
}
.tg-dl-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .35rem;
  line-height: 1.2;
}
.tg-dl-cta {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: #0aa8f0;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: color .15s;
}
.tg-dl-cta:hover { color: #fff; }
.tg-dl-cta svg { width: 12px; height: 12px; }

@media (max-width: 480px) {
  .tg-dl-card { margin: 1.25rem 1rem 0; padding: .95rem 1rem; gap: .75rem; }
  .tg-dl-icon { width: 42px; height: 42px; }
  .tg-dl-icon svg { width: 22px; height: 22px; }
  .tg-dl-title { font-size: .92rem; }
}
