/* ============================================
   ULYSSE.IT — Design System
   Mobile-first | Breakpoints: 480px, 768px
   ============================================ */

/* CSS Variables loaded via <link> in HTML head */
:root {
  --navy: #1B2B4B;
  --navy-mid: #2C4070;
  --navy-light: #EEF2F8;
  --amber: #C8943A;
  --amber-light: #F0DEB8;
  --bg: #F9F7F4;
  --surface: #fff;
  --text: #1B2B4B;
  --text-muted: #6B7A9A;
  --border: #E2DDD4;
  --success: #2A7A4F;
  --error: #C0392B;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(27, 43, 75, .08);
  --shadow-lg: 0 8px 32px rgba(27, 43, 75, .12);
  --min-touch: 44px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a {
  color: var(--amber);
  text-decoration: none;
  transition: color .2s;
}
a:hover { color: var(--navy-mid); }

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

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  height: 60px;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--surface) !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span {
  color: var(--amber);
}

/* Nav categories — horizontal scroll, hidden below 768px */
.nav-categories {
  display: flex;
  align-items: center;
  gap: .25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
}
.nav-categories::-webkit-scrollbar { display: none; }

.nav-categories a {
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  font-weight: 500;
  padding: .35rem .6rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .2s, color .2s;
  min-height: var(--min-touch);
  display: flex;
  align-items: center;
}
.nav-categories a:hover,
.nav-categories a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* Toggle collassabile sezioni desktop */
@media (min-width: 769px) {
  .nav-toggle-cat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.1);
    border: none;
    color: rgba(255,255,255,.75);
    cursor: pointer;
    padding: .3rem .4rem;
    border-radius: var(--radius);
    font-size: .65rem;
    line-height: 1;
    transition: background .2s, color .2s;
    flex-shrink: 0;
    min-height: var(--min-touch);
    margin-right: .15rem;
  }
  .nav-toggle-cat:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
  }
  .nav-categories.collapsed > a {
    display: none;
  }
}

/* Menu toggle — visible only below 768px */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  min-width: 44px;
  min-height: var(--min-touch);
}
.menu-toggle .bar {
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* Mobile nav — collapsible */
.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--navy);
  z-index: 99;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
}
.mobile-nav.open {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  animation: slideDown .25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-nav a {
  color: rgba(255,255,255,.85);
  font-size: 1rem;
  font-weight: 500;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  min-height: var(--min-touch);
  display: flex;
  align-items: center;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* ============================================
   PAGE WRAPPER
   ============================================ */
.page-wrapper {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}
.page-wrapper.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 800px;
}

.main-content {
  min-width: 0;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--text-muted);
  font-weight: 500;
}
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb .sep {
  color: var(--border);
  user-select: none;
}

/* ============================================
   TOOL CARD
   ============================================ */
.tool-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tool-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tool-desc {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 500;
  font-size: .9rem;
  margin-bottom: .35rem;
  color: var(--navy);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime-local"],
input[type="url"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: .6rem .75rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  min-height: var(--min-touch);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200, 148, 58, .2);
}

input.error, select.error {
  border-color: var(--error);
}
input.error:focus, select.error:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .15);
}

.hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

.error-hint {
  font-size: .8rem;
  color: var(--error);
  margin-top: .25rem;
  font-weight: 500;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7A9A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
}

/* Radio group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 400;
  font-size: .95rem;
  min-height: var(--min-touch);
  transition: border-color .2s, background .2s;
}
.radio-label:hover {
  border-color: var(--amber);
  background: var(--navy-light);
}
.radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--amber);
  flex-shrink: 0;
}
.radio-label:has(input[type="radio"]:checked) {
  border-color: var(--amber);
  background: var(--navy-light);
}

/* Range slider */
.range-wrapper {
  display: flex;
  align-items: center;
  gap: .75rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
  min-height: auto;
  border: none;
  padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--amber);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--amber);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* Monospace font for numeric inputs */
.monospace {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace !important;
  font-size: 1.1rem !important;
  letter-spacing: .03em;
}

.range-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: .3rem .5rem;
  background: var(--navy-light);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy);
  text-align: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1.25rem;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: var(--min-touch);
  min-touch: var(--min-touch);
  transition: background .2s, border-color .2s, transform .1s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--amber);
  color: var(--navy);
}
.btn-primary:hover {
  background: #b6832f;
  color: var(--navy);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--navy);
  background: var(--navy-light);
}

