/* Fonts: Google Fonts with strong system fallbacks.
   Everything works even if fonts fail to load (offline / file://) */
@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,500;0,600;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── TOKENS: LIGHT (sempre default) ─────────────────── */
:root {
  color-scheme: light;

  --bg:        #ffffff;
  --bg-soft:   #f8f8f6;
  --bg-subtle: #f0f0ed;
  --ink:       #0f0e0d;
  --ink-2:     #3a3935;
  --muted:     #8a8a83;
  --muted-lt:  #c4c4bc;
  --line:      #e6e6e1;
  --line-md:   #cfcfc8;

  --accent:    #1a6ef5;
  --accent-lt: #e8f0fe;
  --danger:    #c0392b;
  --success:   #1a7a48;

  --font-display: 'Cormorant', 'Cormorant Garamond', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --nav-h:  60px;
  --max-w:  1100px;
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.10);
  --t: 170ms ease;
}

/* ── DARK OVERRIDE (solo via JS/toggle) ─────────────── */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #131312;
  --bg-soft:   #1b1b19;
  --bg-subtle: #232321;
  --ink:       #f0efe9;
  --ink-2:     #adadA4;
  --muted:     #737370;
  --muted-lt:  #424240;
  --line:      #282826;
  --line-md:   #353533;
  --accent:    #5294ff;
  --accent-lt: #1a2540;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

/* ── RESET ──────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
/* Prevent horizontal overflow on mobile */
html{overflow-x:hidden}
body{overflow-x:hidden;min-width:0}
img,video,iframe,embed{max-width:100%;height:auto}
html{scroll-behavior:smooth}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--ink);
  line-height:1.6;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
ul,ol{list-style:none}
button,input,select,textarea{font-family:inherit;font-size:inherit}

/* ── NAV ─────────────────────────────────────────────── */
.nav{
  position:sticky;top:0;height:var(--nav-h);
  background:var(--bg);border-bottom:1px solid var(--line);
  z-index:200;transition:background var(--t),border-color var(--t);
}
.nav-inner{
  display:grid;grid-template-columns:1fr auto 1fr;
  align-items:center;height:100%;
  max-width:var(--max-w);margin:0 auto;
  padding:0 1.5rem;gap:.5rem;
}
.nav-logo{
  display:flex;align-items:center;
  text-decoration:none;justify-self:start;flex-shrink:0;
}
.nav-logo img{
  /* Logo wordmark orizzontale (1536x1024) */
  height:52px;
  width:auto;
  object-fit:contain;
  display:block;
}
html[data-theme="dark"] .nav-logo img{
  filter:brightness(1.05) drop-shadow(0 0 1px rgba(255,255,255,.05));
}
.nav-logo:hover img{opacity:.82;transition:opacity .18s}
.nav-logo-text{display:none}

/* Center links */
.nav-links{display:flex;align-items:center;gap:2px;justify-self:center}
.nav-link{
  background:none;border:none;padding:.36rem .72rem;
  font-size:.82rem;font-weight:500;color:var(--muted);
  cursor:pointer;border-radius:var(--r-md);
  transition:color var(--t),background var(--t);
  white-space:nowrap;font-family:var(--font-body);
}
.nav-link:hover{color:var(--ink);background:var(--bg-soft)}
.nav-link.active{color:var(--ink);font-weight:600;background:var(--bg-subtle)}

/* Right actions */
.nav-actions{display:flex;align-items:center;gap:.3rem;justify-self:end}

/* ── Theme pill toggle ───────────────── */
.theme-toggle{
  display:flex;align-items:center;
  background:var(--bg-subtle);border:1px solid var(--line);
  border-radius:var(--r-pill);padding:3px;gap:2px;
  cursor:default;flex-shrink:0;
}
/* Alias classes - not hidden on mobile */
.theme-switcher,.theme-drawer-pill{
  display:flex;align-items:center;
  background:var(--bg-subtle);border:1px solid var(--line);
  border-radius:var(--r-pill);padding:3px;gap:2px;
  cursor:default;flex-shrink:0;
}
.theme-opt{
  width:28px;height:28px;border-radius:var(--r-pill);
  border:none;background:transparent;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:13px;color:var(--muted);
  transition:background var(--t),color var(--t),box-shadow var(--t);
  flex-shrink:0;line-height:1;
}
.theme-opt:hover{color:var(--ink)}
.theme-opt.on{
  background:var(--bg);color:var(--ink);
  box-shadow:0 1px 4px rgba(0,0,0,.10);
}
html[data-theme="dark"] .theme-opt.on{box-shadow:0 1px 4px rgba(0,0,0,.35)}

