/*
Theme Name: Saba Rajendran - Neyveli MLA
Theme URI: https://projects.sabarajendran.com
Author: Praburajasekaran
Author URI: https://projects.sabarajendran.com
Description: Custom theme for MLA Saba Rajendran constituency projects showcase
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saba-rajendran
Tags: political, government, projects, bilingual, dmk

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* === Import Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Lora:wght@600;700&display=swap');

/* === DMK Brand Colors + Extended Palette === */
:root {
	/* DMK Brand - Original */
	--dmk-red: #E31E24;
	--dmk-black: #000000;
	--dmk-white: #FFFFFF;
	--dmk-gray: #F5F5F5;
	--dmk-text: #333333;
	--dmk-border: #DDDDDD;

	/* Extended Design System */
	--primary: #E31E24;
	--primary-dark: #B01519;
	--primary-light: #FF4D52;

	/* Category Colors */
	--infrastructure: #3B82F6;
	--education: #8B5CF6;
	--healthcare: #10B981;
	--agriculture: #F59E0B;
	--water: #06B6D4;
	--roads: #6B7280;
	--electricity: #FBBF24;
	--social: #EC4899;

	/* Neutrals */
	--gray-50: #F9FAFB;
	--gray-100: #F3F4F6;
	--gray-200: #E5E7EB;
	--gray-700: #374151;
	--gray-900: #111827;

	/* Typography */
	--font-display: 'Lora', Georgia, serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

	/* Spacing */
	--space-xs: 0.5rem;
	--space-sm: 1rem;
	--space-md: 1.5rem;
	--space-lg: 2.5rem;
	--space-xl: 4rem;

	/* Effects */
	--shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.08);
	--shadow-lg: 0 10px 24px rgba(0,0,0,0.12);
	--shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-xl: 24px;
}

/* === Base Styles === */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--font-body), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	color: var(--dmk-text);
	line-height: 1.6;
	background-color: var(--gray-50);
}

/* Tamil Font Support */
body.tamil {
	font-family: 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === Container === */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* === Header === */
.site-header {
	background-color: var(--dmk-red);
	color: var(--dmk-white);
	padding: 20px 0;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.site-title {
	font-size: 1.8rem;
	font-weight: bold;
	color: var(--dmk-white);
	text-decoration: none;
}

/* === Projects Grid === */
.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
	margin: 40px 0;
}

.project-card {
	background: var(--dmk-white);
	border: 1px solid var(--dmk-border);
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.project-thumbnail {
	width: 100%;
	height: 200px;
	object-fit: cover;
	background-color: var(--dmk-gray);
}

.project-content {
	padding: 20px;
}

.project-title {
	font-size: 1.2rem;
	font-weight: 600;
	margin-bottom: 10px;
	color: var(--dmk-black);
}

.project-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 15px;
}

.project-badge {
	display: inline-block;
	padding: 4px 12px;
	background-color: var(--dmk-gray);
	border-radius: 20px;
	font-size: 0.85rem;
	color: var(--dmk-text);
}

.project-badge.category {
	background-color: var(--dmk-red);
	color: var(--dmk-white);
}

.project-budget {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--dmk-red);
	margin-top: 10px;
}

/* === Filter Bar === */
.filters-bar {
	background: var(--dmk-gray);
	padding: 20px;
	border-radius: 8px;
	margin: 30px 0;
}

.filter-group {
	margin-bottom: 15px;
}

.filter-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--dmk-black);
}

.filter-group select {
	width: 100%;
	max-width: 300px;
	padding: 10px 15px;
	border: 1px solid var(--dmk-border);
	border-radius: 5px;
	font-size: 1rem;
	background-color: var(--dmk-white);
}

/* === Responsive Design === */
@media (max-width: 768px) {
	.projects-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
		gap: 20px;
	}

	.site-title {
		font-size: 1.4rem;
	}
}

@media (max-width: 480px) {
	.projects-grid {
		grid-template-columns: 1fr;
	}
}

/* === Archive Header === */
.archive-header {
	text-align: center;
	margin: 40px 0 20px;
}

.archive-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--dmk-black);
	margin-bottom: 10px;
}

.archive-description {
	font-size: 1.1rem;
	color: var(--dmk-text);
}

/* === Filter Controls === */
.filter-controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin-bottom: 20px;
}

.filter-group input[type="text"],
.filter-group select {
	width: 100%;
	padding: 10px 15px;
	border: 1px solid var(--dmk-border);
	border-radius: 5px;
	font-size: 1rem;
	background-color: var(--dmk-white);
}

