/* Tennis Club Torremaggiore - template statico (base: screenshot di riferimento) */
:root {
  --navy: #0d2350;
  --navy-2: #1a3570;
  --orange: #c2410c;
  --orange-2: #9a3412;
  --ink: #1f2937;
  --muted: #5b6472;
  --line: #dfe3ea;
  --soft: #f3f5f9;
  --white: #fff;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --wrap: 1140px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 400 16px/1.65 var(--body); color: var(--ink); background: var(--white); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; text-transform: uppercase; color: var(--navy); line-height: 1.05; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(34px, 4vw, 48px); }
h3, .card h2 { font-size: 24px; }
.eyebrow { display: block; font: 700 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--navy); margin-bottom: 14px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--white); padding: 8px 12px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; font: 700 13px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border: 2px solid transparent; transition: background .2s, color .2s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn--orange { background: var(--orange); color: var(--white); }
.btn--orange:hover { background: var(--orange-2); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-2); }
.btn--ghost { border-color: var(--white); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--orange); }

/* top bar */
.topbar { background: var(--soft); font-size: 13px; color: var(--muted); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 40px; }
.topbar ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--orange); }
.topbar svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2; }
.topbar .fb svg { fill: currentColor; stroke: none; width: 16px; height: 16px; margin: 0; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 600 22px/1 var(--head); text-transform: uppercase; color: var(--navy); }
.brand img { width: 46px; }
.menu { display: flex; align-items: center; gap: 32px; }
.menu > a:not(.btn) { font: 700 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--navy); padding: 8px 0; border-bottom: 2px solid transparent; }
.menu > a:not(.btn):hover { border-color: var(--orange); }
.burger { display: none; }

/* hero */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; place-items: center; text-align: center; color: var(--white); overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(13,35,80,.35), rgba(13,35,80,.55)); }
.hero__in { position: relative; z-index: 1; padding: 96px 24px; }
.hero h1 { color: var(--white); font-size: clamp(48px, 8vw, 104px); }
.hero p { font-size: 18px; margin: 16px 0 32px; }

