/* ==========================================================================
   ElenaCartomante.com – Foglio di stile
   Palette: rosso brand #c8102e · nero #111 · blu azioni #1a56db
   ========================================================================== */
:root {
  --red: #c8102e;
  --red-dark: #9c0b22;
  --red-soft: #fdeef0;
  --ink: #1b1b1f;
  --muted: #5d5d66;
  --line: #e6e3e8;
  --bg: #ffffff;
  --bg-soft: #faf7f8;
  --blue: #1a56db;
  --blue-dark: #1444b4;
  --gold: #e3b341;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(27, 27, 31, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 1000; }
.skip-link:focus { left: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; font-size: 1rem; line-height: 1.2; transition: .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--red); color: var(--red); }
.btn-outline:hover { background: var(--red-soft); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--red); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-heart { width: 36px; height: 36px; fill: var(--red); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--red); }
.brand-sub { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: .15rem; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.main-nav a { display: block; padding: .5rem .8rem; text-decoration: none; color: var(--ink); font-weight: 500; border-radius: 8px; }
.main-nav a:hover { background: var(--bg-soft); color: var(--red); }
.main-nav a[aria-current="page"] { color: var(--red); font-weight: 600; }
.nav-cta { margin-left: .5rem; }
.nav-cta a.btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); }
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: .75rem 1rem 1rem; }
  .main-nav a { padding: .75rem .5rem; }
  .nav-cta { margin: .5rem 0 0; }
  .nav-cta a.btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6rem) 0;
  background: radial-gradient(1200px 500px at 85% -10%, #ffe1e6 0%, transparent 60%),
              radial-gradient(800px 400px at -10% 110%, #fff4d6 0%, transparent 60%), var(--bg-soft);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: .6em; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.hero-note { font-size: .92rem; color: var(--muted); }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 420px; margin-inline: auto; width: 100%; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--red); font-weight: 700; margin-bottom: 1rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 300px; } }

/* ---------- Sezioni ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.card h3 { margin-top: .25rem; }
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; margin-bottom: 1rem; }
.card-icon svg { width: 26px; height: 26px; fill: currentColor; }
.card-highlight { border-color: var(--red); position: relative; }
.grid-2 > .card-highlight, .grid-3 > .card-highlight { margin-top: 12px; }
.card-badge { position: absolute; top: -12px; left: 1.5rem; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .7rem; border-radius: 999px; }

/* ---------- Numeri / prezzi ---------- */
.phone-box { display: flex; flex-direction: column; gap: .35rem; }
.phone-number { font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 700; color: var(--red); text-decoration: none; letter-spacing: .02em; }
.phone-number:hover { color: var(--red-dark); }
.price { font-size: 1.05rem; }
.price strong { color: var(--ink); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.steps li { position: relative; padding-left: 3.5rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; display: grid; place-items: center; font-family: var(--serif); font-size: 1.2rem; }
.quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.5vw, 1.7rem); color: var(--ink); max-width: 760px; margin: 0 auto; text-align: center; }
.quote cite { display: block; font-style: normal; font-family: var(--font); font-size: .95rem; color: var(--muted); margin-top: 1rem; }
.notice { border-left: 4px solid var(--gold); background: #fff9e8; padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; }
.notice-red { border-left-color: var(--red); background: var(--red-soft); }
.table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .98rem; }
.table th, .table td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--bg-soft); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--red); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 1.25rem 1.1rem; color: var(--muted); }

