/* =========================================================
   Casino non AAMS sicuri — tema "Documento di sicurezza"
   Carta menta con motivo guilloché, inchiostro petrolio,
   timbri corallo, dettagli oro. Ogni casinò è un certificato.
   ========================================================= */

:root {
  --paper: #eef5f0;
  --paper-2: #e2ede6;
  --card: #fbfdfb;
  --ink: #12302f;
  --ink-soft: #4c6461;
  --teal: #0f4c5c;
  --teal-2: #16677a;
  --teal-dark: #0a3440;
  --coral: #e4572e;
  --coral-dark: #b8411f;
  --gold: #c9a44c;
  --line: #c7d9cf;
  --line-soft: #dbe8e0;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 66px;
  --radius: 10px;
  --guilloche:
    repeating-radial-gradient(circle at 0 0, transparent 0 14px, rgba(15, 76, 92, .045) 14px 15px),
    repeating-radial-gradient(circle at 100% 100%, transparent 0 14px, rgba(15, 76, 92, .045) 14px 15px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--guilloche);
  overflow-x: clip;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

a { color: var(--teal-2); text-underline-offset: 3px; }
a:hover { color: var(--coral-dark); }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  font-weight: 700;
  color: #fff;
  background: var(--coral);
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 10px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 860px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--teal-dark);
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 10px);
  border-bottom: 3px solid var(--gold);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 22px rgba(10, 52, 64, .28); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
}

.logo { flex: 0 0 auto; }
.logo img { width: auto; height: 40px; }

.main-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.main-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #d8ebe6;
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.main-nav a:hover,
.main-nav a.is-active { color: var(--teal-dark); background: var(--paper); }

.btn-bonus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: var(--coral);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--coral-dark);
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn-bonus:hover { color: #fff; background: #ec6640; }
.btn-bonus:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-dark); }
.btn-bonus svg { width: 18px; height: 18px; flex: 0 0 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 42px 0 18px; }
.hero .container { position: relative; }

.hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 1rem + 2.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--teal-dark);
  text-wrap: balance;
}

.hero-intro { max-width: 780px; margin: 0 0 14px; font-size: 1.05rem; color: var(--ink-soft); }
.hero-text { margin-bottom: 18px; }
.hero-text .hero-intro:last-child { margin-bottom: 0; }
.read-more { display: none; }

/* decorative rubber stamp (desktop only) */
.hero-stamp {
  position: absolute;
  top: -6px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  padding: 14px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  color: var(--coral);
  border: 3px solid var(--coral);
  border-radius: 50%;
  outline: 2px dashed var(--coral);
  outline-offset: -12px;
  transform: rotate(-12deg);
  opacity: .82;
  pointer-events: none;
}
.hero-stamp span { display: block; font-size: 26px; }

.author-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 8px 16px 8px 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.author-box img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: cover;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: var(--paper-2);
}
.author-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 14px; line-height: 1.35; }
.author-name { font-weight: 700; }
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px 2px 7px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--teal);
  border-radius: 999px;
}
.badge-verified svg { width: 12px; height: 12px; }
.author-date { width: 100%; font-size: 13px; color: var(--ink-soft); }

/* ---------- Listing: certificate cards ---------- */
.listing { padding: 16px 0 34px; }

.listing-title {
  margin: 0 0 22px;
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 1rem + 1.3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--teal-dark);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.casino-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }

.casino-card {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(210px, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.05fr) 178px;
  grid-template-areas: "rank brand bonus features cta";
  align-items: center;
  gap: 18px;
  padding: 18px 20px 18px 26px;
  background: var(--card);
  background-image: var(--guilloche);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line), 0 10px 24px rgba(15, 76, 92, .07);
}

/* security strip on the left edge */
.casino-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8px;
  background: repeating-linear-gradient(180deg, var(--teal) 0 6px, var(--gold) 6px 8px);
  border-radius: var(--radius) 0 0 var(--radius);
}

.casino-card--top { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal), 0 14px 30px rgba(15, 76, 92, .14); }

/* stamp-style rank */
.rank {
  grid-area: rank;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 800;
  color: var(--coral);
  border: 2px solid var(--coral);
  border-radius: 50%;
  outline: 1px dashed var(--coral);
  outline-offset: -6px;
  transform: rotate(-10deg);
}

