/*
Theme Name:  Bricks Child — Rossiter's Removals
Template:    bricks
Version:     1.0.0
Description: Child theme for Rossiter's Removals. Brand identity, CSS custom properties, and custom hooks.
Author:      Avada Digital
*/

/* =====================================================================
   BRAND CUSTOM PROPERTIES
   All design tokens for the site. Referenced throughout Bricks elements
   and Core Framework utility classes.
   ===================================================================== */

:root {
  /* --- Teal palette (confirmed client brand colours) --- */
  --brand-primary:       #10464e;  /* Main brand teal — hero BG, nav, primary sections */
  --brand-primary-mid:   #46676c;  /* Mid teal — hover states, secondary BG, icon fills */
  --brand-primary-light: #5d7577;  /* Muted teal-grey — borders, captions, light text */
  --brand-primary-pale:  #e0eced;  /* Very light teal — card fills, alternating sections */

  /* --- CTA / accent --- */
  --brand-accent:        #e07b39;  /* Warm amber-orange — all primary CTA buttons */
  --brand-accent-dark:   #b8601f;  /* CTA hover/active state */

  /* --- Neutrals --- */
  --brand-dark:          #081e22;  /* Near-black (teal-derived) — headings, footer BG */
  --brand-warm:          #f5f0eb;  /* Warm off-white — form areas, alternating sections */
  --brand-white:         #ffffff;

  /* --- Supporting --- */
  --brand-border:        #c4d4d6;  /* Input borders, card dividers */
  --brand-text-body:     #1a3035;  /* Long-form body copy */
  --brand-text-light:    #5d7577;  /* Captions, meta, secondary labels */
  --brand-success:       #27ae60;
  --brand-error:         #e53e3e;

  /* --- Typography --- */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Open Sans', sans-serif;

  /* --- Spacing scale (rem-based) --- */
  --space-xs:  0.5rem;   /*  8px */
  --space-sm:  1rem;     /* 16px */
  --space-md:  1.5rem;   /* 24px */
  --space-lg:  3rem;     /* 48px */
  --space-xl:  5rem;     /* 80px */
  --space-2xl: 7.5rem;   /* 120px */

  /* --- Layout --- */
  --container-max:  1200px;
  --container-wide: 1440px;

  /* --- Border radius --- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
}

/* =====================================================================
   TYPOGRAPHY DEFAULTS
   Applied globally — Bricks Theme Styles will override per-element
   but these ensure consistent baseline rendering.
   ===================================================================== */

body {
  font-family: var(--font-body);
  color:        var(--brand-text-body);
  line-height:  1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family:    var(--font-heading);
  color:          var(--brand-dark);
  letter-spacing: -0.01em;
  line-height:    1.15;
}

/* =====================================================================
   SERVICE PAGE HEROES — background image overlays
   Same approach as homepage: CSS ::before over the section image.
   House Clearances uses a slightly softer overlay for appropriate tone.
   ===================================================================== */

/* About page hero */
#brxe-c4b475 {
  position: relative;
  isolation: isolate;
}
#brxe-c4b475::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(16,70,78,0.80) 0%, rgba(8,30,34,0.90) 100%);
  z-index: 0;
}
#brxe-c4b475 > .brxe-container { position: relative; z-index: 1; }

/* About story split — CSS Grid for precise equal-column layout */

/* Removals, Packing, Storage, Service Areas — standard teal gradient overlay */
#brxe-431b99,  /* Service Areas */
#brxe-5b1b6b,
#brxe-f74ec8,
#brxe-9e21b7 {
  position: relative;
  isolation: isolate;
}

#brxe-431b99::before,
#brxe-5b1b6b::before,
#brxe-f74ec8::before,
#brxe-9e21b7::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(16, 70, 78, 0.80) 0%,
    rgba(8,  30, 34, 0.90) 100%
  );
  z-index: 0;
}

#brxe-431b99 > .brxe-container,
#brxe-5b1b6b > .brxe-container,
#brxe-f74ec8 > .brxe-container,
#brxe-9e21b7 > .brxe-container {
  position: relative;
  z-index: 1;
}