/* intro collage */
.intro { padding: 96px 0; }
.collage { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: 48px auto 48px; }
.collage__photo { grid-column: 4 / 10; grid-row: 1 / 4; }
.collage__photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1.08; object-position: 50% 30%; }
.card { padding: 36px 32px; }
.card--soft { grid-column: 1 / 5; grid-row: 2 / 4; align-self: end; background: var(--soft); position: relative; z-index: 1; margin-bottom: -48px; }
.card--orange { grid-column: 8 / 13; grid-row: 1 / 3; align-self: start; background: var(--orange); color: var(--white); position: relative; z-index: 1; margin-top: 24px; }
.card--orange h2 { color: var(--white); }
.card p { margin: 10px 0 18px; font-size: 15px; }
.card--soft p { color: var(--muted); }
.dots { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.dots li { position: relative; padding-left: 16px; margin: 6px 0; }
.dots li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.dots a { text-decoration: none; font-weight: 500; }
.dots a:hover { color: var(--orange); }

/* tiles */
.programs { padding: 48px 0 112px; }
.programs h2 { margin-bottom: 40px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { position: relative; display: block; overflow: hidden; text-decoration: none; aspect-ratio: 2 / 3; background: var(--navy); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(13,35,80,.8)); }
.tile span { position: absolute; left: 20px; right: 20px; bottom: 22px; z-index: 1; color: var(--white); font: 600 24px/1.1 var(--head); text-transform: uppercase; }
.tile small { display: block; font: 400 13px/1.4 var(--body); text-transform: none; margin-top: 4px; opacity: .85; }
.tile:hover img { transform: scale(1.04); }

/* events: rimando a Facebook */
.events { background: var(--soft); padding: 80px 0; }
.events__grid { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: end; }
.events__fb { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.events__fb p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 16px; }
.events__fb .btn { flex: none; display: inline-flex; align-items: center; gap: 10px; }
.events__fb svg { width: 18px; height: 18px; fill: currentColor; }

/* band */
.band { height: clamp(280px, 42vw, 560px); overflow: hidden; }
.band img { width: 100%; height: 100%; object-fit: cover; }

/* rules split */
.rules { position: relative; padding: 48px 0; }
.rules::before { content: ""; position: absolute; top: 0; bottom: 0; left: 36%; right: 0; background: var(--soft); }
.rules .wrap { position: relative; display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 12px; align-items: center; }
.rules__ph img { width: 100%; aspect-ratio: 3 / 5; object-fit: cover; }
.rules__txt { padding: 48px 0 48px 48px; }
.rules__txt > p { color: var(--muted); font-size: 15px; margin: 14px 0 20px; }
.checks { list-style: none; padding: 0; margin: 0 0 28px; font-size: 15px; }
.checks li { position: relative; padding-left: 26px; margin: 8px 0; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 11px; height: 6px; border-left: 2px solid var(--navy-2); border-bottom: 2px solid var(--navy-2); transform: rotate(-45deg); }

/* contacts with dotted leaders */
.contacts { padding: 112px 0; }
.contacts h2 { margin-bottom: 40px; }
.leaders { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; row-gap: 26px; }
.leader__row { display: flex; align-items: baseline; gap: 10px; }
.leader__row h3 { font-size: 19px; white-space: nowrap; }
.leader__row::after { content: ""; order: 1; flex: 1; border-bottom: 2px dotted var(--line); }
.leader__row a, .leader__row span { order: 2; font: 600 19px/1 var(--head); color: var(--orange); text-decoration: none; white-space: nowrap; }
.leader__row a:hover { color: var(--navy); }
.leader p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* about + faq */
.about { max-width: 760px; margin: -16px auto 40px; color: var(--muted); font-size: 17px; }
.faq { padding: 104px 0; }
.faq__grid { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { position: relative; cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font: 600 21px/1.2 var(--head); text-transform: uppercase; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 28px/1 var(--body); color: var(--orange-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--orange-2); }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: 64ch; }

/* gallery */
.gallery { background: #e9edf4; padding: 104px 0; }
.gallery h2 { margin-bottom: 40px; }
.grid8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid8 a { display: block; overflow: hidden; background: var(--white); }
.grid8 img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s; }
.grid8 a:hover img { transform: scale(1.04); }

/* partners strip */
.partners { padding: 40px 0; border-bottom: 1px solid var(--line); }
.partners .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.partners p { margin: 0; font: 600 20px/1.1 var(--head); text-transform: uppercase; color: var(--navy); }
.partners ul { display: flex; gap: 48px; list-style: none; margin: 0; padding: 0; font: 600 18px/1 var(--head); letter-spacing: .06em; text-transform: uppercase; color: #5b6472; }

/* footer */
.footer { background: var(--navy); color: #c9d2e3; padding: 72px 0 28px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer .brand { color: var(--white); margin-bottom: 18px; }
.footer h3 { color: var(--white); font-size: 18px; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 6px 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }
.footer__legal { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.15); margin-top: 56px; padding-top: 22px; font-size: 13px; }

.totop { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--navy); color: var(--white); text-decoration: none; z-index: 40; }
.totop:hover { background: var(--orange); }

/* tablet */
@media (max-width: 1023px) {
  .collage { grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 0; }
  .collage__photo { grid-column: 1 / 3; grid-row: 1; }
  .collage__photo img { aspect-ratio: 16 / 9; }
  .card--soft, .card--orange { grid-row: 2; margin: 0; align-self: stretch; }
  .card--soft { grid-column: 1; }
  .card--orange { grid-column: 2; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { aspect-ratio: 4 / 5; }
  .events__grid { grid-template-columns: 1fr; gap: 24px; }
  .events__fb { flex-direction: column; align-items: flex-start; gap: 20px; }
  .rules::before { display: none; }
  .rules { padding: 0; }
  .rules .wrap { padding-top: 48px; }
  .rules .wrap { grid-template-columns: 1fr 1fr; }
  .rules__txt { grid-column: 1 / 3; padding: 32px 0 72px; }
  .rules__ph img { aspect-ratio: 4 / 5; }
  .grid8 { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .leaders { grid-template-columns: 1fr; }
  .faq__grid { grid-template-columns: 1fr; gap: 24px; }
}

/* phone */
@media (max-width: 767px) {
  .topbar ul li:not(:first-child) { display: none; }
  .nav .wrap { min-height: 64px; }
  .brand { font-size: 18px; }
  .brand img { width: 38px; }
  .burger { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: none; color: var(--navy); cursor: pointer; }
  .burger svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; }
  .menu > a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav.open .menu { display: flex; }
  .menu .btn { margin-top: 16px; }
  .hero { min-height: 72vh; }
  .hero p { font-size: 16px; }
  .intro { padding: 56px 0; }
  .card--soft, .card--orange { grid-column: 1 / 3; }
  .card--orange { grid-row: 3; }
  .programs { padding: 24px 0 72px; }
  .tiles { gap: 10px; }
  .tile span { left: 14px; bottom: 14px; font-size: 20px; }
  .tile small { display: none; }
  .events, .contacts, .gallery, .faq { padding: 72px 0; }
  .about { font-size: 16px; text-align: left; }
            .grid8 { grid-template-columns: repeat(2, 1fr); }
  .leader__row h3, .leader__row a, .leader__row span { font-size: 17px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .partners ul { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* lightbox */
.zoomable { cursor: zoom-in; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(13, 35, 80, .92); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 72px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { margin-top: 14px; text-align: center; color: var(--white); font-size: 14px; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--navy); font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox__btn:hover { background: var(--orange); color: var(--white); }
.lightbox__btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
@media (max-width: 767px) {
  .lightbox figure { padding: 72px 12px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
}
