@import url("https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@500;600;700&family=Libre+Franklin:ital,wght@0,400;0,600;0,700;1,400&display=swap");

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 1.25rem 3rem;
  background: #fbf9f5;
  color: #23201e;
  font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: "Zilla Slab", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin: 0 0 0.85em;
}

a {
  color: #7a1220;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #23201e;
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid #b08422;
  outline-offset: 2px;
}

strong, b {
  font-weight: 700;
}

::selection {
  background: #f0e4c8;
}

/* The old markup centres everything with align attributes and justifies
   some paragraphs; text reads better ranged left. */
[align="center"],
[align="justify"],
[align="left"] {
  text-align: left;
}

/* ---------- Dead assets ---------- */

/* Every image on the page lives under Images/ or files/Images/ and those
   URLs now 404, so none of them can render. If the image folder is ever
   restored, delete this rule first. */
img {
  display: none;
}

/* Side, top-corner and bottom chrome of the old rounded boxes. The title
   cell shares the same background image, so it is excluded here. */
td[background*="hp_box"]:not([align="left"]),
table[background*="files/Images"] {
  display: none;
}

/* The weather.com module and the Facebook Connect box are both dead
   services, so their panels are hidden rather than left empty. */
table:has(> tbody > tr > td > div[id^="wx_module"]),
div[style*="padding-left"] {
  display: none;
}

/* ---------- Page frame ---------- */

body > div[align="center"] {
  display: flex;
  flex-direction: column;
  max-width: 62rem;
  margin: 0 auto;
}

body > div[align="center"] > br,
body > div[align="center"] > script {
  display: none;
}

/* Wordmark, in place of the Flash header bar (Bici_Top.swf) */
body > div[align="center"]::before {
  content: "Bike sharing Roma";
  order: -2;
  padding: 2.5rem 0 0.75rem;
  border-bottom: 3px solid #7a1220;
  color: #7a1220;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: clamp(1.875rem, 5.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Cycle-lane markings */
body > div[align="center"]::after {
  content: "";
  order: 99;
  height: 6px;
  margin-top: 2.5rem;
  background: repeating-linear-gradient(90deg,
    #7a1220 0, #7a1220 26px,
    transparent 26px, transparent 38px,
    #b08422 38px, #b08422 64px,
    transparent 64px, transparent 76px);
}

/* ---------- Navigation (the footer link row, moved to the top) ---------- */

table[width="772"][height="46"] {
  order: -1;
  margin-bottom: 2rem;
  border-bottom: 1px solid #ded7cc;
}

.GrayLine {
  padding: 0.65rem 0;
}

a.Footer {
  display: inline-block;
  padding: 0.25rem 0.15rem;
  color: #7a1220;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

a.Footer:hover {
  color: #23201e;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ---------- Layout tables become blocks ---------- */

table, tbody, tr, td {
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border-spacing: 0;
  vertical-align: baseline;
  text-align: left;
}

/* The main two-column split: sidebar on the left, content on the right */
table[width="772"]:not([height]) > tbody > tr {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: start;
}

table[width="772"]:not([height]) > tbody > tr > td:first-child {
  flex: 1 1 16rem;
}

table[width="772"]:not([height]) > tbody > tr > td:last-child {
  flex: 2.4 1 22rem;
}

/* ---------- Panels ---------- */

table:has(> tbody > tr > td[bgcolor="#FFFFFF"]) {
  margin-bottom: 1.5rem;
  border: 1px solid #ded7cc;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

/* Panel heading. The old GIF titles are gone, so the text is restored here. */
td[background*="hp_boxTopBk"][align="left"] {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid #ded7cc;
  border-left: 4px solid #b08422;
  background: #f6f2ea;
  color: #7a1220;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

table:has(> tbody > tr > td > form#fLogin) > tbody > tr > td[background*="hp_boxTopBk"][align="left"]::after {
  content: "Login utente";
}

.TitComune::after {
  content: "Notizie dal servizio";
}

/* Panel body */
td[bgcolor="#FFFFFF"] {
  padding: 1.1rem;
}

.Txt {
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- Login form ---------- */

#fLogin {
  margin: 0;
}

/* The old layout used empty cells for spacing */
#fLogin td:not([align]) {
  display: none;
}

#fLogin td[align="left"] {
  margin-bottom: 0.15rem;
  color: #23201e;
  font-size: 0.9375rem;
  font-weight: 600;
}

#fLogin td[align="left"]:has(input) {
  margin-bottom: 0.85rem;
}

input.FormLogin {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid #ded7cc;
  border-bottom-color: #8d867d;
  border-radius: 3px;
  background: #fdfcfa;
  color: #23201e;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

input.FormLogin:focus {
  border-color: #7a1220;
  background: #ffffff;
  outline: 2px solid #b08422;
  outline-offset: 1px;
}

/* The submit control was an image inside a link, so its label is restored */
#fLogin td[align="right"] {
  margin-top: 0.35rem;
}

#fLogin a[href^="javascript"] {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 3px;
  background: #7a1220;
  color: #ffffff;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

#fLogin a[href^="javascript"]::after {
  content: "Entra";
}

#fLogin a[href^="javascript"]:hover {
  background: #5e0d18;
  color: #ffffff;
}

#rdu {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #ded7cc;
  font-size: 0.9375rem;
}

#rdu a {
  color: #5d5854;
}

#rdu a:hover {
  color: #7a1220;
}

/* ---------- News list ---------- */

.Txt table:not(:has(td[bgcolor="#FFFFFF"])) > tbody > tr {
  padding: 0;
}