/* House Clearances — slightly warmer, deeper overlay for respectful tone */
#brxe-9765cb {
  position: relative;
  isolation: isolate;
}

#brxe-9765cb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(8, 30, 34, 0.82) 0%,
    rgba(16, 70, 78, 0.88) 100%
  );
  z-index: 0;
}

#brxe-9765cb > .brxe-container {
  position: relative;
  z-index: 1;
}

/* =====================================================================
   HERO — background image overlay
   Photo sits behind a directional teal gradient:
   slightly transparent at top (image shows), deeper at bottom (text contrast).
   ===================================================================== */

#brxe-dd70ac {
  position: relative;
  isolation: isolate;
}

#brxe-dd70ac::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(16, 70, 78, 0.78) 0%,
    rgba(8,  30, 34, 0.88) 100%
  );
  z-index: 0;
}

/* Lift inner content above the overlay */
#brxe-dd70ac > .brxe-container {
  position: relative;
  z-index: 1;
}

/* =====================================================================
   HERO TRUST BAR — remove orphaned right border on the last stat item
   ===================================================================== */

#brxe-d3b91d > .brxe-block:last-child {
  border-right: none !important;
}

/* =====================================================================
   CONTACT PAGE — form + info split layout
   ===================================================================== */

/* ── CONTACT FORM + INFO LAYOUT ─────────────────────────────────────── */

/* Split: prevent 100% width default on blocks */
#brxe-89f063 {
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
}
#brxe-89f063 > .brxe-block {
  width: auto !important;
  min-width: 0;
}

/* "Prefer to Talk?" card: sticky just below the Bricks header */
#brxe-89f063 > .brxe-block:last-child {
  position: sticky;
  top: 92px; /* Bricks sticky header height */
  align-self: flex-start;
}

/* When WP admin bar is visible (logged-in users), add 32px */
.admin-bar #brxe-89f063 > .brxe-block:last-child {
  top: 124px;
}

@media (max-width: 900px) {
  #brxe-89f063 {
    flex-wrap: wrap !important;
  }
  #brxe-89f063 > .brxe-block:last-child {
    position: static;
  }
}

/* ── FORM FIELD STYLING ──────────────────────────────────────────────── */

/* Remove any Bricks default orange gap/background from form rows */
.brxe-form .form-group,
.brxe-form .fields-wrapper,
.brxe-form > div {
  background-color: transparent !important;
}

/* Inputs, textarea, select */
.brxe-form input:not([type="submit"]),
.brxe-form textarea,
.brxe-form select {
  border: 1.5px solid #c4d4d6 !important;
  border-radius: 6px !important;
  padding: 12px 16px !important;
  font-family: 'Open Sans', sans-serif !important;
  font-size: 15px !important;
  color: #1a3035 !important;
  background-color: #ffffff !important;
  width: 100% !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none !important;
}

.brxe-form input:not([type="submit"]):focus,
.brxe-form textarea:focus,
.brxe-form select:focus {
  border-color: #10464e !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(16,70,78,0.1) !important;
}

/* Labels */
.brxe-form label {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  color: #10464e !important;
  margin-bottom: 6px !important;
  display: block !important;
}

/* Submit button */
.brxe-form input[type="submit"],
.brxe-form button[type="submit"] {
  background-color: #e07b39 !important;
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 14px 40px !important;
  border-radius: 4px !important;
  border: none !important;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  width: auto !important;
  display: inline-block;
}

.brxe-form input[type="submit"]:hover,
.brxe-form button[type="submit"]:hover {
  background-color: #b8601f !important;
  transform: translateY(-2px);
}

/* =====================================================================
   PROCESS STEP ARROWS
   Desktop: chevron-right sits between horizontal steps
   Mobile: rotate 90° to point down when steps stack vertically
   ===================================================================== */

.process-arrow {
  flex-shrink: 0;
  align-self: center;
  transition: transform 0.2s ease;
}

@media (max-width: 767px) {
  .process-arrow {
    transform: rotate(90deg);
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 4px 0;
  }
}

/* =====================================================================
   SERVICE PAGE — split content sections
   .brxe-block defaults to width:100% which prevents flex-row side-by-side.
   Force nowrap and reset child block widths for all split containers.
   ===================================================================== */

