/*
Theme Name: S Höganäs
Description: Modernt, lättläst tema för Socialdemokraterna Höganäs. Behåller befintliga sidor, nyheter, menyer och widgetar.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: s-hoganas
*/

@font-face { font-family: "Archivo"; src: url("assets/fonts/archivo-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("assets/fonts/archivo-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20C0; }
@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20C0; }

:root {
	--red: #d4001e;
	--red-dark: #ad0018;
	--wine: #4a0a14;
	--ink: #241216;
	--muted: #6a5a5d;
	--line: #e7dcdb;
	--soft: #f7f1f0;
	--white: #fff;
	--display: "Archivo", "Arial Narrow", Arial, sans-serif;
	--body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--body); font-size: 1.125rem; line-height: 1.6; overflow-wrap: break-word; }
img, video, iframe, embed, object { max-width: 100%; }
img, video { height: auto; }
a { color: var(--red-dark); text-underline-offset: .15em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hero :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }
main:focus { outline: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--display); font-weight: 750; line-height: 1.15; letter-spacing: -.012em; color: var(--ink); }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--white); color: var(--ink); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Knappar */
.button, .wp-block-button__link, .wp-element-button, .wp-block-file .wp-block-file__button, input[type="submit"] {
	display: inline-block; padding: .62em 1.15em; border: 0; border-radius: 3px; background: var(--red); color: var(--white); font-family: var(--display); font-size: 1rem; font-weight: 700; line-height: 1.25; text-decoration: none; cursor: pointer;
}
.button:hover, .wp-block-button__link:hover, .wp-block-file .wp-block-file__button:hover, input[type="submit"]:hover { background: var(--red-dark); color: var(--white); }
.button--red { background: var(--red); color: var(--white); }
.button--white { background: var(--white); color: var(--red-dark); }
.button--white:hover { background: var(--wine); color: var(--white); }
.text-link { font-weight: 650; }

/* Sidhuvud */
.site-header { position: relative; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter); }
.brand { flex: 1 1 auto; order: 1; }
.brand__link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; width: auto; height: 52px; }
.brand__text { display: block; width: min-content; overflow-wrap: normal; color: var(--red); font-family: var(--display); font-size: 1.28rem; font-weight: 800; line-height: 1.05; letter-spacing: -.015em; text-decoration: none; }
.brand__text:hover { color: var(--red-dark); }
.site-nav { display: contents; }
.site-nav > nav { order: 4; flex: 0 0 100%; margin: 0 -9px; }
.site-nav > .search-form { order: 2; }
.site-nav > .site-nav__cta { order: 3; }
.site-nav__list { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0; margin: 0; padding: 0; list-style: none; }
.site-nav__list > li { position: relative; }
.site-nav__list a { display: block; padding: 8px 9px; color: var(--ink); font-family: var(--display); font-size: 1rem; font-weight: 600; text-decoration: none; }
.site-nav__list a:hover, .site-nav__list a[aria-current], .site-nav__list .current-menu-item > a, .site-nav__list .current-menu-ancestor > a { color: var(--red); }
.site-nav__list .sub-menu { position: absolute; left: 0; top: 100%; display: none; min-width: 250px; margin: 0; padding: 8px 0; background: var(--white); border: 1px solid var(--line); list-style: none; }
.site-nav__list li:hover > .sub-menu, .site-nav__list li:focus-within > .sub-menu { display: block; }
.site-nav__cta { flex: none; }
.menu-toggle { display: none; padding: 8px 14px; background: var(--white); border: 2px solid var(--ink); border-radius: 3px; color: var(--ink); font: 700 1rem var(--display); cursor: pointer; }

