/*
Theme Name: BlogSquare Child
Theme URI: https://wpenjoy.com/themes/blogsquare
Description: Child theme for BlogSquare. Bundles the homepage changes (latest-4 featured strip + main list starting at post 5), default sidebar widgets on first load, removal of the Pro upgrade notice / About page / Featured meta box, equal-height featured cards, and a full WCAG AAA contrast pass. Lives separately so the parent BlogSquare theme can be updated without losing any of this.
Author: James
Author URI: https://mediangr.com.ng
Template: blogsquare
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blogsquare-child
*/


/*--------------------------------------------------------------
Featured strip – equal-height cards (CSS, no JS dependency)
--------------------------------------------------------------*/
/* Uniform image area regardless of the source image dimensions.
   aspect-ratio reserves the box before the image loads, so there
   is no layout shift and every card lines up. */
#featured-content .hentry .thumbnail-wrap {
  aspect-ratio: 630 / 359;
  overflow: hidden; }
  #featured-content .hentry .thumbnail-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; }

/* Reserve a fixed three-line title block so long and short titles
   produce the same card height, and clamp anything longer. */
#featured-content .hentry .entry-title {
  min-height: 3.9em; /* 3 lines × 1.3 line-height */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden; }

@media only screen and (max-width: 767px) {
  /* Cards stack full width on mobile – let height be natural. */
  #featured-content .hentry .entry-title {
    min-height: 0; } }

/*--------------------------------------------------------------
WCAG AAA contrast adjustments
Body and heading text (#333 / #222 on #fff) already exceed 7:1.
The rules below raise muted text, links, accent fills and the
dark footer to meet the AAA 7:1 (normal text) / 4.5:1 (large)
thresholds. Contrast ratios are noted alongside each group.
--------------------------------------------------------------*/

/* Muted / secondary text on light backgrounds  ->  #4d4d4d = 8.0:1 on #fff */
.entry-meta,
.entry-meta a,
.byline,
.byline a,
.entry-category,
.entry-category a,
.read-more a,
.read-more a:visited,
.breadcrumbs .breadcrumbs-nav,
.breadcrumbs .breadcrumbs-nav a,
#post-nav span,
.comment-list .reply a,
.author-box .author-meta em a,
.content-loop .widget-title,
.featured-ad .widget-title,
.post-ad .widget-title,
.form-allowed-tags code,
.form-allowed-tags code a,
#featured-content .hentry .entry-category a,
#featured-content .hentry .byline,
#featured-content .hentry .byline a,
.sidebar .widget-posts-thumbnail .entry-meta,
.single #primary .entry-header .entry-meta,
.single #primary .entry-header .entry-meta a {
  color: #4d4d4d; }

