/* ============================================================
   VISION FOR TENNIS — sito vetrina
   Linguaggio visivo: il campo in cemento visto dall'alto.
   Le righe bianche del campo fanno da divisori e struttura;
   la pallina gialla è l'unico accento forte (azioni da socio).
   ============================================================ */
:root {
  --court:      #1F4E8C;   /* blu campo */
  --court-deep: #0E2A4F;   /* blu fuori campo */
  --court-soft: #E8EEF6;
  --ball:       #DCE74C;   /* pallina */
  --clay:       #C8372D;   /* rosso del vecchio marchio, usato poco */
  --paper:      #F5F7FA;
  --ink:        #15202E;
  --muted:      #5B6676;
  --rule:       #D5DCE6;

  /* allineo le variabili del vecchio foglio di stile (prenotazioni) */
  --blue: var(--court); --blue-mid: #2A64AD; --blue-light: var(--court-soft);
  --red: var(--clay); --gray-bg: var(--paper); --text: var(--ink);

  --f-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --wrap: 1180px;
}

body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; }
h1, h2, h3, .display { font-family: var(--f-display); font-weight: 700; letter-spacing: .005em; line-height: 1.05; color: inherit; }
a { color: var(--court); text-underline-offset: .18em; }
a:hover { color: var(--court-deep); }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; box-shadow: 0 0 0 5px var(--court-deep); border-radius: 2px; }
.container { max-width: var(--wrap); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ball); color: var(--court-deep); padding: .5rem 1rem; z-index: 2000; font-weight: 600; }
.skip-link:focus { left: 1rem; }

