/*
Theme Name: Hedlunda
Theme URI: https://example.com/
Author: OpenAI
Description: Ett ljust, minimalistiskt fotoportfoliotema med Instagram-liknande bildrutnät och lightbox för gallerier.
Version: 1.2.0
Text Domain: hedlunda
*/

/* ==========================================================
	Modern WordPress CSS Reset — 2026
========================================================== */

/* Box sizing */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Remove default spacing */
* {
	margin: 0;
}

/* Document */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

/* Body */
body {
	min-height: 100vh;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
p {
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.15;
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

/* Lists
	Keep semantic list markers by default.
*/
ul,
ol {
	padding-inline-start: 1.5em;
}

/* Images / media */
img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

img,
video {
	height: auto;
}

/* Prevent SVG overflow */
svg {
	overflow: visible;
}

/* Forms */
input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button,
input,
select,
textarea {
	margin: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	appearance: button;
}

button,
select {
	text-transform: none;
}

textarea {
	resize: vertical;
}

/* Links */
a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.15em;
}

/* Tables */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Horizontal rule */
hr {
	height: 0;
	color: inherit;
	border: 0;
	border-top: 1px solid currentColor;
}

/* Quotes */
blockquote,
q {
	quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
	content: "";
	content: none;
}

/* Font weight */
b,
strong {
	font-weight: bolder;
}

/* Code */
pre,
code,
kbd,
samp {
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

pre {
	overflow-x: auto;
	white-space: pre;
}

/* Hidden */
[hidden] {
	display: none !important;
}

/* Better focus defaults */
:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Dialog */
dialog {
	padding: 0;
}

/* WordPress media */
figure {
	margin: 0;
}

iframe {
	max-width: 100%;
	border: 0;
}

/* WordPress captions */
.wp-caption,
.wp-caption img {
	max-width: 100%;
}

.wp-caption-text {
	overflow-wrap: break-word;
}

/* Gutenberg alignment helpers */
.alignleft {
	float: left;
}

.alignright {
	float: right;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide,
.alignfull {
	max-width: none;
}

/* WordPress responsive embeds */
.wp-block-embed iframe {
	max-width: 100%;
}

/* WordPress galleries */
.wp-block-gallery img,
.wp-block-image img {
	height: auto;
	max-width: 100%;
}

/* Screen-reader text — WordPress compatible */
.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;
}

.screen-reader-text:focus {
	position: fixed;
	top: 5px;
	left: 5px;
	z-index: 100000;
	display: block;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	background: #fff;
	color: #000;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
}

/* Clear floats used by classic WordPress content */
.entry-content::after,
.post-content::after {
	display: table;
	clear: both;
	content: "";
}

/*--------------------------------------------------------------
# HEMSIDAN
--------------------------------------------------------------*/

* {
	box-sizing: border-box;
}

html {
	background: #fff;
}

body,
button,
input,
select,
textarea {
	color: #242424;
	font-family: 'ElenaWebBasic', serif;
	font-weight: 300;
	font-style: normal;
	font-size: 1.15rem;
	background: #fff;
	margin: 0;
	line-height: 1.7;
}

p {
	margin: 0 0 1.7em;
}

a {
	color: #1e1e1d;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:visited {
	color: #1e1e1d;
}

a:hover,
a:focus,
a:active {
	color: #3858e9;
}

a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

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

/* Header Text Box */

.site-header {
	padding: 100px 100px 0;
}

.site-branding {
	max-width: 1400px;
	margin: 0 auto;
}

.shl-logo {
	text-align: center;
	line-height: 0;
	padding-bottom: 30px;
}

.shl-logo a {
	display: inline-block;
}

/* Kategorimeny */

.category-navigation {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto 30px;
}

.category-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.category-menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.category-menu a {
	display: block;
	padding: 14px 18px;
	color: #242424;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: .035rem;
	font-weight: 300;
	line-height: 1.2;
	text-decoration: none;
	transition: color 150ms ease, background-color 150ms ease;
}

.category-menu a:hover,
.category-menu a:focus {
	color: #3858e9;
	background: #fafafa;
}

.category-menu .current-menu-item > a,
.category-menu .current-menu-parent > a,
.category-menu .current-post-ancestor > a {
	color: #3858e9;
}

/* Mobil */

@media (max-width: 760px) {

	.category-navigation {
		margin-bottom: 15px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.category-menu a {
		padding: 12px 14px;
		font-size: .8rem;
		letter-spacing: .095rem;
		white-space: nowrap;
	}
}

.site {
	padding: 100px;
}

.site-main {
	max-width: 1400px;
	margin: 0 auto;
}

.site-footer {
		padding: 0 100px 100px;
}

.site-info {
	max-width: 1400px;
	margin: 0 auto;
	text-align: center;
}

.site-info p:last-child {
	margin-bottom: 0;
}

.photo-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(2px, .25vw, 4px);
	width: 100%;
	margin: 0;
	padding: 0;
}

.photo-card {
	position: relative;
	aspect-ratio: 1 / 1;
	margin: 0;
	overflow: hidden;
	background: #f4f4f4;
}

.photo-card__type {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(24px, 2.2vw, 30px);
	height: clamp(24px, 2.2vw, 30px);
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 1px 8px rgba(0, 0, 0, .12);
	pointer-events: none;
}

.photo-card__type svg {
	width: clamp(13px, 1.2vw, 16px);
	height: clamp(13px, 1.2vw, 16px);
	fill: #242424;
}

.photo-card__button {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
}

.photo-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 180ms ease, opacity 180ms ease;
}

.photo-card__button:hover .photo-card__image,
.photo-card__button:focus-visible .photo-card__image {
	transform: scale(1.015);
	opacity: .96;
}

.photo-card__button:focus-visible {
	outline: 3px solid #111;
	outline-offset: -3px;
}

.pagination {
	display: flex;
	justify-content: center;
	gap: .5rem;
	padding: 30px 20px 0;
}

.pagination .page-numbers {
	padding: .55rem .8rem;
	border: 1px solid #ebebeb;
	background: #fff;
	text-decoration: none;
}

.pagination .current {
	background: #1e1e1d;
	border-color: #1e1e1d;
	color: #fff;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	margin: 0 3px;
	border-radius: 50%;
	box-sizing: border-box;
	text-align: center;
	line-height: 1;
}

.lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 1);
	padding: 64px 88px;
}

