/*
 * Site-wide module CSS, moved out of per-module "Custom CSS" fields in the Divi Builder.
 *
 * Everything here is class-scoped AND was verified to appear only where the
 * original modules live, so it is inert elsewhere. Rules whose classes turned
 * out to exist on other pages too, or which target global selectors, live in
 * the page-scoped files instead: home.css, tiles.css, policies.css.
 *
 * Printed at the end of <body> (see functions.php) because that is where Divi
 * emitted these fields; loading them from <head> loses the cascade against
 * Divi's own generated module CSS.
 */

/* ==========================================================================
   Header  — from Theme Builder header layout #34
   ========================================================================== */

.bm-header {
  position: relative;
  z-index: auto !important;
}

/* Match the working production layer model: the header wrapper stays at the
   base context, the beige section is above its row, and only the menu/logo
   content is raised above the slab. */
.et-l--header {
  position: static !important;
  z-index: auto !important;
}

.et-l--header .et_builder_inner_content {
  position: relative !important;
  /* Do not create a parent stacking context: the fixed brown utility bar
     must participate in the root context and stay above the hero slab. */
  z-index: auto !important;
}

/* Keep an opaque beige band in the page layer, below the hero slab. The
   section and row themselves stay transparent only as containers so their
   menu/logo children can remain in the higher interactive layer. */
@media (min-width: 981px) {
  .et-l--header .et_builder_inner_content::before {
    content: "";
    position: absolute;
    top: 67px;
    left: 0;
    right: 0;
    height: 93px;
    background: #ece4e0;
    z-index: 0;
    pointer-events: none;
  }
}

