/* ================================================
   VipLuck IT – portidelcilento.it
   Shared stylesheet – mobile-first
   ================================================ */

:root {
  --navy:   #152241;
  --navy2:  #1e3160;
  --gold:   #c9a84c;
  --gold2:  #f0c96b;
  --white:  #ffffff;
  --grey:   #f4f6fa;
  --text:   #1a1a2e;
  --muted:  #5a6380;
  --green:  #28a745;
  --red:    #dc3545;
  --cta-bg: #c9a84c;
  --cta-hover: #f0c96b;
  --sticky-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.65;
  padding-bottom: var(--sticky-h);
  overflow-x: hidden;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; border-radius: 6px; }

/* ─── HEADER / NAV ─────────────────────────────── */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 12px;
}
.site-logo img { height: 44px; width: auto; }

.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 4px;
  transition: background .2s, color .2s;
  letter-spacing: .02em;
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--gold);
  color: var(--navy);
}

.header-cta {
  background: var(--gold);
  color: var(--navy) !important;
  font-weight: 700;
  font-size: .82rem;
  padding: 9px 16px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: background .2s, transform .15s;
}
.header-cta:hover { background: var(--gold2); transform: scale(1.04); }

/* ─── HERO ─────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy2);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('/img/step-01-homepage.webp');
  background-size: cover;
  background-position: center top;
  filter: brightness(.35) saturate(.8);
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(21,34,65,.92) 0%,
    rgba(21,34,65,.70) 50%,
    rgba(21,34,65,.50) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 70px;
  width: 100%;
}
.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--white);
  line-height: 1.15;
  font-weight: 900;
  max-width: 720px;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  margin-bottom: 18px;
}
.hero h1 span { color: var(--gold2); }
.hero-kicker {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  margin: 10px 0 22px;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.hero-kicker strong { color: var(--gold2); }
.hero-sub {
  color: rgba(255,255,255,.88);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  line-height: 1.5;
}
.hero-score {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 10px 18px;
  color: var(--white);
  font-size: .95rem;
  margin-bottom: 28px;
}
.hero-score .stars { color: var(--gold); letter-spacing: 2px; }
.hero-score strong { font-size: 1.2rem; color: var(--gold2); }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  font-size: 1rem;
  padding: 16px 32px;
  border-radius: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(201,168,76,.5);
}
.cta-btn:hover {
  background: var(--gold2);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(201,168,76,.65);
}
.cta-btn .arrow { font-size: 1.1rem; }
.hero-note {
  margin-top: 12px;
  color: rgba(255,255,255,.55);
  font-size: .78rem;
}

/* ─── SCORE STRIP ───────────────────────────────── */
.score-strip {
  background: var(--navy);
  padding: 20px 24px;
}
.score-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
}
.score-item {
  text-align: center;
  color: var(--white);
}
.score-item .cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.6); }
.score-item .num { font-size: 1.5rem; font-weight: 800; color: var(--gold2); }
.score-item .bar {
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 2px;
  margin: 4px auto;
  max-width: 80px;
  position: relative;
  overflow: hidden;
}
.score-item .bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--gold);
  width: var(--pct);
  border-radius: 2px;
}