.button, button {
	padding: 10px 20px;
	background-color: var(--dmk-red);
	color: var(--dmk-white);
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: 1rem;
	transition: background-color 0.3s ease;
}

.button:hover, button:hover {
	background-color: #c11a1f;
}

.button-secondary {
	background-color: #666;
}

.button-secondary:hover {
	background-color: #444;
}

/* === Project Count === */
.project-count {
	text-align: center;
	font-size: 1.1rem;
	padding: 15px 0;
	border-top: 1px solid var(--dmk-border);
	margin-top: 20px;
}

/* === Loading Indicator === */
#loading-indicator {
	text-align: center;
	padding: 40px;
	font-size: 1.2rem;
	color: var(--dmk-red);
}

/* === No Projects === */
.no-projects {
	text-align: center;
	padding: 60px 20px;
	font-size: 1.2rem;
	color: #999;
}

/* === Project Card Link === */
.project-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.project-thumbnail-placeholder {
	background: linear-gradient(135deg, var(--dmk-gray) 0%, var(--dmk-border) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.project-badge.village {
	background-color: #2196F3;
	color: var(--dmk-white);
}

.project-badge.year {
	background-color: #FF9800;
	color: var(--dmk-white);
}

.project-badge.status-completed {
	background-color: #4CAF50;
	color: var(--dmk-white);
}

.project-badge.status-progress {
	background-color: #FFC107;
	color: var(--dmk-black);
}

.project-excerpt {
	margin-top: 10px;
	font-size: 0.95rem;
	color: #666;
	line-height: 1.5;
}

/* === Single Project === */
.single-project .container {
	max-width: 900px;
}

.back-link {
	margin: 30px 0 20px;
}

.back-link a {
	color: var(--dmk-red);
	text-decoration: none;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	transition: color 0.3s ease;
}

.back-link a:hover {
	color: #c11a1f;
}

.project-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--dmk-gray);
}

.project-header .project-title {
	font-size: 2.5rem;
	margin-bottom: 20px;
	color: var(--dmk-black);
}

.project-meta-info {
	margin-top: 20px;
}

.meta-badges {
	display: grid;
	gap: 15px;
}

.meta-item {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.meta-item strong {
	color: var(--dmk-black);
	min-width: 80px;
}

.meta-item.budget-large {
	padding: 15px;
	background-color: var(--dmk-gray);
	border-radius: 8px;
	margin-top: 10px;
}

.project-budget-amount {
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--dmk-red);
}

.project-featured-image {
	margin: 30px 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.project-featured-image img {
	width: 100%;
	height: auto;
	display: block;
}

.project-content-area {
	margin: 40px 0;
	line-height: 1.8;
}

.bilingual-content {
	display: grid;
	gap: 30px;
}

.bilingual-content h3 {
	font-size: 1.5rem;
	color: var(--dmk-black);
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--dmk-red);
}

.content-tamil,
.content-english {
	padding: 20px;
	background-color: var(--dmk-gray);
	border-radius: 8px;
}

/* === Project Sharing === */
.project-sharing {
	margin: 40px 0;
	padding: 30px;
	background-color: var(--dmk-gray);
	border-radius: 8px;
}

.project-sharing h3 {
	font-size: 1.3rem;
	margin-bottom: 15px;
	color: var(--dmk-black);
}