/* The old separator images become rules between items */
.Txt td[colspan="3"] {
  margin: 1.25rem 0;
  border-top: 1px solid #ded7cc;
}

.Txt td[valign="top"][align="left"] > div,
.Txt td[valign="top"][align="left"] > p {
  margin: 0 0 0.6rem;
}

.Txt td[valign="top"][align="left"] > div:last-child,
.Txt td[valign="top"][align="left"] > p:last-child {
  margin-bottom: 0;
}

/* Item headline */
.Txt div:has(> strong),
.Txt td[align="left"][valign="top"] > b {
  display: block;
  margin-bottom: 0.5rem;
  color: #7a1220;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
}

.Txt div:has(> strong) strong,
.Txt td[align="left"][valign="top"] > b {
  font-weight: inherit;
}

/* Empty paragraphs and divs the editor left behind */
.Txt div:empty,
.Txt p:empty,
.Txt p:has(> br:only-child) {
  display: none;
}

.Txt br + br {
  display: none;
}

/* ---------- Small screens ---------- */

@media (max-width: 40rem) {
  body {
    padding-inline: 1rem;
  }

  .GrayLine {
    line-height: 2;
  }
}

/* =====================================================================
   New pages (progetto.html, contatti.html)
   ---------------------------------------------------------------------
   The rules above are shims for the old table markup. The rules below
   are for clean, hand-written markup and are what any new page should
   use. Nothing here depends on tables.
   ===================================================================== */

.page {
  max-width: 62rem;
  margin: 0 auto;
}

/* ---------- Site header and navigation ---------- */

.site-header {
  padding-top: 2.5rem;
  border-bottom: 3px solid #7a1220;
}

.site-header .wordmark {
  display: inline-block;
  padding-bottom: 0.75rem;
  color: #7a1220;
  font-size: clamp(1.875rem, 5.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header .tagline {
  margin: 0 0 0.85rem;
  color: #5d5854;
  font-size: 1rem;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
  margin: 0;
  padding: 0.65rem 0;
  border-bottom: 1px solid #ded7cc;
  list-style: none;
}

.nav-main a {
  display: block;
  padding: 0.25rem 0;
  color: #7a1220;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-main a:hover {
  color: #23201e;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.nav-main [aria-current="page"] {
  color: #23201e;
  text-decoration: underline;
  text-decoration-color: #b08422;
  text-decoration-thickness: 3px;
}

/* ---------- Page body ---------- */

.page-main {
  padding: 2.25rem 0 1rem;
}

.page-title {
  margin-bottom: 0.5rem;
  color: #7a1220;
  font-size: clamp(1.875rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.08;
}

.lead {
  max-width: 42rem;
  margin-bottom: 2rem;
  font-size: 1.1875rem;
  line-height: 1.55;
}

.prose {
  max-width: 42rem;
}

/* direct children only, so a .panel-title nested in .prose keeps its own look */
.prose > h2 {
  margin: 2.25rem 0 0.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid #ded7cc;
  font-size: 1.5rem;
}

.prose > h3 {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.1875rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose li::marker {
  color: #b08422;
}

.steps {
  margin: 0 0 1em;
  padding-left: 1.6rem;
  counter-reset: step;
  list-style: none;
}

.steps li {
  position: relative;
  margin-bottom: 0.7rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -1.6rem;
  top: 0.28em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #7a1220;
  color: #ffffff;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.15rem;
  text-align: center;
}

/* ---------- Panels on new pages ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.panel {
  border: 1px solid #ded7cc;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.panel + .panel {
  margin-top: 1.5rem;
}

.panel-title {
  margin: 0;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid #ded7cc;
  border-left: 4px solid #b08422;
  background: #f6f2ea;
  color: #7a1220;
  font-size: 1.0625rem;
  font-weight: 600;
}

.panel-body {
  padding: 1.1rem;
  font-size: 1rem;
}

.panel-body > :last-child {
  margin-bottom: 0;
}

.panel-body dl {
  margin: 0;
}

.panel-body dt {
  margin-top: 0.85rem;
  color: #5d5854;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel-body dt:first-child {
  margin-top: 0;
}

.panel-body dd {
  margin: 0.1rem 0 0;
}

/* Anything still to be filled in by the club/operator */
.todo {
  padding: 0.05em 0.35em;
  border-bottom: 2px dotted #b08422;
  background: #fdf6e3;
  font-style: italic;
}

/* ---------- Contact form ---------- */

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #ded7cc;
  border-bottom-color: #8d867d;
  border-radius: 3px;
  background: #fdfcfa;
  color: #23201e;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #7a1220;
  background: #ffffff;
  outline: 2px solid #b08422;
  outline-offset: 1px;
}

.form-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.form-consent input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.2rem 0 0;
  accent-color: #7a1220;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border: 0;
  border-radius: 3px;
  background: #7a1220;
  color: #ffffff;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: #5e0d18;
  color: #ffffff;
}

/* ---------- Site footer ---------- */

.site-footer {
  margin-top: 2.5rem;
  border-top: 6px solid transparent;
  border-image: repeating-linear-gradient(90deg,
    #7a1220 0, #7a1220 26px,
    transparent 26px, transparent 38px,
    #b08422 38px, #b08422 64px,
    transparent 64px, transparent 76px) 6;
  padding-top: 1.25rem;
  color: #5d5854;
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0 0 0.3rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: #5d5854;
}

.site-footer a:hover {
  color: #7a1220;
}

/* ---------- Wider screens ---------- */

@media (min-width: 52rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 2.5rem;
  }
}