/**
 * Recipe Manager Frontend Styles
 *
 * @package PLRecipeCookbook
 */

/* Ensure sticky works properly */
html {
	overflow-x: hidden;
}

/* ==========================================================================
   Single Recipe Styles
   ========================================================================== */

.recipe-single-wrapper {
	max-width: 1600px;
	margin: 0 auto;
	padding: 40px 20px;
	padding-left: 0;
	padding-right: 0;
}

@media (min-width: 1920px) {
	.recipe-single-wrapper {
		max-width: 1800px;
	}
}

/* Layout Container: Main Article + Sidebar */
.recipe-layout-container {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 40px;
	position: relative;
	overflow: visible; /* Important for sticky */
}

@media (max-width: 1024px) {
	.recipe-layout-container {
		grid-template-columns: 1fr;
	}
}

.recipe-single {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
	position: relative;
	z-index: 1;
}

/* Recipe Header */
.recipe-header {
	padding: 40px 40px 20px;
	text-align: center;
}

.recipe-title {
	font-size: 2.5em;
	color: #2c3e50;
	margin: 0 0 20px 0;
	font-weight: 700;
}

.recipe-excerpt {
	font-size: 1.2em;
	color: #7f8c8d;
	line-height: 1.6;
	max-width: 800px;
	margin: 0 auto 20px;
}

/* Hero Section: Image + Meta Info Side by Side */
.recipe-hero-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	padding: 0 40px 40px;
	align-items: start;
}

@media (max-width: 992px) {
	.recipe-hero-section {
		grid-template-columns: 1fr;
	}
}

.recipe-featured-image {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.recipe-featured-image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	max-height: 500px;
}

/* Recipe Meta Info - Now in Hero Section */
.recipe-meta-info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #f8f9fa;
	padding: 12px;
	border-radius: 8px;
	border-left: 4px solid #27ae60;
}

.recipe-meta-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 8px;
	background: #fff;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.recipe-meta-item:hover {
	transform: translateX(3px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.meta-icon {
	font-size: 1.2em;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.meta-icon svg {
	width: 100%;
	height: 100%;
	fill: #27ae60;
}

.meta-label {
	font-weight: 600;
	color: #7f8c8d;
	font-size: 0.8em;
	min-width: 70px;
}

.meta-value {
	font-weight: 700;
	color: #2c3e50;
	font-size: 0.95em;
}

/* Content Wrapper: Main Content (no sidebar inside) */
.recipe-content-wrapper {
	padding: 0 40px 40px;
}

@media (max-width: 1024px) {
	.recipe-content-wrapper {
		padding: 0 20px 40px;
	}
}

.recipe-main-content {
	min-width: 0; /* Prevent grid blowout */
}

/* Description Section */
.recipe-description {
	margin-bottom: 40px;
}

.recipe-description h2 {
	font-size: 1.8em;
	color: #2c3e50;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #27ae60;
}

.recipe-content {
	font-size: 1.1em;
	line-height: 1.8;
	color: #495057;
}

.recipe-content p {
	margin-bottom: 1rem;
}

.recipe-content hr {
	padding: 1rem 0;
}

.recipe-content .wp-block-embed iframe {
	border-radius: 10px;
}

/* Ingredients & Instructions Sections */
.recipe-details-wrapper {
	display: flex;
	flex-direction: column;
	gap: 30px;
	padding: 0;
}

.recipe-ingredients,
.recipe-instructions {
	background: #fff;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	overflow: hidden;
}

.recipe-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 20px;
	background: #f8f9fa;
	cursor: pointer;
	transition: background 0.2s ease;
	border-bottom: 2px solid #27ae60;
}

.recipe-section-header:hover {
	background: #e9ecef;
}

.recipe-section-header h2 {
	font-size: 1.4em;
	color: #2c3e50;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.recipe-section-icon {
	font-size: 1.1em;
}

.recipe-section-toggle {
	font-size: 1.3em;
	color: #27ae60;
	transition: transform 0.3s ease;
	display: inline-block;
}

.recipe-section-header.collapsed .recipe-section-toggle {
	transform: rotate(-90deg);
}

.recipe-section-header.collapsed {
	border-bottom-color: transparent;
}

.recipe-section-content {
	max-height: unset;
	overflow: hidden;
	transition: max-height 0.4s ease;
}

.recipe-section-content.collapsed {
	max-height: 0;
}

.recipe-section-content-inner {
	padding: 25px;
}

/* Shopping Mode Toggle */
.shopping-mode-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	padding: 12px 16px;
	background: #e8f5e9;
	border-radius: 6px;
	border: 2px solid #27ae60;
}

