/*
Theme Name: Fire and Electrical Safety Theme
Theme URI: https://fireandelectrical.co.uk/
Template: Divi
Author: Website Energizers
Author URI: https://websiteenergizers.com/
Description: Divi child theme for Fire and Electrical Safety built by Website Energizers
Version: 5.0.3.1774436314
Updated: 2026-03-25 10:58:34

*/

/* =========================================================
   Blog Posts Shortcode
   Paste this block into your theme's style.css
   @author Website Energizers
   ========================================================= */

/* ─── Wrapper ─────────────────────────────────────────── */
.we-blog-posts {
    width: 100%;
    font-family: inherit;
}

/* ─── Filter ──────────────────────────────────────────── */
.we-blog-posts__filter {
    margin-bottom: 24px;
}

.we-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
}

.we-blog-posts__category-select {
    appearance: none;
    -webkit-appearance: none;
    background: #D9D9D9;
    border: 0px solid black!important;
	border-radius: 0px;
    padding: 8px 36px 8px 12px;
    font-size: 20px;
    color: #2F2F2F;
    cursor: pointer;
    outline: none;
    min-width: 140px;
	min-height: 50px;
}

select {
    outline: none!important;
    border: none!important;
    border-radius: 0!important;
    -webkit-appearance: none!important; /* also kills the default browser chrome on Safari/Chrome */
    appearance: none!important;
}

.we-blog-posts__category-select:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

/* Remove this */
.we-select-arrow {
    position: absolute;
    right: 10px;
    font-size: 16px;
    color: #555;
    pointer-events: none;
    line-height: 1;
}

/* Add this */
.we-select-wrapper::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 9px;
    background-image: url("data:image/svg+xml,%3Csvg width='15' height='9' viewBox='0 0 15 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2705 0.2925L7.4885 6.0745L1.7065 0.2925C1.3165 -0.0975 0.6825 -0.0975 0.2925 0.2925C-0.0975 0.6825 -0.0975 1.3165 0.2925 1.7065L6.7785 8.1925C6.9745 8.3885 7.2325 8.4865 7.4885 8.4845C7.7465 8.4845 8.0025 8.3885 8.1985 8.1925L14.6845 1.7065C15.0745 1.3165 15.0745 0.6825 14.6845 0.2925C14.2945 -0.0975 13.6605 -0.0975 13.2705 0.2925Z' fill='%232F2F2F'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}


/* ─── Grid ────────────────────────────────────────────── */
.we-blog-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    min-height: 200px;
    transition: opacity 0.2s ease;
}

.we-blog-posts__grid.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

.we-blog-posts__no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #777;
    padding: 40px 0;
}

/* ─── Card ────────────────────────────────────────────── */
.we-blog-posts__card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.we-blog-posts__card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.we-blog-posts__card-link {
    display: flex;
	flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Thumbnail */
.we-blog-posts__thumbnail {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #d9d9d9;
}

.we-blog-posts__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.we-blog-posts__card:hover .we-blog-posts__thumbnail img {
    transform: scale(1.03);
}

.we-blog-posts__no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d9d9d9;
}

.we-blog-posts__no-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Content */
.we-blog-posts__content {
    padding: 30px;
	background-color: #D9D9D9;
	flex-grow: 1;
}

.we-blog-posts__title {
    line-height: 1.35;
    color: #111;
    margin: 0 0 10px;
}

h2.we-blog-posts__title {
	font-weight: 500;
	line-height: normal;
	color: #2F2F2F;
}

.we-blog-posts__excerpt {
    font-size: 20px;
	line-height: 30px;
    color: #2F2F2F;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
	font-family: 'Open Sans', Helvetica, Arial, Lucida, sans-serif;
}

/* ─── Pagination ──────────────────────────────────────── */
.we-blog-posts__pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.we-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.we-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 4px;
    font-size: 13px;
    color: #000;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: inherit;
    line-height: 1;
	font-size: 20px;
}

.we-pagination__last {
	font-size: 30px!important;
}

.we-pagination__first {
	font-size: 30px!important;
}

.we-pagination__next {
	font-size: 30px!important;
}

.we-pagination__prev {
	font-size: 30px!important;
}

.we-pagination__btn.is-active {
	text-decoration: none!important;
	color: #FF6B35!important;
}

.we-pagination__btn:disabled.is-active {
	opacity: 1!important;
}

.we-pagination__btn:hover:not(:disabled):not(.is-active) {
    background: #f0f0f0;
}

