/*
Theme Name:   Beckenham Computer Repair
Description:  Child theme of Envision for computerservicesandrepairs.co.uk. Cleaner type, clearer contact details, home page hero, mobile call bar and speed fixes. The parent theme and page content are left untouched.
Template:     envision
Version:      1.5.0
Text Domain:  beckenham-computer-repair
*/

/* ---------- Tokens ---------- */
:root {
  --bcr-ink: #1E2A38;       /* headings, header bar, footer */
  --bcr-text: #2B3642;      /* body copy */
  --bcr-red: #D0152D;       /* brand red, used only for actions */
  --bcr-red-dark: #A80F23;
  --bcr-bench: #EEF1F4;     /* panel background */
  --bcr-rule: #D5DBE1;
  --bcr-open: #1F8A4C;
  --bcr-focus: #FFB000;
  --bcr-font: "Atkinson Hyperlegible", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base type ---------- */
html body,
html body p, html body li, html body td, html body input, html body textarea, html body select, html body button,
#page-wrap .auto-format, #page-wrap .auto-format p {
  font-family: var(--bcr-font) !important;
}
html body { color: var(--bcr-text); font-size: 17px; line-height: 1.6; border-top: 0; }
#page-content .auto-format p, #page-content p, #page-content li { font-size: 17px !important; line-height: 1.65 !important; color: var(--bcr-text); }
#page-content p { max-width: 72ch; }
#page-content .ui-column p { max-width: none; }

html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
#page-wrap .ui--title-text, #page-wrap h1 a, #page-wrap h2 a, #page-wrap h3 a {
  font-family: var(--bcr-font) !important;
  font-weight: 700 !important;
  color: var(--bcr-ink) !important;
  letter-spacing: -0.01em;
  text-transform: none !important;
}
#page-content h1 { font-size: 2.1rem !important; line-height: 1.2 !important; }
#page-content h2 { font-size: 1.65rem !important; line-height: 1.25 !important; margin: 1.4em 0 .5em !important; }
#page-content h3 { font-size: 1.3rem !important; line-height: 1.3 !important; margin: 1.2em 0 .4em !important; }

#page-content a { color: var(--bcr-ink); text-decoration: underline; text-decoration-color: var(--bcr-red); text-underline-offset: 3px; }
#page-content a:hover { color: var(--bcr-red); }
#page-content .ui--title-text a, #page-content .ui--image-wrap a { text-decoration: none; }
#page-content .ui--title-text a:hover { color: var(--bcr-red) !important; }

:focus-visible { outline: 3px solid var(--bcr-focus) !important; outline-offset: 2px; }

/* Section titles: drop the decorative side lines */
.ui--title-borders { display: none !important; }
.ui--title-text { padding-left: 0 !important; padding-right: 0 !important; max-width: 100%; }
.ui--divider { border-color: var(--bcr-rule) !important; }

