/* ==========================================================================
   Cartomanti.net – foglio di stile 2026
   Sostituisce reset.css, main-stylesheet.css, responsive.css e font-awesome.
   Gli stili del cookie banner sono in gdpr.css (condiviso con consulti.cartomanti.net).
   ========================================================================== */

/* ---------- Font locali (nessuna chiamata a Google Fonts) ---------- */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/open-sans-latin-wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('../fonts/oswald-latin-wght.woff2') format('woff2');
}

/* ---------- Variabili ---------- */
:root {
  --blue: #256193;
  --blue-dark: #1b4a72;
  --btn: #1f6fd1;
  --btn-hover: #1859aa;
  --pink: #c81168;
  --ink: #26313d;
  --muted: #5b6673;
  --panel: #f4f4f4;
  --card: #ffffff;
  --side: #e4e4e6;
  --line: #e1e4e8;
  --green: #17a34a;
  --red: #e03131;
  --amber: #f08c00;
  --footer: #64d5f7;
  --radius: 14px;
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-title: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2Z'/%3E%3C/svg%3E");
  --icon-phone-square: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M5 2h14a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3Zm3.5 4.3c-.4 0-.8.2-1.1.5-.6.6-1 1.5-.9 2.6.2 2.1 1.3 4 2.9 5.6 1.6 1.6 3.5 2.7 5.6 2.9 1.1.1 2-.3 2.6-.9.3-.3.5-.7.5-1.1 0-.3-.1-.6-.4-.8l-1.8-1.3c-.4-.2-.9-.2-1.2.1l-.8.8c-1.3-.6-2.6-1.9-3.2-3.2l.8-.8c.3-.3.4-.8.1-1.2L9.3 6.7c-.2-.3-.5-.4-.8-.4Z'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37, 97, 147, .35), transparent 70%) top center / 100% 900px no-repeat,
    #05050b url('../img/bg-stelle.webp') repeat top center;
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--blue); text-decoration: none; transition: color .15s, background-color .15s; }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #8ec5ff; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
::selection { background: var(--blue); color: #fff; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10000;
  background: #000; color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Struttura ---------- */
.site {
  max-width: 1040px;
  margin: 0 auto;
  box-shadow: 0 0 80px rgba(0, 0, 0, .7);
}
@media (min-width: 1041px) {
  .site { margin-bottom: 40px; }
  .site-footer { border-radius: 0 0 var(--radius) var(--radius); }
}

.site-header { background: #f06fb3; }
.logo-link { display: block; line-height: 0; }
.logo-link img { display: block; width: 100%; height: auto; aspect-ratio: 1983 / 793; }

.mobile-nav { display: none; }

.main-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  background: var(--panel);
}
.main {
  min-width: 0;
  border-top: 5px solid var(--blue);
  padding: 26px 30px 40px;
}

/* ---------- Titolo pagina con la caratteristica riga tratteggiata ---------- */
.page-title {
  position: relative;
  margin: 0 0 10px;
  font: 600 clamp(22px, 2.4vw, 27px)/1.2 var(--font-title);
  text-transform: uppercase;
  letter-spacing: .01em;
  color: #353535;
}
.page-title::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 16px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(-45deg, #d0d0d0 0 1px, transparent 1px 4px);
}
.page-title span { position: relative; background: var(--panel); padding-right: 14px; }
.page-lead { color: var(--muted); font-size: 16.5px; margin: 0 0 20px; }

/* ---------- Promo ---------- */
.promo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  margin: 0 0 24px; padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--pink);
  border-radius: 12px;
  font-size: 17px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, .05);
}
.promo-badge {
  background: var(--pink); color: #fff;
  font: 600 14px/1 var(--font-title); letter-spacing: .08em;
  padding: 6px 12px; border-radius: 99px;
}
.promo a { font-weight: 800; font-size: 20px; color: var(--blue); white-space: nowrap; }

