/*
Theme Name:   Bella Maria Child
Theme URI:    https://bella-maria.com/
Description:  Child theme for Divi. Holds the site CSS that used to live in Divi Theme Options and in per-module "Custom CSS" (free-form) fields inside the Divi Builder.
Author:       Bella Maria
Template:     Divi
Version:      1.0.0
Text Domain:  bella-maria-child
*/

/* ==========================================================================
   Global site CSS
   Source: Divi -> Theme Options -> General -> Custom CSS (option et_divi[divi_custom_css]).
   Moved here verbatim; it was already global, so the cascade is unchanged.
   ========================================================================== */

:root {
  --bm-line-color: #e7d683;
}

/* Reserve the final desktop Theme Builder header geometry before Divi's
   late dynamic rules finish. Without these early dimensions the two header
   sections can paint at roughly double height for the first frame and then
   pull the whole page upward. Keep this limited to desktop, where the
   production header uses the 67px utility bar + 93px navigation band. */
@media (min-width: 981px) {
  header.et-l--header .et_pb_section.et_pb_section_0_tb_header {
    height: 67px !important;
    min-height: 67px !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
  }

  header.et-l--header .et_pb_section.et_pb_section_0_tb_header > .et_pb_row {
    height: 37px !important;
    min-height: 37px !important;
  }

  header.et-l--header .et_pb_section.et_pb_section_1_tb_header {
    height: 93px !important;
    min-height: 93px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  header.et-l--header .et_pb_section.et_pb_section_1_tb_header > .et_pb_row {
    height: 93px !important;
    min-height: 93px !important;
  }
}

/* Critical first-paint typography for the stable hero class. The full module
   styles remain in their original late cascade, but this small head-loaded
   rule prevents the browser from painting a default 30px heading before the
   footer-loaded child CSS arrives and expands the hero column. */
.hero-title .et_pb_text_inner h1 {
  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 .et_pb_text_inner h1 {
    font-size: 58px !important;
  }
}

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

/* Project category archives should retain the publication date without
   exposing the administrative author account in the rendered metadata. The
   server-side Divi filter below removes the author fragment from the module
   HTML; this rule keeps any remaining date metadata aligned with the site's
   existing 14px archive typography. */
body.tax-project_category .et_pb_post.type-project .post-meta {
  font-size: 0 !important;
}

body.tax-project_category .et_pb_post.type-project .post-meta .published {
  font-size: 14px !important;
}

/* Content and footer links inherit their colour; Divi buttons and the
   category links that are deliberately disabled are excluded. */
.et-l--body a:not(.et_pb_button),
.et-l--footer a:not(.et_pb_button),
#main-content a:not(.et_pb_button),
#main-footer a:not(.et_pb_button) {
  color: inherit;
  transition: color 0.25s ease;
}

.et-l--body a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a),
.et-l--footer a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a),
#main-content a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a),
#main-footer a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a) {
  color: inherit;
  transition: color 0.25s ease;
}

/* Gold on hover and on keyboard focus. */
.et-l--body a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a):hover,
.et-l--body a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a):focus,
.et-l--footer a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a):hover,
.et-l--footer a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a):focus,
#main-content a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a):hover,
#main-content a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a):focus,
#main-footer a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a):hover,
#main-footer a:not(.et_pb_button):not(.bm-no-category-links):not(.bm-no-category-links a):focus {
  color: #e7d683 !important;
}

/* ---------- Type scale -----------------------------------------------------
   Add the bm-type-scale class to a parent Section or Row. */
.bm-type-scale {
  --bm-body-size: 18px;
  --bm-body-line-height: 1.7;

  --bm-h1-size: 72px;
  --bm-h1-line-height: 1;

  --bm-h2-size: 50px;
  --bm-h2-line-height: 1.08;

  --bm-h3-size: 36px;
  --bm-h3-line-height: 1.15;

  --bm-h4-size: 26px;
  --bm-h4-line-height: 1.25;

  --bm-h5-size: 20px;
  --bm-h5-line-height: 1.3;

  --bm-h6-size: 16px;
  --bm-h6-line-height: 1.35;

  font-size: 16px;
  line-height: var(--bm-body-line-height);
}

.bm-type-scale :where(.et_pb_text, .et_pb_text_inner, p, li) {
  font-size: var(--bm-body-size);
  line-height: var(--bm-body-line-height);
}

.bm-type-scale :where(h1) {
  font-size: var(--bm-h1-size);
  line-height: var(--bm-h1-line-height);
}

.bm-type-scale :where(h2) {
  font-size: var(--bm-h2-size);
  line-height: var(--bm-h2-line-height);
}

.bm-type-scale :where(h3) {
  font-size: var(--bm-h3-size);
  line-height: var(--bm-h3-line-height);
}

.bm-type-scale :where(h4, .subtitle, .subheading) {
  font-size: var(--bm-h4-size);
  line-height: var(--bm-h4-line-height);
}

.bm-type-scale :where(h5) {
  font-size: var(--bm-h5-size);
  line-height: var(--bm-h5-line-height);
}

.bm-type-scale :where(h6) {
  font-size: var(--bm-h6-size);
  line-height: var(--bm-h6-line-height);
}

/* Tablet */
@media (max-width: 980px) {
  .bm-type-scale {
    --bm-body-size: 17px;

    --bm-h1-size: 56px;
    --bm-h1-line-height: 1.02;

    --bm-h2-size: 42px;
    --bm-h3-size: 32px;
    --bm-h3-line-height: 1.14;

    --bm-h4-size: 23px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .bm-type-scale {
    --bm-body-size: 15px;
    --bm-body-line-height: 1.65;

    --bm-h1-size: 40px;
    --bm-h1-line-height: 1.05;

    --bm-h2-size: 32px;
    --bm-h2-line-height: 1.1;

    --bm-h3-size: 26px;
    --bm-h3-line-height: 1.14;

    --bm-h4-size: 21px;
    --bm-h5-size: 17px;
    --bm-h6-size: 14px;
  }
}

/* ---------- Horizontal photo -----------------------------------------------
   Use on Divi Image modules with the bm-horizontal-photo CSS class. */
.bm-horizontal-photo,
.bm-horizontal-photo .et_pb_image_wrap,
.bm-horizontal-photo .et_pb_image_wrap > a {
  display: block;
  width: 100%;
}

.bm-horizontal-photo .et_pb_image_wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.bm-horizontal-photo .et_pb_image_wrap > a,
.bm-horizontal-photo .et_pb_image_wrap img {
  height: 100%;
}

.bm-horizontal-photo .et_pb_image_wrap img {
  display: block;
  width: 100% !important;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767px) {
  .bm-horizontal-photo .et_pb_image_wrap {
    aspect-ratio: 4 / 3;
  }
}

/* ---------- Cookie banner --------------------------------------------------
   Уменьшить баннер на телефонах. */
@media (max-width: 767px) {
  .cookieadmin_law_container {
    width: 88% !important;
    left: 50% !important;
    transform: translateX(-50%) scale(0.85);
    transform-origin: bottom center;
  }
}
