/* F1 page: red, black and white race palette scoped to this page only. */
.f1-page { --f1-red: #d50000; --f1-black: #111111; --f1-white: #ffffff; background: var(--f1-white); color: var(--f1-black); }
.market-nav-f1 { font-weight: 700; }
.market-nav-f1.active { color: #d50000; }
.f1-hero { background: linear-gradient(135deg, var(--f1-black) 0%, #1d1d1d 60%, var(--f1-red) 160%); color: var(--f1-white); padding: 48px 0 40px; border-bottom: 6px solid var(--f1-red); position: relative; overflow: hidden; }
.f1-hero::after { content: ""; position: absolute; right: 0; top: 0; width: 180px; height: 100%; background: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 14px, transparent 14px 28px); pointer-events: none; }
.f1-hero-inner { position: relative; z-index: 1; }
.f1-eyebrow { color: var(--f1-red); text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: .8rem; margin: 0 0 8px; }
.f1-hero h1 { font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.1; margin: 0 0 14px; max-width: 820px; color: var(--f1-white); }
.f1-lead { max-width: 760px; font-size: 1.05rem; color: #e8e8e8; margin: 0 0 28px; }
.f1-cards { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.f1-card { background: var(--f1-white); color: var(--f1-black); border-radius: 10px; padding: 20px; border-top: 5px solid var(--f1-red); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.f1-card h2 { font-size: 1.15rem; margin: 0 0 6px; }
.f1-race-date { color: #555; margin: 0 0 12px; font-size: .92rem; }
.f1-timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.f1-timer span { background: var(--f1-black); color: var(--f1-white); border-radius: 8px; padding: 10px 4px; text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.f1-timer b { display: block; font-size: clamp(1.4rem, 4vw, 2.1rem); font-variant-numeric: tabular-nums; color: var(--f1-white); }
.f1-african { background: var(--f1-black); color: var(--f1-white); border: 2px dashed var(--f1-red); border-top-width: 5px; border-top-style: solid; }
.f1-african h2 { color: var(--f1-white); }
.f1-tbc { display: inline-block; background: var(--f1-red); color: var(--f1-white); font-weight: 800; padding: 4px 10px; border-radius: 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.f1-section { padding: 36px 16px 8px; }
.f1-section > h2 { font-size: 1.5rem; margin: 0 0 8px; padding-left: 12px; border-left: 6px solid var(--f1-red); }
.f1-map { height: 420px; border-radius: 10px; border: 2px solid var(--f1-black); background: #eee; z-index: 0; }
.f1-note { font-size: .85rem; color: #555; }
.f1-distance { display: inline-block; background: var(--f1-black); color: var(--f1-white); font-weight: 700; font-size: .8rem; padding: 3px 8px; border-radius: 4px; margin: 0 0 6px; }
.f1-distance i { color: var(--f1-red); }
.f1-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.f1-button { background: var(--f1-red); color: var(--f1-white); padding: 10px 16px; border-radius: 6px; font-weight: 700; text-decoration: none; }
.f1-button-ghost { background: var(--f1-white); color: var(--f1-black); border: 2px solid var(--f1-black); }
.f1-explainer-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: start; }
.f1-video { margin: 0; }
.f1-video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--f1-black); border-radius: 10px; overflow: hidden; }
.f1-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.f1-video figcaption { display: flex; flex-direction: column; gap: 2px; padding: 8px 2px; font-size: .9rem; }
.f1-video figcaption span { color: #666; font-size: .8rem; }
.f1-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.f1-disclaimer { font-size: .82rem; color: #555; border-top: 1px solid #ddd; padding: 16px; margin-top: 28px; }
@media (max-width: 760px) {
  .f1-hero { padding: 32px 0 28px; }
  .f1-cards, .f1-explainer-grid { grid-template-columns: 1fr; }
  .f1-map { height: 320px; }
  .f1-section { padding: 28px 12px 4px; }
}

/* Sticky section tabs */
.f1-page section[id] { scroll-margin-top: calc(var(--f1-header-h, 69px) + 56px); }
.f1-tabs { position: sticky; top: var(--f1-header-h, 69px); z-index: 20; background: var(--f1-black); border-bottom: 3px solid var(--f1-red); }
.f1-tabs .market-container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 0 12px; }
.f1-tabs .market-container::-webkit-scrollbar { display: none; }
.f1-tabs a { color: #ddd; text-decoration: none; font-weight: 700; font-size: .9rem; padding: 12px 14px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.f1-tabs a:hover, .f1-tabs a.is-active { color: var(--f1-white); border-bottom-color: var(--f1-white); }
/* Facts and sources */
.f1-section h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.f1-facts { padding-left: 20px; margin: 12px 0; display: grid; gap: 10px; line-height: 1.5; }
.f1-src { display: block; font-size: .78rem; color: #666; margin-top: 2px; }
.f1-src a { color: #444; }
.f1-spec { background: #fff8e1; border-left: 4px solid #f9a825; padding: 6px 10px; list-style-position: inside; margin-left: -20px; border-radius: 4px; }
.f1-spec-tag { display: inline-block; background: #f9a825; color: #111; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 3px; }
.f1-sources ol { font-size: .85rem; line-height: 1.6; padding-left: 22px; }
/* Property search */
.f1-search { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end; background: #f6f6f6; border: 1px solid #e2e2e2; border-radius: 10px; padding: 14px; margin: 14px 0 8px; }
.f1-search label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #444; }
.f1-search select, .f1-search input { font: inherit; font-size: .95rem; text-transform: none; letter-spacing: 0; font-weight: 400; padding: 9px 10px; border: 1px solid #bbb; border-radius: 6px; background: #fff; min-width: 0; }
.f1-search .f1-button { border: 0; cursor: pointer; font-size: .95rem; height: 40px; }
.f1-count { font-weight: 700; margin: 6px 0 12px; }
.f1-result { transition: transform .15s ease, box-shadow .15s ease; border-radius: 12px; }
.f1-result.is-active { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--f1-red); }
.f1-result[hidden] { display: none; }
.f1-tooltip { padding: 0; border-radius: 8px; overflow: hidden; }
.f1-preview { display: flex; flex-direction: column; width: 160px; font-size: .8rem; }
.f1-preview img { width: 160px; height: 100px; object-fit: cover; display: block; }
.f1-preview strong, .f1-preview span { padding: 4px 8px 0; white-space: normal; }
.f1-preview span { padding-bottom: 6px; color: #555; }
/* Gallery and lightbox */
.f1-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.f1-gallery-item { margin: 0; }
.f1-gallery-item img { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; display: block; background: #eee; }
.f1-gallery-item figcaption { font-size: .85rem; padding: 6px 2px; }
.f1-gallery-item small, .f1-lightbox small { display: block; color: #666; font-size: .72rem; margin-top: 2px; }
.f1-renders { margin-top: 18px; background: #f6f6f6; border-radius: 10px; padding: 12px 16px; }
.f1-renders h3 { margin-top: 0; }
.f1-lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.f1-lightbox::backdrop { background: rgba(0,0,0,.88); }
.f1-lightbox figure { margin: 0; text-align: center; }
.f1-lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 6px; }
.f1-lightbox figcaption { color: #fff; font-size: .9rem; padding: 8px; }
.f1-lightbox small a { color: #ccc; }
.f1-lb-close, .f1-lb-nav { position: fixed; background: rgba(0,0,0,.6); color: #fff; border: 0; font-size: 2rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; line-height: 1; }
.f1-lb-close { top: 14px; right: 14px; }
.f1-lb-prev { left: 10px; top: 50%; }
.f1-lb-next { right: 10px; top: 50%; }
/* Lite YouTube */
.f1-video-lite { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.f1-video-lite img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.f1-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); background: var(--f1-red); border-radius: 12px; }
.f1-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.f1-video-lite:hover .f1-play, .f1-video-lite:focus-visible .f1-play { background: #ff1a1a; }
/* Latest updates */
.f1-news { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.f1-news-item { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #e5e5e5; border-radius: 8px; padding: 10px 12px; }
.f1-news-item > div { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.f1-news-item time { font-size: .75rem; color: var(--f1-red); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.f1-news-item a { color: var(--f1-black); font-weight: 700; text-decoration: none; }
.f1-news-item a:hover { text-decoration: underline; }
.f1-news-source { font-size: .8rem; color: #666; }
.f1-news-img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; }
.f1-news-hide { align-self: center; border: 1px solid #b00; color: #b00; background: #fff; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
@media (max-width: 980px) {
  .f1-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f1-search .f1-button { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  /* Mobile: swipeable video carousel, tap to play. Desktop keeps the grid. */
  .f1-video-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 0 12px 10px; margin: 0 -12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .f1-video-grid::-webkit-scrollbar { display: none; }
  .f1-video-grid .f1-video { flex: 0 0 84%; scroll-snap-align: center; }
  .f1-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .f1-gallery-item img { height: 120px; }
  .f1-tabs a { padding: 11px 10px; font-size: .85rem; }
}

/* ---- r4 redesign (Nov 2026): property-first, black/red race look ---- */
.f1-hero { background: #0b0b0b; padding: 0; min-height: 520px; display: flex; align-items: flex-end; isolation: isolate; }
.f1-hero::after { display: none; }
.f1-hero-bg { position: absolute; inset: 0; z-index: -2; }
.f1-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; display: block; }
.f1-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,8,8,.92) 0%, rgba(8,8,8,.72) 46%, rgba(8,8,8,.18) 100%), linear-gradient(0deg, rgba(8,8,8,.85) 0%, rgba(8,8,8,0) 45%); }
.f1-hero-inner { padding: 64px 16px 56px; width: 100%; }
.f1-eyebrow { display: flex; align-items: center; gap: 12px; color: #fff; }
.f1-logo { display: block; width: 64px; height: 16px; flex: none; }
.f1-eyebrow span { border-left: 2px solid var(--f1-red); padding-left: 12px; }
.f1-hero h1 { max-width: 760px; text-wrap: balance; }
.f1-lead { max-width: 640px; margin-bottom: 22px; }
.f1-countdown { display: inline-grid; gap: 10px; background: rgba(10,10,10,.72); border: 1px solid rgba(255,255,255,.14); border-top: 4px solid var(--f1-red); border-radius: 12px; padding: 16px 18px; backdrop-filter: blur(6px); max-width: 520px; }
.f1-target-label { display: flex; align-items: center; gap: 10px; margin: 0; color: #fff; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .86rem; }
.f1-flag { width: 22px; height: 14px; border-radius: 2px; background: conic-gradient(#fff 0 25%, #111 0 50%, #fff 0 75%, #111 0) 0 0 / 7px 7px; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.f1-countdown .f1-timer span { background: #161616; border: 1px solid #2a2a2a; min-width: 82px; }
.f1-countdown .f1-timer b { color: #fff; }
.f1-target-note { margin: 0; font-size: .76rem; color: #bdbdbd; }
.f1-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.f1-hero .f1-button-ghost { background: transparent; color: #fff; border-color: #fff; }
.f1-hero-credit { position: absolute; right: 10px; bottom: 6px; z-index: 1; margin: 0; font-size: .64rem; color: rgba(255,255,255,.6); }
.f1-hero-credit a { color: inherit; }
.f1-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; }
.f1-section-head p { margin: 0 0 12px; color: #444; }
.f1-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.f1-chips::-webkit-scrollbar { display: none; }
.f1-chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1.5px solid #222; color: #111; background: #fff; font-weight: 700; font-size: .88rem; text-decoration: none; }
.f1-chip:hover { border-color: var(--f1-red); color: var(--f1-red); }
.f1-chip.is-active { background: #111; color: #fff; border-color: #111; box-shadow: inset 0 -3px 0 var(--f1-red); }
.f1-search { grid-template-columns: repeat(6, minmax(0, 1fr)) auto; }
.f1-listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.f1-result > .listing-card { height: 100%; }
.f1-band-slot:empty { display: none; }
.f1-band-slot { padding: 24px 16px 0; }
.f1-about-summary { max-width: 820px; font-size: 1.02rem; line-height: 1.6; }
.f1-readmore { border-top: 1px solid #e3e3e3; margin-top: 8px; }
.f1-readmore summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; margin: 12px 0; font-weight: 800; color: var(--f1-red); }
.f1-readmore summary::-webkit-details-marker { display: none; }
.f1-readmore summary::after { content: "▾"; transition: transform .15s ease; }
.f1-readmore[open] summary::after { transform: rotate(180deg); }
.f1-readmore .f1-readmore-less, .f1-readmore[open] .f1-readmore-more { display: none; }
.f1-readmore[open] .f1-readmore-less { display: inline; }
.f1-readmore-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; padding-bottom: 8px; }
.f1-news { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.f1-news-item { position: relative; display: block; margin: 0; padding: 0; border: 1px solid #e4e4e4; border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .15s ease, transform .15s ease; }
.f1-news-item:hover { box-shadow: 0 10px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.f1-news-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.f1-news-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 8; background: linear-gradient(135deg, #111 0%, #2a2a2a 70%, #d50000 160%); overflow: hidden; }
.f1-news-initial { font-size: 2rem; font-weight: 900; color: rgba(255,255,255,.85); }
.f1-news-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.f1-news-body { display: grid; gap: 6px; padding: 12px 14px 16px; }
.f1-news-meta { font-size: .76rem; color: #666; text-transform: uppercase; letter-spacing: .04em; }
.f1-news-title { font-size: .98rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.f1-news-hide { position: absolute; top: 8px; right: 8px; }
.f1-news-empty { display: grid; justify-items: start; gap: 10px; padding: 22px; border: 1px dashed #bbb; border-radius: 12px; background: #fafafa; }
.f1-news-empty i { font-size: 1.4rem; color: var(--f1-red); }
.f1-news-empty p { margin: 0; }
@media (max-width: 1100px) { .f1-search { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .f1-hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .f1-hero-inner { box-sizing: border-box; }
  .f1-countdown .f1-timer b { font-size: 1.45rem; }
  .f1-hero::before { background: linear-gradient(0deg, rgba(8,8,8,.94) 0%, rgba(8,8,8,.78) 55%, rgba(8,8,8,.45) 100%); }
  .f1-hero-inner { padding: 36px 14px 40px; }
  .f1-countdown { display: grid; max-width: none; }
  .f1-countdown .f1-timer span { min-width: 0; }
  .f1-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f1-search label, .f1-search select, .f1-search input { min-width: 0; width: 100%; box-sizing: border-box; }
  .f1-search .f1-button, .f1-custom-km { grid-column: span 2; }
  .f1-readmore-body { grid-template-columns: 1fr; }
  .f1-listings { grid-template-columns: 1fr; }
  .f1-hero-credit { position: static; padding: 0 14px 8px; }
}

.f1-offplan { margin-top: 28px; }
.f1-offplan .f1-section-head h3 { margin: 0 0 4px; font-size: 1.15rem; }
.f1-offplan .f1-section-head p { margin: 0 0 12px; color: #555; font-size: .9rem; }
.f1-offplan-area { background: #f3f3f3; color: #111; }
.f1-offplan-meta { margin: 4px 0 10px; color: #555; font-size: .85rem; }