/* ---------- Schede dei servizi ---------- */
.brand {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 24px;
  box-shadow: 0 2px 12px rgba(16, 24, 40, .06);
  scroll-margin-top: 16px;
}
.brand-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; margin: 0 0 14px; padding: 0 0 12px;
  border-bottom: 1px solid #eef0f3;
}
.brand h2 {
  margin: 0;
  font: 600 23px/1.2 var(--font-title);
  text-transform: uppercase;
  color: #1f2b38;
}
.brand h2::before { content: '\2665'; color: var(--pink); margin-right: 8px; }
.brand h3 { font-size: 16px; margin: 0 0 8px; color: #1f2b38; }

.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #e9f8ee; color: #11692f;
  font-weight: 700; font-size: 13px;
  padding: 5px 12px; border-radius: 99px;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(23, 163, 74, .6);
  animation: cn-pulse 2s infinite;
}
@keyframes cn-pulse {
  0% { box-shadow: 0 0 0 0 rgba(23, 163, 74, .55); }
  70% { box-shadow: 0 0 0 8px rgba(23, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 163, 74, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

.numeri { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.numeri li { padding: 10px 14px; background: #f6f7f9; border-radius: 10px; line-height: 1.55; }
a.tel {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; font-size: 18px; color: var(--blue); white-space: nowrap;
}
a.tel::before {
  content: ''; width: 16px; height: 16px; flex: none;
  background: currentColor;
  -webkit-mask: var(--icon-phone) center / contain no-repeat;
  mask: var(--icon-phone) center / contain no-repeat;
}
a.tel:hover { color: var(--blue-dark); text-decoration: underline; }
a.tel--verde { color: #11813a; }
a.tel--verde:hover { color: #0b6129; }

.ricarica {
  margin: 0 0 20px; padding: 16px 18px;
  background: linear-gradient(180deg, #f1f7fd, #fff);
  border: 1px dashed #b7cee6;
  border-radius: 12px;
}
.ricarica h3 { font: 600 18px/1.2 var(--font-title); text-transform: uppercase; margin: 0 0 2px; }
.ricarica p { margin: 0; color: var(--muted); font-size: 14px; }
.payments { display: block; width: 100%; max-width: 380px; margin: 8px 0 12px; }
.pacchetti { display: flex; flex-wrap: wrap; gap: 10px; }
.pacchetti a {
  display: block; line-height: 0; border-radius: 6px; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.pacchetti a:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(37, 97, 147, .35); }
.pacchetti img { width: 120px; }

/* ---------- Cartomanti in tempo reale ---------- */
.op-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 10px; }
.op-head h3 { margin: 0; }
.op-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.op-legend li { display: inline-flex; align-items: center; gap: 6px; }
.op-legend li::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: #8a94a0; }
.op-legend .op--free::before { background: var(--green); }
.op-legend .op--busy::before { background: var(--red); }
.op-legend .op--away::before { background: var(--amber); }

.op-grid {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 6px 8px;
}
.op {
  display: flex; align-items: center; gap: 7px;
  min-width: 0; padding: 6px 10px;
  background: #f5f6f8; border: 1px solid #e6e8ec; border-radius: 8px;
  font-size: 15px; line-height: 1.3;
}
.op-icon {
  flex: none; width: 17px; height: 17px;
  background: currentColor; color: #8a94a0;
  -webkit-mask: var(--icon-phone-square) center / contain no-repeat;
  mask: var(--icon-phone-square) center / contain no-repeat;
}
.op-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-ext { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.op.op--free { background: #ebf8ef; border-color: #bde6c9; }
.op.op--free .op-icon { color: var(--green); }
.op.op--busy .op-icon { color: var(--red); }
.op.op--away .op-icon { color: var(--amber); }
.op-empty { grid-column: 1 / -1; color: var(--muted); font-style: italic; }

.banner-link { display: block; line-height: 0; margin: 0 0 18px; }
.banner-link img { width: 100%; max-width: 620px; border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); transition: transform .2s; }
.banner-link:hover img { transform: scale(1.01); }

.cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 0 0 18px; padding: 14px 16px;
  background: #fff6fa; border: 1px solid #f5cfe2; border-radius: 12px;
}
.cta-link { font-size: 19px; color: #b5135e; }
.cta-link:hover { color: #8e0f4a; text-decoration: underline; }
.cta img { width: 200px; display: block; }
.cta p { flex-basis: 100%; margin: 0; }
.cta p a { font-weight: 700; }
.brand > :last-child { margin-bottom: 0; }

/* ---------- Testi informativi / FAQ ---------- */
.info {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 2px 12px rgba(16, 24, 40, .06);
}
.info h2 { font: 600 21px/1.25 var(--font-title); text-transform: uppercase; color: #1f2b38; margin: 0 0 12px; }
.info h2:not(:first-child) { margin-top: 26px; }
.steps { margin: 0 0 6px; padding-left: 22px; }
.steps li { margin: 0 0 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 12px 34px 12px 0; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--blue);
}
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 0 0 14px; color: #3c4753; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--side);
  box-shadow: inset 1px 0 0 #d0d0d0;
}
.sidebar .panel { border-top: 5px solid var(--blue); }
.panel-title {
  margin: 0; padding: 13px 16px;
  font: 600 17px/1.2 var(--font-title);
  text-transform: uppercase; letter-spacing: .02em;
  color: #333;
}
.side-menu { box-shadow: inset 0 14px 14px -14px rgba(0, 0, 0, .14); }
.side-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-top: 1px dotted #c4c4c8;
  color: #333;
}
.side-item:hover, .side-item.is-current { background: #ededef; color: #333; }
.side-item img { flex: none; width: 39px; }
.side-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.side-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-text span { font-size: 13px; color: #5a5a60; }
.side-badge {
  position: relative; flex: none;
  background: #437f00; color: #fff;
  font-weight: 700; font-size: 12px; line-height: 1.3;
  padding: 3px 8px; border-radius: 4px;
}
.side-badge::after {
  content: ''; position: absolute; left: 8px; bottom: -5px;
  border: 5px solid transparent; border-top-color: #437f00; border-bottom: 0;
}
.panel-pay .panel-body {
  padding: 16px; text-align: center; font-size: 14px; color: #555;
  box-shadow: inset 0 14px 14px -14px rgba(0, 0, 0, .14);
}
.panel-pay img { width: 220px; margin: 0 auto 8px; display: block; }
.panel-pay p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer);
  border-top: 6px solid #3fbbe6;
  color: #0b2a38;
  font-size: 14px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px; padding: 20px 30px;
}
.footer-inner p { margin: 0; max-width: 620px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a, .link-button {
  color: #06324a; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.footer-links a:hover, .link-button:hover { color: #000; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Pagine testuali (policy, termini) ---------- */
.legal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.legal h2 {
  font: 600 20px/1.3 var(--font-title); text-transform: uppercase; color: #1f2b38;
  margin: 28px 0 10px; padding-left: 12px; border-left: 4px solid var(--blue);
}
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 16.5px; margin: 18px 0 6px; }
.legal p, .legal li { font-size: 15.5px; }
.legal ul { padding-left: 22px; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 14px; }
.legal a:not(.btn), .form-info a, .faq a { text-decoration: underline; text-underline-offset: 2px; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: 10px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.legal th { background: #f5f7fa; font-weight: 700; }
.legal tr:last-child td { border-bottom: 0; }
.box-titolare { background: #f3f7fb; border: 1px solid #d6e3f0; border-radius: 10px; padding: 14px 16px; margin: 0 0 1em; }
.btn {
  display: inline-block; padding: 11px 20px; border: 0; border-radius: 8px;
  background: var(--btn); color: #fff; font: 700 15px/1.2 var(--font); cursor: pointer;
}
.btn:hover { background: var(--btn-hover); color: #fff; }

/* ---------- Modulo di assistenza ---------- */
.support {
  max-width: 700px; padding: 30px;
  background: var(--card);
  border: 1px solid #dce3ec; border-top: 4px solid var(--blue);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(25, 49, 77, .08);
}
.support-intro h2 { font: 600 24px/1.3 var(--font-title); text-transform: uppercase; margin: 0 0 8px; color: #183b59; }
.support-intro p { margin: 0; color: #536477; font-size: 15px; }
.support-required { display: block; margin: 10px 0 22px; font-size: 13px; color: #536477; }
.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.field input[type='text'], .field input[type='email'], .field input[type='tel'], .field textarea {
  display: block; width: 100%; margin: 0; padding: 12px 14px;
  border: 1px solid #aab8c8; border-radius: 8px;
  background: #fff; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #66778a; opacity: 1; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #b42318; }
.hint { display: block; margin-top: 7px; color: #536477; font-size: 12.5px; line-height: 1.5; }
.consents { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e3e8ef; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.consent input { flex: 0 0 18px; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--blue); }
.consent label { font-size: 13.5px; line-height: 1.6; color: #43556a; cursor: pointer; }
.consent label a { font-weight: 700; text-decoration: underline; }
.form-info { font-size: 12.5px; color: #5b6673; margin: 4px 0 0; }
.support .btn { width: 100%; min-height: 50px; margin-top: 20px; font-size: 16px; }
.support .btn[disabled] { opacity: .7; cursor: progress; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: 10px; margin: 0 0 20px; font-size: 15px; }
.alert-ok { background: #e7f6ec; color: #145c2c; border: 1px solid #bfe3cb; }
.alert-error { background: #fdecea; color: #8a1c13; border: 1px solid #f5c2bd; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-box { grid-template-columns: minmax(0, 1fr) 260px; }
  .main { padding: 22px 22px 34px; }
}
@media (max-width: 760px) {
  .main-box { grid-template-columns: minmax(0, 1fr); }
  .sidebar { box-shadow: none; }
  .main { padding: 18px 16px 28px; }
  .brand, .info, .legal { padding: 16px; }
  .support { padding: 22px 16px; border-radius: 12px; }
  .support-grid { grid-template-columns: minmax(0, 1fr); }
  .mobile-nav {
    display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px;
    background: #000; scrollbar-width: none;
  }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a {
    flex: none; padding: 7px 14px; border-radius: 99px;
    background: #1b1b22; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap;
  }
  .mobile-nav a[aria-current='page'] { background: var(--btn); }
  .footer-inner { padding: 18px 16px 80px; text-align: center; justify-content: center; }
  .footer-links { justify-content: center; }
}
@media (max-width: 600px) {
  .page-title::before { display: none; }
  .page-title span { padding: 0; }
  .promo { font-size: 16px; }
  .op-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op { font-size: 14px; padding: 6px 8px; }
  .pacchetti img { width: 100px; }
}
@media (max-width: 360px) {
  .op-grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  body { background: #fff; }
  .site { box-shadow: none; }
  .sidebar, .mobile-nav, .cn-banner, .cn-reopen, .cn-prefs { display: none !important; }
  .main-box { display: block; }
}
