/*
Theme Name: FERLE TT25
Theme URI: https://ferle.no/
Description: Lett child-tema for FERLE-sitene (ferle.no, ferle.dk, ferle.se), basert på Twenty Twenty-Five. Designtokens ligger i theme.json.
Author: FERLE
Template: twentytwentyfive
Version: 0.1.4
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: ferle-tt25
*/

/* Fokus: ingen ring ved museklikk, tydelig ring ved tastatur */
:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) { outline: none; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Header */
.site-header .wp-block-site-logo img { height: auto; }
.site-header .wp-block-navigation a { text-decoration: none; }
.site-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Lister uten punkter (footer, lenkelister) */
.is-style-ferle-plain { list-style: none; padding-left: 0; }
.is-style-ferle-plain li + li { margin-top: .5em; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Kort */
.is-style-ferle-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
}

/* Ikonfelt (inline SVG) */
.ferle-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 10px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--navy);
}
.ferle-icon svg { width: 24px; height: 24px; }

/* Pill / badge */
.is-style-ferle-pill {
	display: inline-block; padding: 7px 14px; border-radius: 999px;
	background: var(--wp--preset--color--accent-soft);
	font-size: 14px; font-weight: 500; color: var(--wp--preset--color--contrast);
}

/* Overlinje (eyebrow) */
.is-style-ferle-eyebrow {
	font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* Sekundærknapp */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	background: transparent;
	padding: 14px 27px;
}

/* Header: hamburger under 1100px (kjernen bytter først ved 600px) */
@media (min-width: 600px) and (max-width: 1099px) {
	.site-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { font-size: 20px; gap: 18px; }
@media (max-width: 599px) {
	.site-header .wp-block-site-logo img { width: 104px !important; }
	.site-header .header-cta .wp-block-button__link { font-size: 14px; padding: 10px 14px !important; }
	.site-header .wp-block-group { gap: 14px; }
}

/* ---------- Forside / landingssider ---------- */
.ferle-hero-figure {
	position: relative; min-height: 520px; display: flex !important; align-items: center; justify-content: center;
	background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: 16px;
}
.ferle-hero-figure::before {
	content: ""; position: absolute; width: 400px; max-width: 80%; aspect-ratio: 1; border-radius: 50%;
	background: var(--wp--preset--color--accent-soft); left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.ferle-hero-figure > .wp-block-image { position: relative; margin: 0 !important; }
.ferle-float-badge {
	position: absolute; left: -28px; bottom: 36px; margin: 0 !important;
	padding: 14px 18px 14px 70px; border-radius: 10px; background: var(--wp--preset--color--base);
	box-shadow: 0 10px 30px rgba(27, 34, 50, .12); font-size: 13px; line-height: 1.4; color: var(--wp--preset--color--muted);
}
.ferle-float-badge strong { font-size: 18px; color: var(--wp--preset--color--contrast); }
.ferle-float-badge::before {
	content: ""; position: absolute; left: 18px; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%;
	background: var(--wp--preset--color--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A2B49' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h11v9H3zM14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E") center / 20px no-repeat;
}
@media (max-width: 781px) {
	.ferle-hero-figure { min-height: 380px; }
	.ferle-hero-figure img { width: 190px !important; }
	.ferle-float-badge { left: 12px; bottom: 16px; }
}

.ferle-icon--neutral { background: var(--wp--preset--color--surface); }
.ferle-pill-neutral { background: var(--wp--preset--color--surface); align-self: flex-start; }
.is-style-ferle-pill { align-self: flex-start; width: fit-content; }

/* Kort med bilde og hel klikkflate */
.ferle-linkcard, .ferle-product { position: relative; overflow: hidden; }
.ferle-linkcard > .wp-block-image { margin: 0; flex-shrink: 0; }
.ferle-linkcard > .wp-block-image img { width: 100%; height: auto; aspect-ratio: 367 / 252; object-fit: cover; display: block; }
.ferle-linkcard a::after, .ferle-product h3 a::after { content: ""; position: absolute; inset: 0; }
.ferle-linkcard a, .ferle-product h3 a { text-decoration: none; color: inherit; }
.ferle-linkcard p a { color: var(--wp--preset--color--navy); }
.ferle-linkcard:hover, .ferle-product:hover { border-color: #D9D2C6; box-shadow: 0 6px 20px rgba(27, 34, 50, .07); }
.ferle-linkcard:hover p a, .ferle-product:hover h3 a { text-decoration: underline; text-underline-offset: 3px; }
.ferle-product .wp-block-image { flex-shrink: 0; margin: 0; }
.ferle-product .wp-block-image img { border-radius: 8px; }

/* Tagger (alkometer) */
.ferle-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ferle-tags li { margin: 0 !important; padding: 6px 12px; border-radius: 999px; background: var(--wp--preset--color--surface); font-size: 14px; color: var(--wp--preset--color--contrast); }
.ferle-bigcard { border-radius: 16px; }
.ferle-bigcard > .wp-block-group { align-self: stretch; }

.ferle-cta > .wp-block-group { max-width: 100%; }

/* Fullbredde-seksjoner ligger kant i kant */
.wp-block-post-content > .alignfull { margin-block: 0; }
.wp-site-blocks > .wp-block-template-part:last-child { margin-block-start: 0; }
