/*!
Theme Name: Star Housing Kadence Child
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Description: A child theme for the Kadence Theme.
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* Theme customization starts here
-------------------------------------------------------------- 
00. CORE
01. SITEWIDE
02. HEADER
03. FOOTER
10. PAGE > HERO
30. SPECIFIC PAGES
	31. Homepage
  32. Corporate Pages
  33. Report Request Apply Page
  34. Search Page (Mobile)
50. BLOCK CUSTOMISATIONS
  51. TOC block
  52. Person Cards for Person CPT
  53. TSMs flip cards
60. WIDGETS
70. PLUGINS
  71. Recite Me Plugin Customisation
  72. The Events Calendar
80. CUSTOM POST TYPES
99. HOTFIXES & BUGS

/* ---------------------------------------------------
* 00. CORE 
* ---------------------------------------------------*/
/*Text balance */
.balance {
  text-wrap: balance;
}

/* ---------------------------------------------------
 * 01. SITEWIDE
 * ---------------------------------------------------*/

body>div#wrapper {
  max-width: 2580px;
  margin: 0 auto;
}

/* Custom Buttons - Kadence advanced button must use the theme style */
.kt-button.button.kb-btn-global-inherit {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.kt-button.button.kb-btn-global-inherit::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 0;
  background: var(--global-palette2);
  left: 0;
  bottom: 0;
  transition: width ease-in-out 0.3s;
  z-index: -1;
  opacity: 1;
  border-radius: 0 50px 50px 0;
}

.kt-button.button.kb-btn-global-inherit:hover::before {
  width: 100%;
}

.kb-button.kb-btn-global-outline {
  text-align: left;
  line-height: 1.4;
}

/* TOC rows */
.kb-row-layout-wrap.star-toc-row:hover {
  background-color: var(--global-palette7);
}

.kb-row-layout-wrap.star-toc-row {
  transition: all ease-in-out 0.2s;
}

/* Blog post related content */
body .entry-related-carousel h3.entry-title {
  font-size: 1rem;
  color: var(--global-palette3);
}

body .kadence-breadcrumbs {
  font-size: 1rem;
}

/* ---------------------------------------------------
 * 02. HEADER
 * ---------------------------------------------------*/
/* Make background dark */
ul#primary-menu li.kadence-menu-mega-enabled>.sub-menu {
  box-shadow: 0 100vw 0 100vw #0000008c;
}

#primary-menu li.menu-item:last-child {
  border-right: none;
}

#primary-menu .sub-menu {
  margin-top: -1px;
}

.main-navigation .primary-menu-container .sub-menu>li.menu-item.menu-item-has-children>a,
.main-navigation .primary-menu-container .sub-menu>li.menu-item.star-force-bold>a {
  font-weight: 700;
  border-bottom: 2px solid var(--global-palette1);
}

.main-navigation .primary-menu-container .sub-menu>li.star-force-bold>a {
  margin-top: 2rem;
}