/* ── Language selector ───────────────── */
.lang-wrap{position:relative;flex-shrink:0}
.lang-btn{
  display:flex;align-items:center;gap:.3rem;
  padding:.3rem .55rem;border-radius:var(--r-md);
  border:1px solid var(--line);background:var(--bg-soft);
  font-size:.74rem;font-weight:600;letter-spacing:.04em;
  color:var(--ink-2);cursor:pointer;font-family:var(--font-body);
  transition:background var(--t),border-color var(--t),color var(--t);
  white-space:nowrap;
}
.lang-btn:hover{background:var(--bg-subtle);color:var(--ink);border-color:var(--line-md)}
.lang-btn.open{background:var(--bg-subtle);border-color:var(--line-md);color:var(--ink)}
/* Chevron via pseudo */
.lang-btn::after{
  content:'';display:block;
  width:8px;height:5px;flex-shrink:0;
  background:currentColor;opacity:.45;
  clip-path:polygon(0 0,100% 0,50% 100%);
  transition:transform var(--t),opacity var(--t);
}
.lang-btn.open::after{transform:rotate(180deg);opacity:.7}

.lang-panel{
  position:absolute;top:calc(100% + 5px);right:0;
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-lg);padding:4px;
  min-width:155px;box-shadow:var(--shadow-md);
  display:none;z-index:400;
}
.lang-panel.open{display:block;animation:fadeUp .14s ease}
@keyframes fadeUp{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}

.lang-opt{
  display:flex;align-items:center;gap:.55rem;
  width:100%;padding:.48rem .7rem;
  background:none;border:none;border-radius:var(--r-md);
  font-size:.82rem;font-family:var(--font-body);
  color:var(--ink-2);cursor:pointer;text-align:left;
  transition:background var(--t),color var(--t);
}
.lang-opt:hover{background:var(--bg-soft);color:var(--ink)}
.lang-opt.cur{color:var(--ink);font-weight:600;background:var(--bg-subtle)}
.lang-opt-flag{font-size:15px;line-height:1;flex-shrink:0}
.lang-opt-name{flex:1}
.lang-opt-check{
  font-size:11px;color:var(--accent);
  opacity:0;margin-left:auto;flex-shrink:0;
}
.lang-opt.cur .lang-opt-check{opacity:1}

/* ── Hamburger (mobile only) ─────────── */
.nav-hamburger{
  display:none;flex-direction:column;align-items:center;
  justify-content:center;gap:5px;
  width:34px;height:34px;
  border-radius:var(--r-md);border:1px solid var(--line);
  background:var(--bg-soft);cursor:pointer;flex-shrink:0;
}
.nav-hamburger span{
  display:block;width:16px;height:1.5px;
  background:var(--ink);border-radius:2px;
  transition:transform .2s ease,opacity .2s ease;
}
.nav-hamburger.open span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
.nav-hamburger.open span:nth-child(2){opacity:0}
.nav-hamburger.open span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}

/* ── Mobile drawer ───────────────────── */
.nav-drawer{
  position:fixed;top:var(--nav-h);left:0;right:0;bottom:0;
  background:var(--bg);border-top:1px solid var(--line);
  z-index:190;padding:1rem 1.25rem;
  display:flex;flex-direction:column;gap:.15rem;
  transform:translateX(100%);transition:transform .22s ease;
  overflow-y:auto;
}
.nav-drawer.open{transform:translateX(0)}
.nav-drawer-link{
  background:none;border:none;padding:.72rem 1rem;
  font-size:.94rem;font-weight:500;color:var(--ink-2);
  cursor:pointer;border-radius:var(--r-md);
  transition:background var(--t),color var(--t);
  text-align:left;font-family:var(--font-body);width:100%;
}
.nav-drawer-link:hover{background:var(--bg-soft);color:var(--ink)}
.nav-drawer-link.active{color:var(--ink);background:var(--bg-subtle);font-weight:600}
.nav-drawer-sep{height:1px;background:var(--line);margin:.4rem 0}
.nav-drawer-actions{display:flex;gap:.5rem;margin-top:.5rem}
.nav-drawer-actions .btn{flex:1;justify-content:center}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:.4rem;padding:.55rem 1.2rem;
  border-radius:var(--r-pill);border:none;
  font-size:.855rem;font-weight:600;
  cursor:pointer;white-space:nowrap;line-height:1;
  transition:opacity var(--t),background var(--t),color var(--t),border-color var(--t);
}
.btn:disabled{opacity:.4;pointer-events:none}
.btn-primary{background:var(--ink);color:var(--bg)}
.btn-primary:hover{opacity:.78}
.btn-outline{background:transparent;border:1px solid var(--ink);color:var(--ink)}
.btn-outline:hover{background:var(--ink);color:var(--bg)}
.btn-ghost{background:transparent;border:none;color:var(--muted);padding:.5rem .7rem}
.btn-ghost:hover{color:var(--ink);background:var(--bg-soft)}
.btn-soft{background:var(--bg-subtle);border:1px solid var(--line);color:var(--ink-2)}
.btn-soft:hover{background:var(--bg-soft);border-color:var(--line-md)}
.btn-sm{padding:.35rem .8rem;font-size:.78rem}
.btn-lg{padding:.7rem 1.9rem;font-size:.92rem}
.btn-full{width:100%}
.btn-spin{width:13px;height:13px;border:1.5px solid currentColor;border-top-color:transparent;border-radius:50%;animation:spin .65s linear infinite}