/* Ranking-number badges and tag chips sit on #f0f0f0  ->  #444 = 7.9:1 on #f0f0f0 */
.sidebar .widget-posts-thumbnail ul > li.post-list span,
.site-footer .widget-posts-thumbnail ul > li.post-list span,
.widget_tag_cloud .tagcloud a {
  color: #444 !important; }

/* Primary accent as TEXT on light backgrounds  ->  #005299 = 7.6:1 on #fff */
a:hover,
.sf-menu li a:hover,
.sf-menu li:hover > a,
.sf-menu li a:hover.sf-with-ul:after,
.sf-arrows ul li a.sf-with-ul:hover:after,
.single #primary .entry-header .entry-category a,
.single #primary .entry-header .entry-meta .entry-category a:hover,
.pagination .page-numbers.current,
.read-more a:hover {
  color: #005299; }

/* Primary accent as a FILL behind white text  ->  white on #005299 = 7.6:1 */
.content-loop .entry-category a:hover,
.entry-categories a:hover,
.pagination .page-numbers:hover,
.pagination .page-numbers.current:hover,
.entry-tags .tag-links a:hover,
.widget_tag_cloud .tagcloud a:hover,
.sidebar .widget-posts-thumbnail ul > li.post-list:nth-of-type(4) span,
#wp-calendar caption,
#back-top a span {
  background-color: #005299 !important; }

/* Ranking badge 2 (red): white on #b00000 = 7.4:1 */
.sidebar .widget-posts-thumbnail ul > li.post-list:nth-of-type(2) span,
.site-footer .widget-posts-thumbnail ul > li.post-list:nth-of-type(2) span {
  background-color: #b00000 !important;
  color: #fff !important; }

/* Ranking badge 3 (orange): orange kept, numerals switched to black = 9.8:1 */
.sidebar .widget-posts-thumbnail ul > li.post-list:nth-of-type(3) span,
.site-footer .widget-posts-thumbnail ul > li.post-list:nth-of-type(3) span {
  color: #000 !important; }

/* Search buttons: orange kept for brand, label switched to black = 9.8:1 on #ff9900 */
.sidebar .wp-block-search .wp-block-search__button,
.sidebar .widget_search input[type='submit'] {
  color: #000 !important; }

/* Required-field marker: #b00020 = 7.4:1 on #fff */
.required {
  color: #b00020; }

/* ---- Dark footer (#222): accents and muted text must be LIGHTER ---- */

/* Footer links: light blue on #222 = 8.5:1 */
.site-footer .widget a,
.site-footer .widget .widget-title a:hover,
.site-footer .widget ul > li a:hover,
.site-footer .wp-calendar-nav a:hover {
  color: #8cc0ff !important; }

/* Footer inactive tab labels and calendar nav: #b3b3b3 = 7.4:1 on #222 */
.site-footer .widget_tabs ul.horizontal li a,
.site-footer .wp-calendar-nav a {
  color: #b3b3b3 !important; }

/* Footer comment/meta text: #aab4c4 = 7.7:1 on #222 */
.site-footer .widget_tabs .tab-content .tab-comments span,
.site-footer .widget_tabs .tab-content .entry-meta,
.site-footer .widget_tabs .tab-content .entry-meta a {
  color: #aab4c4 !important; }

/* Footer accent fills behind white text -> #005299 */
.site-footer .widget_tabs .tab-content .tag-cloud-link:hover,
.site-footer .widget_tag_cloud .tagcloud a:hover,
.site-footer #wp-calendar caption {
  background-color: #005299 !important; }

/* Bottom bar muted text on #222: ~#d7d7d7 = 11:1 */
#site-bottom,
#site-bottom .site-info {
  color: rgba(255, 255, 255, 0.85) !important; }

/* Placeholders kept readable */
::-webkit-input-placeholder { color: #4d4d4d; opacity: 1; }
::-moz-placeholder { color: #4d4d4d; opacity: 1; }
:-ms-input-placeholder { color: #4d4d4d; opacity: 1; }
::placeholder { color: #4d4d4d; opacity: 1; }

/* Always-visible keyboard focus indicator */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
.button:focus,
.search-submit:focus {
  outline: 2px solid #005299;
  outline-offset: 2px; }

/*--------------------------------------------------------------
Genericons removed for performance – redraw the back-to-top arrow
--------------------------------------------------------------*/
#back-top a span.genericon-collapse,
#back-top a span.genericon {
  font-family: inherit; }
  #back-top a span.genericon-collapse:before {
    content: "\2191"; /* upwards arrow */
    font-weight: bold;
    font-size: 18px;
    line-height: 30px; }

/*--------------------------------------------------------------
Additional WCAG AAA contrast touch-ups
--------------------------------------------------------------*/
/* Meta separator bullets (treated as text by checkers) */
.entry-meta .sep,
.byline .sep,
#featured-content .hentry .byline .sep {
  color: #4d4d4d; }

/* Bottom bar navigation links on #222 -> white (15:1) */
#site-bottom a,
#site-bottom .footer-nav li a,
#site-bottom .site-info a {
  color: #ffffff !important; }
  #site-bottom a:hover,
  #site-bottom .footer-nav li a:hover,
  #site-bottom .site-info a:hover {
    color: #8cc0ff !important; }

/*--------------------------------------------------------------
Post meta contrast (overrides the parent's #999 / #ccc which sit
at specificity 0,2,0 – matched here so the child wins by source
order while leaving the parent ':hover' states intact).
  #4d4d4d on #fff = 8.0:1 (AAA)
--------------------------------------------------------------*/
.content-loop .entry-meta,
.single #primary .entry-header .entry-meta {
  color: #4d4d4d; }

.content-loop .entry-meta a,
.single #primary .entry-header .entry-meta a {
  color: #4d4d4d; }

.content-loop .entry-meta .entry-author,
.content-loop .entry-meta .entry-author a,
.content-loop .entry-meta .entry-date,
.content-loop .entry-meta .entry-comment a,
.content-loop .entry-meta .comments-link {
  color: #4d4d4d; }

.content-loop .entry-meta .sep,
.single #primary .entry-header .entry-meta .sep {
  color: #4d4d4d; }

.single #primary .entry-header .entry-author,
.single #primary .entry-header .entry-author a {
  color: #4d4d4d; }