.lb.is-open {
	display: flex;
}

.lb__stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.lb__image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 12px 45px rgba(0, 0, 0, .08);
}

.lb__close,
.lb__prev,
.lb__next {
	position: fixed;
	z-index: 2;
	border: 0;
	background: rgba(255, 255, 255, .88);
	color: #242424;
	cursor: pointer;
	font: inherit;
	line-height: 1;
}

.lb__close {
	top: 20px;
	right: 24px;
	width: 44px;
	height: 44px;
	font-size: 34px;
}

.lb__prev,
.lb__next {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 64px;
	font-size: 38px;
}

.lb__prev {
	left: 18px;
}

.lb__next {
	right: 18px;
}

.lb__counter {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	padding: .4rem .65rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .9);
	font-size: .95rem;
	color: #1e1e1d;
;
}

.lb__close:hover,
.lb__prev:hover,
.lb__next:hover,
.lb__close:focus-visible,
.lb__prev:focus-visible,
.lb__next:focus-visible {
	background: #f3f3f3;
	outline: none;
}

body.lightbox-open {
	overflow: hidden;
}

@media (min-width: 1440px) {
	.photo-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) and (max-width: 1439px) {
	.site-header {
		padding: 50px 50px 0;
	}

	.site {
		padding: 50px;
	}

	.site-footer {
		padding: 0 50px 50px;
	}

	.photo-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 760px) and (max-width: 1023px) {
	.site-header {
		padding: 25px 25px 0;
	}

	.site {
		padding: 25px;
	}

	.site-footer {
		padding: 0 25px 25px;
	}

	.photo-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.htb-header-text-box {
		padding-bottom: 20px;
	}
	.site-header {
		padding: 10px 10px 0;
	}

	.shl-logo {
		padding-top: 10px;
	}

	.site {
		padding: 10px;
	}

	.site-footer {
			padding: 0 10px 10px;
	}

	.pagination {
		padding: 30px 0;
	}

	.photo-card__type {
		top: 7px;
		right: 7px;
	}

	.lb {
		padding: max(56px, env(safe-area-inset-top)) 10px max(72px, env(safe-area-inset-bottom));
	}

	.lb__image {
		max-width: calc(100vw - 20px);
		max-height: calc(100dvh - 136px);
		box-shadow: 0 8px 30px rgba(0, 0, 0, .07);
	}

	.lb__close {
		top: max(8px, env(safe-area-inset-top));
		right: max(8px, env(safe-area-inset-right));
		width: 46px;
		height: 46px;
	}

	.lb__prev,
	.lb__next {
		top: auto;
		bottom: max(10px, env(safe-area-inset-bottom));
		transform: none;
		width: 52px;
		height: 52px;
		font-size: 32px;
	}

	.lb__prev {
		left: max(10px, env(safe-area-inset-left));
	}

	.lb__next {
		right: max(10px, env(safe-area-inset-right));
	}

	.lb__counter {
		bottom: max(18px, env(safe-area-inset-bottom));
	}
}

@media (max-width: 600px) {
	.site-info,
	.htb-header-text-box {
		font-size: 1rem;
	}
}

@media (max-width: 360px) {
	.photo-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (hover: none) {
	.photo-card__button:hover .photo-card__image {
		transform: none;
		opacity: 1;
	}
}
