/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ==========================================================================
   BJM Layout v1.1 – Header, Containers, Breadcrumbs, Responsive Behavior
   Last updated: 2025-06-14
   ==========================================================================
*/

/* Extract – First Portion of Final CSS */

/* ==========================================================================  
   📍 Breadcrumb Styling – Stories We Remember  
   Aligns breadcrumbs to match logo/menu layout (1214px) and behaves responsively  
   ========================================================================== */

/* === Breadcrumb Container Aligned with Header Grid === */
/* ✅ Ensure breadcrumbs align with Blocksy .ct-header-inner (1214px) */

/* === Breadcrumbs: Aligned Inside Header Grid === */
.swr-breadcrumbs-wrap {
  max-width: 1214px;
  margin: 8px auto 0 auto; /* ✅ Tight top spacing from logo */
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.swr-breadcrumb-inner {
  max-width: 1214px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  box-sizing: border-box;
}

.swr-breadcrumb-inner p#breadcrumbs {
  margin: 0;
  padding: 0;
  font-size: 14px;
  text-align: left;
  line-height: 1.4;
  color: #444;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 📱 Mobile fallback */
@media screen and (max-width: 768px) {
  .swr-breadcrumbs-wrap,
  .swr-breadcrumb-inner {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .swr-breadcrumb-inner p#breadcrumbs {
    font-size: 13px;
  }
}

/* ==========================================================================
   Global Header + Logo Alignment
   ========================================================================== */
.site-header > .ct-container,
.site-header .ct-header-inner {
  max-width: 1214px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

/*Section 2 - Featured Image, Content Containers, and Main Post Layout */
/* ==========================================================================
   Single Story Template – Content Container and Featured Image
   ========================================================================== */

/* === Constrain Main Container on Single Post Pages to 1214px Grid === */
body.single-post .site-main,
body.single-post .content-area,
body.single-post .swr-single-story {
  max-width: 1214px !important;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box;
}

/* === Featured Image Behavior for Single Stories === */
.swr-featured-image img {
  width: 100%;
  height: auto;
  margin-bottom: 24px;
  border-radius: 12px;
  object-fit: cover;
}

/* ==========================================================================
   Story of the Month Badge – Single Post Context
   ========================================================================== */
.swr-sotm-badge-single {
  display: inline-block;
  background-color: #f9cd4a;
  color: #000;
  font-size: 14px;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}


/* Section 3 – Contributor Metadata and Taxonomies */
/* ==========================================================================
   Contributor Metadata Styling
   ========================================================================== */

.swr-meta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
  font-size: 16px;
  line-height: 1.6;
}

.swr-meta-line {
  margin-bottom: 8px;
  color: #333;
}

.swr-meta-line strong {
  font-weight: 600;
  color: #111;
}


/* ==========================================================================
   Taxonomy Display Styling (Voice, Time Period, Category)
   ========================================================================== */

.swr-taxonomies {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed #ccc;
  font-size: 15px;
  line-height: 1.5;
}

.swr-taxonomy-line {
  margin-bottom: 6px;
}

.swr-taxonomy-line strong {
  font-weight: 600;
  color: #000;
}


/* 🗂️ Section 4 – Collection Grid & Card Styling */

/* ==========================================================================
   Collection Grid Layout
   ========================================================================== */

.swr-collection-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 24px;
  margin-top: 32px;
  margin-bottom: 48px;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}


/* ==========================================================================
   Collection Grid Card Styling
   ========================================================================== */

.swr-collection-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  width: calc(33.333% - 16px);
  min-width: 280px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.swr-collection-card:hover {
  transform: translateY(-4px);
}


/* ==========================================================================
   Grid Card Image
   ========================================================================== */

.swr-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}


/* ==========================================================================
   Card Body (Title, Meta, Button)
   ========================================================================== */

.swr-card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.swr-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #111;
  margin-bottom: 10px;
}

.swr-card-meta {
  font-size: 14px;
  color: #555;
  line-height: 1.4;
  margin-bottom: 12px;
}

.swr-read-more {
  margin-top: auto;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: #0066cc;
  text-decoration: none;
}

.swr-read-more:hover {
  text-decoration: underline;
}

/* 🧩 Section 5 – Grid Filters, Taxonomy Badges & Search Styling */

/* ==========================================================================
   Grid Filter Controls (Dropdowns & Search)
   ========================================================================== */

.swr-collection-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  margin: 24px 0 16px 0;
  padding: 0 16px;
  box-sizing: border-box;
}

.swr-collection-filters select,
.swr-collection-filters input[type="search"] {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f9f9f9;
  min-width: 160px;
  box-sizing: border-box;
}

.swr-collection-grid-searchbar {
  order: 4; /* Ensures search field appears last in row */
  flex: 1;
  min-width: 180px;
}

/* ==========================================================================
   Time Period Badge Styling
   ========================================================================== */

.pt-cv-taxoterm.below_title {
  display: inline-block;
  background: #004080;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  margin-bottom: 8px;
  border-radius: 20px;
  text-transform: capitalize;
}