.shopping-mode-toggle label {
	font-weight: 600;
	color: #2c3e50;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	user-select: none;
}

.shopping-mode-toggle input[type="checkbox"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

/* Ingredient Sections */
.ingredients-section {
	margin-bottom: 25px;
}

.ingredients-section:last-child {
	margin-bottom: 0;
}

.ingredients-section-title {
	font-size: 1.2em;
	color: #27ae60;
	font-weight: 600;
	margin: 0 0 12px 0;
	padding-bottom: 8px;
	border-bottom: 2px solid #e9ecef;
}

/* Ingredients List */
.ingredients-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ingredients-list li {
	padding: 12px 16px;
	margin-bottom: 8px;
	background: #f8f9fa;
	border-left: 4px solid #27ae60;
	border-radius: 4px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 12px;
}

.ingredients-list li:hover {
	background: #e9ecef;
}

.ingredient-checkbox {
	display: none;
	width: 20px;
	height: 20px;
	cursor: pointer;
	flex-shrink: 0;
}

.shopping-mode-active .ingredient-checkbox {
	display: block;
}

.shopping-mode-active .ingredients-list li.checked {
	opacity: 0.5;
	text-decoration: line-through;
	background: #d4edda;
}

.ingredient-text {
	flex: 1;
}

/* Instructions List */
.instructions-list {
	list-style: none;
	padding: 0;
	margin: 0;
	counter-reset: step-counter;
}

.instruction-step {
	position: relative;
	margin-bottom: 20px;
	padding: 20px 20px 20px 60px;
	background: #f8f9fa;
	border-radius: 8px;
	transition: all 0.2s ease;
	min-height: 60px;
}

.instruction-step:hover {
	background: #e9ecef;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-number {
	position: absolute;
	top: 0;
	left: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #27ae60;
	color: #fff;
	border-radius: 8px 0 8px 0; /* Rounded top-left and bottom-right */
	font-weight: bold;
	font-size: 1.1em;
}

.step-text {
	line-height: 1.7;
	color: #495057;
}

/* Recipe Footer */
.recipe-footer {
	margin-top: 40px;
	padding: 30px;
	background: #f8f9fa;
	border-radius: 8px;
	border-top: 3px solid #27ae60;
}

.recipe-categories,
.recipe-tags {
	margin-bottom: 15px;
	padding: 0;
}

.recipe-categories:last-child,
.recipe-tags:last-child {
	margin-bottom: 0;
}

.recipe-categories strong,
.recipe-tags strong {
	color: #2c3e50;
	margin-right: 10px;
}

.recipe-categories a {
	color: #27ae60;
	text-decoration: none;
	transition: color 0.2s ease;
}

.recipe-categories a:hover {
	color: #1e8449;
	text-decoration: underline;
}

.recipe-tag {
	display: inline-block;
	padding: 5px 12px;
	margin: 4px;
	background: #e9ecef;
	border-radius: 20px;
	font-size: 0.9em;
	color: #495057;
	transition: all 0.2s ease;
}

.recipe-tag:hover {
	background: #27ae60;
	color: #fff;
}

/* ==========================================================================
   Sidebar - Table of Contents (Outside main container)
   ========================================================================== */

.recipe-sidebar {
	position: relative;
	height: 100%;
}

/* Sticky container for TOC + widgets */
.recipe-sidebar-sticky-container {
	position: -webkit-sticky; /* Safari */
	position: sticky;
	top: 5rem;
	max-height: calc(100vh - 7rem);
	will-change: transform;
	z-index: 10;
}

/* Sidebar widgets - First position, no sticky */
.recipe-sidebar-widgets {
	margin-bottom: 1.5rem;
	border-radius: 12px;
	transition: opacity 0.3s ease-out, max-height 0.3s ease-out;
}

.recipe-toc-wrapper {
	position: relative;
	background: #fff;
	border: 2px solid #e9ecef;
	border-radius: 12px;
	padding: 25px;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* Hide desktop sidebar on mobile */
@media (max-width: 1024px) {
	.recipe-sidebar {
		display: none;
	}
}

/* Mobile widgets container - shown below article on mobile */
.recipe-mobile-widgets {
	display: none;
}

@media (max-width: 1024px) {
	.recipe-mobile-widgets {
		display: block;
	}
	
	.recipe-mobile-widgets .recipe-widget {
		margin-bottom: 20px;
	}
}

/* Mobile Table of Contents (inside main content) */
.recipe-toc-mobile {
	display: none;
	margin-bottom: 30px;
}

@media (max-width: 1024px) {
	.recipe-toc-mobile {
		display: block;
	}
}

.recipe-toc-mobile-wrapper {
	background: #fff;
	border: 2px solid #e9ecef;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.recipe-toc-title {
	font-size: 1.15em;
	color: #2c3e50;
	margin: 0 0 20px 0;
	padding-bottom: 12px;
	border-bottom: 2px solid #27ae60;
	font-weight: 700;
}

.recipe-toc-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.recipe-toc-list li {
	margin-bottom: 8px;
}

.toc-link {
	display: block;
	padding: 10px 15px;
	color: #495057;
	text-decoration: none;
	border-radius: 6px;
	transition: all 0.2s ease;
	font-weight: 500;
	border-left: 3px solid transparent;
}

.toc-link:hover {
	background: #e9ecef;
	border-left-color: #27ae60;
	transform: translateX(5px);
}

.toc-link.active {
	background: #27ae60;
	color: #fff;
	border-left-color: #1e8449;
	font-weight: 600;
}

/* ==========================================================================
   Archive Recipe Styles
   ========================================================================== */

.recipe-archive-wrapper {
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px 20px;
	padding-left: 0;
	padding-right: 0;
}

.recipe-archive-header {
	text-align: center;
	margin-bottom: 40px;
}

.recipe-archive-title {
	font-size: 2.5em;
	color: #2c3e50;
	margin: 0 0 15px 0;
}

.recipe-archive-description {
	font-size: 1.2em;
	color: #7f8c8d;
}

.recipe-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.recipe-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
}

.recipe-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recipe-card-image {
	position: relative;
	height: 220px;
	overflow: hidden;
}

.recipe-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.recipe-placeholder-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #f5f5f5;
}

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