.share-buttons {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

.share-button {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 600;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-button.whatsapp {
	background-color: #25D366;
	color: var(--dmk-white);
}

.share-button.facebook {
	background-color: #1877F2;
	color: var(--dmk-white);
}

.share-button.twitter {
	background-color: #1DA1F2;
	color: var(--dmk-white);
}

/* === Project Navigation === */
.project-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 40px 0;
	padding: 30px 0;
	border-top: 2px solid var(--dmk-gray);
}

.nav-previous,
.nav-next {
	padding: 20px;
	background-color: var(--dmk-gray);
	border-radius: 8px;
	transition: background-color 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
	background-color: #e0e0e0;
}

.nav-previous a,
.nav-next a {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nav-subtitle {
	font-size: 0.85rem;
	color: #666;
	text-transform: uppercase;
	font-weight: 600;
}

.nav-title {
	font-size: 1.1rem;
	color: var(--dmk-black);
	font-weight: 600;
}

.nav-next {
	text-align: right;
}

/* === Pagination === */
.pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 40px 0;
}

.pagination a,
.pagination span {
	padding: 10px 15px;
	border: 1px solid var(--dmk-border);
	border-radius: 5px;
	text-decoration: none;
	color: var(--dmk-text);
	transition: background-color 0.3s ease;
}

.pagination a:hover {
	background-color: var(--dmk-red);
	color: var(--dmk-white);
	border-color: var(--dmk-red);
}

.pagination .current {
	background-color: var(--dmk-red);
	color: var(--dmk-white);
	border-color: var(--dmk-red);
}

/* === Responsive Design Enhancements === */
@media (max-width: 768px) {
	.archive-title {
		font-size: 2rem;
	}

	.filter-controls {
		grid-template-columns: 1fr;
	}

	.project-header .project-title {
		font-size: 1.8rem;
	}

	.project-navigation {
		grid-template-columns: 1fr;
	}

	.nav-next {
		text-align: left;
	}

	.share-buttons {
		flex-direction: column;
	}

	.share-button {
		text-align: center;
	}
}

@media (max-width: 480px) {
	.archive-title {
		font-size: 1.6rem;
	}

	.project-header .project-title {
		font-size: 1.5rem;
	}

	.meta-item {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* === Utility Classes === */
.text-center {
	text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* ========================================
   REDESIGNED ARCHIVE PAGE STYLES
   Professional Government Design
   ======================================== */

/* Archive Main Container */
.archive-main {
	background: #FFFFFF;
	min-height: 100vh;
}

/* Enhanced Archive Header with Stats */
.archive-main .archive-header {
	margin: 3rem 0 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 3px solid var(--dmk-red);
}

.archive-header-content {
	margin-bottom: 2rem;
}

.archive-main .archive-title {
	font-family: var(--font-display);
	font-size: 2.25rem;
	font-weight: 700;
	font-style: normal;
	color: var(--dmk-black);
	margin-bottom: 0.75rem;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.archive-main .archive-description {
	font-size: 1rem;
	color: #4B5563;
	max-width: 800px;
	line-height: 1.7;
	font-weight: 400;
}

/* Statistics Dashboard */
.archive-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-bottom: 2.5rem;
}

.stat-card {
	background: #F9FAFB;
	padding: 2rem 1.5rem;
	border-radius: 0;
	box-shadow: none;
	text-align: center;
	border: 2px solid #E5E7EB;
	border-left: 4px solid var(--dmk-red);
	position: relative;
	overflow: hidden;
	transition: none;
}

.stat-card::before {
	display: none;
}

.stat-card:hover {
	transform: none;
	box-shadow: none;
	border-left-color: var(--dmk-black);
}

.stat-number {
	font-family: var(--font-body);
	font-size: 2.5rem;
	font-weight: 800;
	color: var(--dmk-black);
	line-height: 1;
	margin-bottom: 0.5rem;
}

.stat-label {
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #6B7280;
	font-weight: 600;
}

/* Enhanced Filter Bar - Pill Style */
.archive-main .filters-bar {
	background: white;
	padding: 1.5rem 2rem;
	border-radius: 0;
	margin-bottom: 2.5rem;
	box-shadow: none;
	border: 2px solid #E5E7EB;
	border-left: 4px solid var(--dmk-red);
}

/* Pill Filters Container */
.pill-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin-bottom: 1.25rem;
}

/* Pill Button Styling */
.filter-pill {
	padding: 0.5rem 1.25rem;
	background: white;
	border: 2px solid #E5E7EB;
	border-radius: 50px;
	font-family: 'Noto Sans Tamil', var(--font-body);
	font-size: 0.875rem;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	outline: none;
}

.filter-pill:hover {
	border-color: var(--dmk-red);
	color: var(--dmk-red);
	background: rgba(227, 30, 36, 0.05);
}

.filter-pill.active {
	background: var(--dmk-red);
	border-color: var(--dmk-red);
	color: white;
	font-weight: 600;
}

.filter-pill:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.15);
}

.archive-main .project-count {
	padding-top: 1.5rem;
	border-top: 2px solid #E5E7EB;
	text-align: left;
	font-family: var(--font-body);
	font-size: 0.9375rem;
	color: var(--dmk-text);
	font-weight: 500;
}

.archive-main .project-count strong {
	color: var(--dmk-red);
	font-weight: 700;
}

/* Enhanced Projects Grid with Icon Cards */
.archive-main .projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.5rem;
	margin: 2rem 0;
	animation: none;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Project Card with Icon Design */
.archive-main .project-card {
	background: white;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
	transition: box-shadow 0.2s ease;
	border: 2px solid #E5E7EB;
	border-top: 4px solid var(--dmk-red);
	display: flex;
	flex-direction: column;
	position: relative;
}

.archive-main .project-card::before {
	display: none;
}

.archive-main .project-card:hover {
	transform: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	border-top-color: var(--dmk-black);
}

/* Icon Wrapper */
.project-icon-wrapper {
	padding: 2rem 1.5rem 1.5rem;
	background: #F9FAFB;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 140px;
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid #E5E7EB;
}

.project-icon {
	width: 80px;
	height: 80px;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
	position: relative;
	z-index: 1;
}

.archive-main .project-card:hover .project-icon {
	transform: scale(1.05);
}

.project-icon svg {
	width: 48px;
	height: 48px;
	stroke-width: 1.5;
}

/* Project Content */
.archive-main .project-content {
	padding: 1.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.archive-main .project-title {
	font-family: var(--font-display);
	font-size: 1.125rem;
	font-weight: 700;
	font-style: normal;
	line-height: 1.4;
	margin-bottom: 1rem;
	color: var(--dmk-black);
}

/* Project Meta Badges */
.archive-main .project-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.archive-main .project-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.375rem 0.75rem;
	font-size: 0.6875rem;
	font-weight: 600;
	border-radius: 0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border: 1px solid;
	transition: none;
}

.archive-main .project-badge.village,
.archive-main .project-badge.year {
	background: white;
	color: #374151;
	border-color: #D1D5DB;
}

.archive-main .project-badge.status-completed {
	background: white;
	color: #059669;
	border-color: #059669;
}

.archive-main .project-badge.status-progress {
	background: white;
	color: #D97706;
	border-color: #D97706;
}

/* Project Budget */
.archive-main .project-budget {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin-bottom: 1rem;
	padding: 0.75rem;
	background: #F9FAFB;
	border-radius: 0;
	border-left: 3px solid var(--dmk-red);
}

.budget-label {
	font-size: 0.75rem;
	color: #6B7280;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.budget-amount {
	font-family: var(--font-body);
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--dmk-black);
}

