/* =============================================
   La Nuova Quercia – style.css
   Theme: Italian Gambling – Dark Gold & Tricolore
   ============================================= */

/* === CSS VARIABLES === */
:root {
  --col-bg:         #0a0a14;
  --col-surface:    #111125;
  --col-card:       #16162b;
  --col-card-hover: #1d1d38;
  --col-border:     #2a2a4a;
  --col-gold:       #e8b84b;
  --col-gold-light: #f5d37a;
  --col-gold-dark:  #b8893a;
  --col-green:      #009246;
  --col-red:        #CE2B37;
  --col-white:      #ffffff;
  --col-text:       #d4d4e8;
  --col-text-muted: #8888aa;
  --col-accent:     #c8a230;
  --col-btn:        linear-gradient(135deg, #e8b84b 0%, #c8890d 100%);
  --col-btn-hover:  linear-gradient(135deg, #f5d37a 0%, #e8a020 100%);
  --header-h:       64px;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow-card:    0 4px 24px rgba(0,0,0,.45);
  --shadow-glow:    0 0 20px rgba(232,184,75,.15);
  --transition:     0.22s ease;
  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'Barlow', system-ui, sans-serif;
  --max-w:          1240px;
}

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

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

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

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

a {
  color: var(--col-gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--col-gold-light); }

ul, ol {
  padding-left: 1.4em;
}

/* === ITALIAN FLAG STRIPE === */
.flag-stripe {
  display: flex;
  height: 5px;
  position: relative;
  z-index: 200;
}
.flag-green  { flex: 1; background: var(--col-green); }
.flag-white  { flex: 1; background: #ffffff; }
.flag-red    { flex: 1; background: var(--col-red); }

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: .03em;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-header {
  background: var(--col-btn);
  color: #1a0e00;
  box-shadow: 0 2px 12px rgba(232,184,75,.3);
  font-size: 0.85rem;
  padding: 9px 18px;
}
.btn-header:hover {
  background: var(--col-btn-hover);
  color: #000;
  box-shadow: 0 4px 20px rgba(232,184,75,.5);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--col-btn);
  color: #1a0e00;
  font-size: 1rem;
  padding: 13px 28px;
  width: 100%;
  justify-content: center;
  box-shadow: 0 3px 15px rgba(232,184,75,.35);
}
.btn-primary:hover {
  background: var(--col-btn-hover);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,184,75,.5);
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10,10,20,.96);
  border-bottom: 1px solid var(--col-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,.6), 0 1px 0 rgba(232,184,75,.15);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo-img {
  height: 40px;
  width: auto;
}

.main-nav {
  flex: 1;
  margin-left: 24px;
}
.main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.main-nav a {
  color: var(--col-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.main-nav a:hover {
  color: var(--col-gold);
  background: rgba(232,184,75,.08);
}

.desktop-only { display: flex; }

/* === HERO === */
.hero-section {
  position: relative;
  background: linear-gradient(160deg, #0d0d22 0%, #150828 50%, #1a0a0a 100%);
  padding: 40px 0 36px;
  overflow: hidden;
  border-bottom: 1px solid var(--col-border);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-content: flex-start;
  opacity: 0.04;
  pointer-events: none;
  overflow: hidden;
}
.hero-pattern span {
  font-size: 2.8rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--col-gold);
}

.hero-inner { position: relative; z-index: 2; }

.hero-badge {
  display: inline-block;
  background: rgba(232,184,75,.12);
  border: 1px solid rgba(232,184,75,.3);
  color: var(--col-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--col-white);
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 40%, var(--col-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-intro {
  font-size: 1rem;
  color: var(--col-text-muted);
  max-width: 700px;
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Author Block */
.author-block {
  display: flex;
  align-items: center;
  gap: 13px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: inline-flex;
}
.author-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--col-gold);
  object-fit: cover;
  flex-shrink: 0;
}
.author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.author-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.author-name {
  font-weight: 700;
  color: var(--col-white);
  font-size: 0.95rem;
}
.author-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,146,70,.18);
  border: 1px solid rgba(0,146,70,.4);
  color: #4cde8a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .04em;
}
.author-role {
  font-size: 0.78rem;
  color: var(--col-text-muted);
}
.author-date {
  font-size: 0.78rem;
  color: var(--col-text-muted);
}

/* === LISTING SECTION === */
.listing-section {
  padding: 48px 0 56px;
  background: var(--col-bg);
}

.listing-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--col-white);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.listing-title-icon { font-size: 1.4rem; }

/* Casino List */
.casino-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Casino Card */
.casino-card {
  background: var(--col-card);
  border: 1px solid var(--col-border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 52px 1fr 1fr 1fr 160px;
  align-items: center;
  gap: 0;
  overflow: hidden;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(16px);
  box-shadow: var(--shadow-card);
}
.casino-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.casino-card:hover {
  background: var(--col-card-hover);
  border-color: rgba(232,184,75,.25);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform: translateY(-2px);
}
.casino-card.featured {
  border-color: rgba(232,184,75,.35);
  background: linear-gradient(135deg, #1a1830 0%, #1d1528 100%);
  box-shadow: var(--shadow-card), 0 0 30px rgba(232,184,75,.1);
}
.casino-card.featured.visible { opacity: 1; transform: translateY(0); }

/* Card sections */
.card-rank,
.card-brand,
.card-bonus,
.card-features,
.card-cta {
  padding: 18px 16px;
}

.card-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.2);
  border-right: 1px solid var(--col-border);
  align-self: stretch;
  padding: 0;
}
.rank-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--col-gold);
  line-height: 1;
}

