/*
Theme Name: Orange Tree Lane
Description: Custom theme for orangetreelane.com recipe blog
Version: 1.0
Author: Netazoic
*/

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
	--otl-brown:       #5C3A1E;
	--otl-dark-brown:  #3B2008;
	--otl-cream:       #FFF8E7;
	--otl-vanilla:     #FEFFDC;
	--otl-green:       #3A5F0B;
	--otl-link:        #5C3A1E;
	--otl-link-hover:  #c69c6d;
	--otl-olive:       #BECF27;
	--otl-text:        #333333;
	--otl-nav-height:  50px;
	--otl-max-width:   1040px;
}

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

body {
	margin: 0;
	padding: 0;
	background-color: #e8d5b0;
	background-image:
		repeating-linear-gradient(
			90deg,
			rgba(0,0,0,0.03) 0px,
			rgba(0,0,0,0.03) 1px,
			transparent 1px,
			transparent 40px
		),
		repeating-linear-gradient(
			0deg,
			rgba(0,0,0,0.02) 0px,
			rgba(0,0,0,0.02) 1px,
			transparent 1px,
			transparent 60px
		);
	font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
	font-size: 16px;
	color: var(--otl-text);
	line-height: 1.6;
}

a {
	color: var(--otl-link);
	text-decoration: none;
}

a:hover {
	color: var(--otl-link-hover);
	text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
	font-family: Palatino, "Palatino Linotype", Georgia, serif;
	font-style: italic;
	color: var(--otl-green);
	line-height: 1.2;
	margin-top: 0.5em;
	margin-bottom: 0.3em;
}

h1 { font-size: 2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; font-style: normal; font-weight: bold; }

p { margin: 0 0 1em; }

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

ul { list-style: disc; padding-left: 1.5em; }

/* ============================================================
   Site Structure
   ============================================================ */
#page {
	max-width: var(--otl-max-width);
	margin: 0 auto;
	background-color: var(--otl-cream);
	box-shadow: 0 0 20px rgba(0,0,0,0.35);
}

/* ============================================================
   Header / Masthead
   ============================================================ */
#masthead {
	background-color: var(--otl-dark-brown);
	padding: 0;
	line-height: 0;
}

#masthead .masthead-link {
	display: block;
	line-height: 0;
}

#masthead .masthead-img {
	width: 100%;
	height: auto;
	display: block;
	max-height: 280px;
	object-fit: cover;
	object-position: left center;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}

/* ============================================================
   Navigation
   ============================================================ */
#site-navigation {
	background-color: var(--otl-brown);
	background-image: url(images/nav_top_bg.gif);
	background-repeat: repeat-x;
	border-top: 2px solid var(--otl-dark-brown);
	border-bottom: 2px solid var(--otl-dark-brown);
}

#site-navigation .nav-inner {
	max-width: var(--otl-max-width);
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
}

#site-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

#site-navigation ul li {
	position: relative;
	display: flex;
	align-items: center;
}

#site-navigation ul li + li::before {
	content: "";
	flex-shrink: 0;
	width: 7px;
	height: 50px;
	background-image: url(images/nav_top_pipe.gif);
	background-repeat: no-repeat;
	background-position: center;
}

#site-navigation ul a {
	display: block;
	padding: 14px 14px;
	color: #FEFFDC;
	font-family: Palatino, "Palatino Linotype", Georgia, serif;
	font-style: italic;
	font-size: 1.1em;
	text-decoration: none;
	white-space: nowrap;
	line-height: var(--otl-nav-height);
	padding-top: 0;
	padding-bottom: 0;
}

#site-navigation ul a:hover,
#site-navigation ul .current-menu-item > a,
#site-navigation ul .current-page-ancestor > a {
	color: #c69c6d;
	text-decoration: none;
}

/* Dropdown */
#site-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background-color: var(--otl-brown);
	border: 1px solid var(--otl-dark-brown);
	min-width: 180px;
	z-index: 100;
	flex-direction: column;
}

#site-navigation ul li:hover > ul {
	display: flex;
}

#site-navigation ul ul li + li::before {
	display: none;
}

#site-navigation ul ul a {
	padding: 10px 16px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ============================================================
   Content Layout
   ============================================================ */
#content {
	padding: 0;
}

.content-area {
	display: flex;
	gap: 0;
	align-items: flex-start;
}

#primary {
	flex: 1;
	min-width: 0;
	padding: 24px 28px;
}

#secondary {
	width: 280px;
	flex-shrink: 0;
	padding: 24px 20px;
	background-color: var(--otl-vanilla);
	border-left: 2px solid #d4b896;
}

/* Full-width pages (no sidebar) */
.no-sidebar #primary {
	max-width: 100%;
}

