/* Bootstrap 5 */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css');
/* Cinzel font */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&display=swap');

/* ============================================
   IL CODICE DELLO ZODIACO — Public CSS
   Dark Luxury: Nero / Oro / Blu Notte
   ============================================ */

:root {
  --bg:          #08080e;
  --surface:     #10101a;
  --card:        #14141f;
  --card-hover:  #1a1a2a;
  --border:      rgba(201,168,76,0.18);
  --gold:        #c9a84c;
  --gold-light:  #e8c96a;
  --gold-dim:    rgba(201,168,76,0.12);
  --text:        #e4e4f0;
  --muted:       #7a7a9a;
  --purple-glow: rgba(110,50,200,0.12);
  --font-title:  'Cormorant Garamond', 'Georgia', serif;
  --font-body:   'Inter', 'Segoe UI', sans-serif;
  --radius:      12px;
  --radius-lg:   20px;
}

/* ─── Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Typography ────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  color: var(--gold-light);
  line-height: 1.2;
  font-weight: 600;
}

p { color: var(--text); }
.text-muted { color: var(--muted) !important; }
.text-gold { color: var(--gold) !important; }

/* ─── Navbar ────────────────────────────── */
.navbar-public {
  background: rgba(8,8,14,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand-pub {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--gold) !important;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.navbar-brand-pub:hover { color: var(--gold-light) !important; }

.nav-link-pub {
  color: var(--text) !important;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  font-weight: 400;
}
.nav-link-pub:hover,
.nav-link-pub.active { color: var(--gold) !important; }

.nav-link-pub.nav-login {
  color: var(--muted) !important;
  font-size: 0.82rem;
}
.nav-link-pub.nav-login:hover { color: var(--text) !important; }

.navbar-toggler-pub {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.navbar-toggler-pub .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── Gold divider ──────────────────────── */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border: none;
  margin: 0;
}

/* ─── Hero ──────────────────────────────── */
.hero-public {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(110,50,200,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 70% 80%, rgba(201,168,76,0.06) 0%, transparent 60%),
    var(--bg);
  padding: 5rem 1rem 4rem;
}

.hero-public::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.025'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 40px rgba(201,168,76,0.18);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* ─── Buttons ───────────────────────────── */
.btn-gold {
  background: linear-gradient(135deg, #c9a84c 0%, #e8c96a 50%, #c9a84c 100%);
  background-size: 200% 100%;
  color: #0a0a0f;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 2.2rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-position 0.4s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(201,168,76,0.25);
}
.btn-gold:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(201,168,76,0.4);
  color: #0a0a0f;
}

.btn-gold-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  border-radius: 8px;
  padding: 0.75rem 1.8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}
.btn-gold-outline:hover {
  background: var(--gold-dim);
  color: var(--gold-light);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-free {
  background: transparent;
  color: var(--gold-light);
  border: 1.5px solid rgba(201,168,76,0.5);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 8px;
  padding: 0.65rem 1.4rem;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, background 0.2s;
}
.btn-free:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold-light);
  text-decoration: none;
}

/* ─── Lead Magnet Banner ─────────────────── */
.lead-magnet {
  background: linear-gradient(135deg, #1a1508 0%, #0f0d04 50%, #0d1020 100%);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.lead-magnet::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.lead-magnet .badge-free {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 14px;
  display: inline-block;
  margin-bottom: 1rem;
}

/* ─── Section Titles ────────────────────── */
.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ─── Product Cards ──────────────────────── */
.product-card-pub {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s, background 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.product-card-pub::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.product-card-pub:hover {
  border-color: rgba(201,168,76,0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,168,76,0.1);
  background: var(--card-hover);
}
.product-card-pub:hover::before { opacity: 1; }

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
}

.card-title-pub {
  font-family: var(--font-title);
  font-size: 1.45rem;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

.card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.86rem;
  color: var(--muted);
}
.card-features li {
  padding: 0.3rem 0;
  padding-left: 1.3rem;
  position: relative;
}
.card-features li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.65rem;
  top: 0.45rem;
}

.card-price {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.card-price .price-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 400;
}

.badge-free-card {
  background: rgba(40,180,100,0.12);
  color: #5de0a0;
  border: 1px solid rgba(40,180,100,0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 12px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-block;
}

.badge-premium-card {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 12px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-block;
}

/* ─── Checkout / Order ───────────────────── */
.checkout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 640px;
  margin: 0 auto;
}