.recipe-card-content {
	padding: 20px;
}

.recipe-card-title {
	font-size: 1.4em;
	margin: 0 0 10px 0;
}

.recipe-card-title a {
	color: #2c3e50;
	text-decoration: none;
	transition: color 0.2s ease;
}

.recipe-card-title a:hover {
	color: #27ae60;
}

.recipe-card-excerpt {
	color: #7f8c8d;
	line-height: 1.6;
	margin-bottom: 15px;
}

.recipe-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	font-size: 0.9em;
	color: #7f8c8d;
}

.recipe-card-meta-item {
	display: flex;
	align-items: center;
	gap: 5px;
}

.recipe-pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 40px;
}

.recipe-pagination a,
.recipe-pagination span {
	padding: 10px 16px;
	background: #fff;
	color: #27ae60;
	text-decoration: none;
	border: 2px solid #27ae60;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.recipe-pagination a:hover {
	background: #27ae60;
	color: #fff;
}

.recipe-pagination .current {
	background: #27ae60;
	color: #fff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.recipe-title {
		font-size: 2em;
	}
	
	.recipe-header,
	.recipe-hero-section,
	.recipe-content-wrapper {
		padding-left: 20px;
		padding-right: 20px;
	}
	
	.recipe-toc-wrapper {
		position: relative;
		top: 0;
		margin-bottom: 30px;
	}
}

/* ==========================================================================
   Archive Page Styles
   ========================================================================== */

/* Recipe Archive Wrapper */
.recipe-archive-wrapper {
max-width: 1600px;
margin: 0 auto;
padding: 40px 20px;
}

/* Archive Header - Option 1: Minimal Sidebar Style */
.archive-header {
margin-bottom: 30px;
display: grid;
grid-template-columns: 1fr auto;
gap: 30px;
align-items: center;
}

@media (max-width: 992px) {
.archive-header {
	grid-template-columns: 1fr;
	gap: 20px;
}
}

.archive-title-wrapper {
display: flex;
align-items: center;
gap: 15px;
position: relative;
padding-left: 20px;
}

.archive-title-wrapper::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
background: linear-gradient(to bottom, #27ae60, #229954);
border-radius: 2px;
}

.archive-icon {
font-size: 2em;
line-height: 1;
}

.archive-title-content {
display: flex;
flex-direction: column;
gap: 4px;
}

.archive-label {
font-size: 0.65em;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 2px;
color: #27ae60;
line-height: 1;
}