/* Add link to mobile header links */
.mobile-menu-container.drawer-menu-container a::before {
  content: "";
  width: 1rem;
  height: 1rem;
  vertical-align: middle;
  display: inline-block;
  margin-right: 0.5rem;
  background-color: var(--global-palette9);
  /* Use the SVG as a mask */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 128'%3E%3Cpath d='m124 8v36c0 2.211-1.789 4-4 4s-4-1.789-4-4v-26.344l-57.172 57.172c-.781.781-1.805 1.172-2.828 1.172s-2.047-.391-2.828-1.172c-1.563-1.563-1.563-4.094 0-5.656l57.172-57.172h-26.344c-2.211 0-4-1.789-4-4s1.789-4 4-4h36c2.211 0 4 1.789 4 4zm-16 104v-48c0-2.211-1.789-4-4-4s-4 1.789-4 4v48c0 2.207-1.793 4-4 4h-80c-2.207 0-4-1.793-4-4v-80c0-2.207 1.793-4 4-4h48c2.211 0 4-1.789 4-4s-1.789-4-4-4h-48c-6.617 0-12 5.383-12 12v80c0 6.617 5.383 12 12 12h80c6.617 0 12-5.383 12-12z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 128'%3E%3Cpath d='m124 8v36c0 2.211-1.789 4-4 4s-4-1.789-4-4v-26.344l-57.172 57.172c-.781.781-1.805 1.172-2.828 1.172s-2.047-.391-2.828-1.172c-1.563-1.563-1.563-4.094 0-5.656l57.172-57.172h-26.344c-2.211 0-4-1.789-4-4s1.789-4 4-4h36c2.211 0 4 1.789 4 4zm-16 104v-48c0-2.211-1.789-4-4-4s-4 1.789-4 4v48c0 2.207-1.793 4-4 4h-80c-2.207 0-4-1.793-4-4v-80c0-2.207 1.793-4 4-4h48c2.211 0 4-1.789 4-4s-1.789-4-4-4h-48c-6.617 0-12 5.383-12 12v80c0 6.617 5.383 12 12 12h80c6.617 0 12-5.383 12-12z'/%3E%3C/svg%3E");

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.mobile-menu-container.drawer-menu-container .kadence-menu-icon-side-left .menu-label-icon-wrap {
  display: none;
}

/* ---------------------------------------------------
 * 03. FOOTER
 * ---------------------------------------------------*/

.pre-footer::before {
  content: "";
  width: 100%;
  height: clamp(150px, 12vw, 270px);
  display: block;
  background: var(--global-palette1);
  mask-image: url(/wp-content/themes/kadence-child/svg/star-landscape-mask.svg);
  mask-size: cover;
  mask-repeat: no-repeat;
  mask-position: left bottom;
}

/* ---------------------------------------------------
 * 30. SPECIFIC PAGES
 * ---------------------------------------------------*/
/* 32. Corporate Pages */
:root body.star-corporate-style {
  --global-palette1: #002856;
  --global-palette2: #215387;
  --global-palette3: #1a202c;
  --global-palette4: #2d3748;
  --global-palette5: #4a5568;
  --global-palette6: #718096;
  --global-palette7: #edf2f7;
  --global-palette8: #f7fafc;
  --global-palette9: #ffffff;
  --global-palette11: #13612e;
  --global-palette12: #1159af;
  --global-palette13: #b82105;
  --global-palette14: #f7630c;
  --global-palette15: #f5a524;
  --global-palette-highlight: var(--global-palette2);
  --global-palette-highlight-alt: var(--global-palette1);
  --global-palette-highlight-alt2: var(--global-palette9);
  --global-palette-btn-bg: var(--global-palette1);
  --global-palette-btn-bg-hover: var(--global-palette1);
  --global-palette-btn: var(--global-palette9);
  --global-palette-btn-hover: var(--global-palette9);
  --global-palette-btn-sec-bg: var(--global-palette7);
  --global-palette-btn-sec-bg-hover: var(--global-palette2);
  --global-palette-btn-sec: var(--global-palette3);
  --global-palette-btn-sec-hover: var(--global-palette9);
}

body.star-corporate-style:not(.star-override) .wp-block-kadence-image img.kb-img {
  border-radius: 0;
}

body.star-corporate-style:not(.star-override) .page-title .kadence-breadcrumbs {
  color: var(--global-palette9);
}

/* 33. Report Request Apply Page */
.star-equal-heights .kb-query-item>.kb-row-layout-wrap {
  height: 100%;
}

.star-equal-heights .kb-query-item>.kb-row-layout-wrap>.kt-row-column-wrap {
  height: 100%;
}

/* 34. Search Page (Mobile) */
body #search-drawer .drawer-inner input.search-field,
body #search-drawer .drawer-inner input.search-field:focus {
  background: #fff;
  box-shadow: none;
  color: #000;
}

.tribe-events-page-template .kadence-breadcrumbs {
  color: var(--global-palette9);
}

/* ---------------------------------------------------
 * 50. BLOCK CUSTOMISATIONS
 * ---------------------------------------------------*/