/* ============================================================
   Post / Recipe Cards (archive/index)
   ============================================================ */
.post-card {
	display: flex;
	gap: 20px;
	padding: 20px 0;
	border-bottom: 1px solid #d4b896;
	align-items: flex-start;
}

.post-card:last-child {
	border-bottom: none;
}

.post-card .post-thumb {
	flex-shrink: 0;
	width: 140px;
}

.post-card .post-thumb img {
	width: 140px;
	height: 100px;
	object-fit: cover;
	border: 1px solid #b8956a;
}

.post-card .post-body {
	flex: 1;
}

.post-card .post-title {
	font-size: 1.3em;
	margin: 0 0 6px;
}

.post-card .post-title a {
	color: var(--otl-green);
	text-decoration: none;
}

.post-card .post-title a:hover {
	color: var(--otl-link-hover);
}

.post-card .post-meta {
	font-size: 0.82em;
	color: #7a6050;
	margin-bottom: 8px;
}

.post-card .post-excerpt {
	font-size: 0.92em;
	color: var(--otl-text);
	line-height: 1.5;
}

.post-card .read-more {
	display: inline-block;
	margin-top: 8px;
	font-size: 0.85em;
	color: var(--otl-olive);
	font-style: italic;
}

/* ============================================================
   Single Post / Recipe
   ============================================================ */
.entry-header {
	margin-bottom: 20px;
}

.entry-title {
	font-size: 2em;
	margin-bottom: 6px;
}

.entry-meta {
	font-size: 0.85em;
	color: #7a6050;
	margin-bottom: 16px;
}

.entry-meta a {
	color: var(--otl-brown);
}

.entry-content {
	line-height: 1.7;
}

.entry-content img {
	border: 1px solid #b8956a;
	margin-bottom: 12px;
}

.entry-content p { margin-bottom: 1em; }

.entry-content h2,
.entry-content h3 {
	margin-top: 1.4em;
}

/* Recipe card styling adjustments (WPRM integration) */
.wprm-recipe-container {
	border: 1px solid #d4b896 !important;
	background-color: var(--otl-vanilla) !important;
	margin: 20px 0 !important;
}

.wprm-recipe-block-container-columns {
	background-color: var(--otl-vanilla);
}

/* ============================================================
   Page Title Banner
   ============================================================ */
.page-title-bar {
	background-color: var(--otl-brown);
	background-image: linear-gradient(90deg, var(--otl-dark-brown) 0%, var(--otl-brown) 100%);
	color: var(--otl-vanilla);
	font-family: Palatino, Georgia, serif;
	font-size: 1.4em;
	font-style: italic;
	font-weight: bold;
	padding: 12px 28px;
	border-bottom: 2px solid var(--otl-dark-brown);
}

/* ============================================================
   Sidebar Widgets
   ============================================================ */
.widget {
	margin-bottom: 28px;
}

.widget-title {
	font-size: 1em;
	font-style: normal;
	font-weight: bold;
	color: var(--otl-brown);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-bottom: 2px solid var(--otl-brown);
	padding-bottom: 6px;
	margin-bottom: 12px;
}

.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget ul li {
	padding: 5px 0;
	border-bottom: 1px solid #e2d0ba;
	font-size: 0.9em;
}

.widget ul li a {
	color: var(--otl-green);
}

.widget ul li a:hover {
	color: var(--otl-link-hover);
}

/* ============================================================
   Recipe Grid (archive shortcode page)
   ============================================================ */
.recipe-grid-page #primary {
	padding: 24px 28px;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination,
.nav-links {
	padding: 20px 0;
	text-align: center;
	clear: both;
}

.pagination .page-numbers,
.nav-links a,
.nav-links span {
	display: inline-block;
	padding: 6px 14px;
	margin: 0 3px;
	border: 1px solid #d4b896;
	background-color: var(--otl-vanilla);
	color: var(--otl-brown);
	font-size: 0.9em;
	border-radius: 2px;
}

.pagination .current,
.pagination .page-numbers:hover,
.nav-links a:hover {
	background-color: var(--otl-brown);
	color: var(--otl-vanilla);
	border-color: var(--otl-brown);
	text-decoration: none;
}

/* ============================================================
   Footer
   ============================================================ */
#colophon {
	background-color: var(--otl-dark-brown);
	color: #c69c6d;
	text-align: center;
	padding: 20px 24px;
	font-size: 0.85em;
	border-top: 3px solid var(--otl-brown);
}

#colophon a {
	color: #c69c6d;
	text-decoration: none;
}

#colophon a:hover {
	color: var(--otl-vanilla);
	text-decoration: underline;
}

