/*
Theme Name: Bindalsbruket
Description: Tema for bindalsbruket.no. Farger, skrifter og oppsett for eiendommen Bindalsbruket.
Version: 1.6.0
Requires at least: 6.6
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: bindalsbruket
*/

/* Ingen luft mellom topp, innhold og bunn, eller mellom seksjoner i full bredde. */
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a:focus-visible { outline: 3px solid var(--wp--preset--color--tommer); outline-offset: 3px; }
.wp-block-post-content .alignfull p { max-width: 58ch; }
.wp-block-post-content > h2 { margin-top: 1.6em; }
.wp-block-post-title { margin-bottom: 0.6em; }

/* Topp og bunn */
.topp { border-bottom: 3px solid var(--wp--preset--color--tommer); }
.topp a { color: inherit; text-decoration: none; }
.topp .merke { margin: 0; font-family: var(--wp--preset--font-family--tittel); font-weight: 600; font-size: 26px; letter-spacing: 0.01em; line-height: 1.2; }
.topp .merke a { display: inline-flex; align-items: center; gap: 14px; }
.topp .merke a::before { content: ""; flex: none; width: 42px; height: 49px; background: url(assets/logo-hvit.svg) center / contain no-repeat; }
.topp a:hover { color: var(--wp--preset--color--tommer); }
.bunn { color: #D5DEDA; font-size: 17px; line-height: 1.55; }
.bunn p { margin-block-start: 6px; }
.bunn strong { font-family: var(--wp--preset--font-family--tittel); font-weight: 600; font-size: 18px; color: var(--wp--preset--color--papir); }
.bunn .navn strong { font-size: 24px; }
.bunn a { color: var(--wp--preset--color--papir); }

/* Forsiden */
.toppcover { text-align: center; }
.toppcover .wp-block-cover__image-background { object-position: center 62%; }
.toppcover .wp-block-cover__background { opacity: 0.55; }
.toppcover .logo-stor img { width: clamp(130px, 17vw, 210px) !important; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35)); }
.toppcover h1 { margin-top: 20px; margin-bottom: 12px; letter-spacing: 0.02em; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.toppcover p { max-width: 54ch; margin-left: auto; margin-right: auto; line-height: 1.6; text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.temaer .tema .wp-block-image { margin-bottom: 0; }
.wp-block-image.bilde.topp-bilde { margin-bottom: clamp(28px, 4vw, 48px); }
.tema h3 { margin-top: 18px; }
.tema p { hyphens: auto; overflow-wrap: break-word; }
.tema.strek { padding-top: 20px; border-top: 3px solid var(--wp--preset--color--gran); }
.wp-block-table td, .wp-block-table th { border-color: #C2CBC6; padding: 10px 14px; vertical-align: top; }
.wp-block-table th { text-align: left; font-family: var(--wp--preset--font-family--tittel); font-weight: 600; }
.kart iframe { display: block; width: 100%; height: clamp(320px, 55vw, 560px); border: 1px solid #C2CBC6; }
.wp-block-image.toppbilde { margin-block-start: 0; }
.wp-block-image.toppbilde img { display: block; width: 100%; height: clamp(260px, 44vw, 640px); object-fit: cover; object-position: center 62%; }
.wp-block-image.bilde img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.wp-block-image.bilde.bred img { aspect-ratio: 21 / 9; object-position: center 55%; }
.wp-block-image.bilde.bred { margin-bottom: clamp(36px, 5vw, 64px); }
.wp-block-columns.luft { gap: 24px 72px; }
.has-li-background-color p { color: #DCE4E0; }
.ressurs { padding-top: 22px; border-top: 4px solid var(--wp--preset--color--fjord); }
.ressurs.mineral { border-top-color: var(--wp--preset--color--tommer); }
.lenke a { font-family: var(--wp--preset--font-family--tittel); font-size: 19px; font-weight: 500; }

/* Tidslinjen: en vanlig nummerert liste, vist som rutenett. */
ol.tidslinje { margin: 48px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 0 40px; }
ol.tidslinje li { padding: 16px 0 22px; border-top: 2px solid var(--wp--preset--color--gran); font-size: 17px; line-height: 1.45; }
ol.tidslinje li strong { display: block; margin-bottom: 4px; font-family: var(--wp--preset--font-family--tittel); font-weight: 600; font-size: 24px; line-height: 1.2; }

/* Bilder i historieteksten */
.wp-block-post-content figcaption.wp-element-caption { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--wp--preset--color--stein); }
.wp-block-image.historie-bilde.alignright { margin: 6px 0 20px 32px; }
.wp-block-image.historie-bilde img { border: 1px solid #C2CBC6; }
.wp-block-image.alignwide img { display: block; width: 100%; height: auto; }
@media (max-width: 700px) {
  .wp-block-image.historie-bilde.alignright { float: none; margin: 24px auto; }
  .wp-block-image.historie-bilde.alignright img { width: 100% !important; max-width: 340px; margin-inline: auto; }
}

/* Knapp med ramme */
.wp-block-button.is-style-outline .wp-block-button__link { background: none; border: 2px solid var(--wp--preset--color--gran); color: var(--wp--preset--color--gran); padding: 12px 26px; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--gran); color: var(--wp--preset--color--papir); }