.brand { grid-area: brand; display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo {
  display: grid;
  place-items: center;
  flex: 0 0 100px;
  width: 100px;
  height: 58px;
  padding: 6px 8px;
  background: var(--teal-dark);
  border-radius: 8px;
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-info { min-width: 0; }
.brand-name {
  display: block;
  margin: 0 0 4px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--teal-dark);
}
.rating { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1; color: var(--ink-soft); }

.stars {
  position: relative;
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 1px;
  color: #cddad3;
  white-space: nowrap;
}
.stars::before { content: "★★★★★"; }
.stars::after {
  content: "★★★★★";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--w, 100%);
  overflow: hidden;
  color: var(--gold);
}
.r5 { --w: 100%; }
.r4 { --w: 80%; }
.r3 { --w: 60%; }

.bonus-block {
  grid-area: bonus;
  padding: 10px 14px;
  background: rgba(15, 76, 92, .06);
  border: 1px dashed var(--teal-2);
  border-radius: 8px;
}
.bonus-label { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; color: var(--teal-2); }
.bonus-text { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.bonus-terms { margin: 4px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); }

.features {
  grid-area: features;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  line-height: 1.3;
}
.features li { display: flex; align-items: center; gap: 8px; }
.features svg { width: 18px; height: 18px; flex: 0 0 18px; }

.cta { grid-area: cta; display: grid; gap: 6px; text-align: center; }
.btn-play {
  display: block;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: var(--coral);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--coral-dark);
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn-play:hover { color: #fff; background: #ec6640; }
.btn-play:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-dark); }
.cta-note { font-size: 11.5px; line-height: 1.3; color: var(--ink-soft); }

/* ---------- Article content ---------- */
.content { padding: 4px 0 20px; }

.content h2 {
  margin: 2.2em 0 .7em;
  padding-top: .9em;
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 1rem + 1.15vw, 1.85rem);
  font-weight: 800;
  line-height: 1.22;
  color: var(--teal-dark);
  border-top: 4px double var(--line);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.content > h2:first-child { margin-top: .4em; }

.content h3 {
  margin: 1.6em 0 .45em;
  font-family: var(--font-head);
  font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--teal);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.content p { margin: 0 0 1em; }

.content ul { margin: 0 0 1.2em; padding: 0; list-style: none; }
.content ul > li { position: relative; margin: 0 0 .55em; padding-left: 1.6em; }
.content ul > li::before {
  content: "";
  position: absolute;
  left: .15em;
  top: .5em;
  width: .7em;
  height: .7em;
  border: 2px solid var(--teal-2);
  border-radius: 50%;
  background: radial-gradient(circle, var(--coral) 0 30%, transparent 32%);
}

.content ol { margin: 0 0 1.3em; padding: 0; list-style: none; counter-reset: step; }
.content ol > li {
  position: relative;
  min-height: 1.9em;
  margin: 0 0 .7em;
  padding-left: 2.6em;
  counter-increment: step;
}
.content ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .05em;
  display: grid;
  place-items: center;
  width: 1.85em;
  height: 1.85em;
  font-family: var(--font-head);
  font-size: .85em;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
}

/* ---------- Tables ---------- */
.table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 1.2em 0 1.6em;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(15, 76, 92, .07);
  scrollbar-width: thin;
  scrollbar-color: var(--teal-2) var(--paper-2);
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: var(--paper-2); }
.table-wrap::-webkit-scrollbar-thumb { background: var(--teal-2); border-radius: 8px; }

.table-wrap table { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: 15px; line-height: 1.45; }
.table-wrap td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
.table-wrap td + td { border-left: 1px solid var(--line-soft); }
.table-wrap td p { margin: 0; }

.table-wrap tr:first-child td {
  vertical-align: middle;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--teal);
  border-bottom: 3px solid var(--gold);
  border-left-color: rgba(255, 255, 255, .15);
}
.table-wrap tr:nth-child(odd):not(:first-child) td { background: rgba(226, 237, 230, .55); }
.table-wrap tr:last-child td { border-bottom: 0; }