/* ==========================================================================
   "Story of the Month" Badge (Grid & Single)
   ========================================================================== */

.swr-sotm-badge,
.swr-sotm-badge-single {
  display: inline-block;
  background: #ffcc00;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  margin-top: 12px;
  margin-bottom: 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.swr-sotm-badge-single {
  margin-left: 16px;
}

/* 📱 Section 6 – Responsive Media Queries & Mobile Layout Fixes */

/* ==========================================================================
   Responsive Fixes for Mobile and Tablet
   ========================================================================== */

@media screen and (max-width: 1024px) {
  .swr-collection-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .swr-collection-filters select,
  .swr-collection-filters input[type="search"] {
    width: 100% !important;
  }

  .swr-carousel-card {
    max-width: 100%;
  }

  .swr-single-story,
  .swr-featured-image img,
  .entry-content,
  .swr-meta,
  .swr-taxonomies {
/*     padding-left: 16px; */
/*     padding-right: 16px; */
  }
}

@media screen and (max-width: 768px) {
  .swr-header-wrapper {
    padding-left: 12px;
    padding-right: 12px;
  }

  .swr-breadcrumbs,
  .header-breadcrumbs {
    font-size: 13px;
  }

  .swr-sotm-badge-single {
    margin-left: 0;
    display: block;
  }
}

/* 🧰 Utility Fixes and Last-Resort Overrides */
/* ==========================================================================
   Utility & Debug Overrides
   ========================================================================== */


.max-1214 {
  max-width: 1214px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.max-1440 {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}


/* 🔒 Constrain Header Early to Avoid Flash */
.ct-header,
/* === SWR Header Wrapper (Outer Constraint) === */


/* === Inner Header Alignment (Logo & Nav) === */
.ct-header-inner {
  max-width: 1214px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* === Prevent Horizontal Scroll Glitches === */
body {
  overflow-x: hidden;
}

/* === Universal Header Spacing === */
.swr-header-wrapper {
  padding-top: 24px;
  padding-bottom: 32px;
  max-width: 1214px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* === Universal Page Content Spacing === */
/* === Top spacing after header across all pages === */


/* 1. Add spacing ABOVE header */
body:not(.home) .swr-header-wrapper {
  padding-top: 24px;
}

/* 2. Add spacing BELOW header before breadcrumbs/content */
/* body:not(.home) main.site-main {
  padding-top: 32px;
} */


/* 3. Optional: constrain Content Views grid if it's drifting */
.page-id-376 .pt-cv-view {
  max-width: 100%;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

/* === Add Your Story Form Width Constraint === */
body.page-id-6 .swr-content-container {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* ==========================================================================
      UI Elements fixes made by Hamza === STARTS
   ========================================================================== */

/* Filter Bar Alignment Fix */
.swr-collection-filters{
	align-items: center !important;
	padding: 0 !important;
}
.swr-collection-filters .cvp-live-filter, .swr-collection-filters .swr-collection-grid-searchbar{
	width: calc(25% - 10px) !important;
}
@media (max-width: 1024px) {
  .swr-collection-filters .cvp-live-filter,
  .swr-collection-filters .swr-collection-grid-searchbar {
    width: 100% !important;
  }
}
.swr-collection-grid-searchbar{
	flex-direction: column;
	max-width: 100%;
}
.swr-collection-grid-searchbar label{
	align-self: start;
}
.swr-collection-grid-searchbar input{
	height: 40px !important;
	background-color: inherit !important;
	transform: translateY(4px);
}
.cvp-live-filter{
	margin: 0px;
}

/* Header Nav Menu */
.swr-nav-menu {
  list-style: none;
  display: flex;
  gap: 24px; /* spacing between menu items */
  margin: 0;
  padding: 0;
  align-items: center;
}

.swr-nav-menu li {
  display: flex;
}

.swr-nav-menu a {
  text-decoration: none;
  padding: 8px 12px;
  color: #2872fa; /* or your theme color */
  display: block;
}

#barkley-animation-container {
	right: 20vw;
}

@media (max-width: 768px){
	#barkley-animation-container {
		right: 0vw;
	}
}

#barkley-animation-container[style*="display: none"] {
	opacity: 0;
	pointer-events: none;
}

#barkley {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 9999;
	transition: opacity 0.4s ease;
	pointer-events: auto;
}

#barkley[style*="display: none"] {
	opacity: 0;
	pointer-events: none;
}

.barkley-fallback button:hover {
	background: #555;
}

#barkley-animation-container #barkley-controls, #barkley-animation-container #barkley-volume{
	display: none;
	position: absolute;
	top: 110px;
	margin: 0 auto;
	width: 100%;
}
#barkley-animation-container:hover #barkley-controls{
	display: flex;
}
#barkley-animation-container:hover #barkley-volume{
	display: block;
	top: 143px;
	left: 50%;
	transform: translatex(-50%);
}
#barkley-animation-container .barkley-fallback{
	position: absolute;
	width: 100%;
	margin: 0 auto:
	bottom: -20px;
}


   /* ======================================================================
      UI Elements fixes made by Hamza === ENDS
========================================================================== */

