/* =============================================================
   AlikonWeb – Cassiopeia User CSS
   File: /templates/cassiopeia/css/user.css
   Joomla 5 · Cassiopeia
   ============================================================= */

/* ── 1. VARIABILI ──────────────────────────────────────────── */
:root {
  --code-color:    #d33880;
  --ak-navy:       #0f172a;
  /*--ak-blue:       #60a5fa; */
  --ak-blue:       #4678b9;
  --ak-teal:       #2dd4bf;
  --ak-purple:     #a855f7;
  --ak-pink:       #ec4899;
  --ak-bg:         #f8fafc;
  --ak-surface:    #ffffff;
  --ak-border:     #e2e8f0;
  --ak-text:       #1e293b;
  --ak-muted:      #64748b;
  --ak-radius:     10px;
  --ak-radius-lg:  16px;
  --ak-shadow:     0 2px 12px rgba(15,23,42,0.08);
  --ak-shadow-hv:  0 6px 24px rgba(15,23,42,0.14);
  --ak-font:       'DM Sans', system-ui, sans-serif;
  --ak-ease:       0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── 2. FONT ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── 3. BASE ────────────────────────────────────────────────── */
body {
  font-family: var(--ak-font);
  background-color: var(--ak-bg);
  color: var(--ak-text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h2, h3, h4, h5, h6 {
  font-family: var(--ak-font);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ak-navy);
  letter-spacing: -0.02em;
}
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
p  { margin-bottom: 1.1em; }

a { color: var(--ak-blue); text-decoration: none; transition: color var(--ak-ease); }
a:hover { color: var(--ak-teal); }

/* ── 4. H1 GRADIENT ─────────────────────────────────────────── */
h1 {
  font-family: var(--ak-font);
  font-weight: 800;
  display: inline-block;
  background: linear-gradient(90deg, #60a5fa, #2dd4bf, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: cover;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* ── 5. CLASSE .rainbow ─────────────────────────────────────── */
.rainbow {
  font-weight: 700;
  font-size: 3.6rem;
  display: inline-block;
  background: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, violet, red);
  background-size: 600%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rainbowSine 9s linear infinite;
}
@keyframes rainbowSine {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ══════════════════════════════════════════════════════════════
   HERO SECTION — tutti gli stili qui per evitare
   il filtraggio HTML di Joomla/TinyMCE
   ══════════════════════════════════════════════════════════════ */

.ak-hero {
  position: relative;
  overflow: hidden;
  background-color: #020617;
  border-radius: 16px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  font-family: var(--ak-font);
}

/* Griglia di sfondo */
.ak-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(96,165,250,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,165,250,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}

/* Sfere luminose */
.ak-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: akOrbFloat 8s ease-in-out infinite;
}
.ak-orb-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(37,99,235,0.22) 0%, transparent 70%);
  top: -120px; left: -80px;
}
.ak-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,0.16) 0%, transparent 70%);
  bottom: -180px; right: -100px;
  animation-duration: 10s;
  animation-direction: reverse;
}
.ak-orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(13,148,136,0.18) 0%, transparent 70%);
  top: 60%; left: 55%;
  animation-duration: 6s;
  animation-delay: 2s;
}
@keyframes akOrbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-20px) scale(1.05); }
}

/* Layout a griglia */
.ak-hero-inner {
  position: relative;
  z-index: 2;
  padding: 56px 48px 64px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: center;
}

/* Badge */
.ak-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: 50px;
  margin-bottom: 24px;
}
.ak-badge-dot {
  width: 6px; height: 6px;
  background: #2dd4bf;
  border-radius: 50%;
  flex-shrink: 0;
  animation: akPulse 2s ease infinite;
}
.ak-badge span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #94a3b8;
}
@keyframes akPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* H1 dentro la hero — sovrascrive il gradient globale con animazione */
.ak-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 20px !important;
  background: linear-gradient(90deg, #60a5fa, #2dd4bf, #a855f7, #ec4899) !important;
  background-size: 300% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  display: inline-block !important;
  animation: akGradShift 8s ease infinite !important;
}
@keyframes akGradShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* Sottotitolo */
.ak-hero-sub {
  font-size: 1.05rem;
  color: #64748b;
  font-weight: 300;
  line-height: 1.8;
  max-width: 560px;
  margin: 0 0 32px;
}
.ak-hero-sub strong {
  color: #cbd5e1;
  font-weight: 500;
}

/* Pulsanti */
.ak-hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.ak-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff !important;
  border: none;
  border-radius: 12px;
  font-family: var(--ak-font);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 24px rgba(124,58,237,0.3);
  line-height: 1;
}
.ak-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 32px rgba(124,58,237,0.5);
  color: #ffffff !important;
}

