/* QuizItalia – Shared Stylesheet */
:root {
  --cream: #f5f0e8;
  --terracotta: #c4622d;
  --terracotta-dark: #9e4a1e;
  --olive: #7a8c5a;
  --midnight: #1a1a2e;
  --gold: #d4a843;
  --sand: #e8dcc8;
  --text: #2a2018;
  --text-light: #6b5d4f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(196,98,45,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(122,140,90,.10) 0%, transparent 50%),
    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='%23c4622d' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ─── HEADER ─── */
header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 48px 20px 32px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--terracotta);
  line-height: 1;
}
.logo a { text-decoration: none; color: inherit; }
.logo span { color: var(--midnight); }
.tagline {
  font-size: .95rem;
  color: var(--text-light);
  margin-top: 6px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.nav-btn {
  background: white;
  border: 2px solid var(--sand);
  color: var(--text-light);
  padding: 8px 20px;
  border-radius: 99px;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
}
.nav-btn:hover, .nav-btn.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: white;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  padding: 8px 20px 0;
  max-width: 900px;
  margin: 0 auto;
  font-size: .82rem;
  color: var(--text-light);
  position: relative;
  z-index: 10;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.breadcrumb li + li::before { content: '›'; margin-right: 8px; }
.breadcrumb a { color: var(--terracotta); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ─── AD BANNER ─── */
.ad-banner {
  width: 100%;
  max-width: 728px;
  margin: 0 auto 24px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

/* ─── MAIN CONTAINER ─── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 10;
}

/* ─── QUIZ ENGINE ─── */
#quiz-screen { display: none; }
#result-screen { display: none; }

.quiz-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.back-btn {
  background: white;
  border: 2px solid var(--sand);
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.back-btn:hover { background: var(--terracotta); border-color: var(--terracotta); color: white; }
.quiz-title-bar { flex: 1; }
.quiz-title-bar h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--midnight);
}
.progress-wrap {
  background: var(--sand);
  border-radius: 99px;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--terracotta);
  border-radius: 99px;
  transition: width .4s ease;
}
.question-card {
  background: white;
  border-radius: 20px;
  padding: 36px 32px;
  border: 1px solid var(--sand);
  margin-bottom: 20px;
  animation: fadeUp .35s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.question-num {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--terracotta);
  margin-bottom: 12px;
}
.question-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  color: var(--midnight);
  line-height: 1.4;
  margin-bottom: 28px;
}
.answers { display: grid; gap: 10px; }
.answer-btn {
  background: var(--cream);
  border: 2px solid var(--sand);
  border-radius: 12px;
  padding: 14px 20px;
  text-align: left;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  color: var(--text);
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.answer-btn .ans-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--sand);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all .2s;
}
.answer-btn:hover { border-color: var(--terracotta); background: #fff5f0; }
.answer-btn:hover .ans-letter { background: var(--terracotta); border-color: var(--terracotta); color: white; }
.answer-btn.selected { border-color: var(--terracotta); background: #fff0e8; }
.answer-btn.selected .ans-letter { background: var(--terracotta); border-color: var(--terracotta); color: white; }
.answer-btn.correct { border-color: var(--olive); background: #f0f5ea; }
.answer-btn.correct .ans-letter { background: var(--olive); border-color: var(--olive); color: white; }
.answer-btn.wrong { border-color: #c0392b; background: #fdf0ee; }
.answer-btn.wrong .ans-letter { background: #c0392b; border-color: #c0392b; color: white; }
.answer-btn:disabled { cursor: default; }
.next-btn {
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: background .2s, transform .15s;
  display: none;
}
.next-btn:hover { background: var(--terracotta-dark); transform: translateY(-1px); }
.next-btn.visible { display: block; }
.ad-mid { margin: 20px 0; }

/* ─── RESULT SCREEN ─── */
#result-screen { text-align: center; }
.result-card {
  background: white;
  border-radius: 24px;
  padding: 48px 32px;
  border: 1px solid var(--sand);
  margin-bottom: 24px;
  animation: fadeUp .4s ease;
}
.result-emoji { font-size: 4.5rem; margin-bottom: 20px; display: block; }
.result-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--terracotta); margin-bottom: 8px; }
.result-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--midnight);
  margin-bottom: 16px;
  line-height: 1.15;
}
.result-desc { font-size: 1rem; color: var(--text-light); line-height: 1.65; max-width: 480px; margin: 0 auto 28px; }
.score-row { display: flex; justify-content: center; gap: 32px; margin: 24px 0; }
.score-item { text-align: center; }
.score-num { font-family: 'Playfair Display', serif; font-size: 2.4rem; color: var(--terracotta); font-weight: 900; }
.score-lbl { font-size: .78rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .06em; }
.share-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.share-btn {
  padding: 11px 22px;
  border-radius: 99px;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  cursor: pointer;
  transition: all .2s;
  border: 2px solid;
}
.share-btn.whatsapp { background: #25D366; border-color: #25D366; color: white; }
.share-btn.twitter { background: #000; border-color: #000; color: white; }
.share-btn.copy { background: white; border-color: var(--sand); color: var(--text); }
.share-btn:hover { opacity: .85; transform: translateY(-1px); }
.retry-btn {
  background: transparent;
  border: 2px solid var(--terracotta);
  color: var(--terracotta);
  border-radius: 12px;
  padding: 14px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
  max-width: 320px;
}
.retry-btn:hover { background: var(--terracotta); color: white; }
.ad-result { margin: 24px 0; }
.result-guide-link {
  text-align: center;
  margin: 16px 0;
  font-size: .9rem;
  color: var(--text-light);
}
.result-guide-link a { color: var(--terracotta); }

/* ─── ARTICLE LAYOUT ─── */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 10;
}
.article-header { margin-bottom: 32px; }
.article-category {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--terracotta);
  margin-bottom: 10px;
  display: block;
}
.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--midnight);
  line-height: 1.2;
  margin-bottom: 14px;
}
.article-intro { font-size: 1.05rem; color: var(--text-light); line-height: 1.65; }
.article-meta {
  display: flex;
  gap: 16px;
  font-size: .8rem;
  color: var(--text-light);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--sand);
  flex-wrap: wrap;
}
.article-body { font-size: 1rem; line-height: 1.75; color: var(--text); }
.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--midnight);
  margin: 40px 0 16px;
  line-height: 1.3;
}
.article-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--midnight);
  margin: 28px 0 10px;
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 18px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--midnight); }
.article-body a { color: var(--terracotta); }

