/* Adattamenti condivisi: nessun vincolo di larghezza sul contenuto dei soci. */
[hidden] { display: none !important; }
body { overflow-wrap: anywhere; }
main, main > *, .card, form, fieldset { min-width: 0; }
img { max-width: 100%; }
.field, input, select, textarea { min-width: 0; max-width: 100%; }
input, select, textarea { font-size: 16px; }
button, .btn, .btn-secondary { min-height: 44px; touch-action: manipulation; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #65a30d; outline-offset: 3px; }
.menu-toggle { padding: 8px 14px; border: 1px solid #64748b; border-radius: 8px; color: white; background: transparent; }
.install-card { background: #fff; border: 1px solid #cbd5e1; border-left: 4px solid #84cc16; border-radius: 12px; padding: 12px 16px; }
.install-card summary { cursor: pointer; font-weight: 700; padding-block: 8px; min-height: 44px; }
.install-card p { margin-top: 8px; }
@media (min-width: 801px) { .menu-toggle { display: none !important; } }
@media (max-width: 800px) {
  .header-inner { padding: 12px 16px; gap: 12px; }
  .site-brand { flex: 1; min-width: 0; font-size: 15px; }
  .site-brand img { width: 64px !important; height: auto; }
  #main-nav { width: 100%; gap: 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #main-nav a, #main-nav button { display: flex; align-items: center; padding: 10px 12px; min-height: 44px; border-radius: 6px; }
  #main-nav a:hover, #main-nav button:hover { background: #1e293b; }
  html.js-nav #main-nav:not(.is-open) { display: none; }
  #main { padding: 20px 16px; }
  #main h1 { font-size: clamp(1.6rem, 6vw, 2rem); line-height: 1.2; }
  #main h2 { font-size: 1.25rem; line-height: 1.3; }
  .card { padding: 18px; }
  .site-footer { padding: 20px 16px; }
  .site-footer [aria-label="Enti associativi"] { gap: 10px; justify-content: space-around; }
  .site-footer figure { flex: 1; min-width: 0; }
  .site-footer figure img { width: 100% !important; max-width: 96px; height: 65px !important; object-fit: contain; margin-inline: auto; }
  .site-footer figcaption { font-size: 11px; }
}
@media (max-width: 420px) {
  .calendar-month-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .calendar-month-nav h2 { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .calendar-month-nav a { min-height: 44px; display: flex; align-items: center; overflow-wrap: normal; }
  .calendar-month-nav a:last-child { justify-content: flex-end; }
  #main .btn, #main .btn-secondary { max-width: 100%; white-space: normal; text-align: center; }
  input[type=file] { font-size: 14px; padding: 8px; }
}
@media (display-mode: standalone) {
  .site-header { padding-top: env(safe-area-inset-top); }
  body { padding-bottom: env(safe-area-inset-bottom); }
  #app-install-card { display: none; }
}
.site-brand img.club-shield { width: 88px !important; }
.site-brand img.club-wordmark { width: 264px !important; height: auto; object-fit: contain; }
.social-links { display: flex; gap: 2px; align-items: center; }
.social-links a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; }
.social-links svg { width: 19px; height: 19px; }
.social-links a:hover { color: #bef264; background: #1e293b; }
@media (max-width: 800px) {
  .site-brand img.club-shield { width: 54px !important; }
  .site-brand img.club-wordmark { width: min(180px, 49vw) !important; }
  .site-brand { flex: 1 1 calc(100% - 144px); gap: 8px; }
  .social-links { margin-left: auto; }
  .menu-toggle { margin-left: auto; }
}
/* Il centro utile del fondo è la fascia vegetata: le bande esterne restano fuori vista. */
.site-header { background-color: #555d3f; background-image: linear-gradient(#0002, #0002), url("../img/header-vegetato.f2020b7e4939.png"); background-size: 100% 100%, auto 270%; background-position: center; border-bottom-color: #d8b93b; }
.header-inner { gap: 12px 24px; padding-top: 18px; padding-bottom: 12px; }
.site-brand { flex: 0 1 auto; }
.social-links { margin-left: auto; background: #182015cc; border-radius: 10px; }
#main-nav { width: 100%; padding: 8px 12px; background: #182015ed; border-radius: 10px; gap: 8px 20px; }
#main-nav a, #main-nav button { min-height: 36px; display: inline-flex; align-items: center; }
.menu-toggle { background: #182015ed; border-color: #ffffff66; }
@media (max-width: 800px) {
  .header-inner { padding: 12px 16px; gap: 10px; }
  .site-brand { flex: 1 1 100%; justify-content: flex-start; }
  .site-brand img.club-shield { width: 68px !important; }
  .site-brand img.club-wordmark { width: min(204px, 60vw) !important; }
  .social-links { margin-left: 0; }
  #main-nav a, #main-nav button { min-height: 44px; }
}
/* Testata: marchio protagonista, social discreti e accesso a destra. */
.header-inner { position: relative; padding-top: 54px; padding-bottom: 18px; gap: 18px; }
.site-brand { gap: 12px; }
.site-brand img.club-shield { width: 104px !important; }
.site-brand img.club-wordmark { width: 340px !important; }
.social-links { position: absolute; top: 6px; right: 20px; gap: 0; border-radius: 7px; background: #182015a6; }
.social-links a { width: 36px; height: 40px; }
.social-links svg { width: 16px; height: 16px; }
.guest-header #main-nav { margin-left: auto; width: auto; padding: 4px; gap: 4px; }
.guest-header #main-nav a { padding: 10px 18px; border-radius: 7px; min-height: 44px; }
.guest-header #main-nav a:last-child { background: #e5c443; color: #192014; }
.guest-header .menu-toggle { display: none !important; }
@media (max-width: 800px) {
  .header-inner { padding: 48px 12px 12px; gap: 12px; }
  .social-links { right: 12px; top: 3px; }
  .site-brand { flex: 1 1 100%; justify-content: center; gap: 6px; }
  .site-brand img.club-shield { width: 24% !important; max-width: 100px; flex-shrink: 0; }
  .site-brand img.club-wordmark { width: 72% !important; max-width: 300px; flex-shrink: 0; }
  html.js-nav .guest-header #main-nav:not(.is-open), .guest-header #main-nav { display: flex; width: auto; justify-content: flex-end; margin-left: auto; }
  .guest-header #main-nav a { padding: 10px 16px; }
}

/* Installed app welcome: preserve the full portrait on every screen. */
#app-launch { position:fixed; inset:0; z-index:10000; background:#10130d; cursor:pointer; }
#app-launch img { display:block; width:100%; height:100%; object-fit:contain; }

/* Original banner: anchor each end independently so mobile keeps both sides.
   Auto width preserves the image ratio; vertical framing hides the black bars. */
.site-header {
  position: relative;
  isolation: isolate;
  background: #555d3f;
}
.site-header::before, .site-header::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: -1;
  pointer-events: none;
  background-image: url("../img/header-vegetato.f2020b7e4939.png");
  background-size: auto 290%;
  background-repeat: no-repeat;
}
.site-header::before {
  left: 0;
  background-position: left center;
  -webkit-mask-image: linear-gradient(to right, #000 35%, transparent 100%);
  mask-image: linear-gradient(to right, #000 35%, transparent 100%);
}
.site-header::after {
  right: 0;
  background-position: right center;
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 100%);
  mask-image: linear-gradient(to left, #000 35%, transparent 100%);
}
.discord-invite { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; padding:22px; margin-bottom:20px; border-radius:14px; background:#24243d; color:#fff; border:1px solid #6262a0; }
.discord-invite strong { font-size:1.15rem; }
.discord-invite p { margin:6px 0 0; color:#e0e0f0; }
.discord-invite a { display:inline-flex; gap:10px; align-items:center; min-height:44px; padding:10px 18px; background:#5865f2; color:white; border-radius:8px; font-weight:700; text-decoration:none; }
.discord-invite a:hover { background:#4752c4; }
.discord-invite a:focus-visible { outline:3px solid #fff; outline-offset:3px; }