#footer-widgets {
	background-color: var(--otl-brown);
	padding: 28px 32px;
	display: flex;
	gap: 32px;
	flex-wrap: wrap;
}

#footer-widgets .footer-col {
	flex: 1;
	min-width: 180px;
}

#footer-widgets .widget-title {
	color: var(--otl-vanilla);
	border-bottom-color: var(--otl-vanilla);
}

#footer-widgets a {
	color: #c69c6d;
}

#footer-widgets a:hover {
	color: var(--otl-vanilla);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn, .otl-btn {
	display: inline-block;
	padding: 8px 20px;
	background-color: var(--otl-olive);
	color: #FFFFFF;
	font-family: Palatino, Georgia, serif;
	font-size: 0.9em;
	border: none;
	cursor: pointer;
	text-decoration: none;
	border-radius: 2px;
}

.btn:hover, .otl-btn:hover {
	background-color: var(--otl-brown);
	color: var(--otl-vanilla);
	text-decoration: none;
}

/* ============================================================
   Search form
   ============================================================ */
.search-form {
	display: flex;
	gap: 4px;
}

.search-form input[type="search"] {
	flex: 1;
	padding: 7px 10px;
	border: 1px solid #b8956a;
	background: #FFFFFF;
	font-family: Palatino, Georgia, serif;
	font-size: 0.9em;
}

.search-form button,
.search-form input[type="submit"] {
	padding: 7px 14px;
	background-color: var(--otl-olive);
	color: #FFFFFF;
	border: none;
	cursor: pointer;
	font-size: 0.9em;
}

.search-form button:hover,
.search-form input[type="submit"]:hover {
	background-color: var(--otl-brown);
}

/* ============================================================
   Category list styling
   ============================================================ */
.category-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.category-list li a {
	display: inline-block;
	padding: 5px 12px;
	background-color: var(--otl-vanilla);
	border: 1px solid #d4b896;
	color: var(--otl-green);
	font-size: 0.88em;
	border-radius: 3px;
	text-decoration: none;
}

.category-list li a:hover {
	background-color: var(--otl-brown);
	color: var(--otl-vanilla);
	border-color: var(--otl-brown);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
	.content-area {
		flex-direction: column;
	}

	#secondary {
		width: 100%;
		border-left: none;
		border-top: 2px solid #d4b896;
	}

	#masthead .site-title {
		font-size: 2em;
	}

	#site-navigation ul {
		flex-direction: column;
		align-items: flex-start;
	}

	#site-navigation ul li + li::before {
		display: none;
	}

	#site-navigation ul a {
		padding: 10px 16px;
	}

	.post-card {
		flex-direction: column;
	}

	.post-card .post-thumb {
		width: 100%;
	}

	.post-card .post-thumb img {
		width: 100%;
		height: 180px;
	}
}

/* ============================================================
   Homepage — wood background
   ============================================================ */
body.home #content {
	background-image: url(images/woodbg.jpg);
	background-repeat: repeat;
}

/* ============================================================
   Homepage — two-column layout
   ============================================================ */
.home-layout {
	display: flex;
	align-items: flex-start;
	gap: 0;
}

.home-primary {
	flex: 1;
	min-width: 0;
	padding: 24px 28px;
}

.home-secondary {
	width: 300px;
	flex-shrink: 0;
	padding: 20px 16px;
}

/* ============================================================
   Homepage — section title rule
   ============================================================ */
.home-section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.home-section-title span {
	font-family: Palatino, Georgia, serif;
	font-size: 1.1em;
	font-weight: bold;
	color: var(--otl-brown);
	white-space: nowrap;
}

.green-rule {
	flex: 1;
	border: none;
	border-top: 2px solid var(--otl-green);
	margin: 0;
}

/* ============================================================
   Homepage — recipe cards
   ============================================================ */