/* ---------- Info bar ---------- */
.bcr-infobar { background: var(--bcr-ink); color: #fff; font-size: 15px; line-height: 1.4; }
.bcr-infobar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; padding: 9px 0; }
.bcr-infobar a { color: #fff !important; text-decoration: none; }
.bcr-infobar a:hover { text-decoration: underline; }
.bcr-infobar__phone { margin-left: auto; font-weight: 700; font-size: 16px; }
.bcr-status::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #8A96A3; margin-right: 8px; vertical-align: 1px; }
.bcr-status.is-open::before { background: #3DDC84; }

/* ---------- Header & navigation ---------- */
#header-container { box-shadow: none !important; border-bottom: 1px solid var(--bcr-rule); }
#header-navigation > li > a {
  font-family: var(--bcr-font) !important; font-size: 16px !important; font-weight: 700 !important;
  color: var(--bcr-ink) !important; text-transform: none !important; letter-spacing: 0 !important;
  border-bottom: 3px solid transparent !important;
}
#header-navigation > li > a:hover, #header-navigation > li.current-menu-item > a { border-bottom-color: var(--bcr-red) !important; color: var(--bcr-ink) !important; background: none !important; }

/* ---------- Home hero ---------- */
body.bcr-hero-ready #the-content .xcz { height: auto !important; min-height: 460px; display: flex; align-items: center; }
body.bcr-hero-ready .xcz .ui--video-background { opacity: 1 !important; }
body.bcr-hero-ready .xcz .ui--video-background .ui--gradient {
  background: linear-gradient(90deg, rgba(30,42,56,.85) 0%, rgba(30,42,56,.55) 45%, rgba(30,42,56,.05) 100%) !important;
}
body.bcr-hero-ready .xcz .ui--section-content { position: relative; z-index: 2; width: 100%; }
.bcr-hero { max-width: 38rem; padding: 64px 32px 56px; text-align: left; }
.bcr-hero--with-form { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 48px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.bcr-hero__text { max-width: 36rem; }

/* Quote form card in the hero */
.bcr-hero__form { background: #fff; border-radius: 8px; padding: 22px 24px 18px; color: var(--bcr-ink); }
.bcr-hero__form .wpcf7 h4, .bcr-hero__form .footer-widget-title { font-size: 1.3rem !important; margin: 0 0 12px !important; color: var(--bcr-ink) !important; }
#page-content .bcr-hero__form p { font-size: 15px !important; line-height: 1.4 !important; margin: 0 0 4px !important; color: var(--bcr-ink) !important; max-width: none; }
.bcr-hero__form .wpcf7-form-control-wrap { margin: 2px 0 10px; }
.bcr-hero__form input[type="text"], .bcr-hero__form input[type="email"], .bcr-hero__form input[type="tel"], .bcr-hero__form textarea {
  width: 100% !important; max-width: 100% !important; box-sizing: border-box; font-size: 16px !important;
  border: 1px solid var(--bcr-rule) !important; border-radius: 6px !important; padding: 9px 11px !important; min-height: 42px; box-shadow: none !important; margin: 0 !important;
}
.bcr-hero__form textarea { height: 84px !important; min-height: 84px; resize: vertical; }
.bcr-hero__form input:focus, .bcr-hero__form textarea:focus { border-color: var(--bcr-ink) !important; }
.bcr-hero__form input[type="submit"] {
  width: 100%; background: var(--bcr-red) !important; background-image: none !important; color: #fff !important; border: 0 !important;
  border-radius: 6px !important; padding: 13px 20px !important; font-size: 17px !important; font-weight: 700; text-shadow: none !important; margin-top: 4px;
}
.bcr-hero__form input[type="submit"]:hover { background: var(--bcr-red-dark) !important; }
.bcr-hero__form .wpcf7-response-output { margin: 10px 0 0 !important; font-size: 15px; }
.bcr-hero__form .wpcf7-spinner { position: absolute; }
#page-content .bcr-hero .bcr-hero__title, html body .bcr-hero__title {
  font-family: var(--bcr-font) !important; font-weight: 700 !important; display: block;
  color: #fff !important; font-size: clamp(2.1rem, 4.4vw, 3.2rem) !important; line-height: 1.08 !important;
  margin: 0 0 18px !important; letter-spacing: -0.02em;
}
#page-content .bcr-hero__lede { color: #E3E8EE !important; font-size: 19px !important; line-height: 1.55 !important; margin: 0 0 26px; }
.bcr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.bcr-btn { display: inline-block; padding: 14px 22px; border-radius: 6px; font-weight: 700; font-size: 17px; line-height: 1.2; text-decoration: none !important; }
#page-content .bcr-btn--primary { background: var(--bcr-red); color: #fff !important; }
#page-content .bcr-btn--primary:hover { background: var(--bcr-red-dark); }
#page-content .bcr-btn--ghost { color: #fff !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
#page-content .bcr-btn--ghost:hover { box-shadow: inset 0 0 0 2px #fff; background: rgba(255,255,255,.08); }

/* The repair-ticket status tag */
#page-content .bcr-hero__ticket {
  display: inline-block; margin: 30px 0 0; padding: 8px 14px 8px 18px;
  background: #fff; color: var(--bcr-ink) !important; font-size: 15px !important; font-weight: 700;
  border-radius: 4px; border-left: 4px solid var(--bcr-red);
}
.bcr-hero__ticket .bcr-status.is-open::before { background: var(--bcr-open); }

/* Old welcome heading now sits under the hero */
.bcr-welcome { font-size: 1.65rem !important; }
body.bcr-hero-ready .ui--title.text-center { text-align: left !important; margin-top: 36px; }

/* ---------- Content boxes pasted into pages ---------- */
#the-content [style*="font-family"] { font-family: var(--bcr-font) !important; }
#the-content div[style*="border-radius"]:not(.cta-strip) {
  background: #fff !important; border: 1px solid var(--bcr-rule) !important; border-radius: 8px !important;
  box-shadow: none !important; padding: 26px 28px !important;
}
#the-content div[style*="border-radius"] > h2:first-child, #the-content div[style*="border-radius"] > h3:first-child { margin-top: 0 !important; }
#the-content div[style*="border-radius"] + div[style*="border-radius"] { margin-top: 20px !important; }
#the-content h2[style], #the-content h3[style], #the-content p[style] { color: inherit; }
#the-content h2[style], #the-content h3[style] { color: var(--bcr-ink) !important; }
#the-content ul[style] { padding-left: 22px !important; }
#the-content .cta-strip { background: var(--bcr-bench) !important; color: var(--bcr-ink) !important; border-radius: 8px !important; padding: 22px !important; }
#the-content .cta-strip p { color: var(--bcr-ink) !important; font-weight: 700; max-width: none; }
#the-content .cta-strip a { background: var(--bcr-red) !important; color: #fff !important; border-radius: 6px !important; text-decoration: none; }
#the-content .contact-box { background: var(--bcr-bench) !important; border: 0 !important; }

