/*
Theme Name: Span Global Services
Theme URI: https://www.spanglobalservices.com/
Author: Span Global Services
Author URI: https://www.spanglobalservices.com/
Description: Custom WordPress theme built from the Span Global Services blog design (blog listing + blog detail templates).
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: spanglobal
*/

/* All visual styling lives in /assets/css (bootstrap.min.css, style.min.css,
   responsive.css, etc.) and is enqueued from functions.php so the original
   design assets can be used as-is. This file intentionally stays minimal;
   small theme-only additions/overrides are appended below. */

/* ---------- Theme additions not present in the original static template ---------- */

/* Equal-height, bottom-aligned blog cards ("Latest Posts" grid + "Recommended
   Blogs", both rendered via template-parts/blog-card.php). Bootstrap's .row
   already stretches the .col-lg-4 columns to match the tallest one in each
   row; this makes the card itself fill that stretched column and pins the
   category pill / read-time row to the bottom regardless of how many lines
   the title wraps to, so every card's footer lines up. */
.latest-blog-inside {
	height: 100%;
	display: flex;
	flex-direction: column;
	margin-bottom: 30px;
}

.latest-blog-inside .span-category-small {
	margin-top: auto;
}

/* Explicit vertical gap between wrapped rows of cards — matters most on
   mobile/tablet where cards stack one per line and rely on this space to
   read as separate cards rather than running into each other. */
#latestBlogGrid,
.recommednet-blog .row {
	row-gap: 30px;
}

.spanglobal-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 40px 0 60px;
	flex-wrap: wrap;
}

.spanglobal-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 6px;
	border: 1px solid #e2e2e2;
	color: #222;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s ease;
}

.spanglobal-pagination .page-numbers.current,
.spanglobal-pagination .page-numbers:hover {
	background: #222;
	border-color: #222;
	color: #fff;
}

/* Loading state while a pagination click is fetching the next page via
   AJAX (see /assets/js/blog-pagination.js) — the grid dims briefly instead
   of the browser navigating to /page/2/, /page/3/, etc. */
#spanglobalBlogPagination.is-loading #latestBlogGrid {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.spanglobal-no-posts {
	text-align: center;
	padding: 60px 20px;
}

.tablecnt-span {
	background: #fff;
	border: 1px solid rgba(13, 216, 138, 0.3);
	border-left: 4px solid #0dd88a;
	border-radius: 14px;
	padding: 22px 22px 16px;
	box-shadow: 0 8px 24px rgba(0, 65, 32, 0.06);
	max-height: calc(80vh - 260px);
	overflow-y: auto;
}

.tablecnt-span h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: "Mulish", sans-serif;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 1px;
	color: #004120;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px dashed rgba(0, 65, 32, 0.18);
}

.tablecnt-span h3::before {
	content: "";
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	border-radius: 5px;
	background: linear-gradient(270deg, #bff281 0%, #0dd88a 100%);
}

.tablecnt-span ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tablecnt-span ul li {
	margin-bottom: 2px;
}

.tablecnt-span ul li a {
	position: relative;
	display: block;
	padding: 8px 4px 8px 18px;
	font-family: "Mulish", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	color: #2b2d2c;
	text-decoration: none;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.tablecnt-span ul li a::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 16px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #27af0d;
}

.tablecnt-span ul li a:hover {
	color: #27af0d;
	padding-left: 22px;
}

.blog-span-content img {
	max-width: 100%;
	height: auto;
}

.blog-detail-spanleft-side img,
.blog-detail-spanleft-side .wp-post-image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	object-fit: contain;
	margin-bottom: 20px;
}

@media (max-width: 576px) {
	.blog-detail-spanleft-side img,
	.blog-detail-spanleft-side .wp-post-image {
		object-fit: contain;
	}
}

.span-home-blog-rightside-image {
	flex: 0 0 220px;
	max-width: 220px;
	overflow: hidden;
	border-radius: 1rem;
}

.span-home-blog-rightside-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.span-home-blog-rightside-image img,
.span-home-blog-rightside-image .wp-post-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media screen and (max-width: 991px) {
	.span-home-blog-rightside-image {
		width: 100%;
		max-width: 100%;
	}
}

.cta-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(15, 23, 20, 0.65);
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.cta-popup-overlay.is-open {
	display: flex;
}

.cta-popup-box {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 440px;
	border-radius: 14px;
	padding: 40px 32px 32px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	animation: ctaPopupIn 0.2s ease;
}

@keyframes ctaPopupIn {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.cta-popup-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	padding: 4px 8px;
}

.cta-popup-close:hover {
	color: #111;
}

.cta-popup-box h3 {
	margin-bottom: 8px;
}

.cta-popup-box p {
	margin-bottom: 20px;
	color: #555;
}

.cta-popup-box .latest-strip-inputs {
	width: 100%;
}

.cta-popup-error {
	display: none;
	color: #d63638;
	font-size: 14px;
	margin-bottom: 14px;
}

.cta-popup-box .btn.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.cta-popup-success-state .btn {
	display: inline-block;
	margin-top: 6px;
}
.error-message {
    color: red;
    font-size: 13px;
    display: block;
    margin-top: 5px;
}



