/*
Theme Name: Sesto Rugby Old
Description: Tema per Sesto Rugby Old - Banda Birbona.
Version: 1.0.0
Text Domain: sro
*/

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #14161b;
  --muted: #565c69;
  --line: #d8dbe1;
  --accent: #2f519f;
  --accent-hover: #26437f;
  --accent-text: #2f519f;
  --accent-soft: #eef2f9;
  --ink: #101828;
  --radius: 4px;
  --font: "Archivo", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.display { font-weight: 850; font-stretch: 115%; text-transform: uppercase; line-height: 0.92; letter-spacing: -0.01em; }
h2 { font-weight: 850; font-stretch: 112%; text-transform: uppercase; line-height: 0.95; font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-bottom: 1.25rem; }
h3 { font-weight: 800; font-stretch: 105%; text-transform: uppercase; font-size: 1.35rem; line-height: 1.1; }
section { padding: 104px 0; }
.muted { color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 10px; font: 700 0.95rem/1 var(--font); font-stretch: 105%; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; text-decoration: none; padding: 16px 24px; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; transition: background .2s, border-color .2s, transform .1s; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-light { background: #fff; color: #14161b; }
.btn-light:hover { background: #e9ecf2; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 50px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: #fff; padding: 12px 18px; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 1.75rem; cursor: pointer; }

/* Hero full-bleed */
.hero { padding: 56px 0 0; }
.hero-photo { margin-top: 48px; aspect-ratio: 21 / 9; border-radius: var(--radius); overflow: hidden; background: var(--accent-soft); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; }
.hero h1 { font-size: clamp(3rem, 7.2vw, 6.4rem); margin-bottom: 1.25rem; max-width: 12ch; }
.hero p { font-size: 1.2rem; max-width: 46ch; color: var(--muted); margin-bottom: 2rem; }
.hero-logo { width: 230px; }

/* Manifesto */
.manifesto { padding: 120px 0 96px; }
.manifesto blockquote { font-size: clamp(2.2rem, 5.2vw, 4.4rem); max-width: 20ch; }
.manifesto mark { background: none; color: var(--accent-text); }

/* Chi siamo: editoriale */
.about { padding-top: 0; }
.about-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 72px; align-items: center; border-top: 2px solid var(--text); padding-top: 64px; }
.about-cols { columns: 2; column-gap: 40px; color: var(--muted); }
.about-cols p { margin-bottom: 1rem; break-inside: avoid; }
.about-cols p:first-child::first-letter { float: left; font-weight: 900; font-stretch: 115%; font-size: 4.2rem; line-height: .8; padding: 6px 10px 0 0; color: var(--accent-text); }
.about-cols strong { color: var(--text); }
.about-photo { aspect-ratio: 4 / 5; background: var(--accent-soft); overflow: hidden; border-radius: var(--radius); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Segni particolari: lista a due colonne */
.traits { background: #f5f6f8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.traits-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; }
.traits-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
.traits-list .trait { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; padding: 28px 0; border-top: 1px solid var(--line); }
.traits-list .trait i { font-size: 2.2rem; color: var(--accent-text); }
.traits-list .trait p { font-size: 1.3rem; font-weight: 600; line-height: 1.35; }
.traits-list .trait.wide { grid-column: span 2; grid-template-columns: 56px 1fr; background: var(--accent); color: #fff; border: 0; padding: 32px; border-radius: var(--radius); margin-top: 8px; }
.traits-list .trait.wide i { color: #fff; }
.traits-list .trait.wide p { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 850; font-stretch: 112%; text-transform: uppercase; line-height: 1; }

/* Valori */
.values-grid { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 0 64px; }
.value { padding: 32px 0; border-top: 2px solid var(--text); }
.value:first-child { grid-row: span 2; }
.value .word { font-size: clamp(2.4rem, 5vw, 4.2rem); color: var(--accent-text); margin-bottom: 1rem; }
.value:not(:first-child) .word { font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--text); }
.value p { color: var(--muted); max-width: 44ch; }

/* Galleria a mosaico */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 250px 250px; gap: 16px; margin-top: 40px; }
.gallery figure { border-radius: var(--radius); overflow: hidden; background: var(--accent-soft); }
.gallery figure:nth-child(1) { grid-row: span 2; }
.gallery figure:nth-child(2) { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.gallery figure:hover img { transform: scale(1.03); }

/* Contatti */
.contact { background: #f5f6f8; border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; }
.contact-grid .lead { font-size: 1.2rem; color: var(--muted); margin-bottom: 2rem; max-width: 46ch; }
.contact-list { list-style: none; border-top: 1px solid var(--line); margin-bottom: 2rem; }
.contact-list a { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.contact-list a:hover span { color: var(--accent-text); }
.contact-list i { font-size: 1.5rem; color: var(--accent-text); }
.note { font-style: italic; color: var(--muted); }
.right { display: grid; gap: 24px; }
.map { aspect-ratio: 16 / 8; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--accent-soft); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: span 2; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field textarea { font: inherit; color: var(--text); background: #fff; border: 1px solid #a7acb7; border-radius: var(--radius); padding: 12px 14px; width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent-text) 35%, transparent); border-color: var(--accent-text); }
.field .error { color: #c8201c; font-size: .9rem; display: none; }
.field.invalid .error { display: block; }
.field.invalid input, .field.invalid textarea { border-color: #c8201c; }
.form-foot { grid-column: span 2; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { display: none; font-weight: 500; }
.form-status.show { display: block; }

/* Footer */
footer { background: #fff; color: var(--text); padding: 72px 0 32px; border-top: 2px solid var(--text); }
.foot-top { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.foot-top .display { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 14ch; }
.foot-top img { width: 190px; }
.foot-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .95rem; }
.foot-bottom a { color: var(--muted); text-decoration: none; }
.foot-bottom a:hover { color: var(--accent-text); }
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 24px; }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
  .about-grid, .contact-grid, .values-grid { grid-template-columns: 1fr; gap: 40px; }
  .value:first-child { grid-row: auto; }
  .traits-list { grid-template-columns: 1fr; }
  .traits-list .trait.wide { grid-column: span 1; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 280px 200px 200px; }
  .gallery figure:nth-child(1) { grid-row: auto; grid-column: span 2; }
  .gallery figure:nth-child(2) { grid-column: span 2; }
  .foot-top { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  section { padding: 72px 0; }
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 16px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 0; }
  .nav-links .btn { display: inline-flex; margin-top: 8px; }
  .hero { padding-top: 40px; }
  .hero-photo { aspect-ratio: 4 / 3; margin-top: 32px; }
  .about-cols { columns: 1; }
  .traits-head { flex-direction: column; align-items: flex-start; }
  .gallery { grid-template-rows: 220px 180px 180px; }
  .form { grid-template-columns: 1fr; }
  .field.full, .form-foot { grid-column: span 1; }
  .traits-list .trait.wide { padding: 24px; }
}

/* Compatibilità WordPress */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Blocchi Gutenberg: reset dei margini/stili di default */
.wp-block-image, .wp-block-quote, blockquote.wp-block-quote { margin: 0; padding: 0; border: 0; }
/* WordPress avvolge il contenuto dei gruppi in un contenitore interno: lo rendiamo trasparente al layout. */
.wp-block-group__inner-container { display: contents; }
.hero-photo figure, .about-photo figure { height: 100%; }
.traits-title { margin: 0; }
#galleria { padding-top: 0; }

/* Contact Form 7: stessa resa del form originale */
.wpcf7 { width: 100%; }
.wpcf7-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.wpcf7-form > * { grid-column: 1 / -1; }
.wpcf7-form > p:nth-of-type(-n+2) { grid-column: auto; }
.wpcf7-form .hidden-fields-container, .wpcf7-form br, .wpcf7-form > p:empty, .wpcf7-spinner { display: none; }
.wpcf7-form label { display: grid; gap: 8px; font-weight: 700; font-size: .9rem; }
.wpcf7-form-control-wrap { display: block; }
.wpcf7-form input.wpcf7-text, .wpcf7-form input.wpcf7-email, .wpcf7-form textarea.wpcf7-textarea { font: inherit; font-weight: 400; color: var(--text); background: #fff; border: 1px solid #a7acb7; border-radius: var(--radius); padding: 12px 14px; width: 100%; max-width: none; }
.wpcf7-form textarea.wpcf7-textarea { height: 140px; min-height: 120px; resize: vertical; }
.wpcf7-form input.wpcf7-text:focus, .wpcf7-form input.wpcf7-email:focus, .wpcf7-form textarea.wpcf7-textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent-text) 35%, transparent); border-color: var(--accent-text); }
.wpcf7-form input.wpcf7-not-valid, .wpcf7-form textarea.wpcf7-not-valid { border-color: #c8201c; }
.wpcf7-not-valid-tip { display: block; margin-top: 6px; color: #c8201c; font-size: .9rem; font-weight: 400; }
.wpcf7-form .wpcf7-submit { justify-self: start; appearance: none; font: 700 0.95rem/1 var(--font); font-stretch: 105%; text-transform: uppercase; letter-spacing: 0.02em; padding: 16px 24px; border-radius: var(--radius); border: 2px solid transparent; background: var(--accent); color: #fff; cursor: pointer; transition: background .2s, transform .1s; }
.wpcf7-form .wpcf7-submit:hover { background: var(--accent-hover); }
.wpcf7-form .wpcf7-submit:active { transform: translateY(1px) scale(0.98); }
.wpcf7-form.submitting .wpcf7-submit { opacity: .6; pointer-events: none; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--accent); font-weight: 500; }
.wpcf7 form.sent .wpcf7-response-output { border-color: #1f7a3d; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output, .wpcf7 form.aborted .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output { border-color: #c8201c; }
@media (max-width: 768px) {
  .wpcf7-form { grid-template-columns: 1fr; }
  .wpcf7-form > p:nth-of-type(-n+2) { grid-column: 1 / -1; }
}
.wp-block-group.wrap { margin-left: auto; margin-right: auto; }

/* Pagine interne (Privacy, Cookie, ecc.): stesso contenitore e stessa tipografia della home */
.page-article { padding: 72px 0 104px; }
.page-head { border-bottom: 2px solid var(--text); padding-bottom: 28px; margin-bottom: 48px; }
.page-title { font-size: clamp(2.6rem, 6.4vw, 5.2rem); max-width: 16ch; }
.page-photo { margin: 0 0 48px; border-radius: var(--radius); overflow: hidden; }
.page-content { max-width: 820px; color: var(--text); }
.page-content > * + * { margin-top: 1rem; }
.page-content p, .page-content li { color: var(--muted); }
.page-content strong { color: var(--text); }
.page-content h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 3rem 0 1rem; line-height: 1.05; }
.page-content h3 { font-size: 1.15rem; margin: 2rem 0 .6rem; color: var(--text); }
.page-content p { margin: 0 0 1rem; }
.page-content ul, .page-content ol { margin: 0 0 1.2rem; padding-left: 1.4em; }
.page-content li { margin-bottom: .4rem; }
.page-content a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.page-content a:hover { color: var(--accent-hover); }
.page-content table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.8rem; font-size: .95rem; }
.page-content th, .page-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; color: var(--text); }
.page-content th { background: #f5f6f8; font-weight: 700; }
.page-content td { color: var(--muted); }
.page-content code { background: var(--accent-soft); color: var(--text); padding: 1px 6px; border-radius: var(--radius); font-size: .9em; }
.page-content .policy-agg { font-size: .95rem; border-left: 4px solid var(--accent); padding-left: 14px; }
@media (max-width: 768px) {
  .page-article { padding: 48px 0 72px; }
  .page-head { margin-bottom: 32px; padding-bottom: 20px; }
  .page-content table { font-size: .85rem; display: block; overflow-x: auto; }
  .page-content th, .page-content td { padding: 8px; }
}
