/*
Theme Name: Söderfors
Theme URI: https://soderfors.se
Description: Community hub theme for soderfors.se — "allt som händer i Söderfors". Child of Twenty Twenty-Five; block templates for the landing page, news flow, and events (På gång). Built by Aakerman Media.
Author: Aakerman Media
Author URI: https://aakerman.se
Template: twentytwentyfive
Version: 0.1.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.1
License: Proprietary — Aakerman Media
Text Domain: soderfors
*/

/* ---------------------------------------------------------------------------
   Söderfors front-end — visitskelleftea.se pattern replication
   --------------------------------------------------------------------------- */

/* No gap between header and the hero image (flush, like the reference) */
.wp-site-blocks > header + *{
	margin-block-start:0 !important;
}

/* Section cards — Skellefteå-bold: the image FILLS the card and a backplate with
   the title (+ rating/distance) sits OVER it. Image-dominant, present, heroic. */
.place-card{
	position:relative;
	height:100%;
	min-height:300px;
	aspect-ratio:4 / 5;
	border-radius:14px;
	overflow:hidden;
	background:var(--wp--preset--color--dalalv);
	transition:transform .18s ease;
}
.place-card:hover{ transform:translateY(-3px); }
/* Featured image fills the whole card */
.place-card .wp-block-post-featured-image{ position:absolute; inset:0; margin:0; height:100%; }
.place-card .wp-block-post-featured-image img{
	width:100%; height:100%; object-fit:cover; display:block; border-radius:0 !important;
}
/* The backplate over the image (bottom), holding the text */
.place-card__plate{
	position:absolute; left:0; right:0; bottom:0; z-index:2;
	padding:2.6rem 1.25rem 1.15rem;
	background:linear-gradient(to top,
		rgba(18,51,63,0.94) 0%, rgba(18,51,63,0.80) 45%, rgba(18,51,63,0) 100%);
}
.place-card__plate .wp-block-post-title{ margin:0; }
.place-card__plate .wp-block-post-title,
.place-card__plate .wp-block-post-title a{
	color:#fff !important; text-decoration:none;
	font-weight:800; font-size:1.3rem; line-height:1.12;
}
.place-card__plate .wp-block-post-date a,
.place-card__plate .wp-block-post-date,
.place-card__plate p:first-child{ color:#ffd9b0 !important; }
/* rating · distance badge on the plate */
.aak-place-badge{
	margin:0.45rem 0 0; display:flex; gap:0.55rem; align-items:center;
	color:#fff; font-weight:700; font-size:0.92rem;
}
.aak-badge-rating{ color:#ffd257; }
.aak-badge-sep{ opacity:0.5; }
.aak-badge-dist{ opacity:0.92; }

/* Home hero: centred solid-colour PLATE that straddles the image/next-section
   edge ~50/50 (overlapping card, like the reference). */
.hero-plate{
	position:relative;
	z-index:2;
	width:min(90%, 980px);          /* wide — ~80% of the cards' width below (desktop/iPad) */
	max-width:980px;
	margin:-70px auto 0;   /* straddle the hero/section seam ~50/50 */
	border-radius:6px;
	overflow:hidden;
	/* Grainy rust: flat bruksrost→deep-rust gradient, light top-left → dark bottom-right */
	background:linear-gradient(135deg, #b5552d 0%, #9a4526 52%, #7f3a1e 100%);
}
/* SVG feTurbulence grain blended over the gradient (css-tricks grainy-gradients) */
.hero-plate::after{
	content:"";
	position:absolute; inset:0; z-index:0;
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
	opacity:0.38;   /* real grain — fine gritty speckle, not a milky wash */
	pointer-events:none;
}
.hero-plate > *{ position:relative; z-index:1; }   /* keep the text above the grain */
@media (max-width:782px){
	.hero-plate{ width:100%; max-width:100%; margin-top:-56px; border-radius:0; } /* full-width on phone */
}

/* Header logo lockup: wordmark on a solid colour block, stretched to the
   header's full height so it reads as a flush corner block. */
.site-logo-plate{
	align-self:stretch;
}

/* Nav level 1 always bold (parent theme sets a lighter weight — override it). */
.wp-block-navigation .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__content .wp-block-navigation-item__label,
.wp-block-navigation .wp-block-navigation-item__label{
	font-weight:800 !important;
}

/* Nav level 2 (mega/submenu dropdown): brand backplate colour, white text. */
.wp-block-navigation .wp-block-navigation__submenu-container{
	background-color:var(--wp--preset--color--dalalv);
	border:0;
	padding:0.25rem 0;
	min-width:220px;
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content{
	color:#fff;
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover{
	color:#fff;
	text-decoration:underline;
}

/* Collapse the nav to a hamburger at <=1024px — BEFORE the 8 items would wrap to
   two lines (the block's own default only hamburgers at 600px, too late for us). */
@media (max-width:1200px){
	.wp-block-navigation__responsive-container-open:not(.always-shown){
		display:flex !important;
	}
	.wp-block-navigation__responsive-container:not(.is-menu-open){
		display:none !important;
	}
}

/* ---------------------------------------------------------------------------
   Place single — Historia + "På gång här" event blocks (DR-009)
   --------------------------------------------------------------------------- */
.aak-place-history,
.aak-place-events{
	margin-top:2.4rem;
}
.aak-place-history h2,
.aak-place-events h2{
	font-size:1.6rem;
	margin-bottom:0.8rem;
}
.aak-place-events .aak-event-list{
	list-style:none;
	margin:0;
	padding:0;
}
.aak-place-events .aak-event-list li{
	padding:0.7rem 0;
	border-bottom:1px solid #e3e0d6;
}
.aak-place-events .aak-event-list li:last-child{
	border-bottom:0;
}
.aak-place-events .aak-event-list a{
	text-decoration:none;
	font-weight:600;
}
.aak-place-events .aak-event-list a:hover{
	text-decoration:underline;
}
.aak-place-events .aak-event-when{
	display:inline-block;
	min-width:8.5rem;
	color:var(--wp--preset--color--bruksrost);
	font-weight:700;
	text-transform:uppercase;
	letter-spacing:0.03em;
	font-size:0.85rem;
}