/* ── FORMS ────────────────────────────────────────────── */
.field{display:flex;flex-direction:column;gap:.3rem}
.field-label{font-size:.78rem;font-weight:600;color:var(--ink-2)}
.field-input{
  width:100%;padding:.6rem .85rem;
  background:var(--bg);border:1px solid var(--line-md);
  border-radius:var(--r-md);color:var(--ink);outline:none;
  transition:border-color var(--t),box-shadow var(--t),background var(--t);
  appearance:none;
}
.field-input::placeholder{color:var(--muted-lt)}
.field-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(26,110,245,.1)}
.field-input.err{border-color:var(--danger)}
.field-err{font-size:.72rem;color:var(--danger);display:none}
.field-err.show{display:block}
.field-hint{font-size:.72rem;color:var(--muted)}
.strength-track{height:2px;background:var(--bg-subtle);border-radius:2px;overflow:hidden;margin-top:3px}
.strength-fill{height:100%;border-radius:2px;transition:width .3s,background .3s;width:0}

/* ── FEED / SOCIAL ───────────────────────────────────── */
.feed-layout{
  display:grid;
  grid-template-columns:260px 1fr 240px;
  gap:1.25rem;
  max-width:1100px;margin:0 auto;
  padding:1.5rem 1.25rem 4rem;
  min-width:0;
}
.feed-main{min-width:0;overflow:hidden}

/* Right ad sidebar */
.feed-right{
  display:flex;flex-direction:column;gap:.75rem;
  position:sticky;top:calc(var(--nav-h) + 1rem);
  height:fit-content;
}
.ad-box{
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-xl);overflow:hidden;
}
.ad-box-inner{
  padding:1rem;
  display:flex;flex-direction:column;align-items:center;
  text-align:center;gap:.5rem;
}
.ad-box-img{
  width:100%;height:120px;object-fit:cover;
  background:linear-gradient(135deg,var(--bg-soft),var(--line));
  display:flex;align-items:center;justify-content:center;
  font-size:2rem;
}
.ad-box-label{
  font-size:.58rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted-lt);
}
.ad-box-title{font-size:.82rem;font-weight:600;color:var(--ink);line-height:1.4}
.ad-box-sub{font-size:.75rem;color:var(--muted);line-height:1.5}
/* Inline mobile ad card */
.ad-card-inline{
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-xl);overflow:hidden;
  margin-bottom:.75rem;
  display:none;  /* hidden on desktop */
}