.archive-title {
font-size: 2em;
color: #2c3e50;
margin: 0;
font-weight: 700;
line-height: 1.2;
}

.archive-description {
font-size: 1rem;
color: #555;
max-width: 100%;
margin: 25px 0;
padding: 20px 25px;
line-height: 1.7;
background: #f8f9fa;
border-left: 4px solid #22c55e;
border-radius: 4px;
}

/* Recipe Search Bar */
.recipe-search-bar {
margin: 0;
}

.recipe-search-form {
max-width: 500px;
margin: 0;
position: relative;
display: flex;
gap: 0;
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
border-radius: 50px;
overflow: hidden;
background: #fff;
}

@media (max-width: 992px) {
.recipe-search-form {
	max-width: 600px;
	margin: 0 auto;
}
}

.recipe-search-input {
flex: 1;
padding: 16px 24px;
font-size: 1em;
border: 2px solid #e9ecef;
border-radius: 50px 0 0 50px;
border-right: none;
outline: none;
transition: border-color 0.3s ease;
}

.recipe-search-input:focus {
border-color: #27ae60;
}

.recipe-search-button {
padding: 16px 28px;
background: #27ae60;
border: 2px solid #27ae60;
border-left: none;
border-radius: 0 50px 50px 0;
color: #fff;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}

.recipe-search-button:hover {
background: #219150;
border-color: #219150;
}

.recipe-search-button .dashicons {
font-size: 20px;
width: 20px;
height: 20px;
}

.recipe-search-button .search-icon {
	width: 20px;
	height: 20px;
	stroke-width: 2.5;
}

.screen-reader-text {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}

@media (max-width: 768px) {
.recipe-search-form {
	border-radius: 25px;
}

.recipe-search-input {
	padding: 14px 20px;
	font-size: 0.95em;
	border-radius: 25px 0 0 25px;
}

.recipe-search-button {
	padding: 14px 22px;
	border-radius: 0 25px 25px 0;
}
}

/* Recipe Filters - Modern Card Style */
.recipe-filters {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
border-radius: 16px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
margin-bottom: 40px;
overflow: hidden;
border: 1px solid rgba(39, 174, 96, 0.1);
}

.recipe-filters-inner {
padding: 25px 30px;
}

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

.filter-group:last-child {
margin-bottom: 0;
}

.filter-title {
font-size: 0.8em;
color: #6c757d;
text-transform: uppercase;
letter-spacing: 0.5px;
margin: 0 0 12px 0;
font-weight: 600;
display: flex;
align-items: center;
gap: 6px;
}

.filter-title::before {
content: '';
width: 3px;
height: 14px;
background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
border-radius: 2px;
}

.filter-pills {
display: flex;
flex-wrap: wrap;
gap: 8px;
}

.filter-pill {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 14px;
background: #fff;
color: #495057;
border: 1.5px solid #e0e0e0;
border-radius: 20px;
font-size: 0.9em;
font-weight: 500;
text-decoration: none;
transition: all 0.2s ease;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-pill:hover {
color: #27ae60;
border-color: #27ae60;
box-shadow: 0 2px 6px rgba(39, 174, 96, 0.15);
background: #f8fff8;
}

.filter-pill span {
position: relative;
z-index: 1;
}

.filter-pill.active {
background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
color: #fff;
border-color: #27ae60;
box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.filter-pill.active:hover {
box-shadow: 0 3px 10px rgba(39, 174, 96, 0.4);
}

.filter-count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 20px;
height: 20px;
padding: 0 6px;
background: rgba(39, 174, 96, 0.1);
border-radius: 10px;
font-size: 0.75em;
font-weight: 600;
position: relative;
z-index: 1;
}

.filter-pill:hover .filter-count {
background: rgba(39, 174, 96, 0.15);
}

.filter-pill.active .filter-count {
background: rgba(255, 255, 255, 0.25);
color: #fff;
}

/* Load More Button */
.load-more-button {
cursor: pointer;
font-family: inherit;
}

.load-more-button:disabled {
opacity: 0.6;
cursor: not-allowed;
}

.load-more-button:not(:disabled):hover {
background: #27ae60;
color: #fff;
border-color: #27ae60;
}

/* Recipe Grid */
.recipe-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 30px;
margin-bottom: 50px;
}

/* Recipe Card */
.recipe-card {
background: #fff;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
transition: all 0.3s ease;
}

.recipe-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recipe-card-link {
text-decoration: none;
color: inherit;
display: block;
}

.recipe-card-image {
position: relative;
width: 100%;
height: 250px;
overflow: hidden;
}

.recipe-card-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}

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