.we-pagination__btn.is-active {
    font-weight: 700;
    color: #000;
    cursor: default;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.we-pagination__btn.is-disabled,
.we-pagination__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.pagination__btn {
	display: flex;
	justify-content: center;
	vertical-align: middle;
}

.we-pagination {
    align-items: center;
    line-height: 1;
}

.we-pagination__btn {
    line-height: 1;
    padding: 0;
    vertical-align: middle;
}

.we-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    font-size: 13px;
    color: #999;
    user-select: none;
}

.we-pagination__first,
.we-pagination__prev,
.we-pagination__next,
.we-pagination__last {
	height: 28px!important;
}

.we-pagination__first .arrow-inner,
.we-pagination__prev .arrow-inner,
.we-pagination__next .arrow-inner,
.we-pagination__last .arrow-inner {
  position: relative;
  top: -3px;
}

@media screen and (max-width: 1400px) {
	h2.we-blog-posts__title {
		font-size: 25px!important;
	}
}

@media screen and (max-width: 1200px) {
	.we-blog-posts__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 767px) {
	.we-blog-posts__grid {
		grid-template-columns: repeat(1, 1fr);
	}
	
	.we-blog-posts__category-select, .we-blog-posts__excerpt {
		font-size: 18px!important;
	}
	
	.we-blog-posts__content {
		padding: 20px;
	}
	
	 h2.we-blog-posts__title {
		font-size: 20px!important;	
		 text-align: center;
	}
	
	.we-blog-posts__excerpt {
		text-align: center;
	}
	
	.we-pagination__btn {
		font-size: 40px!important;
	}
	
	.we-pagination__page {
		display: none;
	}
	
	.we-pagination__ellipsis {
		display: none;
	}
	
	.we-blog-posts__pagination, .we-pagination {
		width: 100%;
	}
	
	.we-pagination {
		justify-content: space-between;
	}
	
	.we-pagination__last {
		display: none;
	}
	
	.we-pagination__first {
		display: none;
	}
	
	.we-pagination__next {
		justify-content: flex-end;
	}
	
	.we-pagination__prev {
		justify-content: flex-start;
	}
	
	.we-pagination__btn:hover:not(:disabled):not(.is-active) {
		background: transparent;
	}
	
	.we-pagination__btn:hover:not(:disabled):not(.is-active) span {
		color: #FF6B35;
	}
	
	.we-blog-posts__filter {
		display: flex;
		justify-content: center;
	}
	
	.we-select-wrapper, .we-blog-posts__category-select {
		width: 100%;
	}
	
		
}

/**
 * Related Posts — [we_related_posts]
 *
 * Drop this into your theme's stylesheet or enqueue separately.
 * Mirrors the three-column card grid from the design.
 *
 * @author Website Energizers
 */
 
.we-related-posts {
    margin: 3rem 0;
}
 
/* --- Grid --- */
.we-related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
 
 
/* --- Card --- */
.we-related-posts__card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease;
}
 
.we-related-posts__card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
 
/* --- Thumbnail --- */
.we-related-posts__thumbnail {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #d9d9d9;
}
 
.we-related-posts__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
 
.we-related-posts__card:hover .we-related-posts__thumbnail img {
    transform: scale(1.03);
}
 
/* Placeholder shown when there's no featured image */
.we-related-posts__thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: #d9d9d9;
}
 
/* --- Body --- */
.we-related-posts__body {
    padding: 1.25rem 1.25rem 1.5rem;
    flex: 1;
	background-color: #D9D9D9;
	border: none;
}
 
.we-related-posts__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.6rem;
}
 
.we-related-posts__title a {
    color: inherit;
    text-decoration: none;
}
 
.we-related-posts__title a:hover {
    text-decoration: underline;
}
 
.we-related-posts__excerpt {
    font-size: 20px;
    line-height: 30px;
    color: #2F2F2F;
}

.we-related-posts {
		margin-top: 0px;
		margin-bottom: 0px;
}

@media screen and (max-width: 1400px) {
	.we-related-posts__title {
		font-size: 25px!important;
	}
}

@media screen and (max-width: 1200px) {
	.we-related-posts__grid {
		grid-template-columns: repeat(1, 1fr);
	}
	
	.we-related-posts__thumbnail {
		aspect-ratio: 4 / 2;
	}
	
	.we-blog-posts__excerpt, .we-related-posts__body {
		text-align: center;
	}
}

@media screen and (max-width: 767px) {
	.we-related-posts__title {
		font-size: 20px!important;
		text-align: center;
	}
	
	.we-related-posts__excerpt {
		font-size: 18px!important;
	}
	
}



