/*!
 * GIFTY-CM-ROSE Theme Styles
 */

/* Variables */
:root {
	--gifty-primary: #3498db;
	--gifty-secondary: #2c3e50;
	--gifty-text: #333;
	--gifty-light: #f4f4f4;
	--gifty-border: #ddd;
	--gifty-spacing: 20px;
	--gifty-container-width: 1200px;
}

/* Reset */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	color: var(--gifty-text);
	line-height: 1.6;
	background: #fff;
}

a {
	color: var(--gifty-primary);
	text-decoration: none;
	transition: color 0.3s ease;
}

a:hover {
	color: var(--gifty-secondary);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Container */
.site-main,
.header-container,
.footer-widgets,
.footer-bottom {
	max-width: var(--gifty-container-width);
	margin: 0 auto;
	padding: 0 var(--gifty-spacing);
}

/* Header */
.site-header {
	background: var(--gifty-secondary);
	color: #fff;
	padding: var(--gifty-spacing) 0;
}

.site-header a {
	color: #fff;
}

.site-header a:hover {
	color: var(--gifty-primary);
}

.header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
}

.site-branding .site-title {
	font-size: 1.8rem;
	margin: 0;
}

.site-branding .site-description {
	font-size: 0.9rem;
	opacity: 0.8;
	margin: 5px 0 0;
}

/* Navigation */
.main-navigation {
	position: relative;
}

.main-navigation ul {
	list-style: none;
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
}

.main-navigation li {
	position: relative;
}

.main-navigation a {
	display: block;
	padding: 10px 0;
	font-weight: 500;
}

.main-navigation .menu-toggle {
	display: none;
	background: none;
	border: none;
	color: #fff;
	font-size: 1.5rem;
	cursor: pointer;
}

/* Dropdowns */
.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--gifty-secondary);
	min-width: 200px;
	z-index: 10;
	flex-direction: column;
	gap: 0;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.main-navigation ul ul li {
	width: 100%;
}

.main-navigation ul ul a {
	padding: 10px 15px;
}

.main-navigation li:hover > ul {
	display: block;
}

/* Header Layouts */
.header-layout2 .header-container {
	flex-direction: column;
	text-align: center;
}

.header-layout2 .main-navigation ul {
	justify-content: center;
}

.header-layout3 .header-container {
	flex-direction: row-reverse;
}

/* Content Area */
.content-area {
	padding: calc(var(--gifty-spacing) * 2) 0;
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
}

.has-sidebar .content-area > *:first-child {
	flex: 1 1 70%;
}

.has-sidebar .widget-area {
	flex: 1 1 25%;
}

.no-sidebar .content-area > *:first-child {
	flex: 1 1 100%;
}

/* Posts Grid */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
}

article {
	background: #fff;
	border: 1px solid var(--gifty-border);
	border-radius: 5px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
}

article:hover {
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.entry-header {
	padding: 20px 20px 10px;
}

.entry-title {
	font-size: 1.4rem;
	margin: 0 0 10px;
}

.entry-meta {
	font-size: 0.9rem;
	color: #666;
}

.entry-meta span {
	margin-right: 15px;
}

.post-thumbnail img {
	width: 100%;
	object-fit: cover;
}

.entry-summary,
.entry-content {
	padding: 0 20px 20px;
}

.entry-footer {
	padding: 15px 20px;
	background: #f9f9f9;
	border-top: 1px solid var(--gifty-border);
}

.read-more {
	display: inline-block;
	background: var(--gifty-primary);
	color: #fff;
	padding: 8px 20px;
	border-radius: 3px;
	font-size: 0.9rem;
}

.read-more:hover {
	background: var(--gifty-secondary);
	color: #fff;
}

/* Pagination */
.pagination {
	margin: 40px 0;
	text-align: center;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 8px 13px;
	margin: 0 5px;
	border: 1px solid var(--gifty-border);
	border-radius: 3px;
}

.pagination .current {
	background: var(--gifty-primary);
	color: #fff;
	border-color: var(--gifty-primary);
}

/* Sidebar */
.widget-area {
	background: #f9f9f9;
	padding: 20px;
	border-radius: 5px;
}

.widget {
	margin-bottom: 30px;
}

.widget-title {
	font-size: 1.2rem;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--gifty-primary);
}

.widget ul {
	list-style: none;
}

.widget li {
	margin-bottom: 8px;
}

.widget a {
	color: var(--gifty-text);
}

.widget a:hover {
	color: var(--gifty-primary);
}

/* Footer */
.site-footer {
	background: var(--gifty-secondary);
	color: #ddd;
	padding: 50px 0 20px;
}

.site-footer a {
	color: #fff;
}

.site-footer a:hover {
	color: var(--gifty-primary);
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	border-top: 1px solid rgba(255,255,255,0.1);
	padding-top: 20px;
}

.footer-menu ul {
	list-style: none;
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
}

.footer-menu li {
	margin: 0;
}

.footer-copyright {
	font-size: 0.9rem;
	opacity: 0.8;
}

/* 404 Page */
.error-404 {
	text-align: center;
	padding: 80px 0;
}

.error-404 .page-title {
	font-size: 3rem;
	margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
	.header-container {
		flex-direction: column;
		gap: 15px;
	}

	.main-navigation .menu-toggle {
		display: block;
		margin: 0 auto;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		text-align: center;
		width: 100%;
		gap: 0;
	}

	.main-navigation.toggled ul {
		display: flex;
	}

	.main-navigation ul ul {
		position: static;
		display: block;
		box-shadow: none;
	}

	.has-sidebar .content-area > *:first-child,
	.has-sidebar .widget-area {
		flex: 1 1 100%;
	}

	.footer-bottom {
		flex-direction: column;
		gap: 15px;
		text-align: center;
	}

	.footer-menu ul {
		justify-content: center;
		flex-wrap: wrap;
	}
}