.name-first tr:not(:first-child) td:first-child { font-weight: 700; color: var(--teal-dark); }
.name-first td:first-child { min-width: 140px; }
.equal td { width: 50%; }
.cols-3 table { min-width: 560px; }
.cols-4 table { min-width: 680px; }
.cols-5 table { min-width: 680px; }
.nowrap-last td:last-child { white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq-item {
  margin: 0 0 12px;
  padding: 16px 20px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--coral);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.content .faq-item h3 { margin: 0 0 .4em; }

/* ---------- Author bio ---------- */
.author-bio {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 44px 0 10px;
  padding: 22px;
  background: var(--card);
  background-image: var(--guilloche);
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: var(--radius);
}
.author-bio img {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  object-fit: cover;
  border: 3px solid var(--gold);
  border-radius: 50%;
  background: var(--paper-2);
}
.author-bio-name { margin: 0 0 2px; font-family: var(--font-head); font-size: 1.15rem; font-weight: 800; color: var(--teal-dark); }
.author-bio-role { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--coral-dark); }
.author-bio-text { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px;
  padding: 44px 0 24px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #bcd4ce;
  background: var(--teal-dark);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 10px);
  border-top: 3px solid var(--gold);
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 32px; }
.footer-title { margin: 0 0 12px; font-family: var(--font-head); font-size: 17px; font-weight: 600; color: #fff; }
.footer-logo img { width: auto; height: 38px; margin-bottom: 12px; }
.footer-about { margin: 0; }
.footer-links { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: #e4f1ed; text-decoration: none; }
.footer-links a:hover { color: var(--gold); text-decoration: underline; }
.rg-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(201, 164, 76, .45);
  border-radius: var(--radius);
}
.rg-box p { margin: 0; font-size: 13.5px; }
.age-badge {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: var(--coral);
  border-radius: 50%;
}
.footer-bottom {
  margin-top: 30px;
  padding-top: 16px;
  font-size: 13px;
  text-align: center;
  color: #93b1aa;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-bottom p { margin: 0 0 4px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: #fff;
  background: var(--teal);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(10, 52, 64, .3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top svg { width: 20px; height: 20px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .casino-card {
    grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "rank brand cta"
      "rank bonus features";
    align-items: start;
  }
  .cta { align-self: center; }
  .hero-stamp { display: none; }
}

@media (max-width: 980px) {
  .main-nav { display: none; }
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 680px) {
  body { font-size: 16px; line-height: 1.65; }
  .container { padding: 0 14px; }

  .hero { padding: 18px 0 8px; }
  .hero h1 { margin-bottom: 10px; }
  .hero-intro { font-size: 15px; line-height: 1.55; margin-bottom: 10px; }
  .hero-text {
    position: relative;
    max-height: 7.1em;
    margin-bottom: 4px;
    overflow: hidden;
  }
  .hero-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.4em;
    background: linear-gradient(180deg, rgba(238, 245, 240, 0), var(--paper));
    pointer-events: none;
  }
  .hero-text.is-open { max-height: none; }
  .hero-text.is-open::after { display: none; }
  .read-more {
    display: inline-block;
    margin: 0 0 12px;
    padding: 4px 0;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--teal-2);
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }
  .author-box { padding: 6px 12px 6px 6px; gap: 10px; }
  .author-box img { width: 38px; height: 38px; flex-basis: 38px; }
  .author-meta { font-size: 13px; }
  .author-date { font-size: 12px; }

  .listing { padding: 12px 0 24px; }
  .listing-title { margin-bottom: 16px; }

  .casino-card {
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
      "rank brand"
      "bonus bonus"
      "features features"
      "cta cta";
    gap: 10px 12px;
    padding: 14px 14px 14px 22px;
  }
  .rank { width: 44px; height: 44px; font-size: 17px; align-self: center; }
  .brand-logo { flex-basis: 88px; width: 88px; height: 50px; }
  .brand-name { font-size: 16px; }
  .bonus-block { padding: 8px 12px; }
  .bonus-text { font-size: 15px; }
  .features { grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 13.5px; }
  .features li:first-child { grid-column: 1 / -1; }
  .btn-play { padding: 12px 14px; font-size: 15px; }

  .table-wrap { margin: 1em 0 1.4em; }
  .table-wrap table { font-size: 14px; }
  .table-wrap td { padding: 9px 11px; }
  .table-wrap tr:first-child td { font-size: 12.5px; }
  .name-first td:first-child { min-width: 120px; }

  .faq-item { padding: 14px 14px 4px; }
  .author-bio { flex-direction: column; align-items: center; text-align: center; padding: 18px; }
}

@media (max-width: 480px) {
  :root { --header-h: 58px; }
  .header-inner { gap: 10px; }
  .logo img { height: 34px; }
  .btn-bonus { padding: 8px 13px; font-size: 13px; gap: 6px; }
  .btn-bonus svg { width: 16px; height: 16px; flex-basis: 16px; }
}

@media (max-width: 360px) {
  .btn-bonus span { display: none; }
  .btn-bonus { padding: 9px; }
  .features { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition: none !important; animation: none !important; }
}