/* Sidebar */
.feed-sidebar{
  display:flex;flex-direction:column;gap:.75rem;
  position:sticky;top:calc(var(--nav-h) + 1rem);
  height:fit-content;
}
.sidebar-profile{
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-xl);overflow:hidden;
}
.sidebar-cover{height:56px;background:linear-gradient(135deg,#1a6ef5 0%,#7c3aed 100%)}
.sidebar-body{padding:0 1rem 1rem}
.sidebar-av{
  width:52px;height:52px;border-radius:50%;
  border:3px solid var(--bg);
  background:var(--bg-subtle);margin-top:-26px;
  display:flex;align-items:center;justify-content:center;
  font-size:.78rem;font-weight:600;color:var(--muted);
  margin-bottom:.5rem;
}
.sidebar-name{font-size:.95rem;font-weight:600;color:var(--ink)}
.sidebar-bio{font-size:.78rem;color:var(--muted);margin-top:.15rem}
.sidebar-stats{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:.4rem;margin-top:.85rem;
}
.stat-box{
  background:var(--bg-soft);border-radius:var(--r-md);
  padding:.5rem .65rem;text-align:center;
}
.stat-n{font-size:1rem;font-weight:600;color:var(--ink)}
.stat-l{font-size:.68rem;color:var(--muted)}

.sidebar-section{
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-xl);padding:1rem;
}
.sidebar-title{
  font-size:.72rem;font-weight:600;letter-spacing:.07em;
  text-transform:uppercase;color:var(--muted);
  margin-bottom:.75rem;
}
.sidebar-link{
  display:flex;align-items:center;gap:.55rem;
  font-size:.83rem;color:var(--ink-2);
  padding:.3rem 0;cursor:pointer;
  transition:color var(--t);background:none;border:none;width:100%;text-align:left;
}
.sidebar-link:hover{color:var(--ink)}
.sidebar-dot{
  width:8px;height:8px;border-radius:50%;flex-shrink:0;
}

/* Composer */
.composer{
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-xl);padding:1rem;
  margin-bottom:1rem;
}
.composer-row{display:flex;gap:.75rem;align-items:flex-start}
.composer-av{
  width:36px;height:36px;border-radius:50%;
  background:var(--bg-subtle);border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;
  font-size:.7rem;font-weight:600;color:var(--muted);flex-shrink:0;
}
.composer-input{
  flex:1;background:var(--bg-soft);
  border:1px solid var(--line);
  border-radius:var(--r-pill);
  padding:.55rem 1rem;font-size:.875rem;
  color:var(--ink);cursor:pointer;
  transition:background var(--t),border-color var(--t);
  text-align:left;
}
.composer-input:hover{background:var(--bg-subtle);border-color:var(--line-md)}
.composer-actions{
  display:flex;gap:.5rem;
  margin-top:.75rem;padding-top:.75rem;
  border-top:1px solid var(--line);
}
.composer-act{
  display:flex;align-items:center;gap:.35rem;
  font-size:.8rem;font-weight:500;color:var(--muted);
  background:none;border:none;cursor:pointer;
  padding:.35rem .65rem;border-radius:var(--r-md);
  transition:background var(--t),color var(--t);
}
.composer-act:hover{background:var(--bg-soft);color:var(--ink)}