.author-content-wrap {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

.author-avatar-wrap {
	flex: 0 0 90px;
}

.author-avatar-wrap .avatar {
	display: block;
	width: 90px;
	height: 90px;
	border-radius: 50%;
	object-fit: cover;
}

.author-details-wrap {
	flex: 1;
	min-width: 0;
}

.author-details-wrap h4 {
	margin: 0 0 8px;
	font-size: 20px;
	color: #111;
}

.author-details-wrap p {
	margin: 0 0 10px;
	color: #555;
	line-height: 1.7;
}

@media (max-width: 576px) {
	.author-content-wrap {
		flex-direction: column;
		align-items: flex-start;
	}

	.author-avatar-wrap {
		margin-bottom: 8px;
	}
}

.author-social ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 10px;
}

.author-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #111;
	color: #fff;
	text-decoration: none;
}

.single-sidebar-sticky {
	position: sticky;
	top: 100px;
	margin-top: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.single-sidebar-subscribe {
	background: linear-gradient(160deg, #f1ffee 0%, #e2fbec 100%);
	border: 1px solid rgba(13, 216, 138, 0.35);
	border-radius: 16px;
	padding: 28px 24px 24px;
	box-shadow: 0 10px 30px rgba(13, 216, 138, 0.14);
	position: relative;
	overflow: hidden;
}

.single-sidebar-subscribe::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
	background: linear-gradient(270deg, #bff281 0%, #0dd88a 100%);
}

.home-load-more-wrap {
	text-align: center;
	margin-top: 30px;
}

.home-load-more-btn {
	background: linear-gradient(270deg, #BFF281 0%, #0DD88A 100%);
	border: none;
	border-radius: 50px;
	color: #000;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	padding: 14px 32px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-load-more-btn:hover:not(:disabled) {
	transform: translateY(-2px);
}

.home-load-more-btn:disabled {
	opacity: 0.65;
	cursor: default;
}

.home-load-more-status {
	color: #2b2d2c;
	font-size: 14px;
	margin-top: 12px;
}

.single-sidebar-subscribe h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: "Mulish", sans-serif;
	font-size: 20px;
	font-weight: 800;
	margin-bottom: 8px;
	color: #04241a;
}

.single-sidebar-subscribe h3 i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: linear-gradient(270deg, #bff281 0%, #0dd88a 100%);
	color: #04241a;
	font-size: 14px;
}

.single-sidebar-subscribe p {
	font-family: "Mulish", sans-serif;
	font-size: 14px;
	line-height: 1.7;
	color: #3b4a41;
	margin-bottom: 18px;
}

.single-sidebar-subscribe-form {
	display: block;
}

.single-sidebar-subscribe-fields {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.single-sidebar-subscribe-field {
	flex: 1;
	min-width: 0;
}

.single-sidebar-subscribe-form .strip-inputs {
	margin-bottom: 0;
}

.single-sidebar-subscribe-form .sub-blog-btns {
	flex: 0 0 auto;
	width: auto;
	white-space: nowrap;
	margin-bottom: 0;
	letter-spacing: 0.5px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.single-sidebar-subscribe-form .sub-blog-btns:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(13, 216, 138, 0.3);
}

@media (max-width: 400px) {
	.single-sidebar-subscribe-fields {
		flex-direction: column;
		align-items: stretch;
	}

	.single-sidebar-subscribe-form .sub-blog-btns {
		width: 100%;
	}
}

.single-sidebar-btn {
	width: 100%;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.single-sidebar-btn:hover {
	background: #333;
	transform: translateY(-1px);
}

.single-subscribe-success-popup {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 100000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.single-subscribe-success-popup.is-visible {
	opacity: 1;
	visibility: visible;
}

.single-subscribe-success-box {
	background: #fff;
	border-radius: 14px;
	padding: 28px 24px;
	max-width: 420px;
	width: 100%;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
	text-align: center;
}

.single-subscribe-success-icon {
	width: 54px;
	height: 54px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: #111;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	font-weight: 700;
}

.single-subscribe-success-box h3 {
	margin-bottom: 10px;
	color: #111;
	font-size: 22px;
}

.single-subscribe-success-box p {
	margin-bottom: 18px;
	color: #555;
	line-height: 1.7;
	font-size: 15px;
}


/* AI Summary Wrapper */
.ai-summary-box {
    margin: 10px 0 35px 0;
}


/* Heading */
.ai-summary-box h3 {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
    margin: 0 0 18px;
    color: #111;
}


/* Buttons Row */
.ai-summary-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
}


/* Individual Button */
.ai-summary-buttons .ai-icon-btn {

    width: 50px !important;
    height: 50px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    border: 1px solid #d8dce5 !important;
    border-radius: 14px !important;

    background: #ffffff !important;

    text-decoration: none !important;

    box-sizing: border-box !important;

    transition: all .2s ease;
}


/* SVG Size */
.ai-summary-buttons .ai-icon-btn svg {

    width: 28px !important;
    height: 28px !important;

    min-width: 28px !important;
    min-height: 28px !important;

    max-width: 28px !important;
    max-height: 28px !important;

    display: block !important;

}


/* Hover */
.ai-summary-buttons .ai-icon-btn:hover {

    transform: translateY(-2px);

    box-shadow: 0 5px 15px rgba(0,0,0,0.12);

}


/* Remove unwanted list styles if theme adds them */
.ai-summary-buttons,
.ai-summary-buttons li {

    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;

}

.ai-chatgpt {
    color:#10a37f;
}

.ai-claude {
    color:#d97757;
}

.ai-perplexity {
    color:#1da1f2;
}

.ai-gemini {
    color:#675cff;
}

/* Mobile */
@media(max-width:600px){

    .ai-summary-buttons {
        flex-wrap: wrap !important;
    }

    .ai-summary-buttons .ai-icon-btn {
        width:60px !important;
        height:60px !important;
    }

}