/* ─── CALLOUT BOXES ─── */
.callout {
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0;
  border-left: 4px solid;
}
.callout.green { background: #f0f5ea; border-color: var(--olive); }
.callout.orange { background: #fff5f0; border-color: var(--terracotta); }
.callout.blue { background: #f0f4ff; border-color: #5b7fd4; }
.callout.gold { background: #fdf8e8; border-color: var(--gold); }
.callout-title {
  font-weight: 700;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
  color: var(--midnight);
}
.callout p { margin: 0; font-size: .95rem; }

/* ─── FACT BOXES ─── */
.fact-box {
  background: white;
  border: 1px solid var(--sand);
  border-radius: 16px;
  padding: 24px;
  margin: 28px 0;
}
.fact-box-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--midnight);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--sand);
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}
.fact-item { text-align: center; }
.fact-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--terracotta);
  font-weight: 900;
  display: block;
}
.fact-label { font-size: .78rem; color: var(--text-light); }

/* ─── RELATED CONTENT ─── */
.related-section {
  background: white;
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid var(--sand);
  margin-top: 40px;
}
.related-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--midnight);
  margin-bottom: 16px;
}
.related-links { display: grid; gap: 10px; }
.related-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--cream);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: .9rem;
  transition: all .2s;
  border: 1px solid var(--sand);
}
.related-link:hover { background: #fff0e8; border-color: var(--terracotta); color: var(--terracotta); }
.link-emoji { font-size: 1.2rem; flex-shrink: 0; }

/* ─── LEGAL / ABOUT PAGES ─── */
.legal-wrap, .about-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 10;
}
.page-hero {
  background: white;
  border-radius: 20px;
  padding: 40px 32px;
  border: 1px solid var(--sand);
  margin-bottom: 32px;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--midnight);
  margin-bottom: 8px;
}
.page-subtitle { font-size: 1rem; color: var(--text-light); }
.legal-date { font-size: .82rem; color: var(--text-light); margin-bottom: 28px; }
.legal-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--midnight);
  margin: 36px 0 12px;
}
.legal-content h3 { font-size: 1rem; color: var(--midnight); margin: 20px 0 8px; font-weight: 600; }
.legal-content p { margin-bottom: 14px; line-height: 1.7; }
.legal-content ul { padding-left: 24px; margin-bottom: 14px; }
.legal-content li { margin-bottom: 6px; }
.legal-content a { color: var(--terracotta); }

/* ─── CONTACT FORM ─── */
.contact-form {
  background: white;
  border: 1px solid var(--sand);
  border-radius: 20px;
  padding: 36px 32px;
  margin-top: 24px;
}
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 6px; color: var(--midnight); }
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--sand);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color .2s;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--terracotta); background: white; }
.form-textarea { resize: vertical; min-height: 120px; }
.form-submit {
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.form-submit:hover { background: var(--terracotta-dark); }

/* ─── ABOUT PAGE ─── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.about-card {
  background: white;
  border: 1px solid var(--sand);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}
.about-card-emoji { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.about-card h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--midnight); margin-bottom: 6px; }
.about-card p { font-size: .85rem; color: var(--text-light); line-height: 1.5; }

/* ─── FOOTER ─── */
footer {
  text-align: center;
  padding: 32px 20px;
  font-size: .78rem;
  color: var(--text-light);
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--sand);
}
footer a { color: var(--terracotta); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--midnight);
  color: white;
  padding: 12px 24px;
  border-radius: 99px;
  font-size: .88rem;
  transition: transform .3s;
  z-index: 999;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .question-card { padding: 24px 20px; }
  .result-card { padding: 32px 20px; }
  .contact-form { padding: 24px 20px; }
  .page-hero { padding: 28px 20px; }
}