.search-form { display: flex; flex: none; }
.search-form label { display: block; }
.search-form input { width: 150px; height: 40px; padding: 0 10px; border: 1px solid #a99a9c; border-right: 0; border-radius: 3px 0 0 3px; background: var(--white); color: var(--ink); font: inherit; font-size: 1rem; }
.search-form button { height: 40px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 0 3px 3px 0; background: var(--ink); color: var(--white); font: 700 .95rem var(--display); cursor: pointer; }

/* Hero */
.hero { background: var(--red); color: var(--white); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 6vw, 72px) var(--gutter) clamp(32px, 4vw, 48px); }
.hero--image .hero__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 64px); }
.hero__date { margin: 0 0 12px; font-weight: 600; }
.hero__title { margin: 0 0 20px; color: var(--white); font-size: clamp(2.5rem, 6.4vw, 5.25rem); font-weight: 800; line-height: .98; letter-spacing: -.028em; text-wrap: balance; max-width: 15ch; }
.hero--image .hero__title { max-width: none; font-size: clamp(2.4rem, 5.1vw, 4.5rem); }
.hero__title.is-long, .hero--image .hero__title.is-long { font-size: clamp(2rem, 3.9vw, 3.25rem); line-height: 1.04; letter-spacing: -.02em; max-width: 24ch; }
.hero__title a { color: inherit; text-decoration: none; }
.hero__title a:hover { text-decoration: underline; text-decoration-thickness: .06em; }
.hero__excerpt { max-width: 56ch; margin-bottom: 22px; font-size: 1.2rem; line-height: 1.45; }
.hero__excerpt p { margin: 0; }
.hero__nav { margin-top: clamp(28px, 4vw, 48px); padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .55); }
.hero__links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.hero__links a { color: var(--white); font-family: var(--display); font-weight: 650; text-underline-offset: .2em; }
.hero__links a:hover { color: var(--white); text-decoration-thickness: 2px; }
.hero__media { display: block; align-self: end; margin-bottom: calc(-1 * clamp(72px, 8vw, 112px)); position: relative; z-index: 2; }
.hero__media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(40px, 6vw, 80px); max-width: var(--wrap); margin: 0 auto; padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(48px, 7vw, 88px); }
.layout--after-hero { padding-top: clamp(40px, 5vw, 56px); }
.layout--after-hero .sidebar { padding-top: clamp(72px, 8vw, 104px); }
.section-title { margin: 0 0 8px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.page-title { margin: 0 0 14px; font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.04; letter-spacing: -.022em; text-wrap: balance; }
.lead { font-size: 1.28rem; line-height: 1.45; }
.lead p { margin: 0 0 1em; }
.meta { margin: 0 0 8px; color: var(--muted); font-size: 1rem; }
.meta a { color: inherit; }
.breadcrumbs { margin-bottom: 20px; font-size: .95rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; }
.breadcrumbs a { color: inherit; }
.article--full { max-width: 900px; margin: 0 auto; padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(56px, 8vw, 96px); }
.article__image { margin: 24px 0; }
.article__image img { display: block; width: 100%; border-radius: 3px; }
figcaption, .wp-element-caption, .wp-caption-text { margin-top: 8px; color: var(--muted); font-size: .95rem; }

/* Nyhetsrad */
.post-row { display: grid; grid-template-columns: minmax(0, 1fr); padding: 26px 0; border-bottom: 1px solid var(--line); }
.post-row.has-post-thumbnail { grid-template-columns: 220px minmax(0, 1fr); gap: 26px; }
.post-row__image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.post-row__title { margin: 0 0 8px; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.16; }
.post-row__title a { color: var(--ink); text-decoration: none; }
.post-row__title a:hover { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; }
.post-row__excerpt p { margin: 0; }

.navigation.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { display: inline-block; min-width: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); font-weight: 600; text-align: center; text-decoration: none; }
a.page-numbers:hover { border-color: var(--red); color: var(--red); }
.page-numbers.current { background: var(--red); border-color: var(--red); color: var(--white); }
.page-numbers.dots { border-color: transparent; }