/* Inner page title bar */
#titlebar { background: var(--bcr-bench) !important; border-bottom: 1px solid var(--bcr-rule) !important; }
#titlebar h1, #titlebar .titlebar-title { font-size: 2rem !important; }
#titlebar .breadcrumb, #titlebar .breadcrumb a { font-size: 14px !important; color: #56616D !important; }

/* Images */
#page-content img { max-width: 100%; height: auto; border-radius: 6px; }

/* ---------- Footer ---------- */
.ui--footer { background: var(--bcr-ink) !important; }
#footer-widgets, #footer-widgets p, #footer-widgets .textwidget { color: #C9D1DA !important; font-size: 16px !important; line-height: 1.6 !important; }
#footer-widgets a { color: #fff !important; }
#footer-widgets .footer-widget-title { color: #fff !important; font-size: 1.2rem !important; }
#footer-bottom { background: #16202B !important; border-top: 0 !important; }
#footer-bottom, #footer-bottom a { color: #9AA6B2 !important; font-size: 14px !important; }
#wpcf7-f1307-o1 input[type="submit"] { background: var(--bcr-red) !important; color: #fff !important; border: 0 !important; border-radius: 6px; padding: 12px 26px; font-weight: 700; }

/* ---------- Mobile call bar ---------- */
.bcr-mobilebar { display: none; }
@media (max-width: 979px) {
  .bcr-hero--with-form { grid-template-columns: 1fr; gap: 28px; }
  .bcr-hero__form { max-width: 480px; }
}

@media (max-width: 767px) {
  .bcr-mobilebar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--bcr-ink); box-shadow: 0 -1px 0 rgba(255,255,255,.12);
  }
  .bcr-mobilebar a { flex: 1; text-align: center; padding: 15px 8px; color: #fff !important; font-weight: 700; font-size: 17px; text-decoration: none; }
  .bcr-mobilebar a:first-child { background: var(--bcr-red); }
  html body { padding-bottom: 56px; }
  #toTop { display: none !important; }

  .bcr-infobar__addr, .bcr-infobar__phone { display: none; }
  .bcr-infobar__inner { padding: 8px 16px; }
  .bcr-hero { padding: 44px 20px 40px; }
  .bcr-hero--with-form { grid-template-columns: 1fr; gap: 28px; }
  body.bcr-hero-ready #the-content .xcz { min-height: 0; }
  #page-content .bcr-hero__lede { font-size: 17px !important; }
  #the-content div[style*="border-radius"]:not(.cta-strip) { padding: 20px !important; }
  #page-content h1 { font-size: 1.75rem !important; }
  #page-content h2 { font-size: 1.4rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ui--animation { animation: none !important; transition: none !important; opacity: 1 !important; }
}

/* ================= v1.2: narrower page, service cards, new footer ================= */

/* Comfortable page width on big screens */
@media (min-width: 1200px) {
  .container { width: 1120px !important; }
}