/* ---------- Pagina interna ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li + li::before { content: "›"; margin-right: .4rem; }
.breadcrumb a { color: var(--muted); }
.prose { max-width: 800px; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.legal { max-width: 860px; font-size: .98rem; }
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.1rem; }
.legal .table { font-size: .9rem; }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem 1rem 2.5rem; margin: 1.5rem 0; font-size: .95rem; }

/* ---------- Form ---------- */
.form { display: grid; gap: 1.1rem; max-width: 680px; }
.form label { font-weight: 600; display: block; margin-bottom: .3rem; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea, .form input[type=password] {
  width: 100%; padding: .8rem .95rem; border: 1px solid #c9c5cc; border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
.form textarea { min-height: 150px; resize: vertical; }
.form .check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; font-size: .95rem; }
.form .check input { margin-top: .3rem; width: 18px; height: 18px; flex: none; accent-color: var(--red); }
.form .req { color: var(--red); }
.form-help { font-size: .85rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.5rem; border: 1px solid; }
.alert-ok { background: #ecf9ef; border-color: #9ad8a7; color: #1f5c2e; }
.alert-err { background: var(--red-soft); border-color: #f1a3ad; color: var(--red-dark); }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* ---------- PayPal ---------- */
.paypal-box { display: grid; gap: .75rem; max-width: 420px; }
.paypal-box select { padding: .75rem; border-radius: 10px; border: 1px solid #c9c5cc; font: inherit; width: 100%; }
.paypal-box input[type=image] { width: 160px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d7d4da; padding: 3.5rem 0 2rem; margin-top: 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid #333; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.footer-brand { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: #fff; margin-bottom: .5rem; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: .6rem; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-warning { color: #fff; }
.footer-bottom { padding-top: 1.5rem; font-size: .82rem; color: #a7a3ab; }
.footer-bottom p { margin-bottom: .4rem; }
.site-footer .link-btn { color: #fff; }

/* ==========================================================================
   COOKIE BANNER – nero, testo bianco, pulsanti blu
   ========================================================================== */
.cc-banner {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
  width: min(960px, calc(100% - 2rem)); z-index: 9000;
  background: #111; color: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  font-family: var(--font); font-size: .95rem; line-height: 1.5;
  animation: cc-in .3s ease-out;
}
@keyframes cc-in { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cc-banner[hidden], .cc-modal[hidden], .cc-reopen[hidden] { display: none !important; }
.cc-banner-inner { padding: 1.4rem 1.6rem; }
.cc-title { color: #fff; font-family: var(--font); font-size: 1.15rem; margin: 0 0 .5rem; font-weight: 700; }
.cc-desc { margin: 0 0 1.1rem; color: #e6e6e6; }
.cc-banner a, .cc-modal a { color: #fff; text-decoration: underline; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.cc-btn {
  background: var(--blue); color: #fff; border: 2px solid var(--blue); border-radius: 999px;
  padding: .7rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer; min-width: 130px; transition: .15s;
}
.cc-btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.cc-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 600px) {
  .cc-banner { bottom: 0; width: 100%; border-radius: 16px 16px 0 0; }
  .cc-actions { flex-direction: column; }
  .cc-btn { width: 100%; }
}

/* Pannello preferenze */
.cc-modal { position: fixed; inset: 0; z-index: 9100; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cc-modal-box { background: #111; color: #fff; width: min(620px, 100%); max-height: calc(100vh - 2rem); overflow: auto; border-radius: 16px; padding: 1.5rem 1.6rem; box-shadow: 0 20px 60px rgba(0,0,0,.5); font-size: .95rem; }
.cc-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.cc-modal-head h2 { color: #fff; font-family: var(--font); font-size: 1.3rem; margin: 0; }
.cc-close { background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; padding: 0 .25rem; }
.cc-modal-intro { color: #d0d0d0; margin-bottom: 1.2rem; }
.cc-cat { border-top: 1px solid #333; padding: 1rem 0; }
.cc-cat p { margin: .4rem 0 0; color: #bdbdbd; font-size: .9rem; }
.cc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cc-always { font-size: .78rem; color: #9ad8a7; margin-left: .4rem; }
.cc-switch { appearance: none; -webkit-appearance: none; width: 48px; height: 26px; border-radius: 999px; background: #444; position: relative; cursor: pointer; flex: none; transition: .2s; }
.cc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.cc-switch:checked { background: var(--blue); }
.cc-switch:checked::after { transform: translateX(22px); }
.cc-switch:disabled { opacity: .6; cursor: not-allowed; }
.cc-switch:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cc-modal-actions { margin-top: 1.25rem; }
.cc-meta { color: #8f8f8f; font-size: .78rem; margin: 1rem 0 0; word-break: break-all; }
body.cc-modal-open { overflow: hidden; }

/* Pulsante di richiamo in basso a destra */
.cc-reopen {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 8900;
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--blue);
  background: #111; color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: .15s;
}
.cc-reopen svg { width: 26px; height: 26px; fill: #fff; }
.cc-reopen:hover { background: var(--blue); transform: translateY(-2px); }
.cc-reopen:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- Admin ---------- */
.admin-wrap { width: min(1200px, 100% - 2rem); margin: 2rem auto; }
.admin-nav { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.5rem; }
.admin-nav a { text-decoration: none; padding: .5rem .9rem; border-radius: 8px; background: var(--bg-soft); color: var(--ink); font-weight: 500; border: 1px solid var(--line); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.admin-nav .spacer { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem; }
.stat b { display: block; font-size: 1.9rem; font-family: var(--serif); color: var(--red); }
.stat span { color: var(--muted); font-size: .9rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.filters label { font-size: .85rem; font-weight: 600; display: block; }
.filters input, .filters select { padding: .5rem .7rem; border: 1px solid #c9c5cc; border-radius: 8px; font: inherit; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-ok { background: #ecf9ef; color: #1f5c2e; }
.badge-no { background: var(--red-soft); color: var(--red-dark); }
.badge-mid { background: #fff4d6; color: #7a5a00; }
.pager { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }
.pager a, .pager span { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: .9rem; }
.pager span { background: var(--ink); color: #fff; }
.login-box { max-width: 400px; margin: 4rem auto; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
.btn-danger { background: var(--red); color: #fff; border: 0; border-radius: 8px; padding: .4rem .8rem; cursor: pointer; font: inherit; font-size: .85rem; }
.wrap-cell { max-width: 320px; white-space: pre-wrap; word-break: break-word; }