.product-summary-box {
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2rem;
}
.product-summary-box .prod-name {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.product-summary-box .prod-price {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
}

.form-label-pub {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  display: block;
}

.form-control-pub,
.form-select-pub {
  background: var(--surface) !important;
  border: 1px solid rgba(201,168,76,0.2) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-control-pub:focus,
.form-select-pub:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
}
.form-control-pub::placeholder { color: rgba(122,122,154,0.6); }
.form-control-pub:-webkit-autofill,
.form-control-pub:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset !important;
  -webkit-text-fill-color: var(--text) !important;
}
textarea.form-control-pub { resize: vertical; min-height: 90px; }

.form-section-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: var(--gold);
  font-weight: 600;
  margin: 1.75rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Status Badges ──────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.status-in_attesa, .status-da_pagare  { background: rgba(255,193,7,0.12);  color: #ffc107; border: 1px solid rgba(255,193,7,0.3); }
.status-pagato                         { background: rgba(40,167,69,0.12);   color: #56cc78; border: 1px solid rgba(40,167,69,0.3); }
.status-generato, .status-completato  { background: rgba(23,162,184,0.12);  color: #4fcbe8; border: 1px solid rgba(23,162,184,0.3); }
.status-pronto_download               { background: rgba(201,168,76,0.12);  color: var(--gold); border: 1px solid var(--border); }
.status-errore                        { background: rgba(220,53,69,0.12);   color: #f06070; border: 1px solid rgba(220,53,69,0.3); }
.status-in_lavorazione                { background: rgba(110,50,200,0.12);  color: #a080e8; border: 1px solid rgba(110,50,200,0.3); }

/* ─── Order Info Card ────────────────────── */
.order-info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.5rem;
}
.order-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.92rem;
  gap: 1rem;
}
.order-info-row:last-child { border-bottom: none; }
.order-info-row .label { color: var(--muted); flex-shrink: 0; }
.order-info-row .value { color: var(--text); text-align: right; }

.order-code {
  font-family: 'Courier New', monospace;
  background: var(--gold-dim);
  color: var(--gold);
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}

/* ─── Alert / Message Box ────────────────── */
.msg-box {
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}
.msg-box.info  { background: rgba(23,162,184,0.08); border: 1px solid rgba(23,162,184,0.25); color: #4fcbe8; }
.msg-box.warn  { background: rgba(255,193,7,0.08);  border: 1px solid rgba(255,193,7,0.25);  color: #ffc107; }
.msg-box.ok    { background: rgba(40,167,69,0.08);  border: 1px solid rgba(40,167,69,0.25);  color: #56cc78; }
.msg-box.error { background: rgba(220,53,69,0.08);  border: 1px solid rgba(220,53,69,0.25);  color: #f06070; }

/* ─── Footer ────────────────────────────── */
.footer-pub {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-brand {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: var(--gold);
  font-weight: 600;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
  margin: 0 0.6rem;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  color: rgba(122,122,154,0.55);
  font-size: 0.78rem;
  margin-top: 1.5rem;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.social-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

/* ─── Page Wrapper ───────────────────────── */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-content { flex: 1; }

/* ─── Loading Spinner ────────────────────── */
.spinner-gold {
  width: 38px; height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 768px) {
  .hero-public { min-height: 70vh; padding: 4rem 1rem 3rem; }
  .checkout-card { padding: 1.75rem 1.25rem; }
  .product-card-pub { padding: 1.6rem 1.4rem; }
  .lead-magnet { padding: 1.75rem 1.25rem; }
  .order-info-block { padding: 1rem 1.1rem; }
}

/* ─── Bootstrap dark overrides ───────────── */
.container { max-width: 1180px; }

/* Collapse menu animation */
#navMenu { transition: max-height 0.3s ease; }
#navMenu.show { max-height: 300px; }

/* Select arrow for dark */
.form-select-pub {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23c9a84c' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  background-size: 12px !important;
  padding-right: 2.5rem !important;
}

/* --- STILE PREMIUM CARD SERVIZI --- */

.card-servizio {
    background-color: #121928 !important;
    border: 1px solid #d4af37 !important;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.card-servizio:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(212, 175, 55, 0.15);
}

.card-servizio h3,
.card-servizio .prezzo {
    color: #d4af37 !important;
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

.card-servizio p {
    color: #e2e8f0 !important;
    font-weight: 300;
    line-height: 1.6;
}

.btn-acquista-gold {
    background-color: #d4af37;
    color: #0a0e17;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 24px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    width: 100%;
}

.btn-acquista-gold:hover {
    background-color: #f3d56a;
    color: #0a0e17;
}
