/**
 * Subpage List Shortcode - Premium Frontend Stylesheet
 */

.subpage-list-wrapper {
	box-sizing: border-box;
	margin: 2rem 0;
	width: 100%;
}

.subpage-list-wrapper * {
	box-sizing: border-box;
}

/* Grid Layout Base */
.subpage-list-grid {
	display: grid !important;
	gap: 2rem !important;
	width: 100% !important;
	box-sizing: border-box !important;
	align-items: stretch !important;
}

/* Column Variants - Strictly Equal Widths */
.layout-cols-1 .subpage-list-grid {
	grid-template-columns: minmax(0, 1fr) !important;
}

.layout-cols-2 .subpage-list-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.layout-cols-3 .subpage-list-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.layout-cols-4 .subpage-list-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* Responsive Grid Fallbacks */
@media (max-width: 992px) {
	.layout-cols-4 .subpage-list-grid,
	.layout-cols-3 .subpage-list-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 600px) {
	.layout-cols-4 .subpage-list-grid,
	.layout-cols-3 .subpage-list-grid,
	.layout-cols-2 .subpage-list-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

/* Premium Card Styling - Enforce Equal Dimensions */
.subpage-list-grid > article.subpage-card,
.subpage-card {
	background: #ffffff;
	border: 1px solid rgba(226, 232, 240, 0.9);
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
	            box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
	            border-color 0.35s ease;
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	position: relative;
	box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.03), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
}

.subpage-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 32px -8px rgba(15, 23, 42, 0.1), 0 8px 16px -4px rgba(15, 23, 42, 0.04);
	border-color: rgba(99, 102, 241, 0.3);
}

/* Card Media & Thumbnail */
.subpage-card-media {
	width: 100%;
	position: relative;
	overflow: hidden;
	background: #0f172a;
}

.subpage-card-media a {
	display: block;
	width: 100%;
	height: 100%;
}

.subpage-card-img {
	width: 100%;
	height: 200px !important;
	object-fit: cover !important;
	display: block;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.subpage-card:hover .subpage-card-img {
	transform: scale(1.06);
	filter: brightness(1.03);
}

/* Premium Dynamic Placeholder Badge */
.subpage-card-placeholder {
	height: 200px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
	position: relative;
	overflow: hidden;
}

.subpage-card-placeholder::before {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle at center, rgba(99, 102, 241, 0.25) 0%, transparent 60%);
	transition: transform 0.6s ease;
}

.subpage-card:hover .subpage-card-placeholder::before {
	transform: scale(1.2);
}

.subpage-placeholder-badge {
	position: relative;
	z-index: 2;
	width: 64px;
	height: 64px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.22);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease;
}

.subpage-card:hover .subpage-placeholder-badge {
	transform: scale(1.12) rotate(3deg);
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.4);
}

/* Card Body */
.subpage-card-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
	width: 100%;
}

/* Unified Title Typography across all layouts with high specificity */
.subpage-list-wrapper h3.subpage-card-title,
.subpage-list-wrapper h3.subpage-list-title,
.subpage-card-title,
.subpage-list-title {
	margin: 0 0 0.65rem 0 !important;
	font-size: 1.25rem !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	letter-spacing: -0.015em !important;
	min-width: 0 !important;
	overflow-wrap: break-word !important;
	word-break: break-word !important;
}

.subpage-list-wrapper h3.subpage-card-title a,
.subpage-list-wrapper h3.subpage-list-title a,
.subpage-card-title a,
.subpage-list-title a {
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	color: #0f172a !important;
	text-decoration: none !important;
	transition: color 0.2s ease !important;
	word-break: break-word !important;
}

.subpage-list-wrapper h3.subpage-card-title a:hover,
.subpage-list-wrapper h3.subpage-list-title a:hover,
.subpage-card-title a:hover,
.subpage-list-title a:hover {
	color: #2563eb !important;
}

.subpage-card-excerpt {
	font-size: 0.95rem;
	line-height: 1.65;
	color: #64748b;
	margin-bottom: 1.5rem;
	flex-grow: 1;
}

.subpage-card-excerpt p {
	margin: 0;
}

/* Footer & Buttons */
.subpage-card-footer {
	margin-top: auto;
	padding-top: 0.75rem;
}

/* Modern Gradient Button "Devamını Oku" */
.subpage-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.4rem;
	font-size: 0.925rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	border-radius: 10px;
	text-decoration: none !important;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
	line-height: 1.2;
}

.subpage-btn-primary {
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #ffffff !important;
	border: none;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
	position: relative;
	overflow: hidden;
}

.subpage-btn-primary:hover {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
	color: #ffffff !important;
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
	transform: translateY(-2px);
}

.subpage-btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Button Icon Animation */
.subpage-btn-icon {
	transition: transform 0.25s ease;
	flex-shrink: 0;
}

.subpage-btn:hover .subpage-btn-icon {
	transform: translateX(4px);
}

/* Modern Text Link Style */
.subpage-btn-text {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #2563eb !important;
	text-decoration: none !important;
	position: relative;
	padding: 0.25rem 0;
	transition: color 0.2s ease;
}

.subpage-btn-text::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0%;
	height: 2px;
	background-color: #2563eb;
	transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.subpage-btn-text:hover {
	color: #1d4ed8 !important;
}

.subpage-btn-text:hover::after {
	width: 100%;
}

.subpage-btn-text:hover .subpage-btn-icon {
	transform: translateX(4px);
}

/* List Layout Styling */
.layout-list .subpage-list-items {
	list-style: none;
	padding: 0;
	margin: 0;
}

.layout-list .subpage-list-item {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	padding: 1.25rem 1.5rem;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	margin-bottom: 1rem;
	transition: all 0.25s ease;
}

.layout-list .subpage-list-item:hover {
	background-color: #f8fafc;
	border-color: #cbd5e1;
	transform: translateX(4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.layout-list .subpage-list-thumb-link {
	display: block;
	flex-shrink: 0;
	text-decoration: none;
	width: 200px;
	height: 200px;
}

.layout-list .subpage-list-thumb {
	width: 200px !important;
	height: 200px !important;
	min-width: 200px !important;
	min-height: 200px !important;
	max-width: 200px !important;
	max-height: 200px !important;
	object-fit: cover !important;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
	display: block;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.layout-list .subpage-list-item:hover .subpage-list-thumb {
	transform: scale(1.03);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.layout-list .subpage-list-thumb-placeholder {
	width: 200px !important;
	height: 200px !important;
	min-width: 200px !important;
	min-height: 200px !important;
	max-width: 200px !important;
	max-height: 200px !important;
	border-radius: 12px;
	background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.85);
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
	transition: transform 0.3s ease, color 0.3s ease;
}

.layout-list .subpage-list-item:hover .subpage-list-thumb-placeholder {
	transform: scale(1.03);
	color: #ffffff;
}

.layout-list .subpage-list-title {
	font-size: 1.15rem;
	font-weight: 600;
	color: #0f172a;
	text-decoration: none;
}

.layout-list .subpage-list-title:hover {
	color: #2563eb;
}

/* Empty notice */
.subpage-list-empty {
	padding: 2rem;
	background: #f8fafc;
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	color: #64748b;
	text-align: center;
	font-weight: 500;
}
