/*
Theme Name: bananaphoto2026
Theme URI: https://example.com/bananaphoto2026
Author: Michael Schäfer
Description: Minimalistisches, dunkles Fotoblog mit Masonry-Grid für Hoch- und Querformate sowie ActivityPub-Integration.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bananaphoto2026
Tags: grid-layout, dark, photography, microblog
*/

/* ==========================================
   Global
   ========================================== */

html {
	box-sizing: border-box;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	background-color: #2d2d2d;
	color: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	padding: 24px 16px;
	margin: 0;
}

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


/* ==========================================
   Header / Footer / Main
   ========================================== */

.site-header,
.site-footer,
.bananaphoto-main {
	max-width: 1600px;
	margin-left: auto;
	margin-right: auto;
}

.site-header {
	margin-bottom: 32px;
}

.site-header h1 {
	margin: 0;
}

.site-header h1 a,
.site-footer a {
	color: #ffffff;
	text-decoration: none;
}

.site-footer {
	margin-top: 32px;
	color: #ffffff;
}

/* ==========================================
   Masonry Layout 
   ========================================== */

.bananaphoto-masonry-container {
	margin: 0 -10px; /* Kompensiert das seitliche Padding der Cards */
}

.bananaphoto-post-card {
	float: left;
	width: calc(33.333% - 20px);
	margin: 0 10px 20px 10px;
	padding: 8px;
	background-color: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	box-sizing: border-box;
}

@media (max-width: 900px) {
	.bananaphoto-post-card {
		width: calc(50% - 20px);
	}
}

@media (max-width: 600px) {
	.bananaphoto-post-card {
		width: calc(100% - 20px);
	}
}

.bananaphoto-post-card .card-media {
	width: 100%;
	border-radius: 4px;
	overflow: hidden;
}

.bananaphoto-post-card .card-media a {
	display: block;
}

.bananaphoto-post-card .card-media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	object-fit: cover;
}

.bananaphoto-post-card .card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 4px 4px;
	font-size: 0.85rem;
	color: #718096;
}

.bananaphoto-post-card .card-footer a.post-date {
	color: #718096;
	text-decoration: none;
	font-weight: 500;
}

.bananaphoto-post-card .card-footer a.post-date:hover {
	color: #4a5568;
}


/* ==========================================
   Post Statistics
   ========================================== */

.post-stats {
	display: flex;
	align-items: center;
	gap: 12px;
}

.post-stats .stat-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #718096;
}

.post-stats .stat-item svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}


/* ==========================================
   WordPress Gallery
   ========================================== */

.bananaphoto-post-card .wp-block-gallery {
	margin: 0;
}

.bananaphoto-post-card .wp-block-image {
	margin: 0;
}


/* ==========================================
   Pagination
   ========================================== */

.bananaphoto-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 32px;
}

.bananaphoto-pagination a,
.bananaphoto-pagination span {
	color: #ffffff;
	padding: 8px 12px;
	text-decoration: none;
	border-radius: 4px;
}

.bananaphoto-pagination .current {
	background-color: rgba(255, 255, 255, 0.2);
}


/* ==========================================
   WordPress Accessibility
   ========================================== */

.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;
}

/* ==========================================
   Single Post Layout
   ========================================== */

.bananaphoto-single-main {
	max-width: 1600px;
	margin: 0 auto;
}

.bananaphoto-single-layout {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

/* Linke Spalte: Sticky Bild (50% der Layout-Breite) */
.single-media-column {
	width: 50%;
	position: sticky;
	top: 24px;
}

.single-media-wrapper {
	display: flex;
	justify-content: flex-start; /* Bild links ausrichten */
	align-items: flex-start;
	width: 100%;
}

/* Der weiße Rahmen liegt direkt auf dem Bild */
.single-media-wrapper img {
	display: block;
	width: auto;
	max-width: 100%;
	
	/* Maximale Höhe basierend auf dem Viewport (z.B. max. 75% der Fensterhöhe) */
	max-height: calc(80vh - 48px);
	
	object-fit: contain;
	
	/* Weißer Rahmen direkt um die tatsächlichen Bildmaße */
	background-color: #ffffff;
	padding: 8px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	box-sizing: border-box;
}

/* Rechte Spalte: Infos, Text & Kommentare */
.single-info-column {
	width: 50%;
}

.single-entry-header {
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 16px;
}

.single-entry-header .entry-title {
	margin: 0 0 8px 0;
	font-size: 2rem;
	line-height: 1.2;
}

.single-entry-header .entry-meta {
	color: #a0aec0;
	font-size: 0.9rem;
}

.single-info-column .entry-content {
	line-height: 1.6;
	margin-bottom: 24px;
}

/* Versteckt das Bild im Content, falls es dort nochmals ausgegeben wird */
.single-info-column .entry-content img {
	display: none;
}

.entry-tags {
	margin-bottom: 32px;
	font-size: 0.9rem;
	color: #a0aec0;
}

.entry-tags a {
	color: #ffffff;
	text-decoration: underline;
}

/* Responsive Anpassung für Mobilgeräte */
@media (max-width: 900px) {
	.bananaphoto-single-layout {
		flex-direction: column;
	}

	.single-media-column,
	.single-info-column {
		width: 100%;
	}

	.single-media-column {
		position: static;
	}

	.single-media-wrapper img {
		max-height: 70vh;
	}
}