/* Racing Factory – design. Rosso / nero / bianco, font sportivo c-racesport per titoli e menu. */
@font-face {
  font-family: "RF Race";
  src: url("fonts/c-racesport.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --rf-red: #e60000;
  --rf-red-dark: #b80000;
  --rf-ink: #0b0b0c;
  --rf-ink-2: #1a1a1d;
  --rf-line: #2c2c31;
  --rf-paper: #ffffff;
  --rf-mist: #f3f3f4;
  --rf-text: #1b1b1e;
  --rf-text-soft: #55555c;
  --rf-display: "RF Race", "Arial Narrow", sans-serif;
  --rf-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rf-ease: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-padding-top: 5rem; }
body { font-family: var(--rf-body); color: var(--rf-text); background: var(--rf-paper); text-rendering: optimizeLegibility; }
::selection { background: var(--rf-red); color: #fff; }
:focus-visible { outline: 3px solid var(--rf-red); outline-offset: 3px; }
a { text-underline-offset: .18em; }
* { scrollbar-color: var(--rf-red) var(--rf-ink); }
input, select, textarea, progress { accent-color: var(--rf-red); }

/* ---------- Titoli ---------- */
h1, h2, h3, .entry-title, .rf-display {
  font-family: var(--rf-display);
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
  line-height: 1.08;
}
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-top: 2.6em; }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.entry-content > h1:first-child, .entry-content > h2:first-child { margin-top: 0; }
.entry-content p, .entry-content li { max-width: 70ch; }
.entry-content .alignfull p, .entry-content .alignfull li, .entry-content table p { max-width: none; }

/* ---------- Header ---------- */
#masthead, #masthead .site-header-row-container-inner,
.site-header-upper-wrap, .site-main-header-wrap .site-header-row-container-inner {
  background: var(--rf-ink) !important;
}
#masthead { border-bottom: 3px solid var(--rf-red); position: sticky; top: 0; z-index: 50; }
.admin-bar #masthead { top: 32px; }
#masthead .site-branding a.brand img, #masthead .custom-logo { width: clamp(190px, 22vw, 290px); height: auto; max-height: none; }
#masthead .site-header-main-section-left { flex: 0 0 auto; }
#masthead .site-header-main-section-right { flex: 1 1 auto; justify-content: flex-end; }
.main-navigation .primary-menu-container > ul { flex-wrap: nowrap; }
#masthead .site-main-header-inner-wrap { min-height: 72px; }
.main-navigation .primary-menu-container > ul > li.menu-item > a {
  font-family: var(--rf-display);
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  padding: .5em .7em;
  white-space: nowrap;
  transition: color .2s var(--rf-ease);
}
.main-navigation .primary-menu-container > ul > li.menu-item > a:hover,
.main-navigation .primary-menu-container > ul > li.current-menu-item > a,
.main-navigation .primary-menu-container > ul > li.current-menu-ancestor > a { color: var(--rf-red); }
.main-navigation .primary-menu-container ul ul.sub-menu { background: var(--rf-ink-2); border-top: 2px solid var(--rf-red); box-shadow: 0 14px 32px rgba(0,0,0,.45); }
.main-navigation .primary-menu-container ul ul li a { color: #fff; font-family: var(--rf-display); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.main-navigation .primary-menu-container ul ul li a:hover { color: var(--rf-red); background: transparent; }
/* voce di menu attiva: Kadence la colora di nero, qui la rendiamo rossa */
#masthead .header-navigation .header-menu-container > ul > li > a { color: #fff !important; }
#masthead .header-navigation .header-menu-container > ul > li > a:hover,
#masthead .header-navigation .header-menu-container > ul > li.current-menu-item > a,
#masthead .header-navigation .header-menu-container > ul > li.current-menu-ancestor > a,
#masthead .header-navigation .header-menu-container > ul > li.current-menu-parent > a { color: var(--rf-red) !important; }
#masthead .header-navigation .header-menu-container > ul > li.rf-call > a { color: #fff !important; }
#masthead .header-navigation .header-menu-container > ul > li.rf-call > a:hover { color: var(--rf-ink) !important; }
.woocommerce-product-gallery { transition: none !important; }

/* pulsante "Prenota" nel menu: voce con classe rf-call */
.main-navigation li.rf-call > a {
  background: var(--rf-red);
  color: #fff !important;
  border-radius: 3px;
  margin-left: .8em;
  padding: .55em 1.1em !important;
  white-space: nowrap;
  transition: background .2s var(--rf-ease), transform .2s var(--rf-ease);
}
.main-navigation li.rf-call > a:hover { background: #fff; color: var(--rf-ink) !important; }
/* mobile */
.mobile-toggle-open-container .menu-toggle-open, .mobile-toggle-open-container .menu-toggle-open .menu-toggle-icon { color: #fff; }
#mobile-drawer .drawer-inner, #mobile-drawer .drawer-header { background: var(--rf-ink); }
#mobile-drawer .mobile-navigation a { color: #fff; font-family: var(--rf-display); text-transform: uppercase; letter-spacing: .05em; font-size: 1.1rem; padding: .9em 0; }
#mobile-drawer .mobile-navigation a:hover { color: var(--rf-red); }
#mobile-drawer li.rf-call > .drawer-nav-drop-wrap > a, #mobile-drawer li.rf-call > a { background: var(--rf-red); border-radius: 3px; padding-inline: 1em; margin-top: .6em; text-align: center; }
#mobile-drawer .drawer-toggle, #mobile-drawer .menu-toggle-close { color: #fff; }

/* ---------- Titolo pagina (hero Kadence) ---------- */
.entry-hero-container-inner { background: var(--rf-ink) !important; border-bottom: 3px solid var(--rf-red); }
.entry-hero-container-inner .hero-container, .entry-hero-container-inner .entry-header { min-height: 0 !important; padding-block: 2.2rem; }
.entry-hero-container-inner h1, .entry-hero-container-inner .archive-title, .entry-hero-container-inner .entry-title, .entry-hero-container-inner .entry-meta, .entry-hero-container-inner .entry-meta a, .entry-hero-container-inner .kadence-breadcrumbs, .entry-hero-container-inner .kadence-breadcrumbs a { color: #fff; }
.entry-hero-container-inner .hero-section-overlay { background: transparent; }
/* le pagine create a mano hanno già il loro H1 nel contenuto */
body.page:not(.woocommerce-page):not(.home) .entry-hero-container-inner { display: none; }
body.home .entry-hero-container-inner { display: none; }
body.page:not(.woocommerce-page) .entry-content > h1:first-child {
  background: var(--rf-ink); color: #fff;
  margin: calc(-1 * var(--global-kb-spacing-sm, 1.5rem)) calc(-1 * var(--global-content-edge-padding, 1.5rem)) 2rem;
  padding: 1.6rem var(--global-content-edge-padding, 1.5rem);
  border-bottom: 3px solid var(--rf-red);
}
/* le pagine con H1 scuro sono "a tutta larghezza" nel riquadro del contenuto */
body.page:not(.woocommerce-page):not(.home) .content-bg { background: var(--rf-paper); box-shadow: none; }
body.page:not(.woocommerce-page):not(.home) .content-container { padding-top: 0; }

/* ---------- Pulsanti ---------- */
.wp-block-button__link, .button, button.button, .woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, input[type="submit"] {
  font-family: var(--rf-display);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--rf-red);
  color: #fff;
  border: 2px solid var(--rf-red);
  border-radius: 3px;
  padding: .8em 1.5em;
  line-height: 1.1;
  transition: background .2s var(--rf-ease), color .2s var(--rf-ease), border-color .2s var(--rf-ease), transform .2s var(--rf-ease);
}
.wp-block-button__link:hover, .button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, input[type="submit"]:hover {
  background: var(--rf-ink); border-color: var(--rf-ink); color: #fff;
}
.wp-block-button__link:active, .button:active { transform: translateY(1px); }
.is-style-outline > .wp-block-button__link { background: transparent; color: currentColor; border-color: currentColor; }
.rf-hero .is-style-outline > .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--rf-ink); }

/* ---------- Home: hero ---------- */
.rf-hero {
  position: relative;
  background: var(--rf-ink);
  color: #fff;
  overflow: hidden;
  padding: clamp(3rem, 9vw, 7rem) 1.25rem clamp(5rem, 10vw, 8rem) !important;
  isolation: isolate;
}
.rf-hero::before { /* filo rosso del logo, in diagonale */
  content: ""; position: absolute; z-index: 1; pointer-events: none; left: -5%; right: -5%; bottom: 0;
  height: clamp(10px, 1.4vw, 16px); background: var(--rf-red);
  transform: skewY(-1.6deg); transform-origin: left bottom;
}
.rf-hero::after { /* velatura per leggibilità */
  content: ""; position: absolute; z-index: -2; inset: 0;
  background: linear-gradient(115deg, #0b0b0c 55%, #1c1c20);
}
.rf-hero > .wp-block-group__inner-container, .rf-hero > * { max-width: calc(1160px - 2.5rem); margin-inline: auto; }
.rf-hero h1 { color: #fff; font-size: clamp(2.6rem, 7.4vw, 5.4rem); max-width: 11.5ch; margin: 0 0 .35em; }
.rf-hero h1 span { color: var(--rf-red); }
.rf-hero p { color: #e6e6e8; font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 46ch; }
.rf-hero .wp-block-buttons { margin-top: 1.8rem; gap: .8rem; }
.rf-hero .wp-block-button__link { font-size: 1.05rem; padding: .95em 1.7em; }
.rf-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #fff; color: var(--rf-ink); border-color: #fff; }

/* foto a destra, sfumata verso il nero a sinistra; il testo sta sopra */
.rf-hero h1, .rf-hero p, .rf-hero .wp-block-buttons { position: relative; z-index: 2; }
.rf-hero figure.rf-hero__photo {
  position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; left: auto;
  width: min(60%, 940px); max-width: none !important; margin: 0 !important; height: 100%;
}
.rf-hero__photo img, .entry-content .rf-hero__photo img {
  display: block; width: 100%; height: 100% !important; object-fit: cover; object-position: 50% 58%;
  filter: contrast(1.05) brightness(.92);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0, #000 42%);
}
.rf-hero { min-height: clamp(30rem, 62vh, 40rem); display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 720px) {
  .rf-hero { padding-top: 14.5rem !important; justify-content: flex-start; min-height: 0; }
  .rf-hero figure.rf-hero__photo { bottom: auto; left: 0; width: 100%; height: 17rem; }
  .rf-hero__photo img, .entry-content .rf-hero__photo img { object-position: 50% 50%; -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 45%, transparent 100%); }
}

/* ---------- Home: calendario ---------- */
.rf-section { max-width: 1160px; margin-inline: auto; padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem !important; }
.rf-section > h2 { margin-top: 0; }
.rf-dates { border-top: 3px solid var(--rf-ink); }
.rf-date {
  display: grid;
  grid-template-columns: 9rem minmax(19rem, 1.4fr) 1.6fr minmax(9rem, auto) auto;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid #d8d8dc;
}
.rf-date > *, .rf-date p, .rf-date figure, .rf-date .wp-block-buttons { margin: 0 !important; max-width: none !important; }
.rf-date .rf-date__track { width: 9rem; }
.rf-date p { line-height: 1.25; }
.rf-date .rf-date__track img { width: 100%; height: 5.4rem; object-fit: contain; object-position: left center; display: block; }
.rf-date .rf-date__day { font-family: var(--rf-display); font-size: clamp(1.3rem, 2.6vw, 1.7rem); white-space: nowrap; text-transform: uppercase; line-height: 1.1; }
.rf-date .rf-date__where { font-weight: 700; font-size: 1.1rem; }
.rf-date .rf-date__status { font-size: .9rem; color: var(--rf-text-soft); }
.rf-date .wp-block-button__link { padding: .6em 1.2em; font-size: .95rem; }
@media (max-width: 720px) {
  .rf-date { grid-template-columns: 4.5rem 1fr; gap: .3rem 1rem; padding: 1.3rem 0; }
  .rf-date .rf-date__track { grid-column: 1; grid-row: 1 / span 4; width: 4.5rem; align-self: center; }
  .rf-date .rf-date__track img { height: 3.2rem; }
  .rf-date .rf-date__day { grid-column: 2; white-space: normal; }
  .rf-date .rf-date__where, .rf-date .rf-date__status { grid-column: 2; }
  .rf-date .wp-block-buttons { grid-column: 2; margin-top: .5rem !important; justify-self: start; }
}

/* WordPress avvolge i figli dei gruppi in un contenitore: lo rendiamo trasparente alla griglia */
.rf-date > .wp-block-group__inner-container,
.rf-facts > .wp-block-group__inner-container,
.rf-trophies .rf-section > .wp-block-group__inner-container { display: contents; }

/* ---------- Home: trofei ---------- */
.rf-trophies { background: var(--rf-ink); color: #fff; }
.rf-trophies .rf-section { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
.rf-trophy { border-top: 3px solid var(--rf-red); padding-top: 1.2rem; }
.rf-trophy h3 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .4em; }
.rf-trophy p { color: #d9d9dd; }
.rf-trophy a.rf-link { color: #fff; font-family: var(--rf-display); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; border-bottom: 2px solid var(--rf-red); padding-bottom: 2px; }
.rf-trophy a.rf-link:hover { color: var(--rf-red); }
@media (max-width: 720px) { .rf-trophies .rf-section { grid-template-columns: 1fr; } }

/* ---------- Blog ---------- */
.wp-block-latest-posts.is-grid li { margin-bottom: 1.8rem; }
.wp-block-latest-posts__post-title { font-family: var(--rf-display); text-transform: uppercase; font-size: 1.15rem; line-height: 1.15; color: var(--rf-ink); text-decoration: none; display: block; margin-top: .6em; }
.wp-block-latest-posts__post-title:hover { color: var(--rf-red); }
.wp-block-latest-posts__post-date { color: var(--rf-text-soft); font-size: .85rem; }
.wp-block-latest-posts__featured-image img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; }
.entry-title a:hover, .loop-entry .entry-title a:hover { color: var(--rf-red); }
.loop-entry .entry-title { font-family: var(--rf-body); font-weight: 800; text-transform: none; letter-spacing: 0; font-size: 1.25rem; line-height: 1.2; }
.wp-block-latest-posts__post-title { font-family: var(--rf-body) !important; font-weight: 800; text-transform: none !important; font-size: 1.1rem !important; letter-spacing: 0; }
.entry-content img { height: auto; }

/* ---------- Tabelle (calendari) ---------- */
.wp-block-table table { border-collapse: collapse; width: 100%; border: 0; }
.wp-block-table th { background: var(--rf-ink); color: #fff; font-family: var(--rf-display); text-transform: uppercase; letter-spacing: .05em; font-weight: 400; text-align: left; padding: .8em 1em; border: 0; }
.wp-block-table td { padding: .8em 1em; border: 0; border-bottom: 1px solid #d8d8dc; }
.wp-block-table tbody tr:nth-child(even) td { background: var(--rf-mist); }

/* ---------- Loghi sponsor ---------- */
.wp-block-group.is-layout-grid .wp-block-image { margin: 0; }
.wp-block-group.is-layout-grid .wp-block-image img { width: 100%; height: 110px; object-fit: contain; object-position: left center; }

/* ---------- Shop (WooCommerce) ---------- */
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--rf-display); text-transform: uppercase; font-size: 1.05rem; line-height: 1.2; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--rf-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.woocommerce span.onsale { background: var(--rf-red); color: #fff; border-radius: 3px; font-family: var(--rf-display); text-transform: uppercase; }
.woocommerce div.product .product_title { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.woocommerce ul.products li.product a img { aspect-ratio: 4 / 3; object-fit: cover; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--rf-red); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--rf-red); }
.woocommerce div.product form.cart .variations select, .woocommerce div.product form.cart .variations label { font-weight: 700; }
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { border-color: var(--rf-red); box-shadow: 0 0 0 3px rgba(230, 0, 0, .18); }

/* ---------- Footer ---------- */
#colophon, #colophon .site-footer-row-container-inner, .site-footer-wrap .site-footer-row-container-inner { background: var(--rf-ink) !important; color: #c9c9ce; }
#colophon { border-top: 3px solid var(--rf-red); }
#colophon a { color: #fff; }
#colophon a:hover { color: var(--rf-red); }
.site-footer .footer-html { font-size: .92rem; line-height: 1.6; text-align: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 782px) { .admin-bar #masthead { top: 46px; } }

/* =====================================================================
   Pagine interne
   ===================================================================== */
.rf-pagehead {
  position: relative; background: var(--rf-ink); color: #fff; overflow: hidden; isolation: isolate;
  padding: clamp(2.5rem, 7vw, 5rem) 1.25rem clamp(2.8rem, 7vw, 4.8rem) !important;
  border-bottom: 3px solid var(--rf-red);
}
.rf-pagehead::before { content: ""; position: absolute; z-index: -1; left: -5%; right: -5%; bottom: -2px; height: 12px; background: var(--rf-red); transform: skewY(-1.6deg); transform-origin: left bottom; }
.rf-pagehead > *, .rf-pagehead > .wp-block-group__inner-container > * { max-width: calc(1160px - 2.5rem); margin-inline: auto !important; }
.rf-pagehead h1 { color: #fff; margin: 0 auto .3em !important; font-size: clamp(2.4rem, 7vw, 4.4rem); }
.rf-pagehead .rf-lead { color: #dcdce0; font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 60ch; margin-bottom: 0; }
.rf-pagehead .rf-lead, .rf-pagehead h1 { width: min(100%, calc(1160px - 2.5rem)); }

.rf-band-ink, .rf-band-mist { margin: 0; }
.rf-band-ink { background: var(--rf-ink); color: #fff; }
.rf-band-ink h2, .rf-band-ink h3 { color: #fff; }
.rf-band-ink p, .rf-band-ink li { color: #e2e2e6; }
.rf-band-mist { background: var(--rf-mist); }
.rf-section .wp-block-columns { gap: clamp(1.5rem, 5vw, 4rem); margin: 0; }
.rf-section .wp-block-columns h2, .rf-section .wp-block-columns h3 { margin-top: 0; }
.rf-section h2 + .rf-dates, .rf-section h2 + .rf-calendar, .rf-section h2 + .rf-checklist { margin-top: 1.2rem; }

/* righe semplici (data + luogo) */
.rf-date--plain { grid-template-columns: minmax(11rem, 14rem) 1fr; padding: 1rem 0; }
.rf-date--plain .rf-date__day { white-space: normal; font-size: clamp(1.15rem, 2vw, 1.4rem); }
@media (max-width: 720px) {
  .rf-date--plain { grid-template-columns: 1fr; gap: .15rem; }
  .rf-date--plain .rf-date__day, .rf-date--plain .rf-date__where { grid-column: 1; }
}

/* quota IRC */
.rf-price { font-family: var(--rf-display); text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.1; color: #fff; }
.rf-price strong { color: var(--rf-red); font-weight: 400; }
.rf-quota .wp-block-buttons { margin-top: 1.2rem; gap: .7rem; }
.rf-band-ink .is-style-outline > .wp-block-button__link { color: #fff; }
.rf-band-ink .is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--rf-ink); border-color: #fff; }

/* liste con segno rosso */
.rf-checklist, ul.wp-block-list.rf-checklist { list-style: none; padding: 0; margin: 0; columns: 2 20rem; column-gap: 3rem; }
.rf-checklist li { break-inside: avoid; position: relative; padding: .55rem 0 .55rem 1.6rem; border-bottom: 1px solid #d8d8dc; max-width: none; }
.rf-band-ink .rf-checklist li, .rf-band-ink ul.wp-block-list li { border-color: var(--rf-line); }
.rf-checklist li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .7rem; height: .7rem; background: var(--rf-red); transform: skewX(-18deg); }
.rf-band-mist .rf-checklist { columns: 1; }
.rf-quota ul.wp-block-list { padding-left: 1.2rem; }

/* numeri chiave (Thunder Cup) */
.rf-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 3px solid var(--rf-ink); }
.rf-fact { padding: 1.4rem 1.2rem 1.4rem 0; border-bottom: 1px solid #d8d8dc; }
.rf-fact > * { margin: 0 !important; }
.rf-fact .rf-fact__n { font-family: var(--rf-display); text-transform: uppercase; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.05; color: var(--rf-red); }
.rf-fact .rf-fact__l { margin-top: .4rem !important; color: var(--rf-text-soft); font-size: .95rem; }
@media (max-width: 900px) { .rf-facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .rf-facts { grid-template-columns: 1fr; } }

/* loghi partner e sponsor */
.rf-logos { gap: 1rem; }
.rf-logo { background: #fff; border: 1px solid #d8d8dc; border-radius: 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 8rem; padding: 1rem; }
.rf-logo > *, .rf-logo .wp-block-image { margin: 0 !important; width: 100%; }
.rf-logo img { width: 100%; height: 5.5rem; object-fit: contain; object-position: center; display: block; }
.rf-logo--tile { align-items: stretch; justify-content: flex-start; min-height: 11rem; }
.rf-logo__label { margin-top: .7rem !important; font-size: .85rem; font-weight: 700; line-height: 1.25; text-align: center; color: var(--rf-text); }
@media (max-width: 900px) { .rf-logos { grid-template-columns: repeat(2, 1fr) !important; } }

/* meteo */
.rf-meteo { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.rf-meteo__card { background: var(--rf-ink); color: #fff; border-radius: 4px; padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .15rem; min-height: 11.5rem; }
.rf-meteo__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.rf-meteo__name { font-family: var(--rf-display); text-transform: uppercase; font-weight: 400; letter-spacing: .03em; font-size: 1.05rem; line-height: 1.15; }
.rf-meteo__icon { color: var(--rf-red); flex: none; }
.rf-meteo__temp { font-family: var(--rf-display); font-size: clamp(2.6rem, 5vw, 3.4rem); line-height: 1; margin-top: .4rem; font-variant-numeric: tabular-nums; }
.rf-meteo__cond { color: #e2e2e6; font-size: 1rem; }
.rf-meteo__meta { margin-top: auto; padding-top: .8rem; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .85rem; color: #b8b8bf; border-top: 1px solid var(--rf-line); }
.rf-note { color: var(--rf-text-soft); font-size: .88rem; margin-top: 1.4rem; }

/* contatti */
.rf-bigtel { display: inline-block; font-family: var(--rf-display); font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1; color: var(--rf-ink); text-decoration: none; border-bottom: 4px solid var(--rf-red); padding-bottom: .1em; margin: .4rem 0 1.2rem; }
.rf-bigtel:hover { color: var(--rf-red); }
.rf-panel { background: var(--rf-ink); color: #fff; border-radius: 4px; padding: 1.8rem 2rem; border-top: 4px solid var(--rf-red); }
.rf-panel h3 { color: #fff; margin: 0 0 .8rem; }
.rf-panel p { color: #e2e2e6; margin: 0 0 .6rem; }

/* spazio sotto il contenuto: l'ultima sezione non si incolla al footer */
.entry-content > .rf-section:last-child, .entry-content > .rf-band-mist:last-child, .entry-content > .rf-band-ink:last-child { margin-bottom: 0; }
.woocommerce .rf-section ul.products { margin-top: 0; }

/* =====================================================================
   Foto: testate con immagine, galleria, riquadri dei trofei
   ===================================================================== */
.rf-pagehead--photo { min-height: clamp(17rem, 34vw, 26rem); display: flex; flex-direction: column; justify-content: center; }
.rf-pagehead--photo h1, .rf-pagehead--photo .rf-lead { position: relative; z-index: 2; }
.rf-pagehead--photo h1 { max-width: min(13ch, 100%); }
.rf-pagehead--photo .rf-lead { max-width: 36ch; }
.rf-pagehead figure.rf-hero__photo {
  position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; left: auto;
  width: min(58%, 900px); max-width: none !important; margin: 0 !important; height: 100%;
}
.rf-pagehead .rf-hero__photo img, .entry-content .rf-pagehead .rf-hero__photo img {
  display: block; width: 100%; height: 100% !important; object-fit: cover; object-position: 50% 55%;
  filter: contrast(1.05) brightness(.92);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 45%); mask-image: linear-gradient(90deg, transparent 0, #000 45%);
}
@media (max-width: 720px) {
  .rf-pagehead--photo { min-height: 0; justify-content: flex-start; padding-top: 12rem !important; }
  .rf-pagehead figure.rf-hero__photo { bottom: auto; left: 0; width: 100%; height: 10.5rem; }
  .rf-pagehead .rf-hero__photo img, .entry-content .rf-pagehead .rf-hero__photo img {
    -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  }
  .rf-pagehead--photo h1, .rf-pagehead--photo .rf-lead { max-width: none; }
}

/* galleria */
.rf-gallery { gap: .8rem; }
.rf-gallery figure, .rf-gallery .wp-block-image { margin: 0 !important; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; background: var(--rf-ink); }
.rf-gallery img, .entry-content .rf-gallery img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; transition: transform .5s var(--rf-ease); }
.rf-gallery figure:hover img { transform: scale(1.04); }
@media (max-width: 900px) { .rf-gallery { grid-template-columns: repeat(2, 1fr) !important; } }

/* riquadri dei trofei in home */
.rf-trophy .wp-block-image { margin: 0 0 1.2rem; }
.rf-trophy .wp-block-image img, .entry-content .rf-trophy .wp-block-image img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.rf-trophy { border-top: 0; padding-top: 0; }
.rf-trophy h3 { border-top: 3px solid var(--rf-red); padding-top: 1rem; }

/* ---------- Shop su telefono: due colonne, schede più compatte ---------- */
@media (max-width: 720px) {
  .woocommerce ul.products[class*="columns-"], .woocommerce-page ul.products[class*="columns-"], ul.products.products { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1rem .8rem !important; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: .85rem; }
  .woocommerce ul.products li.product .price { font-size: .95rem; }
  .woocommerce ul.products li.product .button { padding: .6em .9em; font-size: .8rem; }
}

/* Banner cookie (Complianz): colori del sito, Accetta e Nega con lo stesso peso */
.cmplz-cookiebanner { border-radius: 4px !important; border-top: 4px solid var(--rf-red) !important; font-family: inherit !important; }
.cmplz-cookiebanner .cmplz-title { font-family: var(--rf-display, inherit) !important; text-transform: uppercase; letter-spacing: .02em; }
.cmplz-cookiebanner .cmplz-btn { border-radius: 3px !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: .03em; }
.cmplz-cookiebanner .cmplz-btn.cmplz-accept,
.cmplz-cookiebanner .cmplz-btn.cmplz-deny { background: var(--rf-red) !important; border: 2px solid var(--rf-red) !important; color: #fff !important; }
.cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences,
.cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences { background: transparent !important; border: 2px solid var(--rf-ink) !important; color: var(--rf-ink) !important; }
.cmplz-cookiebanner a { color: var(--rf-ink) !important; }
.cmplz-manage-consent.cmplz-show { background: var(--rf-ink) !important; color: #fff !important; border-color: var(--rf-red) !important; }

/* Pagine legali: colonna di lettura */
.rf-legal > *, .rf-legal > .wp-block-group__inner-container > * { max-width: 46rem; margin-left: 0; margin-right: auto; }
.rf-legal h2 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin: 2rem 0 .5rem; }
.rf-legal p, .rf-legal li { line-height: 1.65; }
.rf-legal code { font-size: .88em; background: var(--rf-mist, #f2f2f3); padding: .1em .35em; border-radius: 3px; }

/* Semaforo posti: verde disponibili, giallo ultimi posti, rosso esaurito */
.rf-st { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; font-size: .95rem; }
.rf-st::before { content: ""; width: .85em; height: .85em; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 3px rgba(31,157,85,.22); flex: none; }
.rf-st--ok { color: #14693a; }
.rf-st--low { color: #8a5a00; }
.rf-st--low::before { background: #e8a200; box-shadow: 0 0 0 3px rgba(232,162,0,.28); }
.rf-st--out { color: var(--rf-red); }
.rf-st--out::before { background: var(--rf-red); box-shadow: 0 0 0 3px rgba(225,6,0,.22); }
.rf-seats { margin: .2rem 0 .8rem; }
.rf-from { font-size: .6em; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }

/* Prenotazione: dati dei partecipanti */
.rf-qty-label { display: block; font-weight: 700; margin: 1rem 0 .3rem; flex: 0 0 100%; }
.woocommerce-variation-add-to-cart:has(.rf-participants), form.cart:has(.rf-participants) .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.rf-participants { flex: 0 0 100%; width: 100%; margin: 1rem 0; }
.rf-participants__intro { margin: 0 0 .8rem; color: var(--rf-text-soft); font-size: .95rem; }
.rf-participant { border: 1px solid var(--rf-line, #d8d8dc); border-radius: 6px; padding: .9rem 1rem 1rem; margin: 0 0 1rem; }
.rf-participant legend { font-family: var(--rf-display); text-transform: uppercase; padding: 0 .5rem; font-size: 1rem; }
.rf-participant__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; }
.rf-participant__grid .rf-f { margin: 0; }
.rf-participant__grid .rf-f--moto, .rf-participant__grid .rf-f--tempo { grid-column: 1 / -1; }
.rf-participant__grid label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .2rem; }
.rf-participant__grid input { width: 100%; }
@media (max-width: 600px) { .rf-participant__grid { grid-template-columns: 1fr; } }
.rf-waiver { margin: 1.5rem 0; padding: 1rem 1.2rem; border-left: 4px solid var(--rf-red); background: var(--rf-mist, #f2f2f3); }
.rf-waiver .button { display: inline-block; margin-bottom: .4rem; }

/* Pulsanti fissi a destra: carrello e "Torna in alto" */
.rf-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.rf-fab__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 3.1rem; height: 3.1rem; border-radius: 50%; border: 0; cursor: pointer; text-decoration: none; background: var(--rf-ink); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: background .2s var(--rf-ease), transform .2s var(--rf-ease); }
.rf-fab__btn:hover, .rf-fab__btn:focus-visible { background: var(--rf-red); color: #fff; transform: translateY(-2px); }
.rf-fab__cart { background: var(--rf-red); }
.rf-fab__cart:hover, .rf-fab__cart:focus-visible { background: #fff; color: var(--rf-ink); }
.rf-fab__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--rf-ink); }
.rf-fab__count { position: absolute; top: -.25rem; right: -.25rem; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; border-radius: 999px; background: #fff; color: var(--rf-ink); font: 700 .75rem/1.3rem var(--rf-body, sans-serif); text-align: center; box-shadow: 0 0 0 2px var(--rf-red); }
.rf-fab__count[hidden], .rf-fab__top[hidden] { display: none; }
@media (max-width: 600px) { .rf-fab__btn { width: 2.8rem; height: 2.8rem; } }
@media (prefers-reduced-motion: reduce) { .rf-fab__btn { transition: none; } }

/* Promozione TrackBuddy */
.rf-tb { display: flex; gap: 1.2rem; align-items: center; padding: 1.2rem 1.4rem; background: var(--rf-ink); color: #fff; border-radius: 6px; border-left: 4px solid var(--rf-red); margin: 1.5rem 0; }
.rf-tb p { margin: 0; color: inherit; }
.rf-tb__icon { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.rf-tb__body { flex: 1; min-width: 0; }
.rf-tb__title { font-family: var(--rf-display); text-transform: uppercase; font-size: 1.05rem; letter-spacing: .02em; }
.rf-tb__text { margin: .25rem 0 .7rem !important; font-size: .95rem; line-height: 1.45; color: #e6e6e8; }
.rf-tb__btn { display: inline-block; margin: 0 .5rem .4rem 0; padding: .5em 1em; border: 1.5px solid #fff; border-radius: 3px; color: #fff !important; font-weight: 700; font-size: .85rem; text-decoration: none; transition: background .2s var(--rf-ease), color .2s var(--rf-ease); }
.rf-tb__btn:hover, .rf-tb__btn:focus-visible { background: #fff; color: var(--rf-ink) !important; }
.rf-tb__qr { flex: none; text-align: center; font-size: .72rem; max-width: 130px; line-height: 1.3; }
.rf-tb__qr img { display: block; background: #fff; padding: 6px; border-radius: 4px; margin: 0 auto .35rem; width: 110px; height: 110px; }
.rf-tb--compact { padding: .9rem 1rem; margin: 1.2rem 0; }
.rf-tb--compact .rf-tb__icon { width: 48px; height: 48px; border-radius: 11px; }
.rf-tb--compact .rf-tb__title { font-size: .95rem; }
.rf-tb--compact .rf-tb__text { font-size: .88rem; margin-bottom: .5rem !important; }
.rf-tb--confirm { margin: 1.5rem 0; }
@media (max-width: 700px) { .rf-tb__qr { display: none; } .rf-tb { align-items: flex-start; } .rf-tb__icon { width: 52px; height: 52px; } }

/* Calendario: prezzo e cosa è incluso */
.rf-date .rf-date__incl { display: block; margin-top: .25rem; font-weight: 400; font-size: .9rem; color: var(--rf-text-soft); }
.rf-date .rf-date__price { display: block; margin-top: .2rem; font-weight: 700; font-size: 1.05rem; color: var(--rf-ink); }
.rf-date .rf-date__price small { font-weight: 400; font-size: .75rem; color: var(--rf-text-soft); }

/* Negozio: ricerca e categorie */
.rf-filter { margin: 0 0 1.5rem; display: grid; gap: .9rem; }
.rf-filter__search { display: flex; gap: .5rem; max-width: 34rem; }
.rf-filter__search input[type="search"] { flex: 1; min-width: 0; padding: .7rem .9rem; border: 2px solid var(--rf-ink); border-radius: 0; font: inherit; background: #fff; }
.rf-filter__search button { padding: .7rem 1.3rem; border: 0; background: var(--rf-ink); color: #fff; font: inherit; font-weight: 700; text-transform: uppercase; cursor: pointer; }
.rf-filter__search button:hover { background: var(--rf-red, #d6001c); }
.rf-filter__cats { display: flex; flex-wrap: wrap; gap: .5rem; }
.rf-filter__cats a { padding: .45rem .9rem; border: 1px solid #c9c9cf; color: var(--rf-ink); text-decoration: none; font-size: .95rem; background: #fff; }
.rf-filter__cats a small { color: var(--rf-text-soft); margin-left: .25rem; }
.rf-filter__cats a:hover { border-color: var(--rf-ink); }
.rf-filter__cats a.is-active { background: var(--rf-ink); border-color: var(--rf-ink); color: #fff; }
.rf-filter__cats a.is-active small { color: #ddd; }

/* Calendario con molte date: filtro per circuito e "Mostra altre date" */
.rf-date[hidden], .rf-calendar [hidden] { display: none !important; }
.rf-calendar__filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.rf-calendar__filter button { padding: .45rem .9rem; border: 1px solid #c9c9cf; background: #fff; color: var(--rf-ink); font: inherit; font-size: .95rem; cursor: pointer; }
.rf-calendar__filter button:hover { border-color: var(--rf-ink); }
.rf-calendar__filter button[aria-pressed="true"] { background: var(--rf-ink); border-color: var(--rf-ink); color: #fff; }
.rf-calendar__more-wrap { margin: 1.5rem 0 0; text-align: center; }
.rf-calendar__more { padding: .8rem 1.6rem; border: 2px solid var(--rf-ink); background: transparent; color: var(--rf-ink); font: inherit; font-weight: 700; text-transform: uppercase; cursor: pointer; }
.rf-calendar__more:hover { background: var(--rf-ink); color: #fff; }
