/*
Theme Name: Twenty Fifteen
Theme URI: https://wordpress.org/themes/twentyfifteen/
Author: the WordPress team (Modernized by Agent)
Author URI: https://wordpress.org/
Description: Modernized version of Twenty Fifteen for Begonia Weirdo. Clean, card-based layout with improved typography.
Version: 4.1.1-modern
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors
*/

/* ---------------------------------------------------------------------------------------------
   0. IMPORTS & VARIABLES
--------------------------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
	/* Colors */
	--color-bg-page: #f3f4f6;
	--color-bg-sidebar: #ffffff;
	--color-bg-card: #ffffff;

	--color-text-main: #334155;
	--color-text-muted: #64748b;
	--color-text-heading: #1e293b;

	--color-primary: #be185d;
	/* Begonia Pink */
	--color-primary-hover: #9d174d;
	--color-border: #e2e8f0;

	/* Typography */
	--font-heading: 'Playfair Display', serif;
	--font-body: 'Inter', sans-serif;

	/* Spacing */
	--spacing-sm: 0.5rem;
	--spacing-md: 1rem;
	--spacing-lg: 2rem;
	--spacing-xl: 4rem;

	/* Sidebar Width (Desktop) */
	--sidebar-width: 300px;
}

/* ---------------------------------------------------------------------------------------------
   1. RESET & BASE
--------------------------------------------------------------------------------------------- */
*,
*:before,
*:after {
	box-sizing: border-box;
}

body {
	background-color: var(--color-bg-page);
	color: var(--color-text-main);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.7;
	margin: 0;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--color-text-heading);
	font-family: var(--font-heading);
	font-weight: 700;
	margin-top: 0;
	margin-bottom: 1em;
	line-height: 1.3;
}

h1 {
	font-size: 2.5rem;
}

h2 {
	font-size: 2rem;
}

h3 {
	font-size: 1.75rem;
}

/* Links */
a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover,
a:focus {
	color: var(--color-primary-hover);
}

/* Images */
img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

/* ---------------------------------------------------------------------------------------------
   2. LAYOUT (Twenty Fifteen Structure Adaptation)
--------------------------------------------------------------------------------------------- */

/* Mobile First: Sidebar on Top (or simplified) */
.site {
	max-width: 100%;
}

.sidebar {
	background-color: var(--color-bg-sidebar);
	padding: var(--spacing-lg);
	border-bottom: 1px solid var(--color-border);
}

.site-content {
	padding: var(--spacing-lg);
}

/* Desktop: Sidebar Left, Content Right */
@media screen and (min-width: 59.6875em) {

	/* 955px */
	body:before {
		background-color: var(--color-bg-sidebar);
		content: "";
		display: block;
		height: 100%;
		min-height: 100%;
		position: fixed;
		top: 3px;
		left: 0;
		width: 29.4118%;
		z-index: 0;
		/* Behind content */
		border-right: 1px solid var(--color-border);
	}

	.sidebar {
		background-color: transparent;
		/* Handled by body:before */
		border-bottom: 0;
		display: block;
		float: left;
		margin-right: -100%;
		width: 29.4118%;
		position: relative;
		/* Need z-index over body:before? No, body:before is 0 */
		z-index: 1;
		padding: var(--spacing-xl);
		min-height: 100vh;
	}

	.site-content {
		display: block;
		float: left;
		margin-left: 29.4118%;
		width: 70.5882%;
		padding: var(--spacing-xl) 5%;
	}
}

/* ---------------------------------------------------------------------------------------------
   3. COMPONENTS
--------------------------------------------------------------------------------------------- */

/* --- Header / Branding --- */
.site-title {
	font-size: 2.5rem;
	margin-bottom: 0.2em;
}

.site-title a {
	color: var(--color-text-heading);
}

.site-description {
	color: var(--color-text-muted);
	font-family: var(--font-body);
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: var(--spacing-lg);
	opacity: 0.8;
}

/* --- Navigation --- */
.main-navigation {
	margin: var(--spacing-lg) 0;
	border-top: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
	padding: var(--spacing-md) 0;
}

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

.main-navigation li {
	margin: 0;
}

.main-navigation a {
	display: block;
	padding: 0.5em 0;
	color: var(--color-text-main);
	font-weight: 500;
}

.main-navigation a:hover {
	color: var(--color-primary);
	padding-left: 5px;
	/* Subtle movement */
	transition: all 0.2s;
}

.main-navigation .current-menu-item>a {
	color: var(--color-primary);
	font-weight: 700;
}

/* --- Posts / Cards --- */
.hentry {
	background-color: var(--color-bg-card);
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	margin-bottom: var(--spacing-xl);
	padding: var(--spacing-xl);
	border: 1px solid var(--color-border);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hentry:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.entry-header {
	margin-bottom: var(--spacing-lg);
}

.entry-title {
	font-size: 2.25rem;
	margin-bottom: 0.5rem;
}

.entry-title a {
	color: var(--color-text-heading);
	background-image: linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) 100%);
	background-size: 0% 2px;
	background-repeat: no-repeat;
	background-position: left bottom;
	transition: background-size 0.3s;
}

.entry-title a:hover {
	background-size: 100% 2px;
	color: var(--color-text-heading);
}

.entry-content {
	margin-bottom: var(--spacing-lg);
	font-size: 1.1rem;
	color: var(--color-text-main);
}

.entry-footer {
	border-top: 1px solid var(--color-border);
	padding-top: var(--spacing-md);
	font-size: 0.85rem;
	color: var(--color-text-muted);
	display: flex;
	gap: var(--spacing-md);
	flex-wrap: wrap;
}