.card-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--col-border);
  align-self: stretch;
  position: relative;
}
.brand-logo {
  width: 130px;
  height: 44px;
  object-fit: contain;
  object-position: left center;
}
.brand-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--col-white);
}

/* Star Rating – CSS-only */
.star-rating {
  --percent: calc(var(--rating) / 5 * 100%);
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 2px;
  position: relative;
}
.star-rating::before {
  content: '★★★★★';
  background: linear-gradient(90deg, #e8b84b var(--percent), #333360 var(--percent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-exclusive {
  position: absolute;
  top: 12px;
  right: -1px;
  background: linear-gradient(135deg, var(--col-red) 0%, #a01020 100%);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: .07em;
  padding: 2px 7px;
  border-radius: 3px 0 0 3px;
}

.card-bonus {
  border-right: 1px solid var(--col-border);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bonus-label {
  display: inline-block;
  background: rgba(232,184,75,.12);
  color: var(--col-gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
}
.bonus-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--col-white);
  line-height: 1.35;
}
.bonus-note {
  font-size: 0.78rem;
  color: var(--col-text-muted);
}
.bonus-code {
  font-size: 0.82rem;
  color: var(--col-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bonus-code strong {
  background: rgba(232,184,75,.1);
  border: 1px dashed rgba(232,184,75,.35);
  color: var(--col-gold);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: .05em;
}
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background var(--transition);
  line-height: 1;
}
.copy-btn:hover { background: rgba(255,255,255,.08); }

/* Card Features */
.card-features {
  list-style: none;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--col-border);
  align-self: stretch;
}
.card-features li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--col-text);
  line-height: 1.4;
}
.chk { flex-shrink: 0; margin-top: 1px; }

/* Card CTA */
.card-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 18px 16px;
}
.cta-legal {
  font-size: 0.7rem;
  color: var(--col-text-muted);
  text-align: center;
  line-height: 1.3;
}

/* === MAIN CONTENT === */
.main-content {
  background: linear-gradient(180deg, #0d0d1e 0%, var(--col-bg) 100%);
  padding: 56px 0 64px;
  border-top: 1px solid var(--col-border);
}

.content-wrap {
  max-width: 860px;
}

.content-wrap h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 700;
  color: var(--col-white);
  margin: 48px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--col-gold), transparent) 1;
  line-height: 1.3;
}
.content-wrap h2:first-child { margin-top: 0; }

.content-wrap h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--col-gold-light);
  margin: 28px 0 10px;
}

.content-wrap p {
  font-size: 0.97rem;
  color: var(--col-text);
  margin-bottom: 14px;
  line-height: 1.75;
}

.content-wrap ul,
.content-wrap ol {
  margin: 10px 0 18px;
  padding-left: 1.6em;
}
.content-wrap li {
  font-size: 0.95rem;
  color: var(--col-text);
  margin-bottom: 6px;
  line-height: 1.65;
}
.content-wrap ol li::marker {
  color: var(--col-gold);
  font-weight: 700;
}
.content-wrap ul li::marker {
  color: var(--col-gold);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--col-border);
}

.content-wrap table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.content-wrap table tr:first-child td {
  background: rgba(232,184,75,.1);
  color: var(--col-gold-light);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: .05em;
}
.content-wrap table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--col-border);
  color: var(--col-text);
  vertical-align: middle;
}
.content-wrap table td p { margin: 0; font-size: inherit; color: inherit; }
.content-wrap table tr:last-child td { border-bottom: none; }
.content-wrap table tr:nth-child(even) td {
  background: rgba(255,255,255,.02);
}
.content-wrap table tr:hover td {
  background: rgba(232,184,75,.04);
}

/* FAQ Section */
.faq-section {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--col-border);
}
.faq-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.8rem);
  font-weight: 700;
  color: var(--col-white);
  margin-bottom: 24px !important;
  border-bottom: none !important;
}

