/**
 * Custom CSS for DailyBloom Theme
 * 
 * @package DailyBloom_Theme
 * @since 1.0.0
 */

/* Header Styles */
.site-header {
	background-color: white;
	box-shadow: var(--shadow-md);
	position: relative;
	z-index: 1000;
}

.header-content {
	padding: 1rem 0;
}

.site-branding {
	flex: 0 0 auto;
}

.site-title {
	font-family: var(--font-serif);
	font-size: 1.75rem;
	font-weight: 900;
	color: var(--color-primary);
	text-decoration: none;
	transition: color var(--transition-base);
}

.site-title:hover {
	color: #c23c5d;
}

/* Navigation Styles */
.primary-navigation .nav-menu {
	display: flex;
	list-style: none;
	gap: var(--space-lg);
	margin: 0;
	padding: 0;
}

.primary-navigation .nav-menu a {
	color: var(--color-text-dark);
	font-weight: 600;
	padding: var(--space-md) 0;
	transition: color var(--transition-base);
	position: relative;
}

.primary-navigation .nav-menu a:hover,
.primary-navigation .nav-menu a.current {
	color: var(--color-primary);
}

.primary-navigation .nav-menu a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--color-primary);
	transition: width var(--transition-base);
}

.primary-navigation .nav-menu a:hover::after,
.primary-navigation .nav-menu a.current::after {
	width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 6px;
	width: 30px;
	height: 30px;
	padding: 0;
	background-color: transparent;
	border: none;
	cursor: pointer;
	transition: all var(--transition-base);
}

.mobile-menu-toggle span {
	display: block;
	width: 100%;
	height: 3px;
	background-color: var(--color-text-dark);
	border-radius: var(--radius-full);
	transition: all var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translate(10px, 10px);
}

.mobile-menu-toggle.active span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
	transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.mobile-navigation {
	background-color: white;
	border-bottom: 1px solid #e5e7eb;
	padding: var(--space-lg) 0;
}

.mobile-menu {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

.mobile-menu a {
	color: var(--color-text-dark);
	font-weight: 500;
	transition: color var(--transition-base);
}

.mobile-menu a:hover {
	color: var(--color-primary);
}

/* Language Switcher */
.language-switcher {
	position: relative;
}

.language-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background-color: #FAF8F3;
	border: none;
	border-radius: var(--radius-md);
	cursor: pointer;
	font-weight: 600;
	color: var(--color-text-dark);
	transition: all var(--transition-base);
}

.language-toggle:hover {
	background-color: var(--color-accent);
}

.language-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 0.5rem;
	background-color: white;
	border: 1px solid #d1d5db;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	z-index: 10;
}

.language-dropdown a {
	display: block;
	padding: var(--space-md) var(--space-lg);
	color: var(--color-text-dark);
	text-decoration: none;
	transition: all var(--transition-base);
	border-bottom: 1px solid #e5e7eb;
}

.language-dropdown a:last-child {
	border-bottom: none;
}

.language-dropdown a:hover {
	background-color: #FAF8F3;
	color: var(--color-primary);
}

/* Footer Styles */
.site-footer {
	background-color: #2D3142;
	color: #e5e7eb;
	padding: 3rem 0 1rem;
	margin-top: 4rem;
}

.footer-content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-branding .site-title {
	color: white;
}

.footer-description {
	color: #d1d5db;
	line-height: 1.6;
}

.footer-nav h3,
.footer-social h3 {
	color: white;
	margin-bottom: 1rem;
}

.footer-menu,
.social-links {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	list-style: none;
}

.footer-menu a,
.social-link {
	color: #d1d5db;
	text-decoration: none;
	transition: color var(--transition-base);
}

.footer-menu a:hover,
.social-link:hover {
	color: white;
}

.social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-full);
	background-color: rgba(255, 255, 255, 0.1);
	transition: all var(--transition-base);
}

.social-link:hover {
	background-color: var(--color-primary);
}

.footer-bottom {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	align-items: center;
	justify-content: space-between;
	text-align: center;
}

.footer-copyright p {
	color: #d1d5db;
	margin: 0;
}

.footer-copyright a {
	color: white;
}

.footer-links ul {
	display: flex;
	justify-content: center;
	gap: 2rem;
	flex-wrap: wrap;
	list-style: none;
}

.footer-links a {
	color: #d1d5db;
	text-decoration: none;
	font-size: 0.875rem;
	transition: color var(--transition-base);
}

.footer-links a:hover {
	color: white;
}

/* Story Cards */
.story-card {
	transition: all var(--transition-base);
}

.story-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-xl);
}

.age-group-card {
	cursor: pointer;
	transition: all var(--transition-base);
}

.age-group-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: var(--color-primary);
	background: linear-gradient(135deg, #F5E6E8 0%, #E8D4BA 100%);
}

/* Entry Content */
.entry-content {
	font-size: 1.125rem;
	line-height: 1.8;
	color: var(--color-text-dark);
}

.entry-content p {
	margin-bottom: var(--space-lg);
}

.entry-content h2 {
	margin-top: var(--space-2xl);
	margin-bottom: var(--space-lg);
}

.entry-content h3 {
	margin-top: var(--space-xl);
	margin-bottom: var(--space-md);
}

.entry-content img {
	max-width: 100%;
	height: auto;
	margin: var(--space-lg) 0;
	border-radius: var(--radius-lg);
}

.entry-content a {
	color: var(--color-primary);
	font-weight: 500;
	transition: all var(--transition-base);
}

.entry-content a:hover {
	text-decoration: underline;
	color: #c23c5d;
}

/* No Results */
.no-results {
	text-align: center;
	padding: 3rem 0;
}

.no-results h2 {
	color: var(--color-text-dark);
	margin-bottom: 1rem;
}

.no-results p {
	color: var(--color-text-light);
}

/* Screen Reader Only */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Accessibility */
*:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* Loading State */
.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.loading-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #e5e7eb;
	border-top-color: var(--color-primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Utility Classes */
.text-center {
	text-align: center;
}

.text-right {
	text-align: right;
}

.text-left {
	text-align: left;
}

.w-full {
	width: 100%;
}

.h-full {
	height: 100%;
}

.rounded {
	border-radius: var(--radius-lg);
}

.shadow {
	box-shadow: var(--shadow-md);
}

.shadow-lg {
	box-shadow: var(--shadow-lg);
}
