/* Racer Valves blog - child theme styles.
   Everything is prefixed .rv- so nothing here can collide with Forgex. */

:root{
  --rv-ink:#000;
  --rv-mut:#000;
  --rv-faint:#000;
  --rv-line:#e4e9ec;
  --rv-surf:#fff;
  --rv-soft:#f6f8f9;
  --rv-brand:#17386b;      /* Racer navy, taken from the logo */
  --rv-accent:#c8161d;     /* Racer red */
  --rv-band:#f3f6f9;       /* light banner */
}

/* ---------- light banner ---------- */
.rv-banner{
  background:linear-gradient(180deg,var(--rv-band) 0%,#fff 100%);
  border-bottom:1px solid var(--rv-line);
  padding:56px 0 44px;
}
.rv-crumbs{font-size:13px;color:var(--rv-faint);display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:10px}
.rv-crumbs a{color:var(--rv-mut);text-decoration:none}
.rv-crumbs a:hover{color:var(--rv-accent)}
.rv-crumb-current{color:var(--rv-ink)}
.rv-banner-title{
  margin:0;color:var(--rv-ink);font-weight:700;line-height:1.18;
  font-size:clamp(26px,3.4vw,42px);max-width:22ch;text-wrap:balance;
}
.rv-banner-sub{margin:12px 0 0;color:var(--rv-mut);font-size:16px;max-width:62ch}

/* ---------- layout ---------- */
.rv-blog-wrap{padding:52px 0 76px;background:var(--rv-surf)}
.rv-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:40px;align-items:start}
.rv-main{min-width:0}

