/* ============================================================
   AZIENDA AGRICOLA MOTTOLA — Legal Pages Styles
   privacy.html | termini.html
   ============================================================ */

:root {
  --olive-deep:   #2c3e1a;
  --olive-dark:   #486228;
  --olive:        #6a8c32;
  --olive-mid:    #89bf3f;
  --olive-soft:   #e8f0d0;
  --olive-cream:  #f4f8ec;
  --gold-light:   #e4c17a;
  --ink:          #1a1f12;
  --charcoal:     #2d3523;
  --muted:        #5c6b4a;
  --light-text:   #8a9878;
  --border:       #d8e4c0;
  --border-light: #edf5df;
  --bg-cream:     #f9f7f2;
  --bg-white:     #ffffff;
  --bg-dark:      #1e2914;
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --shadow-md:    0 8px 24px rgba(30, 41, 18, 0.10);
  --shadow-lg:    0 20px 50px rgba(30, 41, 18, 0.14);
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --nav-h:        84px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--olive-dark); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--olive-deep); }
img { max-width: 100%; height: auto; display: block; }
ul { padding-left: 1.4em; }
ul li { margin-bottom: 6px; color: var(--muted); font-size: 0.95rem; }

/* ---- NAV ---- */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.legal-nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.legal-nav-logo img {
  height: 64px;
  width: auto;
  mix-blend-mode: multiply;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  margin-left: 8px;
}
.back-link:hover {
  background: var(--olive-cream);
  color: var(--olive-dark);
  border-color: var(--olive-mid);
  text-decoration: none;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--olive-cream);
  border-radius: 30px;
  padding: 3px;
  margin-left: auto;
  flex-shrink: 0;
}

.lang-btn {
  padding: 5px 10px;
  border-radius: 24px;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  opacity: 0.6;
  filter: grayscale(30%);
}
.lang-btn.active {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.15);
}
.lang-btn:hover:not(.active) {
  opacity: 0.9;
  filter: grayscale(0%);
  transform: scale(1.08);
}

/* ---- MAIN ---- */
.legal-main {
  min-height: calc(100vh - var(--nav-h) - 80px);
  padding: 60px 0 80px;
}

.legal-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- HEADER ---- */
.legal-header {
  text-align: center;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.legal-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--olive-mid);
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  background: var(--olive-soft);
  color: var(--olive-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.legal-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--olive-deep);
  line-height: 1.15;
  margin-bottom: 24px;
}

.legal-header h1 small {
  display: block;
  font-size: 0.55em;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  margin-top: 6px;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.legal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--light-text);
  padding: 7px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 30px;
}

.legal-meta i {
  color: var(--olive);
  font-size: 0.78rem;
}

/* ---- SECTIONS ---- */
.legal-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-light);
}

.legal-section:last-of-type {
  border-bottom: none;
}

.legal-section h2 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--olive-deep);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--olive-soft);
  color: var(--olive-dark);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

.legal-section h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 24px 0 10px;
}

.legal-section p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.legal-section p:last-child { margin-bottom: 0; }

/* ---- INFO BOX ---- */
.info-box {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--olive-dark);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 16px 0 20px;
}

.info-box p {
  font-size: 0.93rem;
  line-height: 1.75;
  margin: 0;
}
.info-box strong {
  color: var(--olive-deep);
}

/* ---- TABLE ---- */
.table-wrapper {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 520px;
}

.legal-table thead {
  background: var(--olive-deep);
}

.legal-table thead th {
  padding: 14px 18px;
  text-align: left;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
}
.legal-table tbody tr:last-child { border-bottom: none; }
.legal-table tbody tr:hover { background: var(--olive-cream); }

.legal-table td {
  padding: 14px 18px;
  color: var(--muted);
  vertical-align: top;
  line-height: 1.65;
}

.legal-table td code {
  background: var(--olive-soft);
  color: var(--olive-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'Courier New', monospace;
}

/* ---- RIGHTS GRID ---- */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 24px;
}

.right-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.25s ease;
}
.right-card:hover {
  border-color: var(--olive-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.right-card i {
  font-size: 1.4rem;
  color: var(--olive);
  margin-bottom: 10px;
  display: block;
}

.right-card h4 {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--olive-deep);
  margin-bottom: 6px;
}

.right-card p {
  font-size: 0.8rem;
  color: var(--light-text);
  line-height: 1.5;
  margin: 0;
}

/* ---- NOTICE BOXES ---- */
.notice-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 0.9rem;
}

.notice-box i {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-box--info {
  background: rgba(106, 140, 50, 0.08);
  border: 1px solid rgba(106, 140, 50, 0.25);
  color: var(--charcoal);
}
.notice-box--info i { color: var(--olive); }

.notice-box strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--olive-deep);
  margin-bottom: 4px;
}

.notice-box p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

/* ---- BROWSER LIST ---- */
.browser-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 14px 0;
}

.browser-list li { margin: 0; }

.browser-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--bg-white);
  transition: all 0.22s ease;
  text-decoration: none;
}
.browser-list a:hover {
  border-color: var(--olive-dark);
  background: var(--olive-cream);
  color: var(--olive-dark);
}

/* ---- FOOTER NOTE ---- */
.legal-footer-note {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--olive-cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.legal-footer-note p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.legal-footer-note strong {
  color: var(--olive-deep);
}

/* ---- PAGE FOOTER ---- */
.legal-page-footer {
  background: var(--olive-deep);
  padding: 0;
}

.legal-footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.legal-footer-inner > span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

.legal-footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.legal-footer-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.legal-footer-links a:hover,
.legal-footer-links a.active { color: rgba(255,255,255,0.95); }

.legal-footer-links .sep {
  color: rgba(255,255,255,0.2);
  font-size: 0.75rem;
}

/* ============================================================
   COOKIE CONSENT BANNER (shared in index.html)
   ============================================================ */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(28, 37, 16, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(137, 191, 63, 0.25);
  padding: 20px 32px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
}

#cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.cookie-banner-text {
  flex: 1;
  min-width: 260px;
}

.cookie-banner-text strong {
  display: block;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 4px;
}

.cookie-banner-text p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin: 0;
}

.cookie-banner-text a {
  color: #89bf3f;
  text-decoration: underline;
}
.cookie-banner-text a:hover { color: #b8d96a; }

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 11px 22px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #486228;
  color: #fff;
  box-shadow: 0 3px 10px rgba(72, 98, 40, 0.4);
}
.cookie-btn-accept:hover {
  background: #2c3e1a;
  transform: translateY(-1px);
}

.cookie-btn-reject {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.2);
}
.cookie-btn-reject:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .legal-container { padding: 0 20px; }
  .legal-nav-inner { padding: 0 20px; }

  .legal-meta { gap: 10px; }
  .legal-meta span { font-size: 0.75rem; padding: 6px 10px; }

  .rights-grid { grid-template-columns: repeat(2, 1fr); }
  .browser-list { gap: 8px; }

  .cookie-banner-inner { gap: 16px; }
  .cookie-banner-icon { display: none; }

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

@media (max-width: 480px) {
  .rights-grid { grid-template-columns: 1fr; }
  .legal-section h2 { font-size: 1.35rem; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; justify-content: center; }
}
