/* ==========================================================================
   Extreme Marketing (Divi 5 child) - house styles

   Each group is switched on by a body class from
   Appearance > Customize > Extreme Marketing Theme > House styles:

     html :where(body.em-hs-type)   typography and buttons
     html :where(body.em-hs-ui)     menus and forms
     html :where(body.em-hs-blog)   blog and archive pages

   Every selector is written as  html :where(body.em-hs-...) <divi selector>  so it
   outranks Divi's stylesheet defaults by one step and nothing more. Design settings
   made on an individual Divi module, and button styles set in Divi's Theme
   Customizer, still win over these.
   ========================================================================== */

/* ------------------------------------------------- typography and buttons */
html :where(body.em-hs-type) { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html :where(body.em-hs-type) h1,
html :where(body.em-hs-type) h2,
html :where(body.em-hs-type) h3,
html :where(body.em-hs-type) h4 { line-height: 1.15; text-wrap: balance; }
html :where(body.em-hs-type) h1,
html :where(body.em-hs-type) h2 { letter-spacing: -0.02em; }
html :where(body.em-hs-type) p { text-wrap: pretty; }
html :where(body.em-hs-type) ::selection { background: var(--em-brand); color: #fff; }
html :where(body.em-hs-type) a:focus-visible,
html :where(body.em-hs-type) button:focus-visible,
html :where(body.em-hs-type) .et_pb_button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--em-brand) 55%, #fff);
  outline-offset: 3px;
}

