/*
Theme Name:   Astra Child – Wändels
Theme URI:    https://wandels.se/
Description:  Childtema till Astra för wandels.se. Innehåller mallar och utseende för perennkatalogen (A–Ö). Själva växtdatan registreras av pluginet Wändels växter.
Author:       Smartasystem
Author URI:   https://smartasystem.se/
Template:     astra
Version:      1.0.10
Requires PHP: 7.4
Text Domain:  astra-child
*/

/* Växtkatalogens utseende ligger i css/vaxter.css. */

/* ---------- Startsidan (docs/startsida-block.html) ---------- */

/* Rubrikerna på startsidan får menyns typsnitt och färg. */
.home .entry-content h2,
.home .entry-content h3 {
	font-family: "Varela Round", sans-serif;
	color: #aa1124;
}

.home .entry-content h3 a {
	color: inherit;
	text-decoration: none;
}

.home .entry-content h3 a:hover {
	color: #ed6e2e;
}

/* Stor sidhuvudbild. Höjden ställs in i blocket Omslag. */
.wv-hero {
	margin-top: 0;
	margin-bottom: 3em;
	text-align: center;
}

.home .entry-content .wv-hero h1 {
	font-family: "Varela Round", sans-serif;
	font-size: clamp(2rem, 5vw, 3.5rem);
	color: #fff;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
	margin-bottom: 0.2em;
}

/* .wp-block-cover behövs för att gå före Astras färg på stycken i omslag. */
.home .entry-content .wv-hero.wp-block-cover p {
	font-size: clamp(1.05rem, 2vw, 1.4rem);
	font-weight: 600;
	color: #fff;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

@media (max-width: 767px) {
	.wv-hero {
		min-height: 55vh !important;
	}
}

/* Tre bildkort under sidhuvudbilden. */
.wv-startkort {
	gap: 2em;
	margin-bottom: 3em;
}

.wv-startkort .wp-block-image {
	margin-bottom: 0.8em;
}

.wv-startkort .wp-block-image img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: opacity 0.2s;
}

.wv-startkort .wp-block-image a:hover img {
	opacity: 0.85;
}

.wv-startkort h3 {
	margin: 0 0 0.3em;
}

/* Om oss: bild och text på beige yta. */
.wv-om {
	background: #fff2dd;
	margin-bottom: 3em;
}

.wv-om .wp-block-media-text__media img {
	height: 100%;
	object-fit: cover;
}

.wv-om .wp-block-media-text__content {
	padding: 2em 3em;
}

.wv-om p {
	margin-bottom: 0.8em;
}

@media (max-width: 600px) {
	.wv-om .wp-block-media-text__content {
		padding: 1.5em;
	}
}

.wv-rubrik {
	margin-bottom: 0.8em;
}

/* Motsvarar Zukis widget "Recent Posts (Color)". */
.wv-aktuellt {
	background: #fff2dd;
	padding: 1.5em;
	margin: 0 0 3em;
}

.wv-aktuellt .wp-block-latest-posts {
	margin: 0;
}

.wv-aktuellt .wp-block-latest-posts__featured-image img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.wv-aktuellt .wp-block-latest-posts__post-title {
	display: block;
	margin-top: 0.5em;
	color: #000;
	font-weight: bold;
	text-decoration: none;
}

.wv-aktuellt .wp-block-latest-posts__post-date {
	font-style: italic;
	color: #555;
}

.wv-aktuellt .wp-block-latest-posts__post-excerpt {
	font-size: 0.9em;
}

/* Övervintring och certifieringar längst ned. */
.wv-bra-att-veta {
	margin-top: 3em;
	gap: 2em;
	align-items: flex-end;
	text-align: center;
}

.wv-bra-att-veta .wp-block-image img {
	max-height: 160px;
	width: auto;
	margin: 0 auto;
}

.wv-bra-att-veta a {
	color: #b4293a;
}

/* ---------- Sidhuvudet ---------- */

/* Logotypen (363 px) och menyn får inte plats på en rad under ca 1120 px. */
@media (min-width: 922px) and (max-width: 1140px) {
	#ast-desktop-header .custom-logo {
		max-width: 260px;
		height: auto;
	}

	#ast-desktop-header .main-header-menu > li > .menu-link {
		padding-left: 0.5em;
		padding-right: 0.5em;
	}
}

/* ---------- Undersidor ---------- */

/* Sidhuvudbild som på startsidan: Astras banner (Layout 2) med sidans utvalda
   bild som bakgrund och titeln ovanpå. Inställningarna i Anpassa står i
   docs/astra-startsida-meny-sidfot.md, avsnitt 4. */
.page .ast-single-entry-banner[data-banner-background-type="featured"] {
	min-height: 70vh;
	margin-bottom: 3em;
}

.page .ast-single-entry-banner[data-banner-background-type="featured"] .entry-title {
	font-family: "Varela Round", sans-serif;
	font-size: clamp(2rem, 5vw, 3.5rem);
	color: #fff;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

@media (max-width: 767px) {
	.page .ast-single-entry-banner[data-banner-background-type="featured"] {
		min-height: 55vh;
	}
}


/* Utvalda bilder visades som banner i Zuki. Astra visar dem i full höjd
   (ca 810 px) och med negativa marginaler som gör sidan bredare än fönstret. */
body.page .site-content .ast-single-post-featured-section.ast-article-image-container--wide {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

body.page .ast-single-post-featured-section img {
	display: block;
	width: 100%;
	height: 320px;
	margin: 0;
	object-fit: cover;
}

@media (max-width: 767px) {
	body.page .ast-single-post-featured-section img {
		height: 180px;
	}
}

/* ---------- Sidfoten (docs/sidfot-widgetar.html) ---------- */

/* Vit bakgrund och centrerade kolumner. Går före färg och justering
   i Anpassa → Sidfot. */
.site-footer .site-above-footer-wrap[data-section] {
	background-color: #fff;
}

.site-footer .footer-widget-area[data-section].footer-widget-area-inner,
.site-footer .ast-footer-social-wrap {
	text-align: center;
}

.site-footer .footer-social-inner-wrap {
	justify-content: center;
}

/* Loggorna är små original och ska inte skalas upp till kolumnens bredd. */
.site-footer .wp-block-image {
	max-width: 180px;
	margin: 0 auto 1em;
}

.site-footer .wp-block-image img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 110px;
}
