/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */
/* Add to the ACTIVE child theme's style.css.
   Header Menu widget > Advanced > CSS Classes: ka-primary-menu
   WordPress menu order: Home, About Me, About My Book, Contact, More Reflections.
   The final top-level menu item becomes the button. Footer menus are unaffected. */

/* REPLACE all previous ka-primary-menu button CSS in the child theme.
Header menu order: Home, About Me, About My Book, Contact, More Reflections.
The final item becomes a button only when there are at least five items.
No WordPress menu-item class required. V7 includes ka-primary-menu on the widget. */
.elementor .ka-primary-menu .elementor-nav-menu > li:last-child:nth-child(n+5) > a.elementor-item {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  margin-inline-start: 16px;
  padding: 12px 22px !important;
  border: 1px solid transparent;
  border-radius: 9px;
  background-color: #fff !important;
  color: #3b0009 !important;
  white-space: nowrap;
  text-decoration: none;
}
.elementor .ka-primary-menu .elementor-nav-menu > li:last-child:nth-child(n+5) > a.elementor-item::before,
.elementor .ka-primary-menu .elementor-nav-menu > li:last-child:nth-child(n+5) > a.elementor-item::after {
  display: none !important;
}
.elementor .ka-primary-menu .elementor-nav-menu > li:last-child:nth-child(n+5) > a.elementor-item:hover,
.elementor .ka-primary-menu .elementor-nav-menu > li:last-child:nth-child(n+5) > a.elementor-item:focus {
  background-color: #e9e9e9 !important;
  color: #3b0009 !important;
}
.elementor .ka-primary-menu .elementor-nav-menu > li:last-child:nth-child(n+5) > a.elementor-item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.elementor .ka-primary-menu .elementor-nav-menu--dropdown .elementor-nav-menu > li:last-child:nth-child(n+5) {
  padding: 8px 20px 16px;
}
.elementor .ka-primary-menu .elementor-nav-menu--dropdown .elementor-nav-menu > li:last-child:nth-child(n+5) > a.elementor-item {
  margin: 0;
  width: 100%;
  white-space: normal;
  text-align: center;
}

/* Replace the previous blog-wrap CSS. Subsequent paragraphs can wrap too. */
.wp-block-group.ka-blog-wrap {
  display: block !important;
  overflow: visible !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0;
}
.wp-block-group.ka-blog-wrap::after {
  content: none !important;
  display: none !important;
}
.wp-block-group.ka-blog-wrap > figure.ka-blog-wrap-image {
  display: block !important;
  float: right !important;
  clear: none !important;
  width: 48% !important;
  max-width: 48% !important;
  margin: 0 0 16px 24px !important;
}
.wp-block-group.ka-blog-wrap > figure.ka-blog-wrap-image img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
}
.elementor-widget-theme-post-content p,
.wp-block-group.ka-blog-wrap > p {
  margin: 0 0 24px !important;
  clear: none;
}
/* New section headings start below any remaining image. */
.elementor-widget-theme-post-content .wp-block-heading { clear: both; }
@media (max-width: 767px) {
  .wp-block-group.ka-blog-wrap > figure.ka-blog-wrap-image {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 20px !important;
  }
}

/* Study-guide form: full-width, vertically stacked fields */
.elementor-widget-form:has(#ka-guide) {
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch;
}

#ka-guide {
  width: 100%;
}

#ka-guide .elementor-form-fields-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

#ka-guide .elementor-field-group {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  box-sizing: border-box;
}

#ka-guide input.elementor-field,
#ka-guide button[type="submit"] {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-height: 46px;
  box-sizing: border-box;
}

/* More Reflections: white, clickable cards. */
.elementor .ka-reflection-archive .elementor-post {
  position: relative;
  isolation: isolate;
  cursor: pointer;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(59, 0, 9, 0.08);
  transition: box-shadow 0.2s ease;
}

/* Let the title link cover the entire card. */
.elementor .ka-reflection-archive .elementor-post__text,
.elementor .ka-reflection-archive .elementor-post__title,
.elementor .ka-reflection-archive .elementor-post__title a {
  position: static;
}

.elementor .ka-reflection-archive .elementor-post__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 12px;
  cursor: pointer;
}

/* Rounded image corners. */
.elementor .ka-reflection-archive .elementor-post__thumbnail {
  border-radius: 12px 12px 0 0;
}

/* Comfortable text padding. */
.elementor .ka-reflection-archive .elementor-post__text {
  padding: 20px 24px 24px !important;
}

/* Stronger shadow on hover. */
@media (hover: hover) {
  .elementor .ka-reflection-archive .elementor-post:hover {
    background-color: #fff;
    box-shadow: 0 8px 24px rgba(59, 0, 9, 0.14);
  }
}

/* Visible keyboard focus around the whole card. */
.elementor .ka-reflection-archive .elementor-post__title a:focus-visible::after {
  outline: 3px solid #70333e;
  outline-offset: 4px;
}

/* Mobile spacing. */
@media (max-width: 767px) {
  .elementor .ka-reflection-archive .elementor-post__text {
    padding: 18px 20px 22px !important;
  }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .elementor .ka-reflection-archive .elementor-post {
    transition: none;
  }
}

/* Homepage Reflections cards */
.elementor .ka-home-reflections .elementor-post {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(59, 0, 9, 0.08);
}

.elementor .ka-home-reflections .elementor-post__thumbnail__link {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  margin-bottom: 0;
}

.elementor .ka-home-reflections .elementor-post__text {
  padding: 18px 20px 22px;
}

@media (max-width: 767px) {
  .elementor .ka-home-reflections .elementor-post__text {
    padding-inline: 16px;
  }
}