/* Make content rows flexible so columns fit the new width */
@media (min-width: 768px) {
  #the-content .ui-row.row { display: flex; gap: 30px; margin-left: 0 !important; width: auto; }
  #the-content .ui-row.row::before, #the-content .ui-row.row::after { display: none; }
  #the-content .ui-row.row > [class*="span"] { float: none !important; margin-left: 0 !important; width: auto !important; min-width: 0; flex: 1 1 0; }
  #the-content .ui-row.row > .span2 { flex-grow: 2; }  #the-content .ui-row.row > .span3 { flex-grow: 3; }
  #the-content .ui-row.row > .span4 { flex-grow: 4; }  #the-content .ui-row.row > .span5 { flex-grow: 5; }
  #the-content .ui-row.row > .span6 { flex-grow: 6; }  #the-content .ui-row.row > .span7 { flex-grow: 7; }
  #the-content .ui-row.row > .span8 { flex-grow: 8; }  #the-content .ui-row.row > .span9 { flex-grow: 9; }
  #the-content .ui-row.row > .span12 { flex-grow: 12; }
}

/* Home page: each service becomes a card */
body.home #the-content > .ui-row.row { margin-top: 28px; margin-bottom: 0; }
body.home #the-content > .ui-row.row > .ui-column {
  background: var(--bcr-bench); border-radius: 10px; padding: 26px 26px 12px;
}
body.home #the-content > .ui-row.row > .ui-column .ui--title { margin-bottom: 14px; }
body.home #the-content > .ui-row.row > .ui-column .ui--title-text { font-size: 1.45rem !important; }
body.home #the-content > .ui-row.row > .ui-column .ui-row.row { gap: 22px; }
body.home #the-content > .ui-row.row > .ui-column img { border-radius: 8px; width: 100%; height: auto; }
body.home #the-content > .ui-row.row > .ui-column ul { margin-left: 18px !important; }
body.home #the-content > .ui-row.row > .ui-column li { font-size: 16px !important; margin-bottom: 2px; }
body.home #the-content > .ui--divider { margin: 36px 0 !important; }
@media (max-width: 767px) {
  body.home #the-content > .ui-row.row > .ui-column { margin-bottom: 20px; padding: 22px 20px 8px; }
  body.home #the-content > .ui-row.row > .ui-column img { max-width: 220px; margin-bottom: 12px; }
}

/* Hero form: undo the old footer-form styling that used to target this form */
.bcr-hero__form .wpcf7 { border: 0 !important; padding: 0 !important; border-radius: 0 !important; }
.bcr-hero__form .wpcf7 p, .bcr-hero__form .wpcf7 h4 { text-align: left !important; }

/* Footer: one contact block with the map beside it */
#footer-widgets .ui-row > .widget-area { width: 100% !important; float: none !important; margin-left: 0 !important; }
#footer-widgets { padding-top: 48px !important; padding-bottom: 40px !important; }
#footer-widgets .textwidget { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); column-gap: 48px; align-items: start; }
#footer-widgets .textwidget > p { grid-column: 1; margin: 0 0 14px; }
#footer-widgets .textwidget > .map-embed { grid-column: 2; grid-row: 1 / span 10; margin-top: 0 !important; }
#footer-widgets .map-embed iframe { display: block; width: 100%; height: 280px; border-radius: 8px !important; }
#footer-widgets .bcr-footer-hours { color: #fff !important; font-weight: 700; }
@media (max-width: 767px) {
  #footer-widgets .textwidget { grid-template-columns: 1fr; }
  #footer-widgets .textwidget > .map-embed { grid-column: 1; grid-row: auto; margin-top: 16px !important; }
  #footer-widgets .map-embed iframe { height: 220px; }
}

/* v1.3: appointment-only messaging */
.bcr-infobar__appt { font-weight: 700; }
.bcr-infobar__appt::before { content: ""; display: inline-block; width: 1px; height: 14px; background: rgba(255,255,255,.35); margin-right: 28px; vertical-align: -2px; }
#page-content .bcr-hero__ticket { line-height: 1.35 !important; }
.bcr-hero__ticket-note { display: block; font-weight: 400; font-size: 14px; color: #56616D; margin-top: 2px; padding-left: 17px; }
@media (max-width: 767px) {
  .bcr-infobar__appt { display: block; width: 100%; font-size: 14px; }
  .bcr-infobar__appt::before { display: none; }
}

/* v1.4: anti-spam honeypot stays out of sight */
.bcr-hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* v1.5: quote card heading */
#page-content .bcr-hero__form .bcr-hero__form-title { font-size: 1.35rem !important; margin: 0 0 12px !important; color: var(--bcr-ink) !important; }
.bcr-hero__form .wpcf7-turnstile, .bcr-hero__form .cf-turnstile { margin: 4px 0 10px; }