.btn-block {
  width: 100%;
}

/* ============================================
   RESULTS
   ============================================ */
.results {
  display: none;
  margin-top: 1.5rem;
}
.results.visible {
  display: block;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.result-item {
  background: var(--navy-light);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.result-item .label {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: .25rem;
}
.result-item .value {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}
.result-item .value.highlight,
.result-item .value.target {
  color: var(--amber);
}

.lotto-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.lotto-ball {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(27, 43, 75, .2);
}

@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Result table — scrollable on mobile */
.result-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.result-table th,
.result-table td {
  padding: .6rem .75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.result-table th {
  background: var(--navy-light);
  font-weight: 600;
  font-size: .8rem;
  color: var(--navy);
  position: sticky;
  top: 0;
}
.result-table td {
  color: var(--text);
}
.result-table tr:last-child td {
  border-bottom: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  min-width: 0;
}

.sidebar-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  position: sticky;
  top: 80px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .75rem;
}

.sidebar-nav a {
  display: block;
  padding: .55rem .75rem;
  border-radius: var(--radius);
  color: var(--navy);
  font-size: .95rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.sidebar-nav a:hover {
  background: var(--navy-light);
  color: var(--navy);
  font-weight: 600;
}

.sidebar-nav a.active {
  color: var(--amber);
  font-weight: 700;
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  padding-left: calc(.75rem - 4px);
}

/* ============================================
   CATEGORY HERO & TOOLS GRID
   ============================================ */
.cat-hero {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}
.cat-hero h1 {
  color: #fff;
  margin-bottom: .5rem;
}
.cat-hero p {
  color: rgba(255,255,255,.8);
  max-width: 600px;
  margin: 0 auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tool-tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  transition: box-shadow .2s, transform .15s;
  display: flex;
  flex-direction: column;
}
.tool-tile:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.tool-tile a {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .35rem;
}
.tool-tile a:hover { color: var(--amber); }
.tool-tile p {
  font-size: .85rem;
  color: var(--text-muted);
  flex: 1;
}

/* Tool tile "soon" */
.tool-tile.soon {
  opacity: .5;
  position: relative;
}
.tool-tile.soon a {
  pointer-events: none;
}

/* ============================================
   SOON CARD & BADGE
   ============================================ */
.soon-card {
  background: var(--navy-light);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.soon-badge {
  display: inline-block;
  background: var(--amber-light);
  color: var(--navy);
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.tools-grid-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* ============================================
   HOME HERO & STATS
   ============================================ */
.home-hero {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}
.home-hero h1 {
  color: #fff;
  font-size: 2.25rem;
  margin-bottom: .75rem;
}
.home-hero p {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

.stats-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}
.stats-bar .stat {
  text-align: center;
}
.stats-bar .stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber);
}
.stats-bar .stat-label {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
}

/* ============================================
   SITE DESCRIPTION (HOME & SECTIONS)
   ============================================ */
.site-description {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, #5DADE2 0%, #3A8FE0 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.site-description p {
  font-size: 1rem;
  line-height: 1.75;
  color: #fff;
}
.site-description strong {
  color: #fff;
  font-weight: 700;
}

@media (max-width: 480px) {
  .site-description {
    padding: 1.5rem 1.25rem;
  }
}

/* ============================================
   CATEGORIES SECTION (HOME)
   ============================================ */
.categories-section {
  margin-bottom: 2.5rem;
}
.categories-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.cat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  text-align: center;
  transition: box-shadow .2s, transform .15s;
}
.cat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.cat-card .cat-icon {
  font-size: 2rem;
  margin-bottom: .5rem;
}
.cat-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.cat-card p {
  font-size: .8rem;
  color: var(--text-muted);
}
.cat-card a {
  color: var(--amber);
  font-weight: 600;
  font-size: .85rem;
  margin-top: .5rem;
  display: inline-block;
}

/* ============================================
   TOOL CONTENT (SEO block)
   ============================================ */
.tool-content {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.tool-content h2 {
  margin-bottom: 1rem;
}
.tool-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.tool-content details {
  background: var(--navy-light);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
}
.tool-content summary {
  padding: .75rem 1rem;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  color: var(--navy);
  min-height: var(--min-touch);
  display: flex;
  align-items: center;
  list-style: none;
}
.tool-content summary::-webkit-details-marker { display: none; }
.tool-content summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--surface);
  border-radius: 50%;
  margin-right: .75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--amber);
  flex-shrink: 0;
  transition: transform .2s;
}
.tool-content details[open] summary::before {
  content: '−';
}
.tool-content details p {
  padding: 0 1rem .75rem 2.25rem;
  margin-bottom: 0;
}