/* Recipe Badge (Difficulty) */
.recipe-badge {
position: absolute;
top: 15px;
right: 15px;
padding: 6px 14px;
background: rgba(255, 255, 255, 0.95);
border-radius: 20px;
font-size: 0.85em;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
z-index: 5;
}

.recipe-badge-easy {
background: #d4edda;
color: #155724;
border: 2px solid #c3e6cb;
}

.recipe-badge-medium {
background: #fff3cd;
color: #856404;
border: 2px solid #ffeaa7;
}

.recipe-badge-hard {
background: #f8d7da;
color: #721c24;
border: 2px solid #f5c6cb;
}

/* Recipe Card Content */
.recipe-card-content {
padding: 20px;
}

.recipe-card-title {
font-size: 1.4em;
color: #2c3e50;
margin: 0 0 10px 0;
font-weight: 600;
transition: color 0.2s ease;
}

.recipe-card:hover .recipe-card-title {
color: #27ae60;
}

.recipe-card-excerpt {
color: #6c757d;
font-size: 0.95em;
line-height: 1.6;
margin-bottom: 15px;
}

.recipe-card-meta {
display: flex;
gap: 20px;
flex-wrap: wrap;
font-size: 0.9em;
color: #495057;
padding-top: 15px;
border-top: 1px solid #e9ecef;
}

.recipe-card-meta span {
display: flex;
align-items: center;
gap: 5px;
}

/* No Recipes Message */
.no-recipes {
text-align: center;
padding: 60px 20px;
background: #f8f9fa;
border-radius: 12px;
}

.no-recipes p {
font-size: 1.2em;
color: #6c757d;
margin: 0;
}

/* Recipe Pagination */
.recipe-pagination {
margin-top: 50px;
text-align: center;
}

.recipe-pagination .nav-links {
display: flex;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
}

.recipe-pagination a,
.recipe-pagination span {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 45px;
height: 45px;
padding: 0 15px;
background: #fff;
color: #495057;
border: 2px solid #e9ecef;
border-radius: 8px;
font-weight: 500;
text-decoration: none;
transition: all 0.2s ease;
}

.recipe-pagination a:hover {
background: #27ae60;
color: #fff;
border-color: #27ae60;
transform: translateY(-2px);
}

.recipe-pagination .current {
background: #27ae60;
color: #fff;
border-color: #27ae60;
}

/* Responsive */
@media (max-width: 768px) {
.recipe-archive-wrapper {
padding: 20px 15px;
}

.archive-header {
margin-bottom: 20px;
padding-bottom: 15px;
}

.archive-title-wrapper {
gap: 8px;
}

.archive-icon {
font-size: 1.4em;
}

.archive-label {
font-size: 0.65em;
letter-spacing: 1px;
}

.archive-title {
font-size: 1.4em;
}

.archive-description {
font-size: 0.9em;
margin-top: 8px;
}

.recipe-filters-inner {
padding: 20px;
}

.filter-title {
font-size: 1em;
}

.filter-pills {
gap: 8px;
}

.filter-pill {
padding: 6px 12px;
font-size: 0.9em;
}

.recipe-grid {
grid-template-columns: 1fr;
gap: 20px;
}

.recipe-card-image {
height: 200px;
}
}

@media (min-width: 769px) and (max-width: 1024px) {
.recipe-grid {
grid-template-columns: repeat(2, 1fr);
}
}

@media (min-width: 1400px) {
.recipe-grid {
grid-template-columns: repeat(4, 1fr);
}
}

/* ==========================================================================
   Compact Dropdown Filters - REMOVED (using filter-pills instead)
   ========================================================================== */

/* Mobile Responsive for Filter Groups */
@media (max-width: 768px) {
	.filter-group {
		margin-bottom: 20px;
	}

	.filter-pills {
		gap: 8px;
	}

	.filter-pill {
		font-size: 0.85em;
		padding: 8px 14px;
	}

	.filter-count {
		font-size: 0.75em;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
	}
}

/* ==========================================================================
   Related Recipes Section
   ========================================================================== */

.related-recipes-title {
	font-size: 1.6em;
	margin: 0 0 30px 0;
	color: #333;
	font-weight: 600;
	text-align: left;
}

.related-recipes-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