#brxe-c58c6c,  /* Removals split */
#brxe-24ce81,  /* Packing split */
#brxe-72ea84,  /* Storage split */
#brxe-59ac0e   /* About story */
{
  flex-wrap: nowrap !important;
}

#brxe-c58c6c > .brxe-block,
#brxe-24ce81 > .brxe-block,
#brxe-72ea84 > .brxe-block,
#brxe-59ac0e > .brxe-block {
  width: auto !important;
  min-width: 0;
}

/* About story: switch to CSS Grid for exact equal-width columns that match heights */
#brxe-59ac0e {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: stretch !important;
  flex-wrap: unset !important;
}

#brxe-59ac0e > .brxe-block {
  width: auto !important;
  min-width: 0;
}

/* Image-wrap fills full grid cell height */
#brxe-59ac0e > .brxe-block:last-child {
  height: 100%;
  min-height: 420px;
}

#brxe-59ac0e .brxe-image {
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  min-height: 420px;
}

#brxe-59ac0e .brxe-image img {
  border-radius: 16px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile: stack to single column */
@media (max-width: 767px) {
  #brxe-59ac0e {
    grid-template-columns: 1fr !important;
  }
  #brxe-59ac0e > .brxe-block:last-child {
    min-height: 280px;
  }
}

/* Mobile: allow split sections to stack again */
@media (max-width: 767px) {
  #brxe-c58c6c,
  #brxe-24ce81,
  #brxe-72ea84 {
    flex-wrap: wrap !important;
  }
}

/* Image cover fill and rounding on all service page split photos */
.brxe-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

/* Reinforce rounded corners on split section image wrappers */
#brxe-c58c6c .brxe-image,
#brxe-24ce81 .brxe-image,
#brxe-72ea84 .brxe-image {
  border-radius: 16px;
  overflow: hidden;
}

#brxe-c58c6c .brxe-image img,
#brxe-24ce81 .brxe-image img,
#brxe-72ea84 .brxe-image img {
  border-radius: 16px;
}

/* =====================================================================
   SCROLL REVEAL — sections fade and slide up as they enter the viewport.
   Bricks toggles the .bricks-lazy-hidden class via IntersectionObserver.
   ===================================================================== */

#brx-content .brxe-section {
  will-change: opacity, transform;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

#brx-content .brxe-section.bricks-lazy-hidden {
  opacity: 0;
  transform: translateY(28px);
}

/* Card-level reveal — slightly staggered by being children */
#brx-content .brxe-block.bricks-lazy-hidden {
  opacity: 0;
  transform: translateY(16px);
}

#brx-content .brxe-block {
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================================
   BUTTON HOVER EFFECTS
   ===================================================================== */

/* Base transition for all Bricks buttons */
.bricks-button {
  transition: background-color 0.2s ease,
              border-color 0.2s ease,
              color 0.2s ease,
              box-shadow 0.2s ease,
              transform 0.15s ease;
  cursor: pointer;
}

/* Universal lift on hover — no shadow, just the lift */
.bricks-button:hover {
  transform: translateY(-2px);
}

/* Ensure no residual shadow leaks in from other rules */
.bricks-button {
  box-shadow: none;
}

/* ── Orange/accent primary CTAs → darken only, no shadow ── */
/* Header CTA */
#brxe-f69d1c:hover {
  background-color: #b8601f !important;
}

/* Hero primary CTA */
#brxe-2ed5a3:hover {
  background-color: #b8601f !important;
}

/* Footer CTA buttons */
#brxe-ac92cf:hover {
  background-color: #b8601f !important;
}

/* CTA section — white button on orange bg → very subtle warm tint */
#brxe-2c7676:hover {
  background-color: #f0ebe5 !important;
}

/* ── Ghost / outline button (hero 'Our Services') ── */
#brxe-61d545:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
}

/* ── Orange underline link buttons (service cards) ── */
#brxe-cae494:hover,
#brxe-426702:hover,
#brxe-582b04:hover {
  color: #b8601f !important;
  border-bottom-color: #b8601f !important;
  transform: translateX(3px); /* nudge right for arrow-like feel */
}