.faq-item {
  border: 1px solid var(--col-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover {
  border-color: rgba(232,184,75,.25);
}
.faq-item h3 {
  margin: 0 !important;
  padding: 16px 20px;
  font-size: 0.95rem !important;
  color: var(--col-white) !important;
  background: rgba(255,255,255,.03);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item h3::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--col-gold);
  flex-shrink: 0;
  line-height: 1;
  transition: transform var(--transition);
}
.faq-item.open h3::after {
  transform: rotate(45deg);
}
.faq-item p {
  display: none;
  padding: 0 20px 16px;
  font-size: 0.9rem !important;
  color: var(--col-text-muted) !important;
}
.faq-item.open p {
  display: block;
}

/* === FOOTER === */
.site-footer {
  background: #060610;
  border-top: 1px solid var(--col-border);
  padding: 40px 0 28px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo { height: 36px; width: auto; }
.footer-logo-link { display: inline-flex; }

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav a {
  font-size: 0.85rem;
  color: var(--col-text-muted);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--col-gold); }

.footer-disclaimer {
  background: rgba(206,43,55,.08);
  border: 1px solid rgba(206,43,55,.2);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.responsible-gaming {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #e08888;
  line-height: 1.5;
}
.rg-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.footer-legal {
  font-size: 0.78rem !important;
  color: var(--col-text-muted) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--col-border);
  padding-top: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--col-text-muted);
  margin: 0;
}
.age-badge {
  display: inline-block;
  background: var(--col-red);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: .05em;
}

/* =============================================
   RESPONSIVE – MOBILE FIRST
   ============================================= */

/* Tablet and below: cards go vertical */
@media (max-width: 900px) {
  .casino-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    position: relative;
  }

  .card-rank {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--col-gold);
    border: none;
    align-self: auto;
    padding: 0;
  }
  .rank-num {
    font-size: 0.95rem;
    color: #1a0e00;
  }

  .card-brand {
    border-right: none;
    border-bottom: 1px solid var(--col-border);
    padding: 16px 16px 14px 58px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .brand-name {
    width: 100%;
    font-size: 1rem;
  }
  .badge-exclusive {
    position: static;
    border-radius: 3px;
    margin-left: auto;
  }

  .card-bonus {
    border-right: none;
    border-bottom: 1px solid var(--col-border);
    padding: 14px 16px;
  }

  .card-features {
    border-right: none;
    border-bottom: 1px solid var(--col-border);
    padding: 12px 16px;
    gap: 7px;
  }

  .card-cta {
    padding: 14px 16px 16px;
  }
  .btn-primary {
    font-size: 1rem;
    padding: 13px 24px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root { --header-h: 56px; }

  .desktop-only { display: none !important; }

  .hero-section { padding: 24px 0 24px; }
  .hero-badge { font-size: 0.72rem; padding: 4px 12px; margin-bottom: 10px; }
  .hero-intro { font-size: 0.92rem; margin-bottom: 18px; }

  .author-block {
    padding: 10px 14px;
    gap: 10px;
  }
  .author-img { width: 42px; height: 42px; }
  .author-name { font-size: 0.88rem; }

  .listing-section { padding: 28px 0 40px; }
  .listing-title { font-size: 1.15rem; gap: 8px; margin-bottom: 20px; }

  .casino-list { gap: 12px; }

  .card-brand { padding: 14px 14px 12px 52px; }
  .brand-logo { width: 110px; height: 38px; }

  .bonus-text { font-size: 0.9rem; }

  .main-content { padding: 36px 0 44px; }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-nav ul { gap: 6px 14px; }
}

/* Large screens */
@media (min-width: 1200px) {
  .casino-card {
    grid-template-columns: 56px 220px 1fr 1fr 175px;
  }
}

/* Extra large: ensure no overflow */
@media (min-width: 901px) {
  .casino-card {
    min-height: 110px;
  }
  .card-brand,
  .card-bonus,
  .card-features,
  .card-cta {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Print */
@media print {
  .site-header, .btn, .card-cta, .flag-stripe { display: none; }
  body { background: #fff; color: #000; }
}

/* ── Horizontal scroll fix ── */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

.hero-pattern {
  overflow: hidden;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .casino-list {
    width: 100%;
  }

  .casino-card {
    width: 100%;
    min-width: 0;
  }

  .card-brand,
  .card-bonus,
  .card-features,
  .card-cta {
    width: 100%;
    min-width: 0;
  }

  .brand-logo {
    max-width: 100%;
    height: auto;
  }

  .site-header .header-inner {
    width: 100%;
    min-width: 0;
  }

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