@media (max-width: 1024px) {
	.related-recipes-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.related-recipes-title {
		font-size: 1.5em;
		margin-bottom: 20px;
	}
	
	.related-recipes-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

.related-recipe-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-recipe-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.related-recipe-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.related-recipe-image {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: #f5f5f5;
}

.related-recipe-image img,
.related-recipe-image svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.related-recipe-image .default-recipe-image {
	background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.related-recipe-content {
	padding: 20px;
}

.related-recipe-title {
	font-size: 1.1em;
	font-weight: 600;
	color: #333;
	margin: 0 0 12px 0;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.related-recipe-meta {
	display: flex;
	align-items: center;
	gap: 15px;
	font-size: 0.9em;
	color: #666;
}

.related-meta-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.related-meta-item svg {
	width: 16px;
	height: 16px;
	fill: #4CAF50;
}

.related-recipe-image .difficulty-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(255, 255, 255, 0.95);
	color: #333;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.related-recipe-image .difficulty-badge.difficulty-easy {
	background: rgba(76, 175, 80, 0.95);
	color: white;
}

.related-recipe-image .difficulty-badge.difficulty-medium {
	background: rgba(255, 152, 0, 0.95);
	color: white;
}

.related-recipe-image .difficulty-badge.difficulty-hard {
	background: rgba(244, 67, 54, 0.95);
	color: white;
}

/* ==========================================================================
   Mobile Optimization - Compact Single Recipe View
   ========================================================================== */

@media (max-width: 768px) {
	/* Reduce wrapper padding */
	.recipe-single-wrapper {
		padding: 20px 12px;
	}
	
	/* More compact single recipe container */
	.recipe-single {
		border-radius: 8px;
		box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
	}
	
	/* Compact header */
	.recipe-header {
		padding: 20px 16px 12px;
	}
	
	.recipe-title {
		font-size: 1.6em;
		margin: 0 0 12px 0;
	}
	
	.recipe-excerpt {
		font-size: 0.95em;
		line-height: 1.5;
		margin: 0 auto 12px;
	}
	
	/* Compact hero section */
	.recipe-hero-section {
		gap: 16px;
		padding: 0 16px 20px;
	}
	
	.recipe-featured-image {
		border-radius: 8px;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	}
	
	.recipe-featured-image img {
		max-height: 250px;
	}
	
	/* Compact meta info */
	.recipe-meta-info {
		gap: 4px;
		padding: 10px;
		border-radius: 6px;
	}
	
	.recipe-meta-item {
		gap: 6px;
		padding: 3px 6px;
		border-radius: 4px;
	}
	
	.meta-icon {
		font-size: 1em;
		width: 16px;
		height: 16px;
	}
	
	.meta-label {
		font-size: 0.75em;
		min-width: 60px;
	}
	
	.meta-value {
		font-size: 0.85em;
	}
	
	/* Compact content wrapper */
	.recipe-content-wrapper {
		padding: 0 16px 20px;
	}
	
	/* Compact description */
	.recipe-description {
		margin-bottom: 20px;
	}
	
	.recipe-description h2 {
		font-size: 1.3em;
		margin-bottom: 12px;
		padding-bottom: 8px;
	}
	
	.recipe-content {
		font-size: 0.95em;
		line-height: 1.6;
	}
	
	/* Compact details wrapper */
	.recipe-details-wrapper {
		gap: 16px;
	}
	
	/* Compact section headers */
	.recipe-section-header {
		padding: 10px 14px;
	}
	
	.recipe-section-header h2 {
		font-size: 1.15em;
		gap: 8px;
	}
	
	.recipe-section-icon {
		font-size: 1em;
	}
	
	.recipe-section-toggle {
		font-size: 1.1em;
	}
	
	/* Compact section content */
	.recipe-section-content-inner {
		padding: 16px;
	}
	
	/* Compact shopping mode toggle */
	.shopping-mode-toggle {
		gap: 8px;
		margin-bottom: 14px;
		padding: 10px 12px;
		border-radius: 4px;
	}
	
	.shopping-mode-toggle label {
		gap: 6px;
		font-size: 0.9em;
	}
	
	.shopping-mode-toggle input[type="checkbox"] {
		width: 18px;
		height: 18px;
	}
	
	/* Compact ingredient sections */
	.ingredients-section {
		margin-bottom: 16px;
	}
	
	.ingredients-section-title {
		font-size: 1.05em;
		margin-bottom: 10px;
		padding-bottom: 6px;
	}
	
	.ingredients-list {
		gap: 8px;
	}
	
	.ingredient-item {
		padding: 8px 10px;
		font-size: 0.9em;
		gap: 10px;
	}
	
	.ingredient-checkbox {
		width: 16px;
		height: 16px;
	}
	
	.ingredient-text {
		font-size: 0.95em;
	}
	
	/* Compact instructions */
	.instructions-list {
		gap: 12px;
	}
	
	.instruction-item {
		gap: 12px;
		padding: 14px;
	}
	
	.instruction-number {
		min-width: 28px;
		width: 28px;
		height: 28px;
		font-size: 0.95em;
		border-radius: 8px 0 8px 8px;
	}
	
	.instruction-text {
		font-size: 0.95em;
		line-height: 1.6;
	}
	
	/* Compact recipe tags */
	.recipe-tags {
		padding: 0;
		margin-top: 20px;
		border-radius: 6px;
	}
	
	.recipe-tags h3 {
		font-size: 1.1em;
		margin-bottom: 10px;
	}
	
	.tags-list {
		gap: 6px;
	}
	
	.tag-link {
		padding: 5px 10px;
		font-size: 0.8em;
		border-radius: 4px;
	}
	
	/* Compact mobile TOC */
	.mobile-toc {
		padding: 14px;
		margin-bottom: 20px;
		border-radius: 6px;
	}
	
	.mobile-toc h2 {
		font-size: 1.1em;
		gap: 8px;
		margin-bottom: 12px;
	}
	
	.mobile-toc-list {
		gap: 6px;
	}
	
	.mobile-toc-item a {
		padding: 8px 10px;
		font-size: 0.9em;
		border-radius: 4px;
	}
	
	/* Compact related recipes */
	.related-recipes-section {
		border-radius: 6px;
	}
	
	.related-recipes-title {
		font-size: 1.3em;
		margin-bottom: 16px;
		gap: 8px;
	}
	
	.related-recipes-grid {
		gap: 16px;
	}
	
	.related-recipe-image {
		height: 160px;
	}
	
	.related-recipe-content {
		padding: 14px;
	}
	
	.related-recipe-title {
		font-size: 1em;
		margin: 0 0 10px 0;
	}
	
	.related-recipe-meta {
		gap: 12px;
		font-size: 0.85em;
	}
	
	.related-meta-item svg {
		width: 14px;
		height: 14px;
	}
	
	.related-recipe-image .difficulty-badge {
		top: 8px;
		right: 8px;
		padding: 4px 8px;
		font-size: 0.7em;
		border-radius: 14px;
	}
}

/* Extra small screens - even more compact */
@media (max-width: 480px) {
	.recipe-single-wrapper {
		padding: 16px 10px;
	}
	
	.recipe-header {
		padding: 16px 12px 10px;
	}
	
	.recipe-title {
		font-size: 1.4em;
	}
	
	.recipe-excerpt {
		font-size: 0.9em;
	}
	
	.recipe-hero-section {
		padding: 0 12px 16px;
		gap: 12px;
	}
	
	.recipe-content-wrapper {
		padding: 0 12px 16px;
	}
	
	.recipe-section-header {
		padding: 8px 12px;
	}
	
	.recipe-section-header h2 {
		font-size: 1.05em;
	}
	
	.recipe-section-content-inner {
		padding: 12px;
	}
	
	.instruction-item {
		padding: 12px;
		gap: 10px;
	}
	
	.instruction-number {
		min-width: 26px;
		width: 26px;
		height: 26px;
		font-size: 0.9em;
	}
	
	.related-recipe-image {
		height: 140px;
	}
}

/* ==========================================================================
   Recipe Widgets Styles
   ========================================================================== */

/* Remove individual sticky behavior - parent container handles it */
.recipe-sidebar-widgets .recipe-widget {
	position: relative;
	z-index: 5;
}

/* Recipe widget container */
.recipe-widget {
	background: #fff;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 1.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.3s ease;
}

.recipe-widget:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Widget title */
.recipe-widget-title {
	margin: 0 0 15px 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	color: #2c3e50;
	border-bottom: 2px solid #4CAF50;
	padding-bottom: 10px;
}

/* Cooking Helper Widget Styles */
.cooking-helper-content {
	font-size: 14px;
	line-height: 1.6;
}

.cooking-helper-intro {
	margin: 0 0 12px 0;
	color: #555;
	font-weight: 600;
	font-size: 13px;
}

.cooking-helper-collapsible {
	position: relative;
}

.cooking-helper-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 87px;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.cooking-helper-list.expanded {
	max-height: 1000px;
}

.cooking-helper-list li {
	padding: 6px 10px;
	margin-bottom: 4px;
	background: #f8f9fa;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: background-color 0.2s ease;
}

.cooking-helper-list li:hover {
	background: #e8f5e9;
}

.cooking-helper-list li:last-child {
	margin-bottom: 0;
}

.cooking-helper-list li:nth-child(2) {
	opacity: 0.5;
	pointer-events: none;
}

.cooking-helper-list.expanded li:nth-child(2) {
	opacity: 1;
	pointer-events: auto;
}

/* Collapsed items */
.collapsed-item {
	display: none;
}

.cooking-helper-list.expanded .collapsed-item {
	display: flex;
}

.cooking-helper-collapsible .collapsed-item.cooking-helper-link {
	display: none;
}

.cooking-helper-collapsible .collapsed-item.cooking-helper-link.show {
	display: inline-block;
}

.cooking-helper-toggle {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 8px 16px;
	background: #f0f0f0;
	border: none;
	border-radius: 6px;
	color: #4CAF50;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
}

.cooking-helper-toggle:hover {
	background: #e0e0e0;
}

.measurement-abbr {
	font-weight: 700;
	color: #4CAF50;
	font-size: 14px;
	min-width: 45px;
	display: inline-block;
}

.measurement-full {
	color: #555;
	flex: 1;
	text-align: right;
	font-size: 12px;
}

.cooking-helper-link {
	display: inline-block;
	margin-top: 10px;
	padding: 8px 16px;
	background: #4CAF50;
	color: #fff !important;
	text-decoration: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	transition: background-color 0.3s ease;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
}

.cooking-helper-link:hover {
	background: #45a049;
}

/* Mobile responsive for widgets */
@media (max-width: 1024px) {
	/* Reset sticky container on mobile */
	.recipe-sidebar-sticky-container {
		position: relative;
		top: auto;
		max-height: none;
		overflow-y: visible;
	}
	
	/* Disable sticky on mobile and show widgets */
	.recipe-sidebar-widgets {
		margin-top: 20px;
	}
	
	.recipe-sidebar-widgets .recipe-widget {
		position: relative;
		top: auto;
		margin-bottom: 20px;
		padding: 16px;
	}

	.recipe-widget-title {
		font-size: 16px;
	}

	.cooking-helper-content {
		font-size: 13px;
	}

	.measurement-abbr {
		font-size: 13px;
		min-width: 40px;
	}

	.measurement-full {
		font-size: 11px;
	}

	.cooking-helper-intro {
		font-size: 12px;
	}
}

/* ============================================
   Image Lightbox Styles
   ============================================ */

.recipe-image-expand {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	overflow: hidden;
	border-radius: 12px;
}

.recipe-image-expand img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.3s ease;
}

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

.expand-icon {
	position: absolute;
	bottom: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	border-radius: 50%;
	color: white;
	opacity: 0;
	transition: opacity 0.3s ease, background 0.3s ease;
	pointer-events: none;
}

.recipe-image-expand:hover .expand-icon,
.recipe-image-expand:focus .expand-icon {
	opacity: 1;
}

.recipe-image-expand:focus {
	outline: 2px solid #4CAF50;
	outline-offset: 2px;
}

.expand-icon:hover {
	background: rgba(0, 0, 0, 0.8);
}

/* Lightbox Modal */
.recipe-image-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.recipe-image-lightbox.active {
	opacity: 1;
	visibility: visible;
}

.lightbox-content {
	max-width: 90%;
	max-height: 90%;
	position: relative;
	animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
	from {
		transform: scale(0.8);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

.lightbox-content img {
	max-width: 100%;
	max-height: 90vh;
	width: auto;
	height: auto;
	display: block;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	color: white;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.2s ease;
	z-index: 10000;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.1);
}

.lightbox-close:focus {
	outline: 2px solid white;
	outline-offset: 2px;
}

.lightbox-close svg {
	width: 24px;
	height: 24px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.expand-icon {
		width: 36px;
		height: 36px;
		bottom: 12px;
		right: 12px;
		opacity: 1;
	}
	
	.expand-icon svg {
		width: 20px;
		height: 20px;
	}
	
	.lightbox-close {
		top: 10px;
		right: 10px;
		width: 44px;
		height: 44px;
	}
	
	.lightbox-content {
		max-width: 95%;
		max-height: 95%;
	}
	
	.lightbox-content img {
		max-height: 85vh;
	}
}