/* Sidofält och widgetar */
.sidebar { min-width: 0; }
.widget { margin-bottom: 40px; font-size: 1.05rem; }
.widget-title, .widget h2:first-child, .widget h3:first-child, .widget h4:first-child { margin: 0 0 12px; padding-top: 12px; border-top: 3px solid var(--red); font-size: 1.25rem; }
.widget-title a { color: var(--ink); text-decoration: none; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 9px 0; border-bottom: 1px solid var(--line); line-height: 1.3; }
.widget li a { color: var(--ink); text-decoration: none; font-weight: 550; }
.widget li a:hover { color: var(--red); text-decoration: underline; }
.widget li .children, .widget li .sub-menu { margin: 8px 0 -9px 14px; }
.widget li li:last-child { border-bottom: 0; }
.section-nav .current_page_item > a { color: var(--red); font-weight: 700; }
.widget table, .content table { width: 100%; border-collapse: collapse; font-size: .98rem; line-height: 1.3; }
.widget td, .widget th, .content td, .content th { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.widget tr:empty, .widget td:empty { display: none; }
.widget td:first-child { width: 42%; font-weight: 650; }
.widget video, .widget iframe { display: block; width: 100%; border: 0; }
.widget img { display: block; }

.member-box { padding: 20px; background: var(--red); border-radius: 3px; color: var(--white); }
.widget.member-box h2 { margin: 0 0 14px; padding: 0; border: 0; color: var(--white); font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.widget .wp-block-social-links { display: flex; gap: 10px; }
.widget .wp-block-social-links li { padding: 0; border: 0; }
.widget .wp-block-video { margin: 0; }
.widget figure { margin: 0; }

/* Text */
.content { max-width: 72ch; }
.content > :first-child { margin-top: 0; }
.content h2 { margin: 1.6em 0 .5em; font-size: 1.75rem; }
.content h3 { margin: 1.5em 0 .45em; font-size: 1.4rem; }
.content h4 { margin: 1.4em 0 .4em; font-size: 1.15rem; }
.content ul, .content ol { padding-left: 1.3em; }
.content li { margin-bottom: .35em; }
.content blockquote, .wp-block-quote { margin: 1.5em 0; padding: 0 0 0 20px; border-left: 4px solid var(--red); font-family: var(--display); font-size: 1.25rem; font-weight: 550; line-height: 1.35; }
.content hr, .wp-block-separator { margin: 2em 0; border: 0; border-top: 1px solid var(--line); }
.content img { border-radius: 3px; }
.content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.content .alignwide, .content .alignfull { max-width: 100%; }
.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 1.5em 0; padding: 14px 16px; background: var(--soft); border-radius: 3px; }
.wp-block-file > a:first-child { font-weight: 650; }
.wp-block-file .wp-block-file__button { margin-left: auto; }
.wp-block-embed iframe { width: 100%; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 4px 10px; background: var(--soft); border-radius: 3px; color: var(--ink); font-size: .95rem; text-decoration: none; }
.tags a:hover { background: var(--red); color: var(--white); }
.share { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.share__title { margin: 0; font-size: 1rem; }
.share ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.comments { margin-top: 48px; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea { width: 100%; padding: 10px; border: 1px solid #a99a9c; border-radius: 3px; font: inherit; }

/* Företrädare */
.section-foretradare .content { max-width: none; }
.section-foretradare .wp-block-media-text { display: grid; align-items: center; grid-template-columns: 160px minmax(0, 1fr) !important; gap: 0 4px; margin: 0; }
.section-foretradare .wp-block-media-text__media img { display: block; width: 160px; height: 160px; object-fit: cover; object-position: top; border-radius: 3px; }
.section-foretradare .wp-block-media-text__content { padding: 0 0 0 20px; }
.section-foretradare .wp-block-media-text__content .wp-block-group { display: flex; flex-direction: column; align-items: flex-start !important; gap: 0; }
.section-foretradare .wp-block-media-text__content .is-layout-constrained > * { margin-left: 0 !important; }
.section-foretradare .wp-block-media-text__content p { margin: 0 0 2px; line-height: 1.35; text-align: left !important; overflow-wrap: anywhere; }
.section-foretradare .content > .wp-block-separator { margin: 22px 0; }

/* Politik */
.politics { background: var(--soft); }
.politics__inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 80px); max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter); }
.politics__intro h2 { margin: 0 0 18px; font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; line-height: 1.04; letter-spacing: -.022em; text-wrap: balance; }
.politics__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.politics__list li { border-top: 1px solid #d4c5c3; }
.politics__list a { display: block; padding: 15px 0; color: var(--ink); font-family: var(--display); font-size: 1.16rem; font-weight: 650; line-height: 1.2; text-decoration: none; }
.politics__list a:hover { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; }

/* Sidfot */
.site-footer { background: var(--wine); color: var(--white); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--white); text-decoration-thickness: 2px; }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 40px; max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 28px; }
.site-footer__name { margin: 0 0 12px; font-family: var(--display); font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 800; line-height: 1.05; letter-spacing: -.018em; width: min-content; overflow-wrap: normal; }
.site-footer address { font-style: normal; }
.site-footer__title { margin: 0 0 10px; color: var(--white); font-size: 1.05rem; }
.site-footer__links { margin: 0; padding: 0; list-style: none; }
.site-footer__links li { padding: 3px 0; }
.site-footer__widgets { margin-top: 24px; }
.site-footer .widget-title, .site-footer .widget h2, .site-footer .widget h3, .site-footer .widget h4 { color: var(--white); border-top-color: var(--white); }
.site-footer .widget li a { color: var(--white); }
.site-footer__top { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 28px; }

/* Plugin: The Events Calendar med flera behåller sina egna format men får plats */
.tribe-common, .tribe-events { max-width: 100%; }

@media (max-width: 860px) {
	.menu-toggle { display: block; order: 5; }
	.site-nav > nav { margin: 0; flex: none; }
	.brand { flex: 1 1 0; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 12px var(--gutter) 24px; background: var(--white); border-bottom: 3px solid var(--red); }
	.site-nav.is-open { display: flex; }
	.site-nav__list { display: block; }
	.site-nav__list a { white-space: normal; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 1.08rem; }
	.site-nav__list .sub-menu { position: static; display: block; min-width: 0; padding: 0 0 0 16px; border: 0; }
	.search-form input, .search-form input:focus { width: 100%; }
	.search-form label { flex: 1; }
	.site-nav__cta { text-align: center; }
}

@media (max-width: 900px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.layout--after-hero .sidebar { padding-top: 0; }
	.hero--image .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.hero__media { order: -1; margin: 0; }
	.hero__media img { aspect-ratio: 16 / 9; }
	.hero__title, .hero--image .hero__title { max-width: none; }
	.politics__inner { grid-template-columns: minmax(0, 1fr); }
	.site-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.site-footer__contact { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
	body { font-size: 1.0625rem; }
	.section-foretradare .wp-block-media-text { grid-template-columns: 96px minmax(0, 1fr) !important; }
	.section-foretradare .wp-block-media-text__media img { width: 96px; height: 96px; }
	.section-foretradare .wp-block-media-text__content { padding-left: 14px; font-size: 1rem; }
	.brand img { height: 44px; }
	.brand__text { font-size: 1.1rem; }
	.post-row.has-post-thumbnail { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
	.post-row__excerpt { display: none; }
	.politics__list { grid-template-columns: minmax(0, 1fr); }
	.wp-block-file .wp-block-file__button { margin-left: 0; }
	.content .alignleft, .content .alignright { float: none; margin: 1em 0; }
}

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