/* ─── CONTENT WRAPPER ───────────────────────────── */
.content-wrap {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
/* 900px layout — see RESPONSIVE section below */

/* ─── ARTICLE BODY ──────────────────────────────── */
.article h2 {
  font-size: 1.55rem;
  color: var(--navy);
  font-weight: 800;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--gold);
  line-height: 1.25;
}
.article h3 {
  font-size: 1.15rem;
  color: var(--navy2);
  font-weight: 700;
  margin: 24px 0 10px;
}
.article p { margin-bottom: 14px; color: #2a2d3e; word-wrap: break-word; overflow-wrap: break-word; }
.article ul, .article ol {
  margin: 10px 0 14px 22px;
  color: #2a2d3e;
}
.article li { margin-bottom: 6px; }
.article strong { color: var(--navy); }
.article blockquote {
  border-left: 4px solid var(--gold);
  padding: 12px 18px;
  background: var(--grey);
  border-radius: 0 6px 6px 0;
  margin: 18px 0;
  font-style: italic;
  color: var(--muted);
}
.article .screenshot {
  margin: 22px 0;
  border: 1px solid #dde2ef;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.article .screenshot img { border-radius: 0; }
.article .screenshot figcaption {
  font-size: .78rem;
  color: var(--muted);
  padding: 8px 14px;
  background: var(--grey);
  border-top: 1px solid #dde2ef;
  font-style: italic;
}

/* ─── TABLES ────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0; width: 100%; max-width: 100%; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
td {
  padding: 9px 14px;
  border-bottom: 1px solid #e8ecf5;
  color: #2a2d3e;
}
tr:nth-child(even) td { background: var(--grey); }
tr:hover td { background: #eef1fc; }

/* ─── PRO/CONS ──────────────────────────────────── */
.pro-con {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
@media (max-width: 600px) { .pro-con { grid-template-columns: 1fr; } }
.pros, .cons {
  border-radius: 8px;
  padding: 18px;
}
.pros { background: #eafbf0; border: 1px solid #b7f0cc; }
.cons { background: #fff0f0; border: 1px solid #f0b7b7; }
.pros h4 { color: #1a7a3c; margin-bottom: 10px; font-size: .95rem; }
.cons h4 { color: #a02020; margin-bottom: 10px; font-size: .95rem; }
.pros li, .cons li { font-size: .88rem; margin-bottom: 5px; }
.pros li::marker { content: '✅  '; }
.cons li::marker { content: '⚠️  '; }

/* ─── SIDEBAR ───────────────────────────────────── */
.sidebar { position: sticky; top: 80px; }

.sidebar-box {
  background: var(--navy);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 22px;
  color: var(--white);
}
.sidebar-box h3 {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold2);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.sidebar-logo { text-align: center; margin-bottom: 14px; }
.sidebar-logo img { height: 50px; margin: 0 auto; }
.sidebar-score {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold2);
  margin-bottom: 4px;
}
.sidebar-score small { font-size: .9rem; color: rgba(255,255,255,.6); font-weight: 400; }
.sidebar-stars { text-align: center; font-size: 1.3rem; color: var(--gold); margin-bottom: 16px; letter-spacing: 3px; }
.sidebar-cta {
  display: block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  font-size: .92rem;
  text-align: center;
  padding: 13px 16px;
  border-radius: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .2s, transform .15s;
  box-shadow: 0 3px 12px rgba(201,168,76,.5);
  margin-bottom: 10px;
}
.sidebar-cta:hover { background: var(--gold2); transform: translateY(-1px); }
.sidebar-note { font-size: .72rem; color: rgba(255,255,255,.5); text-align: center; }

.sidebar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
}
.sidebar-row:last-child { border-bottom: 0; }
.sidebar-row .label { color: rgba(255,255,255,.6); }
.sidebar-row .val { font-weight: 700; color: var(--gold2); }

.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 0; }
.sidebar-nav li a {
  display: block;
  padding: 8px 0;
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: color .2s, padding-left .2s;
}
.sidebar-nav li a:hover { color: var(--gold2); padding-left: 6px; }
.sidebar-nav li:last-child a { border-bottom: 0; }

/* ─── ALERT / NOTICE ────────────────────────────── */
.notice {
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .9rem;
}
.notice.warn { background: #fff8e6; border: 1px solid #f0c96b; }
.notice.info { background: #e8f0ff; border: 1px solid #90aae8; }
.notice.danger { background: #fff0f0; border: 1px solid #e88; }
.notice .icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }

/* ─── FAQ ───────────────────────────────────────── */
.faq-item {
  border: 1px solid #dde2ef;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-q {
  background: var(--grey);
  padding: 14px 18px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--navy);
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--gold); }
.faq-q.open::after { content: '−'; }
.faq-a {
  padding: 14px 18px;
  font-size: .9rem;
  color: #2a2d3e;
  display: none;
  border-top: 1px solid #dde2ef;
  line-height: 1.6;
}
.faq-a.open { display: block; }

/* ─── IN-CONTENT CTA BANNER ─────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  border-radius: 12px;
  padding: 28px 28px;
  margin: 32px 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,.25) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,.8); margin-bottom: 20px; font-size: .95rem; }
.cta-banner .cta-btn { font-size: .95rem; padding: 14px 28px; }

/* ─── BREADCRUMB ────────────────────────────────── */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px 0;
  font-size: .8rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb span { color: var(--navy); font-weight: 600; }

/* ─── FOOTER ────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  padding: 36px 24px 20px;
  font-size: .82rem;
  line-height: 1.6;
  margin-top: 40px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.footer-logo img { height: 38px; margin-bottom: 10px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: rgba(255,255,255,.65); }
.footer-links a:hover { color: var(--gold2); }
.footer-divider { border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 16px 0; }
.footer-disclaimer { font-size: .75rem; color: rgba(255,255,255,.45); max-width: 900px; }
.footer-18 {
  display: inline-block;
  border: 2px solid rgba(255,255,255,.4);
  border-radius: 4px;
  padding: 1px 7px;
  font-weight: 800;
  font-size: .85rem;
  margin-right: 6px;
  vertical-align: middle;
  color: rgba(255,255,255,.65);
}

/* ─── STICKY BOTTOM CTA ─────────────────────────── */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999;
  height: var(--sticky-h);
  background: var(--navy);
  border-top: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.35);
}
.sticky-cta .text {
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  display: none;
}
@media (min-width: 480px) { .sticky-cta .text { display: block; } }
.sticky-cta .text strong { color: var(--gold2); }
.sticky-cta-btn {
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  font-size: .88rem;
  padding: 11px 22px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: background .2s, transform .15s;
  box-shadow: 0 2px 12px rgba(201,168,76,.5);
}
.sticky-cta-btn:hover { background: var(--gold2); transform: scale(1.03); }
.sticky-close {
  background: none; border: none;
  color: rgba(255,255,255,.4);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color .2s;
}
.sticky-close:hover { color: rgba(255,255,255,.8); }

/* ─── PAGE NAV (sub pages) ──────────────────────── */
.page-intro {
  background: var(--grey);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: .95rem;
}
.page-intro p { margin: 0; }

/* ─── UTILS ─────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); font-size: .85rem; }
.badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
}

/* ─── RESPONSIVE ────────────────────────────────── */

/* --- 1024px: sidebar starts to shrink ─────────── */
@media (max-width: 1024px) {
  .content-wrap {
    grid-template-columns: 1fr 260px;
    gap: 28px;
  }
}

/* --- 900px: single column, sidebar drops below ── */
@media (max-width: 900px) {
  .content-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px 16px;
  }
  /* sidebar goes AFTER the article on mobile */
  .sidebar {
    order: 2;
    position: static !important;   /* no sticky on mobile */
    width: 100%;
  }
  .article { order: 1; }
  .sidebar-box { max-width: 480px; margin: 0 auto; }
}

/* --- 768px: phones ────────────────────────────── */
@media (max-width: 768px) {
  /* hero */
  .hero { min-height: 340px; }
  .hero-inner { padding: 36px 16px 44px; }
  .hero h1 { font-size: 1.65rem; }
  .hero-sub { font-size: .9rem; }

  /* header */
  .main-nav { display: none; }
  .header-cta { font-size: .78rem; padding: 8px 12px; }
  .site-logo img { height: 36px; }

  /* score strip */
  .score-strip { padding: 16px; }
  .score-strip-inner { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .score-item { padding: 10px 6px; }
  .score-item .label { font-size: .67rem; }
  .score-item .value { font-size: 1.1rem; }

  /* article */
  .article h2 { font-size: 1.2rem; margin: 28px 0 12px; }
  .article h3 { font-size: 1rem; }
  .article p, .article li { font-size: .93rem; }

  /* tables — horizontal scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }
  .table-wrap table { min-width: 420px; }

  /* notices */
  .notice { flex-direction: column; gap: 8px; font-size: .88rem; }

  /* cta banner */
  .cta-btn { font-size: .88rem; padding: 12px 20px; width: 100%; justify-content: center; }
  .cta-banner { padding: 20px 16px; }

  /* sticky bottom cta */
  .sticky-cta { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 14px; }
  .sticky-cta .text { font-size: .82rem; }
  .sticky-cta-btn { font-size: .82rem; padding: 8px 14px; align-self: stretch; text-align: center; }

  /* pro/con */
  .pro-con { grid-template-columns: 1fr; }

  /* faq */
  .faq-q { font-size: .93rem; padding: 13px 14px; }
  .faq-a { font-size: .88rem; padding: 10px 14px; }

  /* author box */
  .author-box { flex-direction: column; align-items: center; text-align: center; padding: 16px; }
  .author-links { justify-content: center; }

  /* glossary */
  .glossary dt { font-size: .9rem; }
  .glossary dd { font-size: .87rem; }

  /* breadcrumb */
  .breadcrumb { font-size: .78rem; padding: 10px 16px; }

  /* footer */
  .footer-top { flex-direction: column; gap: 16px; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-disclaimer { font-size: .78rem; }
}

/* --- 480px: small phones ──────────────────────── */
@media (max-width: 480px) {
  .content-wrap { padding: 16px 12px; width: 100%; box-sizing: border-box; }
  .score-strip { padding: 14px 12px; }
  .score-strip-inner { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hero h1 { font-size: 1.45rem; }
  .hero-sub { font-size: .85rem; }
  .header-inner { padding: 8px 12px; }
  .article h2 { font-size: 1.1rem; }
  .table-wrap { width: 100%; max-width: calc(100vw - 24px); }
  .table-wrap table { min-width: auto; font-size: .82rem; }
  .sidebar-box { max-width: 100%; }
  .sticky-cta { width: 100%; box-sizing: border-box; }
}

/* ─── GLOSSARY ────────────────────────────────── */
.glossary { margin: 0 0 28px; }
.glossary dt {
  font-weight: 700;
  color: var(--gold);
  margin-top: 14px;
  font-size: .95rem;
}
.glossary dd {
  margin: 4px 0 0 16px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.58;
  padding-bottom: 10px;
}

/* ─── AUTHOR BOX ─────────────────────────────────── */
.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--navy);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 10px;
  padding: 22px 24px;
  margin: 48px auto 0;
  max-width: 900px;
  box-shadow: 0 4px 20px rgba(21,34,65,.12);
}
.author-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-info { flex: 1; }
.author-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 2px;
}
.author-role {
  font-size: .8rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.author-bio {
  font-size: .87rem;
  color: rgba(255,255,255,.75);
  line-height: 1.55;
  margin: 0 0 12px;
}
.author-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.author-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: opacity .2s;
}
.author-link:hover { opacity: .85; }
.author-link--linkedin { background: #0077b5; color: #fff; }
.author-link--facebook { background: #1877f2; color: #fff; }

@media (max-width: 600px) {
  .author-box { flex-direction: column; align-items: center; text-align: center; }
  .author-links { justify-content: center; }
}
