/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Import parent theme styles */
@import url("../generatepress/style.css");

/* Make the child pages dropdown a bit smaller */
.child-pages-dropdown {
    font-size: 0.9rem;   /* slightly smaller text */
    padding: 0.25em 0.5em;
    max-width: 250px;   /* optional: cap the width */
}

/* Card Accessibility Borrowed from Bootstrap */ 
/* Tutorial: https://youtu.be/HBriBrnRlQE?si=DLiSXEiBHt6lw91l */ 
/* Make sure you only have ONE link inside your card 😅 or this will not work!  */ 
.stretch-link{
	position: relative;
}
.stretch-link a::after{
	content: '';
	position: absolute;
	inset: 0;
}
.stretch-link a:is(:focus-visible)::after{
	outline: 2px solid;
}
.stretch-link a:is(:hover, :focus){
	outline: none;
}

.breadcrumb_last {display:none;}


/* PERSON CPT SOCIAL LINKS STYLES FOR SHORTCODE*/
/* Default centered alignment */
.people-social-links {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    width: fit-content;
}

.people-social-links a {
    display: inline-block;
    font-size: 1em; /* Default size */
    color: #000000;
    text-decoration: none;
    transition: opacity 0.3s ease;
    padding: 5px;
}

/* One-column layout: left-aligned and bigger icons */
.one-column .people-social-links {
    justify-content: flex-start; /* Left align */
    margin: 0; /* Remove auto centering */
}

.one-column .people-social-links a {
    font-size: 1.5em; /* Bigger icons for leadership */
    padding: 5px; /* More padding for bigger icons */
}

.yoast-breadcrumbs {
	justify-self:start;
	padding: 5px 1rem 5px 1rem;
	background-color: #0077d8;
	color:white;
}

.yoast-breadcrumbs a,
.yoast-breadcrumbs a:visited {
  color: white;
}



ul.list_no-margin,
ol.list_no-margin {
  margin: 0;
  padding: 0; /* optional if you also want bullets/indent gone */
}



main li,
.content li,
.entry-content {margin-bottom:.5rem;}

/* RIGHT-ALIGNED IMAGE BREAKOUT-NEGATIVE MARGIN */
/* Let contents break out of container */
.wp-block-post-content,
.entry-content {
  overflow: visible !important;
}
/* Shared breakout + float styles */
.wp-block-image.alignright,
.wp-block-image.alignright figure,
figure.alignright,
figure.right-featured-image {
  display: block;
  float: right;
  margin-left: 40px;
  margin-bottom: 40px !important;
}

/* XL screens */
@media (min-width: 1390px) {
  .wp-block-image.alignright,
  .wp-block-image.alignright figure,
  figure.alignright,
  figure.right-featured-image {
    width: 500px !important;
    margin-right: -400px !important;
	margin-left: 50px !important;
	margin-bottom: 40px !important;
  }
}

/* Large desktop */
@media (min-width: 1220px) and (max-width: 1389px) {
  .wp-block-image.alignright,
  .wp-block-image.alignright figure,
  figure.alignright,
  figure.right-featured-image {
    width: 460px !important;
    margin-right: -350px !important;
	margin-left: 50px !important;
	margin-bottom: 40px !important;
  }
}

/* Medium desktop / tablet */
@media (min-width: 980px) and (max-width: 1219px) {
  .wp-block-image.alignright,
  .wp-block-image.alignright figure,
  figure.alignright,
  figure.right-featured-image {
    width: 420px !important;
    margin-right: -220px !important;
	margin-bottom: 40px !important;
  }
}

/* Mobile fallback */
@media (max-width: 979px) {
  .wp-block-image.alignright,
  .wp-block-image.alignright figure,
  figure.alignright,
  figure.right-featured-image {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
	margin-bottom: 20px !important;
    float: none !important;
    clear: both;
  }
}


a {
  text-decoration: underline;
  text-decoration-color: #0077D8; /* Different color */
  text-underline-offset: 5px; /* Lower position */
}

/* IN THIS SECTION - SHOW OR HIDE CHILD PAGE SECTION WITH CLASS */
/* Hide the container by default */
.show-if-has-children {
    display: none;
}
/* Only show it when the page has child pages */
.has-child-pages .show-if-has-children {
    display: block;
}

/* ====================================
   1. ACCESSIBLE CARD WRAPPER STYLES (The Parent Element) 
   ==================================== */
.accessible-card {
    /* Critical: Set position relative so the link's absolute pseudo-element stays within this boundary */
    position: relative; [6]
    
    /* Optional: Add transition for smooth hover/focus effects (e.g., the lifting effect) */
    transition: transform .3s ease-in-out, box-shadow .3s ease-in-out; [7]
}

/* 2. FOCUS PARENT & HOVER STYLES: Apply the visual effects to the entire parent card */
/* :focus-within activates when any child (like the link) inside the card is focused. [8, 9] */
.accessible-card:hover,
.accessible-card:focus-within {


    /* Example: Apply a visual focus outline style (e.g., box-shadow) */
    box-shadow: 0 0 0 3px black; /* Modify '3px black' to match your global focus style */ [8]
}

/* ====================================
   3. CLICKABLE PARENT TECHNIQUE (Link Area Expansion)
   ==================================== */
/* Target the link (<a>) nested inside the heading (h3) and generate a pseudo-element. 
   NOTE: If your link is inside an <h2> or other element, adjust the h3 accordingly. */
.accessible-card h3 a::before {
    content: "";        /* Required for pseudo-element [10] */
    position: absolute; /* Allows positioning relative to the .accessible-card parent [10] */
    inset: 0;           /* Fills the entire parent card area (top/right/bottom/left: 0) [10] */
    z-index: 1;         /* Ensures the clickable area is above other elements [10] */
}

/* ====================================
   4. FOCUS PARENT TECHNIQUE (Removing Child Focus)
   ==================================== */
/* When the parent is in a focus-within state, hide the default focus style from the child link. 
   This ensures only the entire card shows the focus indicator. [11] */
.accessible-card:focus-within a {
    box-shadow: none; /* Removes box-shadow based focus styles [11] */
    outline: none;    /* Removes outline based focus styles [11] */
}