/* Post card */
.post-card{
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-xl);overflow:hidden;
  margin-bottom:1rem;
  transition:border-color var(--t),background var(--t);
}
.post-head{
  display:flex;align-items:center;gap:.65rem;
  padding:.9rem 1rem .6rem;
}
.post-av{
  width:38px;height:38px;border-radius:50%;
  background:var(--bg-subtle);border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;
  font-size:.72rem;font-weight:600;color:var(--muted);
  flex-shrink:0;overflow:hidden;
}
.post-av img{width:100%;height:100%;object-fit:cover}
.post-author{font-size:.875rem;font-weight:600;color:var(--ink)}
.post-time{font-size:.74rem;color:var(--muted)}
.post-dest-badge{
  font-size:.68rem;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:var(--accent);
  background:var(--accent-lt);
  padding:.2rem .55rem;border-radius:var(--r-pill);
}
/* Follow button in feed */
.follow-btn{
  padding:.28rem .7rem;border-radius:var(--r-pill);
  font-size:.73rem;font-weight:600;font-family:var(--font-body);
  border:1.5px solid var(--line-md);background:var(--bg);
  color:var(--ink-2);cursor:pointer;
  transition:background var(--t),color var(--t),border-color var(--t);
  white-space:nowrap;flex-shrink:0;
}
.follow-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-lt)}
.follow-btn.following{
  border-color:var(--line);color:var(--muted);background:var(--bg-soft);
}
.post-body{padding:0 1rem .75rem}
.post-title{
  font-family:var(--font-display);
  font-size:1.1rem;font-weight:600;line-height:1.25;
  color:var(--ink);margin-bottom:.35rem;cursor:pointer;
}
.post-title:hover{color:var(--accent)}
.post-excerpt{font-size:.855rem;color:var(--ink-2);line-height:1.65;font-weight:300}
.post-img{
  width:100%;max-height:520px;
  object-fit:contain;
  background:var(--bg-subtle);
  cursor:pointer;
  transition:opacity var(--t);
}
.post-img:hover{opacity:.95}
.post-footer{
  display:flex;align-items:center;gap:.25rem;
  padding:.55rem .75rem;
  border-top:1px solid var(--line);
}
.post-action{
  display:flex;align-items:center;gap:.3rem;
  font-size:.8rem;font-weight:500;color:var(--muted);
  background:none;border:none;cursor:pointer;
  padding:.35rem .6rem;border-radius:var(--r-md);
  transition:background var(--t),color var(--t);
  flex:1;justify-content:center;
}
.post-action:hover{background:var(--bg-soft);color:var(--ink)}
.post-action.liked{color:#e0245e}
.post-action.liked:hover{background:#fff0f5}
.post-sep{width:1px;height:20px;background:var(--line);flex-shrink:0}

/* ── MAP ──────────────────────────────────────────────── */
#map{height:calc(100vh - var(--nav-h) - 52px);width:100%}
.map-bar{
  height:52px;background:var(--bg);
  border-bottom:1px solid var(--line);
  display:flex;align-items:center;
  padding:0 1rem;gap:.75rem;
  transition:background var(--t),border-color var(--t);
  overflow-x:auto;
}
.map-search{
  flex:1;max-width:280px;
  padding:.4rem .8rem;
  border:1px solid var(--line-md);
  border-radius:var(--r-pill);
  background:var(--bg-soft);color:var(--ink);
  font-size:.83rem;outline:none;
  transition:border-color var(--t),background var(--t);
}
.map-search:focus{border-color:var(--accent);background:var(--bg)}
.map-search::placeholder{color:var(--muted-lt)}
.map-sep{width:1px;height:22px;background:var(--line);flex-shrink:0}
.map-filter{
  padding:.32rem .75rem;
  border:1px solid var(--line-md);
  border-radius:var(--r-pill);
  background:none;color:var(--ink-2);
  font-size:.78rem;font-weight:500;
  cursor:pointer;white-space:nowrap;
  transition:background var(--t),border-color var(--t),color var(--t);
}
.map-filter:hover{border-color:var(--ink);color:var(--ink)}
.map-filter.on{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.map-filter.team-on{background:#7c3aed;border-color:#7c3aed;color:#fff}
.map-filter.comm-on{background:var(--accent);border-color:var(--accent);color:#fff}

/* ── AUTH ─────────────────────────────────────────────── */
.auth-wrap{
  min-height:100vh;background:var(--bg-soft);
  display:flex;align-items:center;justify-content:center;padding:2rem 1rem;
}
.auth-box{
  width:100%;max-width:400px;
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-xl);padding:2.1rem;
  box-shadow:var(--shadow-md);
}
.auth-logo{
  display:flex;align-items:center;gap:.5rem;
  text-decoration:none;margin-bottom:1.75rem;
}
.auth-logo img{width:28px;height:28px;object-fit:contain}
.auth-logo span{
  font-family:var(--font-display);font-weight:700;
  font-size:1.15rem;color:var(--ink);
}
.auth-title{font-family:var(--font-display);font-size:1.5rem;font-weight:700;color:var(--ink);margin-bottom:.3rem}
.auth-sub{font-size:.855rem;color:var(--muted);margin-bottom:1.65rem;font-weight:300}
.auth-form{display:flex;flex-direction:column;gap:1rem}
.auth-alt{text-align:center;font-size:.81rem;color:var(--muted);margin-top:1.1rem}
.auth-alt button{background:none;border:none;color:var(--ink);font-weight:600;cursor:pointer;font-size:inherit;text-decoration:underline;text-underline-offset:2px}
.auth-legal{text-align:center;font-size:.7rem;color:var(--muted);margin-top:.8rem;line-height:1.6}
.auth-legal a{color:var(--muted);text-decoration:underline}
.err-banner{
  background:#fef2f2;border:1px solid #fca5a5;
  border-radius:var(--r-md);padding:.6rem .85rem;
  font-size:.81rem;color:var(--danger);display:none;
  margin-bottom:.75rem;
}
html[data-theme="dark"] .err-banner{background:#2d1515;border-color:#7f1d1d}
.err-banner.show{display:block}

/* ── LANDING ──────────────────────────────────────────── */
/* .hero ridefinito inline in index.html - qui solo fallback senza max-width */
.hero:not(.hero-bg ~ *){padding:5rem 1.25rem 4rem}
.hero-eyebrow{
  display:flex;align-items:center;gap:.55rem;
  font-size:.7rem;font-weight:600;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted);margin-bottom:1.4rem;
}
.hero-eyebrow::before{
  content:'';width:16px;height:1px;background:var(--muted-lt);
}
.hero-h1{
  font-family:var(--font-display);
  font-size:clamp(2.4rem,5.5vw,4.4rem);
  font-weight:700;line-height:1.07;letter-spacing:-.025em;
  color:var(--ink);max-width:660px;margin-bottom:1.2rem;
}
.hero-h1 em{font-style:italic;color:var(--muted)}
.hero-sub{
  font-size:1rem;line-height:1.72;font-weight:300;
  color:var(--ink-2);max-width:450px;margin-bottom:2.1rem;
}
.hero-ctas{display:flex;gap:.65rem;flex-wrap:wrap;align-items:center}

.features{
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  display:grid;grid-template-columns:repeat(3,1fr);
}
.feature{
  padding:2.25rem 1.75rem;border-right:1px solid var(--line);
  cursor:pointer;transition:background var(--t);
}
.feature:last-child{border-right:none}
.feature:hover{background:var(--bg-soft)}
.feature-num{font-size:.67rem;font-weight:600;letter-spacing:.1em;color:var(--muted);margin-bottom:1.1rem}
.feature-title{font-family:var(--font-display);font-size:1.15rem;line-height:1.2;color:var(--ink);margin-bottom:.5rem}
.feature-desc{font-size:.81rem;line-height:1.65;color:var(--ink-2);font-weight:300}

/* ── PARTNERS ─────────────────────────────────────────── */
.partner-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1.1rem}
.partner-card{
  background:var(--bg);border:1px solid var(--line);
  border-radius:var(--r-xl);padding:1.75rem 1.5rem;
  text-align:center;transition:transform var(--t),box-shadow var(--t),background var(--t);
}
.partner-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md)}
.partner-cat{font-size:.67rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:.6rem}
.partner-name{font-family:var(--font-display);font-size:1.3rem;font-weight:700;color:var(--ink);margin-bottom:.55rem}
.partner-desc{font-size:.81rem;color:var(--ink-2);line-height:1.6;font-weight:300;margin-bottom:1.1rem}

/* ── FOOTER / SECTION / UTILS ───────────────────────── */
.footer{border-top:1px solid var(--line);padding:1.35rem 1.25rem;background:var(--bg);transition:background var(--t),border-color var(--t)}
.footer-inner{max-width:var(--max-w);margin:0 auto;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem}
.footer-copy{font-size:.72rem;color:var(--muted)}
.footer-links{display:flex;gap:1.1rem}
.footer-links a{font-size:.72rem;color:var(--muted);text-decoration:underline;text-underline-offset:2px}
.footer-links a:hover{color:var(--ink)}

.section{padding:3.5rem 1.25rem;max-width:var(--max-w);margin:0 auto}
.section-label{font-size:.68rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:.65rem}
.section-title{font-family:var(--font-display);font-size:clamp(1.5rem,3vw,2rem);font-weight:700;color:var(--ink);margin-bottom:.65rem}
.section-sub{font-size:.875rem;color:var(--ink-2);font-weight:300;line-height:1.72}

.container{max-width:var(--max-w);margin:0 auto;padding:0 1.25rem}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.pos-rel{position:relative}

/* ── TOAST ────────────────────────────────────────────── */
.toast-wrap{position:fixed;bottom:1.5rem;right:1.5rem;display:flex;flex-direction:column;gap:.5rem;z-index:500;pointer-events:none}
.toast{display:flex;align-items:center;gap:.55rem;padding:.65rem .95rem;background:var(--ink);color:var(--bg);border-radius:var(--r-lg);font-size:.83rem;pointer-events:all;max-width:290px;animation:slideUp .22s ease forwards}
.toast.ok{background:var(--success)}
.toast.er{background:var(--danger)}

/* ── ANIMATIONS ────────────────────────────────────────── */
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes slideUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media(max-width:1100px){
  .feed-layout{grid-template-columns:260px 1fr;max-width:900px}
  .feed-right{display:none !important}
}
@media(max-width:900px){
  .feed-layout{grid-template-columns:1fr;padding:1rem .75rem 5rem}
  .feed-sidebar{display:none !important}
  .feed-main{min-width:0;width:100%;overflow:hidden}
  .ad-card-inline{display:block !important}
}
@media(max-width:768px){
  .nav-links{display:none}
  .nav-hamburger{display:flex !important}
  .nav-inner{
    grid-template-columns:auto 1fr auto;
    width:100%;max-width:100%;
    padding:0 .75rem;
  }
  .nav-actions{gap:.4rem}
  .nav-desktop-only{display:none !important}
  .theme-toggle{display:none !important}
  .lang-wrap{display:none !important}
  #nav-bell{width:38px;height:38px}
  .features{grid-template-columns:1fr}
  .feature{border-right:none;border-bottom:1px solid var(--line)}
  .feature:last-child{border-bottom:none}
  .hero{padding:3rem 1.25rem 2.5rem}
}
@media(max-width:480px){
  .auth-box{padding:1.5rem;border-radius:var(--r-lg)}
  .auth-wrap{align-items:flex-start;padding-top:3rem}
}

/* ── CAROUSEL ────────────────────────────────────────── */
.carousel{
  position:relative;overflow:hidden;
  background:var(--bg-subtle);
  /* height driven by aspect ratio of images */
}
.carousel-track{
  display:flex;
  transition:transform .32s cubic-bezier(.4,0,.2,1);
  will-change:transform;
}
.carousel-img{
  min-width:100%;width:100%;
  height:460px;max-height:72vw;
  object-fit:contain;
  background:var(--bg-subtle);
  flex-shrink:0;
  display:block;
}
.carousel-arrow{
  position:absolute;top:50%;transform:translateY(-50%);
  width:34px;height:34px;border-radius:50%;
  background:rgba(255,255,255,.88);
  border:none;cursor:pointer;
  font-size:1.3rem;line-height:1;
  display:flex;align-items:center;justify-content:center;
  color:#111;
  box-shadow:0 2px 8px rgba(0,0,0,.18);
  transition:opacity var(--t),background var(--t);
  opacity:0;
  z-index:2;
}
html[data-theme="dark"] .carousel-arrow{
  background:rgba(30,30,28,.85);color:#f0f0ec;
}
.carousel:hover .carousel-arrow{opacity:1}
.carousel-prev{left:.6rem}
.carousel-next{right:.6rem}
.carousel-arrow:hover{background:rgba(255,255,255,1)}
html[data-theme="dark"] .carousel-arrow:hover{background:rgba(40,40,38,1)}

.carousel-dots{
  position:absolute;bottom:.55rem;left:50%;transform:translateX(-50%);
  display:flex;gap:.3rem;z-index:2;
}
.carousel-dot{
  width:6px;height:6px;border-radius:50%;
  background:rgba(255,255,255,.55);
  border:none;cursor:pointer;padding:0;
  transition:background var(--t),transform var(--t);
}
.carousel-dot.active{background:#fff;transform:scale(1.25)}
.carousel-counter{
  position:absolute;top:.5rem;right:.65rem;
  font-size:.7rem;font-weight:600;
  color:#fff;background:rgba(0,0,0,.35);
  padding:.15rem .45rem;border-radius:var(--r-pill);
  z-index:2;letter-spacing:.02em;
}

/* ── MAP HOVER TOOLTIP ───────────────────────────────── */
.map-tooltip{
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  padding:.7rem .9rem;
  box-shadow:var(--shadow-lg);
  font-family:var(--font-body);
  min-width:160px;max-width:230px;
  pointer-events:none;
}
.map-tooltip-type{
  font-size:.62rem;font-weight:700;letter-spacing:.07em;
  text-transform:uppercase;margin-bottom:.3rem;
}
.map-tooltip-title{
  font-family:var(--font-display);
  font-size:.95rem;font-weight:600;
  line-height:1.25;color:var(--ink);margin-bottom:.25rem;
}
.map-tooltip-meta{font-size:.73rem;color:var(--muted)}

/* ── Lucide icons in post actions ───────────────────────── */
.post-action svg{vertical-align:middle;display:inline-block}
.post-action.liked svg{color:#ef4444}
.post-action.liked{color:#ef4444}
.post-action.saved svg{color:var(--accent)}
.post-action.reposted svg{color:#22c55e}
.post-action.reposted{color:#22c55e}
.donate-action svg{color:#f59e0b}
.donate-action:hover svg{color:#d97706}
.rating-stars{display:inline-flex;gap:2px;align-items:center}
.rating-stars svg{cursor:pointer;transition:transform .1s}
.rating-stars svg:hover{transform:scale(1.15)}
.rating-stars .star-filled{color:#f59e0b}
.rating-stars .star-empty{color:var(--line)}

/* ── Team rating block ──────────────────────────────────── */
.team-rating{
  display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;
  padding:.85rem 1rem;margin:1rem 0;
  background:var(--bg-soft);border:1px solid var(--line);
  border-radius:var(--r-lg);
}
.rating-label{font-size:.85rem;font-weight:500;color:var(--ink)}
.rating-avg{font-size:.8rem;color:var(--muted);margin-left:auto}
.post-act svg{vertical-align:middle}
.post-act.active svg{color:var(--accent)}
.post-act.active#act-like svg,.post-act#act-like.active svg{color:#ef4444}
.donate-act svg{color:#f59e0b}

/* ── Badges ─────────────────────────────────────────────── */
.sidebar-badges{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.6rem;justify-content:center}
.badge-pill{
  display:inline-flex;align-items:center;gap:.3rem;
  font-size:.66rem;font-weight:600;padding:.18rem .5rem;
  border:1.5px solid var(--line);border-radius:var(--r-pill);
  color:var(--ink-2);background:var(--bg-soft);
}
.badge-ico{font-size:.75rem;line-height:1}
.badge-mini{font-size:.78rem;margin-left:.1rem;cursor:default}

/* ── Share Sheet ────────────────────────────────────────── */
.share-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1000;
  display:flex;align-items:flex-end;justify-content:center;opacity:0;transition:opacity .25s}
.share-overlay.open{opacity:1}
@media(min-width:640px){.share-overlay{align-items:center}}
.share-sheet{background:var(--bg);border-radius:var(--r-xl) var(--r-xl) 0 0;
  width:100%;max-width:480px;padding:1.25rem;transform:translateY(100%);
  transition:transform .3s cubic-bezier(.16,1,.3,1);box-shadow:0 -4px 30px rgba(0,0,0,.15)}
.share-overlay.open .share-sheet{transform:translateY(0)}
@media(min-width:640px){.share-sheet{border-radius:var(--r-xl);transform:translateY(20px) scale(.96)}
  .share-overlay.open .share-sheet{transform:translateY(0) scale(1)}}
.share-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem}
.share-header h3{font-family:var(--font-display);font-size:1.15rem;font-weight:600;color:var(--ink);margin:0}
.share-close{background:var(--bg-soft);border:none;width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--muted)}
.share-close:hover{background:var(--line)}
.share-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:.75rem;margin-bottom:1.25rem}
@media(max-width:400px){.share-grid{grid-template-columns:repeat(4,1fr)}}
.share-opt{display:flex;flex-direction:column;align-items:center;gap:.4rem;
  text-decoration:none;color:var(--ink-2);padding:.5rem 0;border-radius:var(--r-md);transition:background .15s}
.share-opt:hover{background:var(--bg-soft)}
.share-opt-ico{width:48px;height:48px;border-radius:50%;background:var(--bg-soft);
  display:flex;align-items:center;justify-content:center}
.share-opt-name{font-size:.68rem;font-weight:500}
.share-copy{display:flex;gap:.5rem;align-items:center}
.share-url{flex:1;padding:.6rem .8rem;border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--bg-soft);color:var(--ink-2);font-size:.8rem;outline:none;font-family:var(--font-body)}
.share-copy-btn{display:flex;align-items:center;gap:.35rem;padding:.6rem 1rem;
  border:1px solid var(--accent);background:var(--accent);color:#fff;border-radius:var(--r-md);
  font-size:.82rem;font-weight:600;cursor:pointer;white-space:nowrap;font-family:var(--font-body)}
.share-copy-btn:hover{opacity:.9}
.share-native{width:100%;margin-top:.85rem;padding:.65rem;background:none;border:1px solid var(--line);
  border-radius:var(--r-md);color:var(--muted);font-size:.83rem;cursor:pointer;font-family:var(--font-body)}
.share-native:hover{background:var(--bg-soft)}

/* ── Dropdown menu items ────────────────────────────────── */
.dropdown-item{
  display:block;width:100%;padding:.5rem .8rem;background:none;border:none;
  text-align:left;font-size:.83rem;color:var(--ink);cursor:pointer;
  font-family:var(--font-body);border-radius:var(--r-md);
  transition:background .12s,color .12s;
}
/* Hover solo su dispositivi con mouse reale — niente sticky su touch */
@media (hover:hover) and (pointer:fine){
  .dropdown-item:hover{background:var(--bg-soft);color:var(--ink)}
}
.dropdown-item:active{background:var(--bg-soft)}

/* ── Smooth image loading ───────────────────────────────── */
.img-fade{opacity:0;transition:opacity .4s ease}
.img-fade.img-loaded{opacity:1}