.entry-footer a {
	color: var(--color-text-muted);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
}

.entry-footer a:hover {
	color: var(--color-primary);
}

/* Blockquotes */
blockquote {
	border-left: 4px solid var(--color-primary);
	margin: 1.5em 0;
	padding: 0.5em 1em 0.5em 1.5em;
	font-style: italic;
	font-family: var(--font-heading);
	font-size: 1.25rem;
	color: var(--color-text-heading);
	background: #fff5f9;
	/* Very light pink background */
	border-radius: 0 8px 8px 0;
}

/* Inputs & Buttons */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
	background-color: #ffffff;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	padding: 0.75em;
	font-family: inherit;
	font-size: 1rem;
	color: var(--color-text-main);
	width: 100%;
	transition: border-color 0.2s;
}

input:focus,
textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1);
}

button,
input[type="submit"] {
	background-color: var(--color-primary);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	padding: 0.8em 1.5em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s;
}

button:hover,
input[type="submit"]:hover {
	background-color: var(--color-primary-hover);
}

button:active,
input[type="submit"]:active {
	transform: scale(0.98);
}

/* Widgets */
.widget {
	margin-bottom: var(--spacing-lg);
	font-size: 0.95rem;
}

.widget-title {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-text-muted);
	border-bottom: 2px solid var(--color-primary);
	padding-bottom: 0.5rem;
	margin-bottom: 1rem;
	display: inline-block;
}

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

.widget li {
	padding: 0.5em 0;
	border-bottom: 1px solid var(--color-border);
}

.widget li:last-child {
	border-bottom: none;
}

/* Icons (Social) if available */
.social-navigation a:before {
	/* Keep genericons if they rely on it, but changing font stacks might break it unless we import Genericons.
       Assuming Genericons are loaded by WP or a separate CSS.
       Use simple fallback content for now or keep existing encoding if possible.
       For this modernization, we focus on layout/typography. */
	content: '';
}

/* Tables */
table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	/* For rounded corners */
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th,
td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid var(--color-border);
}

th {
	background-color: #f8fafc;
	font-weight: 600;
	color: var(--color-text-heading);
}

/* Footer (Site Info) */
.site-footer {
	padding: var(--spacing-lg) 5%;
	color: var(--color-text-muted);
	font-size: 0.9rem;
	text-align: center;
}

@media screen and (min-width: 59.6875em) {
	.site-footer {
		float: left;
		margin-left: 29.4118%;
		width: 70.5882%;
		text-align: left;
	}
}

/* ---------------------------------------------------------------------------------------------
   4. WORDPRESS COMPONENTS (Restored & Modernized)
--------------------------------------------------------------------------------------------- */

/* --- Comments --- */
.comments-area {
	margin-top: var(--spacing-xl);
	border-top: 1px solid var(--color-border);
	padding-top: var(--spacing-lg);
}

.comments-title {
	font-size: 1.75rem;
	margin-bottom: var(--spacing-lg);
}

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

.comment-body {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	padding: var(--spacing-md);
	margin-bottom: var(--spacing-md);
	position: relative;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.comment-list .children {
	list-style: none;
	padding-left: var(--spacing-lg);
	border-left: 2px solid var(--color-border);
	margin-left: var(--spacing-md);
	margin-top: var(--spacing-md);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	margin-bottom: var(--spacing-sm);
	font-size: 0.95rem;
}

.comment-author .avatar {
	border-radius: 50%;
	width: 40px;
	height: 40px;
	object-fit: cover;
	border: 2px solid var(--color-bg-page);
}

.comment-author .fn {
	font-weight: 700;
	color: var(--color-text-heading);
}

.comment-metadata {
	font-size: 0.8rem;
	color: var(--color-text-muted);
	margin-bottom: var(--spacing-sm);
}

.comment-content {
	font-size: 1rem;
	color: var(--color-text-main);
}

.reply {
	text-align: right;
	margin-top: var(--spacing-sm);
}

.comment-reply-link {
	font-size: 0.85rem;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--color-primary);
	border: 1px solid var(--color-primary);
	padding: 0.25em 0.75em;
	border-radius: 4px;
	transition: all 0.2s;
}

.comment-reply-link:hover {
	background-color: var(--color-primary);
	color: #fff;
}

/* Comment Form */
.comment-form {
	background: #fff;
	padding: var(--spacing-lg);
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	margin-top: var(--spacing-lg);
}

.comment-notes {
	font-size: 0.9rem;
	color: var(--color-text-muted);
}

.comment-form label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 600;
	font-size: 0.9rem;
}

/* --- Galleries --- */
.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-md);
	margin-bottom: var(--spacing-lg);
}

.gallery-item {
	margin: 0;
	width: calc(33.333% - var(--spacing-md));
	/* default to 3 columns approx */
	flex-grow: 1;
}

.gallery-columns-1 .gallery-item {
	width: 100%;
}

.gallery-columns-2 .gallery-item {
	width: calc(50% - var(--spacing-md));
}

.gallery-columns-3 .gallery-item {
	width: calc(33.333% - var(--spacing-md));
}

.gallery-columns-4 .gallery-item {
	width: calc(25% - var(--spacing-md));
}

.gallery-icon img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s;
}

.gallery-icon img:hover {
	transform: scale(1.02);
}

.gallery-caption {
	font-size: 0.85rem;
	color: var(--color-text-muted);
	text-align: center;
	margin-top: 0.5em;
}

/* --- Utilities --- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Alignments */
.alignleft {
	float: left;
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}