/* ---------- cards ---------- */
.rv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}
.rv-grid-3{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.rv-card{
  background:var(--rv-surf);border:1px solid var(--rv-line);border-radius:12px;
  overflow:hidden;display:flex;flex-direction:column;
  transition:box-shadow .18s ease,transform .18s ease;
}
.rv-card:hover{box-shadow:0 10px 28px rgba(20,32,43,.09);transform:translateY(-2px)}
.rv-card-media{
  position:relative;display:block;aspect-ratio:16/10;background:var(--rv-soft);
  overflow:hidden;line-height:0;
}
.rv-card-media img{width:100%;height:100%;object-fit:contain;background:#fff;padding:10px;transition:transform .35s ease}
.rv-card:hover .rv-card-media img{transform:scale(1.04)}
.rv-card-fallback{
  position:absolute;inset:0;display:grid;place-items:center;
  color:var(--rv-faint);font-size:14px;letter-spacing:.08em;text-transform:uppercase;
}
.rv-chip{
  position:absolute;left:12px;bottom:12px;background:var(--rv-brand);color:#fff;
  font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
  padding:5px 10px;border-radius:4px;line-height:1.4;
}
.rv-card-body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:10px;flex:1}
.rv-meta{font-size:12.5px;color:var(--rv-faint);display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.rv-meta a{color:var(--rv-mut);text-decoration:none}
.rv-meta a:hover{color:var(--rv-accent)}
.rv-card-title{margin:0;font-size:19px;line-height:1.35;font-weight:650}
.rv-card-title a{color:var(--rv-ink);text-decoration:none}
.rv-card-title a:hover{color:var(--rv-accent)}
.rv-card-excerpt{margin:0;color:var(--rv-mut);font-size:14.5px;line-height:1.62;flex:1}
.rv-readmore{
  align-self:flex-start;color:#000;font-weight:600;font-size:14px;
  text-decoration:none;display:inline-flex;gap:6px;align-items:center;
}
.rv-readmore:hover{color:var(--rv-brand)}
.rv-readmore span{transition:transform .18s ease}
.rv-readmore:hover span{transform:translateX(3px)}

/* ---------- single ---------- */
.rv-meta-single{margin-bottom:18px;font-size:13.5px}
.rv-hero{margin:0 0 28px;border-radius:12px;overflow:hidden;line-height:0}
.rv-hero img{width:100%;height:auto}
/* The article text spans the same width as the featured image above it, so the
   left and right edges line up down the whole column. */
.rv-content{color:#000;font-size:16.5px;line-height:1.8;max-width:none}
.rv-content > *+*{margin-top:1.15em}
/* Elementor's boxed container carries 10px of side padding, which set the body
   copy in from the featured image's edge. Only the outermost one is reset, so
   nested containers keep their own spacing. */
.rv-content > .elementor > .e-con{padding-left:0;padding-right:0}
.rv-content h2{font-size:26px;line-height:1.3;margin-top:1.9em;color:var(--rv-ink);font-weight:650}
.rv-content h3{font-size:20px;line-height:1.35;margin-top:1.6em;color:var(--rv-ink);font-weight:650}
.rv-content ul,.rv-content ol{padding-left:1.3em}
.rv-content li+li{margin-top:.45em}
.rv-content img{max-width:100%;height:auto;border-radius:10px}
.rv-content blockquote{
  margin:1.6em 0;padding:16px 22px;border-left:3px solid var(--rv-accent);
  background:var(--rv-soft);border-radius:0 8px 8px 0;color:var(--rv-ink);
}
.rv-content table{width:100%;border-collapse:collapse;font-size:15px}
.rv-content th,.rv-content td{border:1px solid var(--rv-line);padding:9px 12px;text-align:left}
.rv-content th{background:var(--rv-soft);font-weight:650}
.rv-content a{color:#000;text-decoration:underline}

.rv-tags{margin-top:30px;display:flex;gap:8px;flex-wrap:wrap}
.rv-tags a{
  font-size:12.5px;color:var(--rv-mut);background:var(--rv-soft);
  border:1px solid var(--rv-line);border-radius:999px;padding:4px 12px;text-decoration:none;
}
.rv-tags a:hover{color:var(--rv-accent);border-color:var(--rv-accent)}
.rv-share{
  margin-top:26px;padding-top:20px;border-top:1px solid var(--rv-line);
  display:flex;gap:14px;align-items:center;flex-wrap:wrap;font-size:14px;
}
.rv-share span{color:var(--rv-faint);font-weight:600}
.rv-share a{color:#000;text-decoration:none;font-weight:500}
.rv-share a:hover{color:var(--rv-accent)}

.rv-related{margin-top:56px}
.rv-section-title{font-size:22px;font-weight:650;color:var(--rv-ink);margin:0 0 20px}

/* ---------- sidebar ---------- */
.rv-side{display:flex;flex-direction:column;gap:22px;position:sticky;top:24px}
.rv-side-card{background:var(--rv-surf);border:1px solid var(--rv-line);border-radius:12px;padding:20px}
.rv-side-cta{background:var(--rv-soft);border-color:#dfe6ea}
.rv-side-title{font-size:16px;font-weight:650;color:var(--rv-ink);margin:0 0 12px}
.rv-side-text{font-size:14px;color:var(--rv-mut);margin:0 0 14px;line-height:1.6}
/* Every control in the enquiry form shares one size. The selector lists the
   input types explicitly rather than using `input`, so Contact Form 7's own
   hidden fields and the submit button keep their own styling. */
.rv-side-cta .fx-form-1-box{margin:0 0 14px}
.rv-side-cta .fx-form-1-label{
  display:block;margin:0 0 6px;font-size:13px;font-weight:600;
  line-height:1.35;color:var(--rv-ink);
}
/* CF7 wraps each control in an inline span, which breaks width:100% */
.rv-side-cta .wpcf7-form-control-wrap{display:block;width:100%}

.rv-side-cta input[type=text],
.rv-side-cta input[type=email],
.rv-side-cta input[type=tel],
.rv-side-cta input[type=number],
.rv-side-cta input[type=url],
.rv-side-cta input[type=date],
.rv-side-cta select,
.rv-side-cta textarea{
  display:block;
  width:100%;
  box-sizing:border-box;
  min-height:48px;
  margin:0;
  padding:12px 13px;
  font-family:inherit;
  font-size:14px;
  line-height:1.4;
  color:var(--rv-ink);
  background:#fff;
  border:1px solid var(--rv-line);
  border-radius:7px;
  -webkit-appearance:none;
  appearance:none;
}
.rv-side-cta textarea{min-height:104px;resize:vertical}

/* Strip the spinner arrows should a number field ever be used here */
.rv-side-cta input[type=number]{-moz-appearance:textfield}
.rv-side-cta input[type=number]::-webkit-outer-spin-button,
.rv-side-cta input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

.rv-side-cta input:focus,
.rv-side-cta select:focus,
.rv-side-cta textarea:focus{
  outline:none;
  border-color:var(--rv-brand);
  box-shadow:0 0 0 3px rgba(23,56,107,.12);
}

/* CF7 validation messages */
.rv-side-cta .wpcf7-not-valid{border-color:var(--rv-accent)}
.rv-side-cta .wpcf7-not-valid-tip{
  display:block;margin-top:5px;font-size:12.5px;line-height:1.4;color:var(--rv-accent);
}
.rv-side-cta .wpcf7-response-output{
  margin:12px 0 0;padding:10px 12px;font-size:13px;line-height:1.5;
  border:1px solid var(--rv-line);border-radius:7px;color:var(--rv-ink);
}

.rv-side-cta input[type=submit],
.rv-side-cta .wpcf7-submit,
.rv-side-cta button[type=submit]{
  width:100%;background:var(--rv-accent);color:#fff;border:0;border-radius:7px;
  padding:13px 14px;font-weight:600;font-size:14.5px;line-height:1.3;cursor:pointer;
}
.rv-side-cta input[type=submit]:hover,
.rv-side-cta button[type=submit]:hover{background:var(--rv-brand)}
.rv-side-cta .wpcf7-spinner{margin:10px auto 0;display:block}
/* The theme wraps the submit button in an inline-block span, so width:100%
   on the button alone resolves against the shrink-wrapped span. */
.rv-side-cta .txxaslideup-item{display:block;width:100%}
.rv-side-cta .fx-pr-btn-1{
  width:100%;display:flex;align-items:center;justify-content:center;gap:8px;
}

.rv-recent{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px}
.rv-recent a{display:flex;gap:12px;text-decoration:none;align-items:flex-start}
.rv-recent-thumb{flex:none;width:62px;height:62px;border-radius:8px;overflow:hidden;background:var(--rv-soft);line-height:0}
.rv-recent-thumb img{width:100%;height:100%;object-fit:cover}
.rv-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0}
.rv-recent-title{color:var(--rv-ink);font-size:14px;font-weight:600;line-height:1.4}
.rv-recent a:hover .rv-recent-title{color:var(--rv-accent)}
.rv-recent-date{color:var(--rv-faint);font-size:12px}

.rv-cats{list-style:none;margin:0;padding:0}
.rv-cats li+li{border-top:1px solid var(--rv-line)}
.rv-cats a{display:flex;justify-content:space-between;padding:9px 0;color:var(--rv-mut);text-decoration:none;font-size:14px}
.rv-cats a:hover{color:var(--rv-accent)}
.rv-cats span{color:var(--rv-faint);font-size:12.5px}

/* ---------- empty + pagination ---------- */
.rv-empty{
  border:1px dashed var(--rv-line);border-radius:12px;padding:48px 28px;text-align:center;background:var(--rv-soft);
}
.rv-empty h2{margin:0 0 8px;font-size:22px;color:var(--rv-ink)}
.rv-empty p{margin:0 0 18px;color:var(--rv-mut)}
.rv-btn{
  display:inline-block;background:var(--rv-accent);color:#fff;text-decoration:none;
  padding:11px 22px;border-radius:7px;font-weight:600;font-size:15px;
}
.rv-btn:hover{background:var(--rv-brand);color:#fff}

.rv-main .navigation.pagination{margin-top:40px}
.rv-main .nav-links{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}
.rv-main .page-numbers{
  min-width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--rv-line);border-radius:8px;color:var(--rv-mut);
  text-decoration:none;font-size:14.5px;padding:0 12px;
}
.rv-main .page-numbers.current{background:var(--rv-brand);border-color:var(--rv-brand);color:#fff;font-weight:600}
.rv-main .page-numbers:hover:not(.current){border-color:var(--rv-accent);color:var(--rv-accent)}

/* ---------- responsive ---------- */
@media (max-width:1100px){
  .rv-layout{grid-template-columns:minmax(0,1fr) 300px;gap:30px}
  .rv-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
  .rv-layout{grid-template-columns:1fr;gap:44px}
  .rv-side{position:static}
}
@media (max-width:640px){
  .rv-banner{padding:38px 0 30px}
  .rv-blog-wrap{padding:36px 0 54px}
  .rv-grid,.rv-grid-3{grid-template-columns:1fr;gap:22px}
  .rv-content{font-size:16px}
  .rv-content h2{font-size:22px}
}
@media (prefers-reduced-motion:reduce){
  .rv-card,.rv-card-media img,.rv-readmore span{transition:none!important}
  .rv-card:hover{transform:none}
  .rv-card:hover .rv-card-media img{transform:none}
}

/* ===================================================================
   Spacing, compact hero and the home-page strip
   =================================================================== */

/* The theme banner uses a 200px top pad, which pushes content far down.
   Tighten it on blog views only, and scale it back further on phones. */
body.single-post .breadcrumb-area,
body.blog .breadcrumb-area,
body.archive .breadcrumb-area{
  padding-top:92px;
  padding-bottom:34px;
}
/* the banner also carries a large min-height from the theme on some views */
body.single-post .breadcrumb-area .breadcrumb-wrap,
body.blog .breadcrumb-area .breadcrumb-wrap{padding-block:0}
body.single-post .breadcrumb-area .breadcrumb-title,
body.blog .breadcrumb-area .breadcrumb-title{
  font-size:clamp(24px,3.2vw,40px);
  line-height:1.2;
}

/* Breathing room between the banner and the article, not a canyon. */
.rv-blog-wrap{padding:38px 0 70px}

/* Featured image: product shots are square, so cap the height and show
   the whole valve rather than a 600px crop. */
/* Featured image: rendered at 1200x628 (1.91:1). The subsize file is built at
   exactly those pixels, so aspect-ratio only reserves the box before load
   (no layout shift) and contain is a safety net for legacy images. */
.rv-hero{
  margin:0 auto 26px;
  max-width:1200px;
  width:100%;
  background:#fff;
  border:1px solid var(--rv-line);
}
.rv-hero img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:1200 / 628;
  object-fit:contain;
}

/* ---------- home page strip ---------- */
.rv-home-blog{padding:72px 0;background:var(--rv-soft);border-top:1px solid var(--rv-line)}
.rv-home-head{
  display:flex;justify-content:space-between;align-items:flex-end;
  gap:18px;flex-wrap:wrap;margin-bottom:30px;
}
.rv-home-eyebrow{
  display:block;font-size:12px;letter-spacing:.1em;text-transform:uppercase;
  color:#000;font-weight:600;margin-bottom:6px;
}
.rv-home-title{margin:0;font-size:clamp(23px,2.6vw,33px);font-weight:700;color:#000;line-height:1.2}
.rv-home-all{
  color:#000;font-weight:600;font-size:15px;text-decoration:none;
  display:inline-flex;gap:7px;align-items:center;white-space:nowrap;
}
.rv-home-all:hover{color:var(--rv-accent)}
.rv-home-all span{transition:transform .18s ease}
.rv-home-all:hover span{transform:translateX(3px)}
.rv-home-blog .rv-card{background:#fff}

/* ---------- phones ---------- */
@media (max-width:900px){
  .rv-home-blog .rv-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  body.single-post .breadcrumb-area,
  body.blog .breadcrumb-area,
  body.archive .breadcrumb-area{padding-top:62px;padding-bottom:22px}
  body.single-post .breadcrumb-area .breadcrumb-title,
  body.blog .breadcrumb-area .breadcrumb-title{font-size:21px;line-height:1.25}
  body.single-post .fx-blog-details-meta{font-size:12px;gap:8px;flex-wrap:wrap}
  .rv-blog-wrap{padding:26px 0 48px}
  .rv-hero{max-width:100%;margin-bottom:20px}
  .rv-home-blog{padding:48px 0}
  .rv-home-blog .rv-grid-3{grid-template-columns:1fr}
  .rv-home-head{margin-bottom:22px}
  .rv-content{font-size:16px;line-height:1.75}
  .rv-content h2{font-size:21px;margin-top:1.6em}
  .rv-content h3{font-size:18px}
  .rv-content table{display:block;overflow-x:auto;white-space:nowrap}
  .rv-card-body{padding:15px 16px 18px}
  .rv-card-title{font-size:17.5px}
}

/* The theme adds its own 70px inner padding plus generous margins inside the
   banner, which pushed the article far below the fold. Tighten on blog views. */
body.single-post .breadcrumb-content,
body.blog .breadcrumb-content,
body.archive .breadcrumb-content{padding-top:0}
body.single-post .breadcrumb-list,
body.blog .breadcrumb-list{margin-bottom:8px}
body.single-post .breadcrumb-title,
body.blog .breadcrumb-title{margin-bottom:12px}
body.single-post .breadcrumb-disc,
body.blog .breadcrumb-disc{margin-bottom:0;font-size:15px}
body.single-post .fx-blog-details-meta{margin-bottom:6px}

@media (max-width:640px){
  body.single-post .breadcrumb-list,
  body.blog .breadcrumb-list{margin-bottom:6px}
  body.single-post .breadcrumb-title,
  body.blog .breadcrumb-title{margin-bottom:10px}
  body.single-post .breadcrumb-disc,
  body.blog .breadcrumb-disc{font-size:14px}
}