/* Project Excerpt */
.archive-main .project-excerpt {
	font-size: 0.875rem;
	line-height: 1.6;
	color: #4B5563;
	margin-top: auto;
}

/* Loading State */
.archive-main #loading-indicator {
	text-align: center;
	padding: var(--space-xl);
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-style: italic;
	color: var(--primary);
}

/* Empty State */
.archive-main .no-projects {
	text-align: center;
	padding: var(--space-xl);
	background: white;
	border-radius: var(--radius-lg);
	border: 2px dashed var(--gray-200);
}

.archive-main .no-projects p {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-style: italic;
	color: var(--gray-700);
}

/* Pagination Enhancement */
.archive-main .pagination {
	display: flex;
	justify-content: center;
	gap: var(--space-sm);
	margin-top: var(--space-xl);
	flex-wrap: wrap;
}

.archive-main .pagination a,
.archive-main .pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 45px;
	height: 45px;
	padding: 0 var(--space-sm);
	background: white;
	border: 2px solid var(--gray-200);
	border-radius: var(--radius-md);
	font-family: var(--font-body);
	font-weight: 600;
	color: var(--dmk-text);
	text-decoration: none;
	transition: all 0.3s ease;
}

.archive-main .pagination a:hover {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
}

.archive-main .pagination .current {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
}

/* Responsive Design for Redesign */
@media (max-width: 1024px) {
	.archive-stats {
		grid-template-columns: repeat(3, 1fr);
	}

	.archive-main .projects-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	}
}

@media (max-width: 768px) {
	.archive-main .archive-title {
		font-size: 1.875rem;
	}

	.archive-stats {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.stat-card {
		padding: 1.5rem 1rem;
	}

	.archive-main .filter-controls {
		grid-template-columns: 1fr;
	}

	.archive-main .projects-grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.archive-main .button,
	.archive-main button {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.archive-main .archive-title {
		font-size: 1.625rem;
	}

	.project-icon-wrapper {
		min-height: 120px;
		padding: 1.5rem 1rem 1rem;
	}

	.project-icon {
		width: 70px;
		height: 70px;
	}

	.project-icon svg {
		width: 40px;
		height: 40px;
	}

	.archive-main .project-content {
		padding: 1.25rem;
	}
}