/* 51. Table of contents row | Class: .stat-toc-row */

.star-toc-row ul li {
  list-style-type: none;
  padding-left: 10px;
  font-size: var(--global-kb-font-size-xsm);
  color: var(--global-palette1);
}

.star-toc-row ul li::before {
  content: "➔";
  color: var(--global-palette1);
  padding-right: 10px;
  transition: all ease-in-out 0.2s;
}

.star-toc-row ul li:hover::before {
  padding-right: 5px;
  padding-left: 5px;
  color: var(--global-palette3);
}

div.kb-row-layout-wrap.star-toc-row div.kt-row-column-wrap ul li a:hover {
  text-decoration: none;
  color: var(--global-palette3);
}

/* Target the Table of contents row only on the 'documents' custom post type */
.single-documents .content-area .entry-content>.star-toc-row:first-child {
  margin-top: -3rem !important;
}

/* Child page button group 
 * use Kadence advanced button, outline style, button group class .star-child-page-button-group */
.wp-block-kadence-advancedbtn.star-child-page-button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 540px) {
  .wp-block-kadence-advancedbtn.star-child-page-button-group {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (min-width: 1025px) {
  .wp-block-kadence-advancedbtn.star-child-page-button-group.star-button-group-5-col {
    grid-template-columns: repeat(5, 1fr);
  }

  .wp-block-kadence-advancedbtn.star-child-page-button-group.star-button-group-4-col {
    grid-template-columns: repeat(4, 1fr);
  }

  .wp-block-kadence-advancedbtn.star-child-page-button-group.star-button-group-3-col {
    grid-template-columns: repeat(3, 1fr);
  }
}

.wp-block-kadence-advancedbtn.star-child-page-button-group.one-col {
  grid-template-columns: 1fr;
}

.star-child-page-button-group.wp-block-kadence-advancedbtn .kb-button.kb-btn-global-outline {
  border: 1px solid color-mix(in lab, var(--global-palette7, #edf2f7) 90%, #000);
}

.star-child-page-button-group .kb-button.kb-btn-global-outline span.kb-svg-icon-wrap {
  padding: 6px;
  border-radius: 20%;
  border: 2px solid var(--global-palette1);
}

.star-child-page-button-group .kb-button.kb-btn-global-outline.kt-btn-has-svg-true {
  justify-content: space-between;
  padding: 0.8rem;
}

.star-child-page-button-group .kt-button.button.kb-btn-global-outline {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.star-child-page-button-group .kt-button.button.kb-btn-global-outline::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 0;
  background: var(--global-palette8);
  left: 0;
  bottom: 0;
  transition: width ease-in-out 0.3s;
  z-index: -1;
  opacity: 1;
}

.star-child-page-button-group .kt-button.button.kb-btn-global-outline:hover::before {
  width: 100%;
}

/** 51. Person Cards for Person CPT
  * Class: .star-person-card 
  * Applied to KB Query block showing Person CPT entries */
li.kb-query-item.type-person {
  position: relative;
  overflow: hidden;
}

/* Image container */
li.kb-query-item.type-person .wp-block-kadence-image {
  position: relative;
  z-index: 1;
}

/* Person details overlay - positioned at bottom of image */
li.kb-query-item.type-person .star-person-details {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
  padding: 1.5rem 1rem 1rem;
  transition: all 0.4s ease;
}

/* Name styling */
li.kb-query-item.type-person .star-person-details h4 {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Title styling */
li.kb-query-item.type-person .star-person-details .star-person-position {
  color: #fff;
  margin-bottom: 0;
}

/* Excerpt - hidden by default */
li.kb-query-item.type-person .star-person-details .star-person-excerpt {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: white !important;
  margin-top: 0.75rem;
  transition: all 0.4s ease;
  transform: translateY(10px);
}

/* Hover state - expand details and show excerpt */
li.kb-query-item.type-person:hover .star-person-details {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 80%, transparent 100%);
  padding-bottom: 1.5rem;
}

li.kb-query-item.type-person:hover .star-person-excerpt {
  max-height: 300px;
  opacity: 1;
  transform: translateY(0);
}

/* Optional: Add a subtle zoom effect to the image */
li.kb-query-item.type-person:hover .kb-img {
  transform: scale(1.05);
  transition: transform 0.4s ease;
}

li.kb-query-item.type-person .kb-img {
  transition: transform 0.4s ease;
}

/* ---------------------------------------------------
 * 52. STAR Numbered List
 * ---------------------------------------------------*/
ol.star-numbered-list>li::marker {
  background-color: var(--global-palette1);
  color: var(--global-palette9);
  font-weight: bold;
  border-radius: 50%;
}

/* ---------------------------------------------------
 * 53. TSMs flip cards
 * For TSM pages.
 * ---------------------------------------------------*/
/* kt-inside-inner-col = inner content */

/* Main container */
div.entry-content .star-flip-card {
  perspective: 1000px;
  /* Remove this if you don't want the 3D effect */
  background-color: transparent;
  min-height: 240px;
}

/* Positions front and back */
div.entry-content .star-flip-card>div:first-of-type {
  position: relative;
  transition:
    transform 0.8s,
    background-color linear;
  transition-delay: 0s, 0.25s;
  transform-style: preserve-3d;
  border-bottom: solid 5px var(--global-palette6);
}

/* Flips the card over with added class */
div.entry-content .star-flip-card.flipped>div:first-of-type {
  transform: rotateY(180deg);
  background-color: var(--global-palette6);
}

/* Styles front and back */
.star-flip-card-front,
.star-flip-card-back {
  width: 100%;
  height: 100%;
  justify-content: center;
  position: absolute;
  backface-visibility: hidden;
}

.star-flip-card-front {
  cursor: pointer;
}

/* Back is rotated to begin with */
.star-flip-card-back {
  transform: rotateY(180deg);
}

.star-flip-card-front .kt-inside-inner-col,
.star-flip-card-back .kt-inside-inner-col {
  position: unset;
}

.star-flip-card-front .wp-block-kadence-icon,
.star-flip-card-back .wp-block-kadence-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  div.entry-content .star-flip-card>div:first-of-type {
    height: 100%;
  }
}

/* ---------------------------------------------------
 * 60. WIDGETS
 * ---------------------------------------------------*/
.widget_categories .children {
  padding-top: 0;
  padding-left: 2rem;
}

/* ---------------------------------------------------
 * 70. PLUGINS
 * ---------------------------------------------------*/
/* 71. Recite Me Plugin Customisation */
#reciteme-launch-button {
  position: fixed;
  top: 65vh;
  left: 0px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--global-palette7);
  width: auto;
  height: auto;
  border-radius: 10px 10px 0px 0;
  transition: all 0.3s ease-in-out;
  transform: rotate(90deg) translateY(-100%);
  transform-origin: left top;
  padding: 5px 10px;
  /* text-transform: uppercase; */
  text-decoration: none;
  color: var(--global-palette1);
  font-weight: bold;
  font-size: 0.8rem;
}

#reciteme-launch-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transform: rotate(-90deg);
}

#reciteme-launch-button span {
  transition: transform 0.3s ease;
  transform-origin: left top;
}

#reciteme-launch-button:hover {
  background-color: var(--global-palette15);
}

#reciteme-launch-button:hover {
  padding: 5px 10px 10px 10px;
}

/* 72. The Events Calendar */
.tribe-common div.tribe-events-calendar-month__calendar-event-details {
  background: var(--global-palette8);
  padding: 5px !important;
  border-radius: 5px;
}

.tribe-events .tribe-events-calendar-month__day-cell.tribe-events-calendar-month__day-cell--mobile.tribe-events-calendar-month__day-cell--selected .tribe-events-calendar-month__day-date-daynum {
  color: var(--global-palette9);
}

/* ---------------------------------------------------
 * 80. CUSTOM POST TYPES
 * ---------------------------------------------------*/
.entry-header .archive-description a {
  color: var(--global-palette9);
}