/*
Theme Name: The Food Prices
Theme URI: https://thefoodprices.com/
Author: The Food Prices Team
Author URI: https://thefoodprices.com/
Description: Modern, clean, and readable light theme with excellent UI/UX and SEO optimization. Perfect for food price comparison websites.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
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: thefoodprices
Tags: food, restaurant, prices, modern, clean, light, responsive, seo-friendly
*/

/* ============================================
   CSS Variables - Light, Readable Theme
   ============================================ */
:root {
	/* Colors - Light Theme */
	--tfp-primary: #16a34a;
	--tfp-primary-dark: #15803d;
	--tfp-primary-light: #22c55e;
	--tfp-text: #1f2937;
	--tfp-text-light: #4b5563;
	--tfp-text-muted: #6b7280;
	--tfp-bg: #ffffff;
	--tfp-bg-alt: #f9fafb;
	--tfp-bg-hover: #f3f4f6;
	--tfp-border: #e5e7eb;
	--tfp-border-light: #f3f4f6;
	
	/* Shadows */
	--tfp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--tfp-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
	--tfp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--tfp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	
	/* Spacing */
	--tfp-spacing-xs: 0.5rem;
	--tfp-spacing-sm: 1rem;
	--tfp-spacing-md: 1.5rem;
	--tfp-spacing-lg: 2rem;
	--tfp-spacing-xl: 3rem;
	--tfp-spacing-2xl: 4rem;
	
	/* Typography */
	--tfp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--tfp-font-size-base: 16px;
	--tfp-line-height-base: 1.6;
	--tfp-line-height-tight: 1.4;
	
	/* Border Radius */
	--tfp-radius-sm: 0.375rem;
	--tfp-radius: 0.5rem;
	--tfp-radius-md: 0.75rem;
	--tfp-radius-lg: 1rem;
	
	/* Transitions */
	--tfp-transition: all 0.2s ease-in-out;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
}

body {
	font-family: var(--tfp-font-family);
	font-size: var(--tfp-font-size-base);
	line-height: var(--tfp-line-height-base);
	color: var(--tfp-text);
	background-color: var(--tfp-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--tfp-primary);
	text-decoration: none;
	transition: var(--tfp-transition);
}

a:hover {
	color: var(--tfp-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
	font-weight: 700;
	line-height: var(--tfp-line-height-tight);
	color: var(--tfp-text);
	margin-bottom: var(--tfp-spacing-sm);
}

p {
	margin-bottom: var(--tfp-spacing-sm);
}

ul, ol {
	list-style: none;
}

/* ============================================
   Layout Structure
   ============================================ */
.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-header {
	background-color: var(--tfp-bg);
	border-bottom: 1px solid var(--tfp-border-light);
	box-shadow: var(--tfp-shadow-sm);
	position: sticky;
	top: 0;
	z-index: 1000;
	backdrop-filter: blur(10px);
	background-color: rgba(255, 255, 255, 0.95);
}

.site-main {
	flex: 1;
	width: 100%;
}

.site-footer {
	background-color: var(--tfp-bg-alt);
	border-top: 1px solid var(--tfp-border-light);
	padding: var(--tfp-spacing-xl) 0;
	margin-top: auto;
}

/* ============================================
   Container
   ============================================ */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--tfp-spacing-md);
	width: 100%;
}

@media (min-width: 768px) {
	.container {
		padding: 0 var(--tfp-spacing-lg);
	}
}

/* ============================================
   Header & Navigation
   ============================================ */
.header-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--tfp-spacing-md) 0;
	gap: var(--tfp-spacing-lg);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: var(--tfp-spacing-sm);
	flex-shrink: 0;
}

.site-logo img {
	max-height: 50px;
	width: auto;
}

.site-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--tfp-text);
	margin: 0;
}

.site-title a {
	color: inherit;
}

.site-description {
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
	margin: 0;
}

.main-navigation {
	flex: 1;
	display: flex;
	justify-content: flex-end;
}

.menu-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--tfp-border);
	color: var(--tfp-text);
	padding: 0.75rem 1.25rem;
	border-radius: var(--tfp-radius);
	font-weight: 600;
	cursor: pointer;
	transition: var(--tfp-transition);
}

.menu-toggle:hover {
	background-color: var(--tfp-bg-alt);
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: var(--tfp-spacing-xs);
	list-style: none;
	margin: 0;
	padding: 0;
}

.menu-item {
	position: relative;
}

.menu-item a {
	display: block;
	padding: 0.625rem 1rem;
	color: var(--tfp-text);
	font-weight: 500;
	border-radius: var(--tfp-radius-sm);
	transition: var(--tfp-transition);
}

.menu-item a:hover,
.menu-item.current-menu-item > a,
.menu-item.current_page_item > a {
	color: var(--tfp-primary);
	background-color: var(--tfp-bg-alt);
}

