/*
Theme Name: berg.land
Theme URI: 
Author: Guido Hoss
Author URI: 
Description: Theme for the berg.land website
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: berg-land
Tags: 
*/

/*
** Header and body fixes
*/

html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box; /* Ensures padding doesn't increase element width */
}

body {
    min-height: 100vh;
    background-color: #fffffc;
    font-family: "Noto Sans", sans-serif;
    text-align: center;
    color: black;
    
    /* Responsive Width Logic */
    max-width: 960px;
	width: auto;
    margin: 0 auto; /* Ensures it stays centered on desktop */
    
    /* Safety for mobile */
	padding: 0 15px;
}


/*
** Other elements
*/

header
{
	background-image: url('assets/header.jpg');
	background-repeat: no-repeat;
	height: 200px;
	border-radius: 20px;
	box-shadow: 0px 0px 50px #fff inset;
}

h1,
h2,
h3
{
    font-family: "Roboto Condensed", sans-serif;
}

h1.wp-block-heading,
h2.wp-block-heading,
h3.wp-block-heading
{
    padding: 0px;
	color: #886600;
	font-weight: normal;
}

h1.wp-block-heading
{
	font-size: 1.6rem;
}

.wp-block-post-content p,
.wp-block-post-content ul
{
	margin-top: 12px;
	line-height: 1.7rem;
}

.wp-block-post-content strong
{
	color: #886600;
}

.wp-block-post-content img
{
	border-radius: 10px;
	box-shadow: 5px 5px 10px -5px rgba(0, 0, 0, 0.5);
	max-width: 100%;
	height: auto;
	display: block;
}

/* Style post tags */
.wp-block-post-terms__separator
{
	/* Remove commas between tags */
	display: none;
}

.taxonomy-post_tag {
    display: flex;
    flex-wrap: wrap;       /* Allows tags to drop to the next line */
    justify-content: flex-end; 
    gap: 8px;              /* Consistent spacing between pills */
    width: 100%;           /* Constrains container to parent width */
    max-width: 100%;
    margin: 10px 0;
    text-align: left;      /* Aligns the group to the left */
}

.taxonomy-post_tag a
{
	text-decoration: none;
	border-radius: 4px;
	background-color: #886600;
	color: white;
	padding: 2px 10px 2px 10px;
	margin-inline: 3px;
	display: inline-block;
	white-space: nowrap;
}

/* Fix gallery display */
.gallery {
    display: flex;
    flex-wrap: wrap;
	justify-content: flex-start; 
    align-content: flex-start;
    max-width: 100%;    /* Prevents it from breaking mobile layout */
	margin: 20px 0;
    gap: 10px;
	border: 1px dotted #886600;
	padding: 10px;
	border-radius: 10px;
}

.gallery .wp-block-image {
	flex: 0 1 150px !important;
    min-width: 100px;
}

.gallery .wp-block-image img {
	width: 100% !important;
    height: auto !important;
    object-fit: cover; /* Maintains aspect ratio while filling the 150x150 box */
}

/* Style topographic maps */
.map
{
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	margin: 20px 0px 20px 0px;
	z-index: 0;
	border-radius: 10px;
}


/* Style YouTube video player */
.youtube
{
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 10px;
}


/* Provide generic background for cover elements missing a featured image */
.wp-block-cover {
    background-color: #ccc; /* Solid color fallback */
    background-size: cover;
    background-position: center;
}


/* Style the cover caption */
.wp-block-cover h2 {
	background: rgba(0, 0, 0, 0.2); /* Black with 50% transparency */
    backdrop-filter: blur(5px); /* Modern touch: blurs the snow behind the text */
    border-radius: 5px;
    padding: 8px 12px;
	font-style: normal;
}


/* Target the select dropdown in the Categories block to make it bigger */
.wp-block-categories select,
.wp-block-archives select {
    font-size: 1rem;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: auto;
}


/* Suppress display of private sections */
.private {
	display: none;
}