.et-l--header .et_pb_section.bm-header {
  position: relative !important;
  z-index: 2 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

.et-l--header .et_pb_section.bm-header > .et_pb_row {
  position: relative !important;
  z-index: -1 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Divi's generated section rule can be more specific than the stable class
   rule above. Keep the same split explicit on the live header section/row. */
body header.et-l--header .et_pb_section.et_pb_section_1_tb_header.bm-header,
body header.et-l--header .et_pb_section.et_pb_section_1_tb_header.bm-header > .et_pb_row.et_pb_row_1_tb_header {
  background: rgba(0, 0, 0, 0) !important;
  background-color: rgba(0, 0, 0, 0) !important;
  background-image: none !important;
}

.et-l--header .et_pb_menu.bm-header {
  position: relative !important;
  z-index: 100 !important;
}

/* Stable child-theme owner for Divi's top sticky utility bar. The current
   Divi setting is 9999; this lower value is still above page content, below
   the WordPress admin bar, and can replace the dynamic module setting after
   the DB cleanup checkpoint. */
.et-l--header .et_pb_section.et_pb_sticky--top {
  z-index: 9999 !important;
}

.menu-item.bm-header-menu > a {
  text-decoration: underline !important;
  text-decoration-color: transparent !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 8px !important;
  transition: text-decoration-color 0.3s ease !important;
}

.menu-item.bm-header-menu > a:hover {
  text-decoration-color: var(--bm-line-color) !important;
}

.et_pb_menu__logo-slot a:hover,
.et_pb_menu__logo-slot a:focus {
  background: transparent !important;
  opacity: 1 !important;
}

.et_pb_menu__menu nav ul {
  gap: 30px !important;
}

/* Tablet breakpoint of the header row. Divi emitted this inside its own
   max-width:980px group, so the wrapper is reproduced here. */
@media only screen and (max-width: 980px) {
  .et_mobile_nav_menu {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }

  .et_mobile_nav_menu .et_mobile_menu {
    width: min(86vw, 280px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }

}

/* ==========================================================================
   Footer — from Theme Builder footer layout #719
   ========================================================================== */

.footer-columns {
  display: flex;
  align-items: stretch;
}

.footer-columns > .et_pb_column,
.footer-columns > .wp-block-column {
  display: flex;
  flex-direction: column;
  justify-content: center; /* контент по центру высоты */
  align-self: stretch;
}

/* Динамическая линия на всю высоту ряда */
.footer-columns > .et_pb_column:not(:first-child),
.footer-columns > .wp-block-column:not(:first-child) {
  border-left: 1px solid #e7d683;
}

.footer_showroom h3 {
  font-size: 35px !important;
}

/* Contact form confirmation message.
   Deduplicated: this one-liner existed three times — footer layout #719,
   Contact Us #1169 and the "Popup - Project Form" layout #2353. */
.et-pb-contact-message {
  text-align: center !important;
}

/* ==========================================================================
   Related materials — from Theme Builder body layout #1182
   (single projects in the "stock-materials" category)
   Deduplicated: the identical rule was set on both the section and the
   portfolio module inside it.
   ========================================================================== */

/* Disable category links only inside the related materials portfolio */
.bm-related-materials .post-meta a {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none !important;
  cursor: default !important;
}

/* ==========================================================================
   Hero title
   Deduplicated: the same declaration block was repeated five times — twice on
   Home #25 and once each on Countertops #221, Tiles #289 and About Us #303.
   All five copies were identical in effect.
   ========================================================================== */

.hero-title h1,
.hero-title .et_pb_text_inner {
  font-size: 82px !important;
  line-height: 0.95 !important;

  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

@media (max-width: 980px) {
  .hero-title h1,
  .hero-title .et_pb_text_inner {
    font-size: 58px !important;
  }
}

@media (max-width: 767px) {
  .hero-title h1,
  .hero-title .et_pb_text_inner {
    font-size: 44px !important;
    line-height: 1 !important;
  }
}

/* The page typography sheet is intentionally generic and is loaded after
 * this file. Keep hero headings at the design-system size on those pages. */
body .hero-title .et_pb_text_inner h1 {
  font-size: 82px !important;
  line-height: 0.95 !important;
}

@media (max-width: 980px) {
  body .hero-title .et_pb_text_inner h1 {
    font-size: 58px !important;
  }
}

@media (max-width: 767px) {
  body .hero-title .et_pb_text_inner h1 {
    font-size: 44px !important;
    line-height: 1 !important;
  }
}

/* Contact showroom rows use the existing stable `bm-map-stretch` module class,
 * not generated Divi row IDs and not a full-page block reserialization. */
@media (max-width: 767px) {
  body.page-id-1169 .et_pb_row:has(> .et_pb_column:first-child .bm-map-stretch) {
    display: flex !important;
    flex-direction: column-reverse !important;
  }

  body.page-id-1169 .et_pb_row:has(> .et_pb_column:last-child .bm-map-stretch) {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Quote popup form.
 *
 * The popup section is reused from footer layout #719. On pages that use a
 * different Theme Builder footer (notably Policies), Divi renders the same
 * markup without loading that layout's generated form CSS. Keep the form
 * geometry in the child theme so the popup does not fall back to browser
 * defaults: two half-width fields, followed by full-width select/textarea.
 * These values match the working footer popup and do not change field names,
 * validation or submission behavior.
 */
.bm-project-popup .bm-project-popup-content > .et_pb_column.et-last-child {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}

.bm-project-popup .et_pb_contact_form {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 15px !important;
}

.bm-project-popup .et_pb_contact_field {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bm-project-popup .et_pb_contact_form_label {
  display: none !important;
}

.bm-project-popup .et_pb_contact_field.et_flex_column_12_24 {
  flex: 0 1 calc(50% - 7.5px) !important;
  width: calc(50% - 7.5px) !important;
}

.bm-project-popup .et_pb_contact_field.et_flex_column_24_24 {
  flex: 0 1 100% !important;
  width: 100% !important;
}

.bm-project-popup .et_pb_contact_field input,
.bm-project-popup .et_pb_contact_field select,
.bm-project-popup .et_pb_contact_field textarea {
  box-sizing: border-box !important;
  width: 100% !important;
}

.bm-project-popup .et_pb_contact_field input,
.bm-project-popup .et_pb_contact_field select {
  min-height: 51px !important;
  height: 51px !important;
}

.bm-project-popup .et_pb_contact_field input,
.bm-project-popup .et_pb_contact_field textarea {
  padding: 16px !important;
}

.bm-project-popup .et_pb_contact_field select {
  padding: 16px 20px 16px 16px !important;
}

.bm-project-popup .et_pb_contact_field textarea {
  min-height: 150px !important;
  height: 150px !important;
}

/* ==========================================================================
   Map — from Contact Us #1169 (row .bm-map-stretch)
   ========================================================================== */

.bm-map-stretch {
  height: 100% !important;
  min-height: 500px !important;
  z-index: 2 !important;
}

.bm-map-stretch .et_pb_code_inner {
  height: 100% !important;
  min-height: 500px !important;
}

.bm-map-stretch iframe {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 500px !important;
  border: 0 !important;
}