/* ---------- Header ---------- */
.site-header { background: var(--court-deep); color: #fff; position: sticky; top: 0; z-index: 1000; }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__logo { width: 38px; height: 38px; object-fit: contain; }
.brand__name { font-family: var(--f-display); font-weight: 700; font-size: 1.45rem; letter-spacing: .01em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; color: rgba(255,255,255,.82); text-decoration: none; padding: .5rem .75rem; font-weight: 500; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { color: #fff; }
.site-nav ul a.active { color: #fff; border-bottom-color: var(--ball); }
.site-nav__member { display: flex; align-items: center; gap: .5rem; }
.btn-member { background: var(--ball); color: var(--court-deep) !important; font-weight: 600; text-decoration: none; padding: .5rem 1rem; border-radius: 999px; white-space: nowrap; }
.btn-member:hover { background: #E8F06E; }
.nav-quiet { color: rgba(255,255,255,.75); text-decoration: none; padding: .4rem .5rem; white-space: nowrap; }
.nav-quiet:hover { color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 6px; font-size: 1.5rem; line-height: 1; padding: .2rem .5rem; }

@media (max-width: 991.98px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--court-deep); flex-direction: column; align-items: stretch; padding: .5rem 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.12); }
  body.nav-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { border-bottom: 1px solid rgba(255,255,255,.08); padding: .8rem .25rem; }
  .site-nav ul a.active { border-bottom-color: rgba(255,255,255,.08); box-shadow: inset 3px 0 0 var(--ball); padding-left: .75rem; }
  .site-nav__member { padding-top: .75rem; flex-wrap: wrap; }
}

/* ---------- Bottoni ---------- */
.btn-court, .btn-line { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; padding: .75rem 1.35rem; border-radius: 4px; border: 2px solid transparent; transition: background-color .15s, color .15s; cursor: pointer; font-size: 1rem; }
.btn-court { background: var(--court); color: #fff; }
.btn-court:hover { background: var(--court-deep); color: #fff; }
.btn-line { border-color: currentColor; color: var(--court); background: transparent; }
.btn-line:hover { background: var(--court); border-color: var(--court); color: #fff; }
.on-dark .btn-line { color: #fff; }
.on-dark .btn-line:hover { background: #fff; color: var(--court-deep); border-color: #fff; }
.btn-ball { background: var(--ball); color: var(--court-deep); }
.btn-ball:hover { background: #E8F06E; color: var(--court-deep); }

/* ---------- Hero home ---------- */
.hero { position: relative; overflow: hidden; background: var(--court); color: #fff; }
.hero__court { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__court .lines { fill: none; stroke: #fff; stroke-opacity: .5; stroke-width: 10; }
.hero__court .net { stroke: #fff; stroke-opacity: .85; stroke-width: 7; stroke-dasharray: 4 14; }
.hero__ball { transform-box: fill-box; transform-origin: center; }
.hero__photo { position: absolute; inset: 0; background-size: cover; background-position: center; mix-blend-mode: multiply; opacity: .55; filter: grayscale(1) contrast(1.1); }
.hero__inner { position: relative; padding: clamp(4rem, 11vw, 8.5rem) 0 clamp(3.5rem, 9vw, 7rem); max-width: 640px; }
.hero__title { font-size: clamp(3.2rem, 10vw, 6.8rem); line-height: .92; margin: 0 0 1.25rem; text-transform: uppercase; letter-spacing: -.005em; }
.hero__text { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 34em; color: rgba(255,255,255,.9); margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero__ball { animation: ball-drop 1.1s cubic-bezier(.3,0,.4,1) .2s both; }
  @keyframes ball-drop {
    0%   { transform: translate(-260px, -340px) scale(1.6); opacity: 0; }
    55%  { transform: translate(0, 0) scale(1); opacity: 1; }
    72%  { transform: translate(40px, -60px) scale(1.08); }
    100% { transform: translate(0, 0) scale(1); }
  }
}

/* ---------- Sezioni home ---------- */
.band { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.band--deep { background: var(--court-deep); color: #fff; }
.band--white { background: #fff; }
.band__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.band__title { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin: 0; }
.band__link { font-weight: 600; text-decoration: none; }
.band--deep .band__link { color: var(--ball); }

.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about--solo { grid-template-columns: minmax(0, 720px); }
.about__text p { font-size: 1.15rem; color: #2B3747; max-width: 38em; }
.about__img { aspect-ratio: 4/3; width: 100%; object-fit: cover; border-radius: 3px; box-shadow: 14px 14px 0 var(--court); }
@media (max-width: 767.98px) { .about { grid-template-columns: 1fr; } .about__img { box-shadow: 8px 8px 0 var(--court); } }

/* Attività come righe divise da linee del campo */
.lines-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid rgba(255,255,255,.7); }
.lines-list__item { display: grid; grid-template-columns: 3rem minmax(10rem, 1fr) 2fr minmax(9rem, .8fr); gap: 1.25rem; align-items: baseline; padding: 1.4rem 0; border-bottom: 2px solid rgba(255,255,255,.7); }
.lines-list__icon { font-size: 1.6rem; color: var(--ball); line-height: 1; }
.lines-list__title { font-family: var(--f-display); font-size: 1.75rem; font-weight: 600; margin: 0; }
.lines-list__desc { margin: 0; color: rgba(255,255,255,.85); }
.lines-list__meta { margin: 0; font-size: .95rem; color: rgba(255,255,255,.65); }
.lines-list--light { border-top-color: var(--court); }
.lines-list--light .lines-list__item { border-bottom-color: var(--court); }
.lines-list--light .lines-list__icon { color: var(--court); }
.lines-list--light .lines-list__desc { color: #2B3747; }
.lines-list--light .lines-list__meta { color: var(--muted); }
.lines-list__img { grid-column: 2 / -1; max-width: 420px; border-radius: 3px; margin-top: .5rem; }
@media (max-width: 767.98px) {
  .lines-list__item { grid-template-columns: 2.25rem 1fr; gap: .35rem 1rem; }
  .lines-list__desc, .lines-list__meta { grid-column: 2; }
}

/* Notizie */
.news-feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 860px) { .news-feature { grid-template-columns: 1fr; } }
.news-lead { text-decoration: none; color: inherit; display: block; }
.news-lead__img, .news-card__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; background: url('../img/court.svg') center/cover var(--court); display: block; }
.news-lead__title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin: 1rem 0 .5rem; }
.news-lead:hover .news-lead__title, .news-card:hover .news-card__title, .news-row:hover .news-row__title { text-decoration: underline; text-decoration-thickness: 2px; }
.news-date { font-size: .9rem; color: var(--muted); }
.news-rows { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--court); }
.news-row { display: block; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.news-row__title { font-family: var(--f-display); font-weight: 600; font-size: 1.45rem; line-height: 1.15; display: block; margin-top: .15rem; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 2.5rem 2rem; }
.news-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.news-card__title { font-size: 1.6rem; margin: .9rem 0 .4rem; }
.news-card__excerpt { color: #3A4656; margin: 0; }
.badge-featured { display: inline-block; background: var(--ball); color: var(--court-deep); font-weight: 600; font-size: .8rem; padding: .1rem .55rem; border-radius: 3px; margin-left: .4rem; }

/* Fascia soci */
.member-band { background: var(--court); color: #fff; position: relative; overflow: hidden; }
.member-band::after { content: ''; position: absolute; right: -90px; top: 50%; width: 260px; height: 260px; margin-top: -130px; border-radius: 50%; background: var(--ball); opacity: .95; }
.member-band__inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; padding: clamp(2.5rem, 6vw, 3.75rem) 0; padding-right: 160px; }
.member-band h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 .35rem; }
.member-band p { margin: 0; color: rgba(255,255,255,.88); max-width: 36em; }
@media (max-width: 767.98px) { .member-band::after { width: 160px; height: 160px; right: -70px; top: auto; bottom: -70px; } .member-band__inner { padding-right: 0; } }

/* ---------- Testata pagine interne ---------- */
.page-hero { background: var(--court); color: #fff; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 22px; border-bottom: 2px solid rgba(255,255,255,.55); }
.page-hero__inner { position: relative; padding: clamp(2.75rem, 6vw, 4.25rem) 0 calc(clamp(2.5rem, 5vw, 3.5rem) + 22px); }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin: 0; text-transform: uppercase; }
.page-hero p { margin: .6rem 0 0; font-size: 1.15rem; color: rgba(255,255,255,.88); max-width: 40em; }
.page-hero__crumb { color: rgba(255,255,255,.75); text-decoration: none; font-size: .95rem; display: inline-block; margin-bottom: .6rem; }
.page-hero__crumb:hover { color: #fff; }

/* Testo lungo (pagine e notizie) */
.prose { max-width: 70ch; font-size: 1.125rem; line-height: 1.7; color: #233041; }
.prose h2 { font-size: 2rem; margin: 2.2rem 0 .7rem; color: var(--ink); }
.prose h3 { font-size: 1.55rem; margin: 1.8rem 0 .6rem; color: var(--ink); }
.prose img { max-width: 100%; height: auto; border-radius: 3px; margin: .5rem 0; }
.prose blockquote { border-left: 4px solid var(--court); margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; font-size: 1.25rem; color: var(--ink); }
.prose iframe { max-width: 100%; aspect-ratio: 16/9; height: auto; width: 100%; border: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; }
.page-figure { width: 100%; max-height: 520px; object-fit: cover; border-radius: 3px; margin-bottom: 2.5rem; }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border-top: 2px solid var(--court); }
.contact-item { padding: 1.4rem 1.25rem 1.4rem 0; border-bottom: 1px solid var(--rule); }
.contact-item i { color: var(--court); font-size: 1.35rem; }
.contact-item h2 { font-size: 1.3rem; margin: .5rem 0 .25rem; }
.contact-item p { margin: 0; color: #2B3747; }
.contact-map { width: 100%; aspect-ratio: 16/7; border: 0; border-radius: 3px; margin-top: 2.5rem; }

/* Paginazione */
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 2.6rem; text-align: center; padding: .45rem .7rem; border: 2px solid var(--court); border-radius: 4px; text-decoration: none; font-weight: 600; }
.pager span { background: var(--court); color: #fff; }

.empty-state { padding: 3rem 0; color: var(--muted); }

/* ---------- Area soci ---------- */
.member-hello { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0; }
.member-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .member-grid { grid-template-columns: 1fr; } }
.member-links { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--court); }
.member-links a { display: grid; grid-template-columns: 2.25rem 1fr auto; align-items: center; gap: .75rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.member-links a:hover { color: var(--court); }
.member-links i.lead { font-size: 1.4rem; color: var(--court); }
.member-links strong { font-family: var(--f-display); font-size: 1.45rem; font-weight: 600; display: block; line-height: 1.1; }
.member-links small { color: var(--muted); font-size: .95rem; }
.panel { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2rem); }
.panel h2 { font-size: 1.7rem; margin: 0 0 1rem; }

/* Pagine di accesso (login, registrazione...) */
.auth-page { padding: clamp(2.5rem, 7vw, 5rem) 0; }
.auth-card { max-width: 460px; margin: 0 auto; background: #fff; border: 1px solid var(--rule); border-top: 6px solid var(--court); border-radius: 6px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.auth-card h1 { font-size: 2.4rem; margin: 0 0 .25rem; }
.auth-card .lead-text { color: var(--muted); margin-bottom: 1.5rem; }
.auth-card .form-control-custom { font-size: 1rem; }
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: .98rem; }

/* Stili booking/esistenti: armonizzo font */
.page-header h1 { font-family: var(--f-display); font-size: 2.4rem; }
.btn-primary-custom { font-family: var(--f-body); }

/* ---------- Footer ---------- */
.site-footer { background: var(--court-deep); color: rgba(255,255,255,.82); padding: 3.5rem 0 1.5rem; margin-top: 0; font-size: .98rem; }
.site-footer a { color: #fff; }
.site-footer__name { font-family: var(--f-display); font-weight: 700; font-size: 2rem; color: #fff; text-transform: uppercase; line-height: 1; }
.site-footer__tag { margin: .4rem 0 1rem; }
.site-footer__legal { font-size: .88rem; color: rgba(255,255,255,.6); }
.site-footer__h { font-family: var(--f-display); font-size: 1.25rem; color: #fff; margin: 0 0 .75rem; }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { margin-bottom: .45rem; }
.site-footer__list i { color: var(--ball); margin-right: .35rem; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .88rem; color: rgba(255,255,255,.55); }

/* Verifica tessera */
.verify-box { max-width: 480px; margin: 0 auto; text-align: center; }
.verify-state { font-family: var(--f-display); font-size: 3rem; font-weight: 700; margin: .5rem 0; line-height: 1; }
.verify-state.ok { color: #1E6B4A; } .verify-state.ko { color: var(--clay); }

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
}
.prose li[data-list="bullet"] { list-style-type: disc; }