/* Dropdown menus */
.sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	background-color: var(--tfp-bg);
	border: 1px solid var(--tfp-border);
	border-radius: var(--tfp-radius);
	box-shadow: var(--tfp-shadow-lg);
	padding: var(--tfp-spacing-xs) 0;
	margin-top: var(--tfp-spacing-xs);
	min-width: 220px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: var(--tfp-transition);
	z-index: 100;
	list-style: none;
}

.menu-item:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sub-menu .menu-item a {
	padding: 0.75rem 1.25rem;
}

.sub-menu .menu-item a:hover {
	background-color: var(--tfp-bg-alt);
}

/* Mobile menu */
@media (max-width: 767px) {
	.menu-toggle {
		display: block;
	}
	
	.primary-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background-color: var(--tfp-bg);
		border-top: 1px solid var(--tfp-border-light);
		box-shadow: var(--tfp-shadow-md);
		flex-direction: column;
		align-items: stretch;
		padding: var(--tfp-spacing-sm);
		gap: 0;
	}
	
	.primary-menu.active {
		display: flex;
	}
	
	.menu-item {
		width: 100%;
	}
	
	.menu-item a {
		padding: 0.875rem 1rem;
		border-bottom: 1px solid var(--tfp-border-light);
	}
	
	.sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		border-top: 1px solid var(--tfp-border-light);
		margin: 0;
		padding: 0;
		display: none;
	}
	
	.menu-item:hover > .sub-menu,
	.menu-item.active > .sub-menu {
		display: block;
	}
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
	padding: var(--tfp-spacing-2xl) 0;
	background: var(--tfp-bg);
	text-align: center;
}

.hero-content {
	max-width: 800px;
	margin: 0 auto;
}

.hero-title {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 700;
	line-height: var(--tfp-line-height-tight);
	color: var(--tfp-text);
	margin: 0 0 var(--tfp-spacing-md);
	letter-spacing: -0.02em;
}

.hero-subtitle {
	font-size: clamp(1.125rem, 2vw, 1.5rem);
	font-weight: 500;
	color: var(--tfp-text-light);
	margin: 0 0 var(--tfp-spacing-md);
	line-height: var(--tfp-line-height-base);
}

.hero-description {
	font-size: 1.125rem;
	color: var(--tfp-text-muted);
	margin: 0 0 var(--tfp-spacing-xl);
	line-height: var(--tfp-line-height-base);
}

.hero-actions {
	display: flex;
	gap: var(--tfp-spacing-sm);
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: var(--tfp-spacing-2xl);
}

.hero-stats {
	display: flex;
	gap: var(--tfp-spacing-xl);
	justify-content: center;
	flex-wrap: wrap;
	padding-top: var(--tfp-spacing-xl);
	border-top: 1px solid var(--tfp-border-light);
}

.stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--tfp-spacing-xs);
}

.stat-value {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 700;
	color: var(--tfp-primary);
	line-height: 1;
}

.stat-label {
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
	font-weight: 500;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	border-radius: var(--tfp-radius);
	transition: var(--tfp-transition);
	border: none;
	cursor: pointer;
	white-space: nowrap;
}

.btn-primary {
	background-color: var(--tfp-primary);
	color: #ffffff;
	box-shadow: var(--tfp-shadow);
}

.btn-primary:hover {
	background-color: var(--tfp-primary-dark);
	box-shadow: var(--tfp-shadow-md);
	transform: translateY(-1px);
	color: #ffffff;
}

.btn-secondary {
	background-color: var(--tfp-bg);
	color: var(--tfp-text);
	border: 1px solid var(--tfp-border);
	box-shadow: var(--tfp-shadow-sm);
}

.btn-secondary:hover {
	background-color: var(--tfp-bg-alt);
	border-color: var(--tfp-border);
	box-shadow: var(--tfp-shadow);
}

.btn-large {
	padding: 1rem 2rem;
	font-size: 1.125rem;
}

/* ============================================
   Sections
   ============================================ */
.section {
	padding: var(--tfp-spacing-2xl) 0;
	width: 100%;
	box-sizing: border-box;
	clear: both;
}

.section-alt {
	background-color: var(--tfp-bg-alt);
}

.section-header {
	text-align: center;
	margin-bottom: var(--tfp-spacing-xl);
}

.section-title {
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 700;
	color: var(--tfp-text);
	margin: 0 0 var(--tfp-spacing-sm);
	line-height: var(--tfp-line-height-tight);
}

.section-subtitle {
	font-size: 1.125rem;
	color: var(--tfp-text-muted);
	margin: 0 0 var(--tfp-spacing-md);
	line-height: var(--tfp-line-height-base);
}

/* ============================================
   Grid
   ============================================ */
.grid {
	display: grid;
	gap: var(--tfp-spacing-md);
	width: 100%;
	grid-template-columns: 1fr;
}