.ak-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.04);
  color: #94a3b8 !important;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  font-family: var(--ak-font);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  line-height: 1;
}
.ak-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: #e2e8f0 !important;
  border-color: rgba(255,255,255,0.2);
}

/* FIX ICONE: dimensione fissa per tutti gli SVG dentro i bottoni */
.ak-hero-btns svg,
.ak-btn-primary svg,
.ak-btn-ghost svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Statistiche */
.ak-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.ak-stat { display: flex; flex-direction: column; gap: 2px; }
.ak-stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}
.ak-stat-label {
  font-size: 0.7rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* Card codice */
.ak-code-card {
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(96,165,250,0.15);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 24px 48px rgba(0,0,0,0.4);
}
.ak-code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}
.ak-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ak-dot-r { background: #ff5f57; }
.ak-dot-y { background: #febc2e; }
.ak-dot-g { background: #28c840; }
.ak-code-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  /* color: #475569; */
  color: #d33880;
  margin-left: 6px;
}
.ak-code-body {
  padding: 20px;
  font-family: 'JetBrains Mono', 'Fira Mono', monospace;
  font-size: 12px;
  line-height: 1.9;
}
.ak-c-cm { color: #334155; }
.ak-c-kw { color: #60a5fa; }
.ak-c-st { color: #2dd4bf; }
.ak-c-fn { color: #ec4899; }
.ak-c-ok { color: #4ade80; }
.ak-c-sy { color: #475569; }
.ak-cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: #2dd4bf;
  vertical-align: middle;
  margin-left: 2px;
  animation: akBlink 1s step-end infinite;
}
@keyframes akBlink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.ak-ext-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.ak-pill {
  font-family: var(--ak-font);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}
.ak-pill-blue   { background: rgba(96,165,250,0.1);  color: #60a5fa;  border: 1px solid rgba(96,165,250,0.2); }
.ak-pill-teal   { background: rgba(45,212,191,0.1);  color: #2dd4bf;  border: 1px solid rgba(45,212,191,0.2); }
.ak-pill-purple { background: rgba(168,85,247,0.1);  color: #a855f7;  border: 1px solid rgba(168,85,247,0.2); }
.ak-pill-pink   { background: rgba(236,72,153,0.1);  color: #ec4899;  border: 1px solid rgba(236,72,153,0.2); }

/* Linea decorativa finale */
.ak-hero-line {
  height: 1px;
  background: linear-gradient(to right, transparent, #60a5fa, #a855f7, transparent);
  opacity: 0.4;
}

/* Animazione ingresso */
@keyframes akFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ak-badge     { animation: akFadeUp 0.6s 0.0s ease both; }
.ak-hero h1   { animation: akGradShift 8s ease infinite, akFadeUp 0.6s 0.1s ease both !important; }
.ak-hero-sub  { animation: akFadeUp 0.6s 0.2s ease both; }
.ak-hero-btns { animation: akFadeUp 0.6s 0.3s ease both; }
.ak-stats     { animation: akFadeUp 0.6s 0.4s ease both; }
.ak-code-card { animation: akFadeUp 0.6s 0.35s ease both; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ak-hero-inner {
    grid-template-columns: 1fr;
    padding: 36px 24px 44px;
    gap: 32px;
  }
  .ak-hero-right { display: none; }
  .ak-stats { gap: 20px; }
  .ak-hero h1 { font-size: clamp(1.8rem, 7vw, 2.5rem) !important; }
}

/* ══════════════════════════════════════════════════════════════
   RESTO DEL SITO
   ══════════════════════════════════════════════════════════════ */

/* ── HEADER ─────────────────────────────────────────────────── */
.header {
  background: var(--ak-navy) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 16px rgba(15,23,42,0.22);
}
.header .navbar-brand,
.header .site-title {
  font-family: var(--ak-font);
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff !important;
  letter-spacing: -0.03em;
}
.header .navbar-brand:hover { opacity: 0.8; }
.header .nav-link,
.header .navbar-nav > li > a {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem !important;
  border-radius: var(--ak-radius);
  transition: background var(--ak-ease), color var(--ak-ease);
}
.header .nav-link:hover,
.header .navbar-nav > li > a:hover,
.header .nav-link.active {
  color: #ffffff !important;
  background: rgba(255,255,255,0.1);
}
.header .dropdown-menu {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--ak-radius);
  box-shadow: var(--ak-shadow-hv);
  padding: 0.5rem;
  margin-top: 0.4rem;
}
.header .dropdown-item {
  color: rgba(255,255,255,0.72);
  border-radius: 6px;
  font-size: 0.86rem;
  padding: 0.4rem 0.85rem;
  transition: background var(--ak-ease), color var(--ak-ease);
}
.header .dropdown-item:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

/* ── PULSANTI GLOBALI ───────────────────────────────────────── */
.btn, a.btn, button.btn {
  font-family: var(--ak-font);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--ak-radius);
  transition: all var(--ak-ease);
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(90deg, #60a5fa, #a855f7) !important;
  border: none !important;
  color: #ffffff !important;
}
.btn-primary:hover {
  background: linear-gradient(90deg, #3b82f6, #9333ea) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(168,85,247,0.35);
  color: #ffffff !important;
}
.btn-outline-primary, .btn-secondary {
  background: transparent !important;
  border: 1.5px solid rgba(96,165,250,0.6) !important;
  color: var(--ak-blue) !important;
}
.btn-outline-primary:hover, .btn-secondary:hover {
  background: rgba(96,165,250,0.1) !important;
  transform: translateY(-1px);
}

/* ── CARD ────────────────────────────────────────────────────── */
.card {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border) !important;
  border-radius: var(--ak-radius-lg) !important;
  box-shadow: var(--ak-shadow);
  transition: transform var(--ak-ease), box-shadow var(--ak-ease);
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--ak-shadow-hv); }
.card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #2dd4bf, #a855f7, #ec4899);
  opacity: 0;
  transition: opacity var(--ak-ease);
}
.card:hover::before { opacity: 1; }
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--ak-border);
  padding: 1.25rem 1.5rem 1rem;
  font-weight: 600;
  color: var(--ak-navy);
}
.card-body  { padding: 1.5rem; }
.card-title { font-weight: 700; font-size: 1.1rem; color: var(--ak-navy); margin-bottom: 0.5rem; }
.card-text  { color: var(--ak-muted); font-size: 0.93rem; line-height: 1.65; }

/* ── BADGE ───────────────────────────────────────────────────── */
.badge, .label {
  font-family: var(--ak-font);
  font-size: 0.7rem; font-weight: 700;
  padding: 0.28em 0.7em;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-primary, .label-primary { background: #dbeafe; color: #1e40af; }
.badge-success, .label-success { background: #d1fae5; color: #065f46; }
.badge-info,    .label-info    { background: #cffafe; color: #0e7490; }
.badge-warning, .label-warning { background: #fef3c7; color: #92400e; }

/* ── ARTICOLI ────────────────────────────────────────────────── */
.item-page,
.com-content-article {
  background: var(--ak-surface);
  border-radius: var(--ak-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--ak-shadow);
  max-width: 860px;
  margin: 2rem auto;
}
.article-info, .article-info-block {
  color: var(--ak-muted);
  font-size: 0.84rem;
  padding: 0.5rem 0 1.5rem;
  border-bottom: 1px solid var(--ak-border);
  margin-bottom: 1.5rem;
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar .moduletable, aside .moduletable {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--ak-shadow);
}
.sidebar .module-title, aside .module-title {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ak-muted);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ak-border);
  margin-bottom: 1rem;
}

/* ── PAGINAZIONE ─────────────────────────────────────────────── */
.pagination .page-item .page-link {
  border-radius: var(--ak-radius) !important;
  border: 1px solid var(--ak-border);
  color: var(--ak-blue);
  margin: 0 2px;
  font-weight: 500;
  transition: all var(--ak-ease);
}
.pagination .page-item.active .page-link {
  background: linear-gradient(90deg, #60a5fa, #a855f7);
  border-color: transparent;
  color: #ffffff;
}

/* ── TABELLE ─────────────────────────────────────────────────── */
.table { font-size: 0.92rem; border-collapse: separate; border-spacing: 0; }
.table th {
  font-weight: 700; font-size: 0.76rem;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ak-muted);
  border-bottom: 2px solid var(--ak-border);
  padding: 0.75rem 1rem;
  background: var(--ak-bg);
}
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--ak-border); vertical-align: middle; }
.table tbody tr:hover { background: var(--ak-bg); }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer.footer, .footer-wrapper {
  background: var(--ak-navy);
  color: rgba(255,255,255,0.6);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
footer .site-title, footer .footer-brand { font-weight: 800; color: #ffffff; font-size: 1.1rem; }
footer a { color: rgba(255,255,255,0.6); transition: color var(--ak-ease); }
footer a:hover { color: var(--ak-teal); }
footer .copyright {
  font-size: 0.78rem; color: rgba(255,255,255,0.35);
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1.5rem;
}

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #60a5fa, #a855f7); border-radius: 99px; }

/* ── SELEZIONE TESTO ─────────────────────────────────────────── */
::selection { background: rgba(168,85,247,0.15); color: var(--ak-navy); }

/* ── ANIMAZIONE CARD ─────────────────────────────────────────── */
@keyframes akCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .moduletable, .item-page { animation: akCardIn 0.4s ease both; }

/* Fine user.css */