/* ============================================
   AD SLOTS
   ============================================ */
.ad-slot {
  background: var(--navy-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100px;
  margin: 1rem 0;
}
.ad-slot .ad-label {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ad-slot.ad-inline {
  min-height: 100px;
}

.ad-slot.ad-sidebar {
  min-height: 250px;
}

.ad-slot.ad-footer {
  min-height: 90px;
}

/* ============================================
    TIMEZONE GRID (Fuso Orario tool)
    ============================================ */
.timezone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.timezone-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  transition: box-shadow .2s, transform .15s;
  border: 2px solid transparent;
}

.timezone-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Roma evidenziata con bordo amber */
.timezone-card.rome {
  border-color: var(--amber);
}

.timezone-flag {
  font-size: 2rem;
  line-height: 1;
}

.timezone-name {
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy);
}

.timezone-time {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: .02em;
}

.timezone-date {
  font-size: .8rem;
  color: var(--text-muted);
}

.timezone-offset {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--navy-light);
  padding: .15rem .5rem;
  border-radius: 999px;
}

/* ============================================
    COOKIE BANNER
    ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-banner .cookie-text {
  flex: 1 1 280px;
  font-size: .9rem;
  line-height: 1.5;
}
.cookie-banner .cookie-text a {
  color: var(--amber-light);
  text-decoration: underline;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: .75rem;
  flex-shrink: 0;
}
.cookie-banner .btn {
  font-size: .85rem;
  padding: .5rem 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.75);
  padding: 2rem 1rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff !important;
}
.footer-logo span { color: var(--amber); }
.footer-claim {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,.6);
  font-size: .85rem;
}
.footer-links a:hover { color: var(--amber-light); }
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: .75rem;
  color: rgba(255,255,255,.35);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ============================================
   SECTION DIVIDER
   ============================================ */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ============================================
   TREND INDICATORS (trend-up / trend-down)
   ============================================ */
.trend-up {
  color: var(--success) !important;
  font-weight: 700;
}

.trend-down {
  color: var(--error) !important;
  font-weight: 700;
}

/* ============================================
   RESPONSIVE — 768px
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .nav-categories { display: none; }
  .menu-toggle { display: flex; }

  .page-wrapper {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }

  .home-hero {
    padding: 2rem 1rem;
  }
  .home-hero h1 {
    font-size: 1.75rem;
  }

  .ad-slot.ad-sidebar {
    min-height: 100px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   RESPONSIVE — 480px
   ============================================ */
@media (max-width: 480px) {
  .home-hero h1 {
    font-size: 1.75rem;
  }
  .home-hero p {
    font-size: .95rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
  .cookie-banner .cookie-actions {
    width: 100%;
    justify-content: center;
  }

  .stats-bar {
    gap: 1.25rem;
  }
  .stats-bar .stat-value {
    font-size: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
}

/* ============================================
   CONTO ALLA ROVESCIA — Countdown
   ============================================ */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.countdown-item {
  background: var(--navy-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform .3s;
}

.countdown-item .countdown-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.countdown-item .countdown-label {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: .5rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Pulse animation for last hour */
@keyframes pulse-countdown {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.countdown-item.pulse {
  animation: pulse-countdown 1s ease-in-out infinite;
}

/* Celebratory message */
.countdown-celebration {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--amber-light) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.countdown-celebration.visible {
  display: block;
  animation: slideDown .4s ease;
}

.countdown-celebration .celebration-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

/* Buttons row */
.countdown-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
}

/* Responsive countdown grid */
@media (max-width: 768px) {
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown-item .countdown-value {
    font-size: 2.25rem;
  }
}

@media (max-width: 480px) {
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
  }

  .countdown-item .countdown-value {
    font-size: 1.75rem;
  }

  .countdown-item {
    padding: 1rem .75rem;
  }

  .countdown-actions {
    flex-direction: column;
  }
}
