﻿/**
 * SixWebSoft Custom - Post Grid Shortcode & Taxonomy Elementor Styles
 * Responsive styling for [swsa_posts] and taxonomy template wrappers.
 */

/* ==========================================================================
   1. Post Grid Layout
   ========================================================================== */
.swsa-post-grid {
	display: grid;
	gap: 28px;
	width: 100%;
	margin: 0 0 32px;
	box-sizing: border-box;
}

.swsa-post-grid *,
.swsa-post-grid *::before,
.swsa-post-grid *::after {
	box-sizing: border-box;
}

.swsa-post-grid.swsa-cols-1 {
	grid-template-columns: 1fr;
}

.swsa-post-grid.swsa-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.swsa-post-grid.swsa-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.swsa-post-grid.swsa-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Responsive Grid Breakpoints */
@media (max-width: 1024px) {
	.swsa-post-grid.swsa-cols-4,
	.swsa-post-grid.swsa-cols-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.swsa-post-grid.swsa-cols-4,
	.swsa-post-grid.swsa-cols-3,
	.swsa-post-grid.swsa-cols-2 {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   2. Post Card
   ========================================================================== */
.swsa-post-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.swsa-post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
	border-color: #d1d5db;
}

/* Thumbnail wrapper */
.swsa-post-thumb-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #f3f4f6;
	overflow: hidden;
	display: block;
}

.swsa-post-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.swsa-post-card:hover .swsa-post-thumb {
	transform: scale(1.05);
}

.swsa-post-thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
	color: #9ca3af;
}

.swsa-post-thumb-placeholder svg {
	width: 48px;
	height: 48px;
	fill: currentColor;
	opacity: 0.6;
}

/* Card Body */
.swsa-post-body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 20px 22px 22px;
}

/* Meta info */
.swsa-post-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
	font-size: 0.85rem;
	color: #6b7280;
}

.swsa-post-badge {
	display: inline-block;
	background-color: #eff6ff;
	color: #1d4ed8;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 9999px;
	text-decoration: none;
	letter-spacing: 0.3px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.swsa-post-badge:hover {
	background-color: #dbeafe;
	color: #1e40af;
}

.swsa-post-date,
.swsa-post-author {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Title */
.swsa-post-title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 10px;
	color: #111827;
}

.swsa-post-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.swsa-post-title a:hover {
	color: #2563eb;
}

/* Excerpt */
.swsa-post-excerpt {
	font-size: 0.938rem;
	line-height: 1.6;
	color: #4b5563;
	margin: 0 0 18px;
	flex-grow: 1;
}

/* Read More */
.swsa-post-readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #2563eb;
	text-decoration: none;
	margin-top: auto;
	transition: gap 0.2s ease, color 0.2s ease;
}

.swsa-post-readmore svg {
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.swsa-post-readmore:hover {
	color: #1d4ed8;
	gap: 9px;
}

.swsa-post-readmore:hover svg {
	transform: translateX(2px);
}

/* ==========================================================================
   3. Pagination
   ========================================================================== */
.swsa-posts-pagination {
	margin-top: 36px;
	margin-bottom: 24px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	width: 100%;
}

.swsa-posts-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
	color: #374151;
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.swsa-posts-pagination .page-numbers:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #111827;
}

.swsa-posts-pagination .page-numbers.current {
	background: #2563eb;
	color: #ffffff;
	border-color: #2563eb;
	cursor: default;
}

.swsa-posts-pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	color: #9ca3af;
	cursor: default;
}

/* Empty message */
.swsa-posts-empty {
	text-align: center;
	padding: 48px 24px;
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
	color: #6b7280;
	font-size: 1rem;
	width: 100%;
}

/* ==========================================================================
   4. Taxonomy Elementor Container
   ========================================================================== */
.swsa-taxonomy-elementor-main {
	width: 100%;
	box-sizing: border-box;
}

.swsa-taxonomy-elementor-content {
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}