.home-recipe-card {
	background-color: rgba(255,255,255,0.82);
	border: 1px solid #d4b896;
	padding: 16px;
	margin-bottom: 20px;
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.home-recipe-thumb {
	width: 120px;
	height: 90px;
	object-fit: cover;
	border: 1px solid #b8956a;
	flex-shrink: 0;
	display: block;
}

.home-recipe-card > a {
	flex-shrink: 0;
}

.home-recipe-body {
	flex: 1;
}

.home-recipe-title {
	font-size: 1.3em;
	margin: 0 0 8px;
}

.home-recipe-title a {
	color: var(--otl-green);
	text-decoration: none;
}

.home-recipe-title a:hover {
	color: var(--otl-link-hover);
}

.home-recipe-excerpt {
	font-size: 0.92em;
	color: var(--otl-text);
	line-height: 1.5;
	margin-bottom: 10px;
}

.home-recipe-link {
	font-family: Palatino, Georgia, serif;
	font-style: italic;
	color: var(--otl-green);
	font-size: 1em;
	text-decoration: none;
}

.home-recipe-link:hover {
	color: var(--otl-link-hover);
}

/* ============================================================
   Homepage — Meet Molly box
   ============================================================ */
.meet-molly-box {
	background-color: var(--otl-brown);
	background-image: url(images/woodbg.jpg);
	background-repeat: repeat;
}

.meet-molly-header {
	background-color: rgba(0,0,0,0.35);
	color: var(--otl-vanilla);
	font-family: Palatino, Georgia, serif;
	font-style: italic;
	font-size: 1.1em;
	font-weight: bold;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(255,255,255,0.2);
}

.meet-molly-body {
	background-color: var(--otl-vanilla);
	padding: 14px;
}

.molly-photo {
	float: right;
	margin: 0 0 10px 12px;
	border: 1px solid #b8956a;
	width: 100px;
	height: auto;
}

.molly-photo-placeholder {
	float: right;
	margin: 0 0 10px 12px;
	width: 100px;
	height: 85px;
	background-color: #e8d5b0;
	border: 1px solid #b8956a;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7em;
	color: #7a6050;
	text-align: center;
}

.molly-greeting {
	font-size: 1.4em;
	margin: 0 0 8px;
}

.meet-molly-body p {
	font-size: 0.88em;
	line-height: 1.55;
	color: var(--otl-text);
	margin-bottom: 10px;
}

/* ============================================================
   Recipe index grid
   ============================================================ */
.recipe-filter-bar {
	padding: 14px 0 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.filter-tag {
	display: inline-block;
	padding: 5px 13px;
	background-color: var(--otl-vanilla);
	border: 1px solid #d4b896;
	color: var(--otl-green);
	font-size: 0.85em;
	border-radius: 3px;
	text-decoration: none;
	white-space: nowrap;
}

.filter-tag:hover,
.filter-tag.active {
	background-color: var(--otl-brown);
	color: var(--otl-vanilla);
	border-color: var(--otl-brown);
	text-decoration: none;
}

.recipe-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	padding: 4px 0 24px;
}

.recipe-grid-card {
	background-color: #fff;
	border: 1px solid #d4b896;
	overflow: hidden;
}

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

.recipe-grid-link:hover {
	text-decoration: none;
}

.recipe-grid-link:hover .recipe-grid-title {
	color: var(--otl-link-hover);
}

.recipe-grid-img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
}

.recipe-grid-no-img {
	background-color: #e8d5b0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #7a6050;
	font-size: 0.8em;
	font-style: italic;
}

.recipe-grid-info {
	padding: 10px 12px 12px;
}

.recipe-grid-title {
	font-size: 0.95em;
	font-style: normal;
	color: var(--otl-green);
	margin: 0 0 4px;
	line-height: 1.3;
}

.recipe-grid-course {
	font-size: 0.78em;
	color: #7a6050;
	font-style: italic;
	margin: 0;
}

/* ============================================================
   Recipe search form
   ============================================================ */
.recipe-search-form {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 16px 0 8px;
	flex-wrap: wrap;
}

.recipe-search-input {
	flex: 1;
	min-width: 220px;
	padding: 8px 12px;
	border: 1px solid #b8956a;
	background: #fff;
	font-family: Palatino, "Palatino Linotype", Georgia, serif;
	font-size: 0.95em;
	color: var(--otl-text);
	border-radius: 2px;
	outline: none;
}

.recipe-search-input:focus {
	border-color: var(--otl-green);
	box-shadow: 0 0 0 2px rgba(58, 95, 11, 0.15);
}

.recipe-search-btn {
	padding: 8px 18px;
	background-color: var(--otl-green);
	color: #fff;
	border: none;
	font-family: Palatino, "Palatino Linotype", Georgia, serif;
	font-style: italic;
	font-size: 0.95em;
	cursor: pointer;
	border-radius: 2px;
	white-space: nowrap;
}

.recipe-search-btn:hover {
	background-color: var(--otl-brown);
}

.recipe-search-summary {
	font-size: 0.88em;
	color: #7a6050;
	font-style: italic;
	margin: 0 0 4px;
	padding: 0;
}

.recipe-no-results {
	padding: 28px 0 20px;
	color: #7a6050;
}

.recipe-no-results p {
	margin-bottom: 8px;
}

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

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

/* ============================================================
   Homepage — responsive
   ============================================================ */
@media (max-width: 768px) {
	.home-layout {
		flex-direction: column;
	}

	.home-secondary {
		width: 100%;
	}

	.home-recipe-card {
		flex-direction: column;
	}

	.home-recipe-thumb {
		width: 100%;
		height: 200px;
	}
}