html :where(body.em-hs-type) .et_pb_button,
html :where(body.em-hs-type) .et_pb_bg_layout_light.et_pb_button {
  padding: 0.7em 1.5em;
  border-radius: var(--em-btn-radius);
  border-color: var(--em-brand);
  background-color: var(--em-brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s var(--em-ease), box-shadow 0.25s var(--em-ease);
}
html :where(body.em-hs-type) .et_pb_button:hover,
html :where(body.em-hs-type) .et_pb_bg_layout_light.et_pb_button:hover,
html :where(body.em-hs-type) .et_pb_bg_layout_light .et_pb_button:hover { background-color: color-mix(in srgb, var(--em-brand) 84%, #000); }
/* Divi's own hover rule widens the padding for its arrow and clears the border; undo both */
html :where(body.em-hs-type) .et_pb_button:hover,
html :where(body.em-hs-type) .et_pb_module .et_pb_button:hover {
  padding: 0.7em 1.5em;
  border-color: color-mix(in srgb, var(--em-brand) 84%, #000);
}
/* remove the arrow that slides in on hover; modules that switch an icon on still show it */
html :where(body.em-hs-type) .et_pb_button:not(.et_pb_custom_button_icon)::after { display: none; }

/* --------------------------------------------------------- menus and forms */
html :where(body.em-hs-ui) .nav li ul,
html :where(body.em-hs-ui) .et_mobile_menu {
  border-top: 0;
  border-radius: 0 0 var(--em-radius) var(--em-radius);
  box-shadow: 0 22px 44px -22px color-mix(in srgb, var(--em-ink) 45%, transparent);
}
html :where(body.em-hs-ui) .nav li ul { padding: 12px 0; border-radius: var(--em-radius); }
html :where(body.em-hs-ui) .et_mobile_menu { padding: 10px; }
html :where(body.em-hs-ui) .et_mobile_menu li a {
  padding: 12px 14px;
  border-bottom: 0;
  border-radius: 10px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}
html :where(body.em-hs-ui) .et_mobile_menu li a:hover,
html :where(body.em-hs-ui) .nav ul li a:hover {
  background-color: color-mix(in srgb, var(--em-brand) 9%, transparent);
  opacity: 1;
}
html :where(body.em-hs-ui) .et_mobile_menu .sub-menu { padding-left: 12px; }

html :where(body.em-hs-ui) .et_pb_contact p input,
html :where(body.em-hs-ui) .et_pb_contact p textarea,
html :where(body.em-hs-ui) #commentform input[type='text'],
html :where(body.em-hs-ui) #commentform input[type='email'],
html :where(body.em-hs-ui) #commentform input[type='url'],
html :where(body.em-hs-ui) #commentform textarea,
html :where(body.em-hs-ui) .et_pb_search input.et_pb_s {
  border: 1px solid transparent;
  border-radius: var(--em-btn-radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
html :where(body.em-hs-ui) .et_pb_contact p input:focus,
html :where(body.em-hs-ui) .et_pb_contact p textarea:focus,
html :where(body.em-hs-ui) #commentform input:focus,
html :where(body.em-hs-ui) #commentform textarea:focus {
  border-color: var(--em-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--em-brand) 22%, transparent);
  outline: 0;
}
html :where(body.em-hs-ui) .et_pb_contact_form .input[type='checkbox'] + label i,
html :where(body.em-hs-ui) .et_pb_contact_form .input[type='radio'] + label i { transition: box-shadow 0.2s ease; }
html :where(body.em-hs-ui) .et-pb-contact-message { font-weight: 500; }

/* ------------------------------------------------- blog and archive pages */
html :where(body.em-hs-blog) .et_pb_blog_grid .et_pb_post {
  border: 1px solid color-mix(in srgb, var(--em-ink) 10%, transparent);
  border-radius: var(--em-radius);
  overflow: hidden;
  transition: transform 0.35s var(--em-ease), box-shadow 0.35s var(--em-ease);
}
html :where(body.em-hs-blog) .et_pb_blog_grid .et_pb_post:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 22px 44px -22px color-mix(in srgb, var(--em-ink) 40%, transparent);
}
html :where(body.em-hs-blog) .et_pb_post .entry-featured-image-url img,
html :where(body.em-hs-blog) .et_pb_blog_grid .et_pb_image_container img { transition: transform 0.7s var(--em-ease); }
html :where(body.em-hs-blog) .et_pb_post:hover .entry-featured-image-url img,
html :where(body.em-hs-blog) .et_pb_blog_grid .et_pb_post:hover .et_pb_image_container img { transform: scale(1.04); }
html :where(body.em-hs-blog) .et_pb_post .entry-featured-image-url { display: block; overflow: hidden; border-radius: var(--em-radius); }
html :where(body.em-hs-blog) .et_pb_blog_grid .et_pb_post .entry-featured-image-url { border-radius: 0; }

html :where(body.em-hs-blog) .et_pb_post .entry-title,
html :where(body.em-hs-blog) .et_pb_post h2 { line-height: 1.25; }
html :where(body.em-hs-blog) .et_pb_post .entry-title a { transition: color 0.2s ease; }
html :where(body.em-hs-blog) .et_pb_post .entry-title a:hover { color: var(--em-brand); }
html :where(body.em-hs-blog) .et_pb_post .post-meta,
html :where(body.em-hs-blog) .et_pb_title_meta_container { font-size: 14px; opacity: 0.75; }
html :where(body.em-hs-blog) .et_pb_post a.more-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--em-brand);
  font-weight: 600;
  text-transform: none;
}

html :where(body.em-hs-blog.single-post) .entry-content { font-size: 17px; line-height: 1.8; }
html :where(body.em-hs-blog.single-post) .entry-content h2,
html :where(body.em-hs-blog.single-post) .entry-content h3 { margin-top: 1.6em; }
html :where(body.em-hs-blog.single-post) .entry-content img { border-radius: var(--em-radius); }
html :where(body.em-hs-blog.single-post) .entry-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--em-brand);
  font-size: 1.1em;
}

html :where(body.em-hs-blog) .wp-pagenavi a,
html :where(body.em-hs-blog) .wp-pagenavi span,
html :where(body.em-hs-blog) .pagination a {
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--em-ink) 12%, transparent) !important;
  border-radius: 999px;
  font-weight: 600 !important;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
html :where(body.em-hs-blog) .wp-pagenavi span.current,
html :where(body.em-hs-blog) .wp-pagenavi a:hover,
html :where(body.em-hs-blog) .pagination a:hover {
  border-color: var(--em-brand) !important;
  background-color: var(--em-brand);
  color: #fff !important;
}

html :where(body.em-hs-blog) #sidebar .widgettitle,
html :where(body.em-hs-blog) .et_pb_widget .widgettitle { font-size: 17px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  html :where(body.em-hs-type) .et_pb_button,
  html :where(body.em-hs-blog) .et_pb_blog_grid .et_pb_post,
  html :where(body.em-hs-blog) .et_pb_post img { transition: none; transform: none !important; }
}