/* ── Services dropdown menu — brand styling ── */

/* Submenu container */
.bricks-nav-menu .sub-menu.brx-submenu-positioned {
  background-color: #10464e !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 28px rgba(8, 30, 34, 0.25) !important;
  padding: 10px 0 !important;
  min-width: 210px !important;
  overflow: hidden;
}

/* Submenu links */
.bricks-nav-menu .sub-menu.brx-submenu-positioned li a {
  color: #e0eced !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  padding: 10px 20px !important;
  display: block;
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

/* Submenu link hover → orange */
.bricks-nav-menu .sub-menu.brx-submenu-positioned li a:hover {
  color: #e07b39 !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Submenu active/current page */
.bricks-nav-menu .sub-menu.brx-submenu-positioned .current-menu-item > a,
.bricks-nav-menu .sub-menu.brx-submenu-positioned .current_page_item > a {
  color: #e07b39 !important;
}

/* Dropdown toggle button (chevron next to Services) */
.bricks-nav-menu > li > .brx-submenu-toggle > button {
  color: #1a3035 !important;
  transition: color 0.2s ease;
}
.bricks-nav-menu > li > .brx-submenu-toggle > button:hover,
.bricks-nav-menu > li > .brx-submenu-toggle > button[aria-expanded="true"] {
  color: #e07b39 !important;
}
.bricks-nav-menu > li > .brx-submenu-toggle > button svg path {
  stroke: currentColor;
}

/* ── Nav hover and active page indicators ── */
.bricks-nav-menu > li > a,
.bricks-nav-menu > li > .brx-submenu-toggle > a {
  transition: color 0.2s ease;
}

/* Hover: orange colour */
.bricks-nav-menu > li > a:hover,
.bricks-nav-menu > li > .brx-submenu-toggle > a:hover {
  color: #e07b39 !important;
}

/* Active / current page: orange + subtle underline dot */
.bricks-nav-menu > .current-menu-item > a,
.bricks-nav-menu > .current_page_item > a,
.bricks-nav-menu > .current-menu-ancestor > a {
  color: #e07b39 !important;
  position: relative;
}

.bricks-nav-menu > .current-menu-item > a::after,
.bricks-nav-menu > .current_page_item > a::after,
.bricks-nav-menu > .current-menu-ancestor > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background-color: #e07b39;
  border-radius: 2px;
}

/* =====================================================================
   FOCUS STYLES — WCAG AA
   Visible focus ring for keyboard navigation.
   ===================================================================== */

:focus-visible {
  outline:        3px solid var(--brand-accent);
  outline-offset: 3px;
}

/* =====================================================================
   SELECTION
   ===================================================================== */

::selection {
  background: var(--brand-primary);
  color:      var(--brand-white);
}

/* =====================================================================
   HEADER — prevent all header text items from wrapping
   ===================================================================== */

/* Nav menu items */
.bricks-nav-menu > li > a,
.bricks-nav-menu > li > .brx-submenu-toggle > a {
  white-space: nowrap;
}

/* CTA button text */
#brx-header .brxe-button {
  white-space: nowrap;
}

/* =====================================================================
   FOOTER BOTTOM BAR
   ===================================================================== */

/* Copyright single line */
#brxe-a33175 {
  white-space: nowrap;
}

/* Privacy Policy and Avada Digital — match copyright font size exactly */
#brxe-a14950,
#brxe-8c6892 {
  font-size: 13px;
}

/* =====================================================================
   HEADER — logo: prevent flex shrinking and ensure correct aspect ratio.
   The img has HTML width/height attributes; CSS must enforce auto-width.
   ===================================================================== */

/* Prevent the logo flex item from being compressed by the flex container */
#brx-header .brxe-logo {
  flex-shrink: 0;
}

/* Ensure logo image scales correctly at the Bricks-generated height */
.bricks-site-logo {
  width: auto !important;
  height: auto;
}

/* Footer bottom bar: prevent row from wrapping to second line */
#brxe-299fd1 {
  flex-wrap: nowrap !important;
}
