/* ============================================================
   Le Cinque Icone — site.css
   Variabili, reset, tipografia, layout, componenti
   ============================================================ */

/* ── Variabili ──────────────────────────────────────────── */
:root {
  --color-primary:      #1D9E75;
  --color-primary-dark: #0F6E56;
  --color-primary-light:#E1F5EE;
  --color-secondary:    #EF9F27;
  --color-secondary-dark:#BA7517;
  --color-tertiary:     #BA7517;
  --color-bg:           #F7F4EE;
  --color-surface:      #FFFFFF;
  --color-text:         #2C2A1E;
  --color-text-muted:   #5F5E5A;
  --color-border:       #D3D1C7;
  --color-danger:       #E24B4A;
  --color-success:      #1D9E75;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm: 0 1px 3px rgba(44,42,30,.08);
  --shadow-md: 0 4px 16px rgba(44,42,30,.10);
  --shadow-lg: 0 8px 32px rgba(44,42,30,.12);

  --container-max: 1200px;
  --header-h:      72px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}
img, video { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Rimuove l'outline su focus programmatico (es. Blazor navigation) per elementi non interattivi */
:focus:not(:focus-visible) { outline: none; box-shadow: none; }
/* main-content è il target di FocusOnNavigate — non deve mostrare outline */
#main-content:focus { outline: none; }

/* ── Tipografia ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }
p  { margin-bottom: 1rem; }
.lead { font-size: 1.2rem; color: var(--color-text-muted); line-height: 1.6; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5rem 0; }
.section--sm { padding: 3rem 0; }
.section--alt { background: var(--color-surface); }
.section--dark { background: var(--color-text); color: #fff; }
.section--green { background: var(--color-primary); color: #fff; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img { height: 56px; width: auto; }
.site-logo:hover { text-decoration: none; color: var(--color-primary); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  flex: 1;
}
.site-nav a {
  display: block;
  padding: .5rem .875rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  text-decoration: none;
}
.site-header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.lang-switch {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.lang-switch:hover { background: var(--color-bg); }
.account-btn {
  display: flex;
  align-items: center;
  padding: .4rem .75rem;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.account-btn:hover { background: var(--color-bg); text-decoration: none; }
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: .4rem .875rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s;
}
.cart-btn:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; }
.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #cc0000 !important;
  color: #fff !important;
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  line-height: 1;
  pointer-events: none;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-text);
  color: #fff;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .45;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 4rem 0;
}
.hero__eyebrow {
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}
.hero__title {
  color: #fff;
  margin-bottom: 1.25rem;
}
.hero__sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Bottoni ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: .95rem;
  cursor: pointer;
  transition: background .15s, transform .1s;
  border: none;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.btn-outline-dark { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-outline-dark:hover { background: var(--color-primary-light); text-decoration: none; }
.btn-sm { padding: .4rem 1rem; font-size: .85rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge-green   { background: #EAF3DE; color: #3B6D11; }
.badge-amber   { background: #FAEEDA; color: #854F0B; }
.badge-teal    { background: #E1F5EE; color: #0F6E56; }
.badge-coral   { background: #FAECE7; color: #993C1D; }
.badge-gray    { background: #F1EFE8; color: #5F5E5A; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card__image { aspect-ratio: 16/9; overflow: hidden; }
.card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__image img { transform: scale(1.04); }
.card__body { padding: 1.25rem 1.5rem 1.5rem; }
.card__eyebrow { font-size: .8rem; font-weight: 600; color: var(--color-primary); letter-spacing: .05em; text-transform: uppercase; margin-bottom: .5rem; }
.card__title { font-size: 1.1rem; margin-bottom: .5rem; }
.card__excerpt { font-size: .9rem; color: var(--color-text-muted); line-height: 1.55; margin-bottom: 1rem; }
.card__meta { font-size: .8rem; color: var(--color-text-muted); display: flex; gap: .75rem; flex-wrap: wrap; }
.card__footer { padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }

/* ── Grid generiche ──────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }

/* ── Sezione intro ───────────────────────────────────────── */
.section-header { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-header .badge { margin-bottom: 1rem; }
.section-header h2 { margin-bottom: .75rem; }
.section-header p { color: var(--color-text-muted); }

/* ── Activity card ───────────────────────────────────────── */
.activity-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.activity-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.activity-card__icon {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.activity-card__body { padding: 1.25rem 1.5rem 1.5rem; flex: 1; }
.activity-card__title { font-size: 1.15rem; margin-bottom: .5rem; }
.activity-card__desc { font-size: .9rem; color: var(--color-text-muted); }

/* ── Event card ──────────────────────────────────────────── */
.event-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  align-items: flex-start;
  transition: box-shadow .2s;
}
.event-card:hover { box-shadow: var(--shadow-md); }
.event-date {
  flex-shrink: 0;
  width: 60px;
  text-align: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: .5rem .25rem;
}
.event-date__day { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.event-date__month { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.event-card__body { flex: 1; }
.event-card__title { font-size: 1rem; font-weight: 600; margin-bottom: .25rem; }
.event-card__location { font-size: .85rem; color: var(--color-text-muted); display: flex; align-items: center; gap: .35rem; }

/* ── Form ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .4rem; color: var(--color-text); }
.form-control {
  width: 100%;
  padding: .65rem .875rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-family: var(--font-body);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29,158,117,.12);
}
.form-control::placeholder { color: var(--color-text-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-check { display: flex; align-items: flex-start; gap: .625rem; }
.form-check input[type="checkbox"] { flex-shrink: 0; width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--color-primary); }
.form-check label { font-size: .875rem; color: var(--color-text-muted); }
.form-error { font-size: .8rem; color: var(--color-danger); margin-top: .25rem; }

/* ── Newsletter ──────────────────────────────────────────── */
.newsletter-section {
  background: var(--color-primary);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.newsletter-section h2 { color: #fff; }
.newsletter-form {
  display: flex;
  gap: .75rem;
  max-width: 480px;
  margin: 1.5rem auto 0;
}
.newsletter-form .form-control {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.newsletter-form .form-control::placeholder { color: rgba(255,255,255,.6); }
.newsletter-form .form-control:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,.7);
  padding: 4rem 0 2rem;
}
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.footer-brand { }
.footer-brand .site-logo { color: #fff; margin-bottom: 1rem; }
.footer-brand p { font-size: .875rem; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: .9rem; font-weight: 600; margin-bottom: 1rem; letter-spacing: .04em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul a { color: rgba(255,255,255,.6); font-size: .875rem; transition: color .15s; }
.footer-col ul a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: #fff; }

/* ── Cookie banner ───────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  max-width: 640px;
  width: calc(100% - 3rem);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.cookie-banner p { font-size: .875rem; color: var(--color-text-muted); margin: 0; }
.cookie-banner__actions { display: flex; gap: .75rem; flex-shrink: 0; }

/* ── Utility ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }  .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.gap-sm { gap: .75rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.divider { height: 1px; background: var(--color-border); margin: 2rem 0; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
/* ── Hamburger (nascosto su desktop) ─────────────────────── */
.mobile-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; line-height: 1; padding: .25rem .5rem;
  color: var(--color-text);
}
.mobile-nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 99;
}

@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { min-height: 60vh; }
  .newsletter-form { flex-direction: column; }
  .site-footer .container { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }

  /* Hamburger visibile */
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

  /* Nav nascosta di default su mobile */
  nav:not(.nav-open) .site-nav { display: none; }

  /* Drawer laterale quando aperto */
  nav.nav-open .site-nav {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 270px;
    background: var(--color-surface);
    z-index: 100;
    padding: 4.5rem 1.5rem 2rem;
    box-shadow: -4px 0 24px rgba(0,0,0,.18);
    overflow-y: auto;
    gap: .25rem;
  }
  nav.nav-open .site-nav li a {
    display: block;
    padding: .65rem .75rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
  }
  nav.nav-open .site-nav li a:hover,
  nav.nav-open .site-nav li a.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
  }
}

/* ── Articolo news (corpo Quill) ──────────────────────────── */
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--color-text); }
.article-body h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.article-body h3 { font-size: 1.15rem; margin: 1.75rem 0 .6rem; }
.article-body p  { margin: 0 0 1.1rem; }
.article-body ul,
.article-body ol { margin: 0 0 1.1rem 1.5rem; }
.article-body li { margin-bottom: .35rem; }
.article-body blockquote {
  border-left: 4px solid var(--color-primary);
  margin: 1.5rem 0;
  padding: .75rem 1.25rem;
  background: var(--color-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-text-muted);
  font-style: italic;
}
.article-body a { color: var(--color-primary); }
.article-body a:hover { text-decoration: underline; }
.article-body img { max-width: 100%; border-radius: var(--radius-md); margin: .5rem 0; }

/* ── Quill snow override in admin ─────────────────────────── */
.ql-toolbar { border-color: transparent !important; background: var(--color-bg); }
.ql-container { border-color: transparent !important; font-size: .95rem; }
.ql-editor { min-height: 280px; }
