:root {
  /* Italian-themed palette */
  --red: #CD212A;
  --red-dark: #a81820;
  --green: #008C45;
  --green-dark: #006b35;
  --gold: #E8A33D;
  --gold-dark: #c98620;
  --cream: #FFFBF5;
  --warm-white: #FFF9F0;
  --dark: #1a1a1a;
  --darker: #0f0f0f;
  --gray: #6b6b6b;
  --light-gray: #e5e5e5;
  --warm-gray: #f5f0e8;
  
  /* Typography */
  --font-serif: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --max-width: 1280px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--dark);
  background: var(--warm-white);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: 1.25rem; }

a {
  color: var(--red);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--red-dark);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-sm {
  padding: 2.5rem 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--red);
  color: white;
}

.btn-primary:hover {
  background: var(--red-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(205, 33, 42, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--dark);
}

.btn-secondary:hover {
  background: var(--dark);
  color: white;
}

.btn-green {
  background: var(--green);
  color: white;
}

.btn-green:hover {
  background: var(--green-dark);
  color: white;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-red { background: rgba(205, 33, 42, 0.1); color: var(--red); }
.badge-green { background: rgba(0, 140, 69, 0.1); color: var(--green); }
.badge-gold { background: rgba(232, 163, 61, 0.15); color: var(--gold-dark); }

/* Vote count display */
.vote-count {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--red);
}

/* Hero section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1b0e 50%, #1a1a1a 100%);
  color: white;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' viewBox='0 0 1200 800'%3E%3Cdefs%3E%3CradialGradient id='rg' cx='50%25' cy='40%25' r='60%25'%3E%3Cstop offset='0%25' style='stop-color:%23CD212A;stop-opacity:0.15'/%3E%3Cstop offset='100%25' style='stop-color:%23000;stop-opacity:0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect width='1200' height='800' fill='url(%23rg)'/%3E%3C/svg%3E");
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 1.5rem;
}

.hero h1 {
  color: white;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

/* Tricolor accent bar */
.tricolor-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(to right, var(--green) 0%, var(--green) 33.3%, white 33.3%, white 66.6%, var(--red) 66.6%, var(--red) 100%);
}

/* Section titles */
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Forms */
input, textarea, select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--transition);
  background: white;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--red);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--gray);
}

.breadcrumbs a {
  color: var(--gray);
}

.breadcrumbs a:hover {
  color: var(--red);
}

.breadcrumb-sep {
  color: var(--light-gray);
}

/* Prose (recipe/blog content) */
.prose {
  max-width: 700px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.prose p {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.prose ul, .prose ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.prose img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.prose blockquote {
  border-left: 4px solid var(--red);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--gray);
  margin: 1.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
  .section { padding: 2.5rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { min-height: 50vh; }
}

/* Language selector */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  color: white;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover {
  background: rgba(255,255,255,0.2);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 180px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--dark);
  transition: background var(--transition);
}

.lang-option:hover {
  background: var(--warm-gray);
}

/* Vote button states */
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
}

.vote-btn:hover:not(:disabled) {
  background: var(--green-dark);
  transform: scale(1.05);
}

.vote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.vote-btn.voted {
  background: var(--gray);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  font-size: 0.95rem;
  display: none;
}

.toast.show {
  display: block;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Google translate hidden bar */
.skiptranslate iframe.skiptranslate { display: none !important; }
.goog-te-banner-frame.skiptranslate { display: none !important; }
.goog-te-gadget { font-size: 0 !important; }
.goog-te-gadget .goog-te-combo { font-size: 0.85rem !important; }