.grid-categories {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.grid-articles {
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.grid-articles {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 768px) {
	.grid-categories {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	}
}

@media (min-width: 1024px) {
	.grid-categories {
		grid-template-columns: repeat(3, 1fr);
	}
	
	.grid-articles {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ============================================
   Cards
   ============================================ */
.card {
	background-color: var(--tfp-bg);
	border: 1px solid var(--tfp-border);
	border-radius: var(--tfp-radius-md);
	overflow: hidden;
	transition: var(--tfp-transition);
	text-decoration: none;
	color: inherit;
	display: block;
	height: 100%;
}

.card:hover {
	box-shadow: var(--tfp-shadow-lg);
	border-color: var(--tfp-border);
	transform: translateY(-2px);
}

.card-category {
	display: flex;
	align-items: center;
	padding: var(--tfp-spacing-md);
}

.card-article {
	display: flex;
	flex-direction: column;
}

.card-image {
	display: block;
	width: 100%;
	overflow: hidden;
	background-color: var(--tfp-bg-alt);
}

.card-article .card-image {
	aspect-ratio: 16 / 9;
}

.card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: var(--tfp-transition);
}

.card:hover .card-image img {
	transform: scale(1.02);
}

.card-content {
	padding: var(--tfp-spacing-md);
	flex: 1;
	display: flex;
	flex-direction: column;
}

.card-category .card-content {
	padding: 0;
}

.badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background-color: rgba(22, 163, 74, 0.1);
	color: var(--tfp-primary);
	border-radius: var(--tfp-radius);
	font-size: 0.75rem;
	font-weight: 600;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: var(--tfp-transition);
	margin-bottom: var(--tfp-spacing-sm);
}

.badge:hover {
	background-color: rgba(22, 163, 74, 0.2);
}

.card-title {
	font-size: 1.25rem;
	font-weight: 600;
	line-height: var(--tfp-line-height-tight);
	color: var(--tfp-text);
	margin: 0 0 var(--tfp-spacing-sm);
}

.card-title a {
	color: inherit;
	text-decoration: none;
	transition: var(--tfp-transition);
}

.card-title a:hover {
	color: var(--tfp-primary);
}

.card-excerpt {
	font-size: 0.9375rem;
	color: var(--tfp-text-muted);
	line-height: var(--tfp-line-height-base);
	margin: 0 0 var(--tfp-spacing-md);
	flex: 1;
}

.card-meta {
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
	margin: 0;
}

.card-footer {
	margin-top: auto;
	padding-top: var(--tfp-spacing-sm);
	border-top: 1px solid var(--tfp-border-light);
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
	max-width: 600px;
	margin: 0 auto;
	text-align: center;
}

.cta-title {
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 700;
	color: var(--tfp-text);
	margin: 0 0 var(--tfp-spacing-md);
	line-height: var(--tfp-line-height-tight);
}

.cta-text {
	font-size: 1.125rem;
	color: var(--tfp-text-muted);
	margin: 0 0 var(--tfp-spacing-xl);
	line-height: var(--tfp-line-height-base);
}

/* ============================================
   Content & Posts
   ============================================ */
.entry-header {
	margin-bottom: var(--tfp-spacing-lg);
}

.entry-title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	margin-bottom: var(--tfp-spacing-sm);
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
	margin-bottom: var(--tfp-spacing-md);
}

.entry-content {
	line-height: var(--tfp-line-height-base);
}

.entry-content p {
	margin-bottom: var(--tfp-spacing-md);
}

.entry-content img {
	margin: var(--tfp-spacing-lg) 0;
	border-radius: var(--tfp-radius);
}

/* ============================================
   Footer
   ============================================ */
.footer-content {
	text-align: center;
	color: var(--tfp-text-muted);
	font-size: 0.875rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 639px) {
	.hero {
		padding: var(--tfp-spacing-xl) 0;
	}
	
	.hero-stats {
		gap: var(--tfp-spacing-md);
		flex-direction: column;
	}
	
	.section {
		padding: var(--tfp-spacing-xl) 0;
	}
	
	.hero-actions {
		flex-direction: column;
		width: 100%;
	}
	
	.btn {
		width: 100%;
	}
	
	.grid-categories,
	.grid-articles {
		grid-template-columns: 1fr !important;
	}
	
	.container {
		padding: 0 var(--tfp-spacing-sm);
	}
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Focus styles */
.btn:focus-visible,
.card:focus-visible,
a:focus-visible,
.menu-item a:focus-visible {
	outline: 2px solid var(--tfp-primary);
	outline-offset: 2px;
}

/* Screen reader text */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.screen-reader-text:focus {
	clip: auto !important;
	display: block;
	height: auto;
	left: 5px;
	top: 5px;
	width: auto;
	z-index: 100000;
}

