/*
Theme Name: NCF Classic
Description: An independent, responsive theme for the Nordic Concrete Federation, with publication and workshop archives.
Version: 1.0.0
Author: Tekna
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: ncf-classic
License: GPL-2.0-or-later
*/

:root { --navy: #1f2d4b; --ink: #202f42; --muted: #596879; --blue: #087ba3; --pale: #f1f6f8; --line: #dbe4ea; --white: #fff; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--navy); color: var(--ink); font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
button, input, select, textarea { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #007da6; outline-offset: 4px; }
img, video { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { color: var(--navy); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 3.3vw, 2.65rem); letter-spacing: -.035em; margin: 0 0 24px; }
h2 { font-size: 1.55rem; letter-spacing: -.025em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.2em; }
.site-shell { width: min(1200px, calc(100% - 64px)); margin: 40px auto 28px; }
.site-header { background: white; border-radius: 6px 6px 0 0; border-top: 4px solid #3fb4cf; position: relative; z-index: 10; }
.header-main { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 30px 40px; }
.site-branding { min-width: 0; }
.custom-logo-link { display: block; line-height: 0; }
.custom-logo { width: 380px; max-height: 114px; object-fit: contain; object-position: left center; }
.brand-text { display: block; max-width: 420px; font-size: 1.8rem; line-height: 1.2; font-weight: 700; color: var(--navy); text-decoration: none; }
.header-tools { display: flex; gap: 16px; align-items: center; }
.search-form { display: flex; background: white; border: 1px solid #bac9d3; border-radius: 4px; width: 260px; max-width: 100%; overflow: visible; }
.search-form input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 10px 12px; color: var(--ink); font-size: .9rem; border-radius: 4px; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-form button { display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--navy); min-width: 44px; min-height: 44px; border-radius: 4px; }
.search-form button:hover { background: var(--pale); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 44px; border: 1px solid var(--navy); border-radius: 4px; padding: 10px 18px; background: var(--navy); color: white; font-weight: 600; font-size: .9rem; text-decoration: none; line-height: 1.5; }
.button:hover { background: #30476b; color: white; }
.button-outline { color: var(--navy); background: transparent; border-color: #bdccd5; }
.button-outline:hover { color: var(--navy); background: var(--pale); }
.contact-link { white-space: nowrap; }
.text-link { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.site-navigation { border-top: 1px solid var(--line); padding: 0 26px; background: #fafcfd; }
.nav-list, .nav-list ul { list-style: none; padding: 0; margin: 0; }
.nav-list { display: flex; align-items: stretch; flex-wrap: wrap; }
.nav-list li { position: relative; display: flex; align-items: stretch; flex-wrap: wrap; }
.nav-list a { display: flex; align-items: center; color: var(--navy); text-decoration: none; line-height: 1.4; padding: 17px 14px; font-size: .88rem; font-weight: 500; }
.nav-list > li > a { border-bottom: 3px solid transparent; }
.nav-list > .current-menu-item > a, .nav-list > .current-menu-ancestor > a { border-bottom-color: var(--blue); color: #006e94; }
.nav-list a:hover, .nav-list .is-open > a { background: #eaf1f5; }
.nav-list .sub-menu { position: absolute; z-index: 20; top: 100%; left: 0; width: 280px; background: white; border: 1px solid var(--line); box-shadow: 0 12px 24px #10233c1a; display: none; padding: 6px; }
.nav-list .sub-menu a { padding: 12px; flex: 1; font-size: .9rem; }
.nav-list .sub-menu .sub-menu { top: 0; left: 100%; }
.nav-list > li:last-child .sub-menu { left: auto; right: 0; }
body:not(.navigation-ready) .nav-list li:hover > .sub-menu, body:not(.navigation-ready) .nav-list li:focus-within > .sub-menu, .navigation-ready .nav-list li.is-open > .sub-menu { display: block; }
.submenu-toggle { color: var(--navy); border: 0; background: transparent; padding: 8px; min-width: 28px; min-height: 44px; margin-left: -10px; }
.submenu-toggle::after { content: ''; display: block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -4px auto 0; }
.submenu-toggle[aria-expanded="true"]::after { transform: rotate(225deg); margin-top: 4px; }
.submenu-toggle:hover { background: #e0eaf0; }
.menu-toggle { display: none; }
.site-main-wrap { background: white; padding: 0 40px 52px; min-height: 55vh; border-radius: 0 0 6px 6px; }
.welcome-panel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, .85fr); gap: 36px; padding: 48px 0 40px; border-bottom: 1px solid var(--line); margin-bottom: 40px; align-items: center; }
.welcome-panel h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); max-width: 650px; }
.eyebrow { color: #417187; font-size: .7rem; text-transform: uppercase; font-weight: 700; letter-spacing: .13em; line-height: 1.5; margin-bottom: 12px; }
.welcome-content { font-size: .94rem; }
.welcome-content em { font-size: .84rem; color: var(--muted); }
.welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.welcome-actions .text-link { font-size: .85rem; }
.welcome-visual { background: #f5f8fa; padding: 24px 14px; border-radius: 5px; }
.welcome-visual img { width: 100%; display: block; mix-blend-mode: multiply; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 235px; gap: 48px; align-items: start; }
.content-column { min-width: 0; }
.sidebar { border-left: 1px solid var(--line); padding-left: 26px; }
.sidebar-section + .sidebar-section { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 28px; }
.sidebar h2 { margin: 0 0 18px; font-size: 1.2rem; }
.sidebar .eyebrow { font-size: .64rem; }
.national-list { list-style: none; margin: 0; padding: 0; }
.national-list a { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; min-height: 44px; }
.national-list a:hover { color: var(--blue); text-decoration: underline; }
.national-list a::before { content: ''; width: 21px; height: 20px; flex: 0 0 21px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.ncf-country-denmark a::before { background-image: url('assets/flags/denmark.png'); }
.ncf-country-finland a::before { background-image: url('assets/flags/finland.png'); }
.ncf-country-iceland a::before { background-image: url('assets/flags/iceland.png'); }
.ncf-country-norway a::before { background-image: url('assets/flags/norway.png'); }
.ncf-country-sweden a::before { background-image: url('assets/flags/sweden.png'); }
.resource-links > a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; text-decoration: none; font-size: .9rem; border-top: 1px solid var(--line); padding: 12px 0; }
.resource-links > a:hover { text-decoration: underline; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; }
.section-heading > a { font-size: .8rem; white-space: nowrap; text-decoration: none; }
.section-heading > a:hover { text-decoration: underline; }
.highlight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.highlights { margin-bottom: 40px; }
.story-card { padding: 24px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: row-reverse; align-items: start; gap: 24px; }
.story-card:first-child { padding-top: 0; }
.story-body { flex: 1; min-width: 0; }
.story-meta { font-size: .75rem; color: var(--muted); margin: 0 0 8px; }
.story-card .story-title { margin: 0 0 12px; }
.story-card .story-title a { text-decoration: none; color: var(--navy); }
.story-card .story-title a:hover { color: var(--blue); text-decoration: underline; }
.story-excerpt { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.read-more { font-size: .8rem; font-weight: 600; text-decoration: none; }
.read-more:hover { text-decoration: underline; }
.story-image { display: block; width: 150px; flex-shrink: 0; }
.story-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 3px; }
.story-card-featured, .story-card-featured:first-child { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); padding: 0; border-radius: 4px; overflow: hidden; background: #f9fbfc; }
.story-card-featured .story-image { width: 100%; }
.story-card-featured .story-image img { border-radius: 0; aspect-ratio: 16 / 10; }
.story-card-featured .story-body { padding: 20px 16px; }
.story-card-featured .story-title { font-size: 1.05rem; line-height: 1.4; }
.story-card-featured .story-excerpt { display: none; }
.story-card-featured:not(:has(.story-image)) { border-top: 4px solid #3ca8bb; background: #eef5f7; }
.breadcrumbs { font-size: .76rem; color: var(--muted); padding: 24px 0 30px; line-height: 1.6; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: '/'; color: #879aaa; margin-right: 10px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); text-decoration: underline; }
.article-header { margin-bottom: 28px; }
.article-header h1 { margin-bottom: 16px; }
.page-heading { padding-top: 40px; }
.entry-content { overflow-wrap: anywhere; }
.entry-content::after { content: ''; display: table; clear: both; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 1.3em; }
.entry-content h1 { font-size: 1.7rem; }
.entry-content h2 { margin: 1.5em 0 .7em; }
.entry-content h3 { margin: 1.4em 0 .6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content a { color: #096e97; }
.entry-content img { max-width: 100% !important; height: auto !important; }
.entry-content figure, .wp-caption { max-width: 100%; margin: 1em 0; }
.wp-caption-text, figcaption { font-size: .8rem; color: var(--muted); }
.entry-content iframe { max-width: 100%; }
.entry-content table { width: 100% !important; max-width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .9rem; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.entry-content th { background: var(--pale); text-align: left; }
.entry-content pre { overflow-x: auto; white-space: pre-wrap; }
.entry-content blockquote { border-left: 3px solid #43abc1; margin-left: 0; padding: 8px 22px; color: var(--muted); }
.entry-content .alignleft { float: left; margin: 0 24px 18px 0; }
.entry-content .alignright { float: right; margin: 0 0 18px 24px; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.article-image { max-width: 560px; margin-bottom: 28px; }
.article-image img { display: block; max-height: 440px; object-fit: contain; object-position: left; }
.catalogue-intro { margin-bottom: 24px; }
.catalogue { margin-top: 30px; }
.count-badge { display: inline-block; padding: 3px 11px; border-radius: 20px; background: #e7f1f5; color: #275a72; font-size: .8rem; font-weight: 600; }
.catalogue-filter { padding: 20px; background: var(--pale); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 20px; }
.catalogue-filter label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 8px; }
.filter-controls { display: flex; gap: 10px; }
.filter-controls input { min-width: 0; flex: 1; width: 100%; padding: 10px 12px; border: 1px solid #afc0cc; border-radius: 4px; background: white; color: var(--ink); font-size: .9rem; }
.filter-status { margin: 10px 0 0; font-size: .78rem; color: var(--muted); }
.catalogue-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.catalogue-list li { border-bottom: 1px solid var(--line); }
.catalogue-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 12px; text-decoration: none; color: var(--navy); line-height: 1.5; font-size: .95rem; }
.catalogue-list a:hover { background: #edf5f8; color: #00698b; }
.catalogue-list li:nth-child(even) { background: #fafcfd; }
.catalogue-arrow { color: #3b7f99; font-size: 1.2rem; flex-shrink: 0; }
.catalogue-empty, .empty-state { padding: 30px 0; }
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.page-numbers { padding: 8px 14px; text-decoration: none; border: 1px solid var(--line); border-radius: 3px; color: var(--navy); }
.page-numbers.current { color: white; background: var(--navy); border-color: var(--navy); }
.post-navigation { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 24px; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.post-navigation a { font-size: .9rem; text-decoration: none; }
.post-navigation a:hover { text-decoration: underline; }
.post-navigation span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.not-found { max-width: 620px; padding: 64px 0; }
.not-found .search-form { width: 100%; margin: 26px 0; }
.site-footer { display: flex; gap: 24px; padding: 24px 4px; font-size: .75rem; color: #c5d0df; }
.site-footer p { margin: 0 auto 0 0; }
.site-footer a { color: #e9eff5; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; left: 20px; top: 20px; z-index: 99999; padding: 12px 20px; background: white; color: var(--navy); }
.comments-area { margin-top: 40px; }
.comment-list { padding-left: 20px; }
.comment-form label { display: block; }
.comment-form input:not([type="checkbox"]), .comment-form textarea { max-width: 100%; border: 1px solid #bac9d3; border-radius: 4px; padding: 10px; }
.comment-form-cookies-consent label { display: inline; }
.comment-form .submit { background: var(--navy); color: white; cursor: pointer; }
@media (max-width: 1050px) {
    .site-shell { width: calc(100% - 40px); margin-top: 24px; }
    .header-main { padding: 24px; gap: 20px; }
    .custom-logo { width: 310px; }
    .header-tools { gap: 10px; }
    .header-tools .search-form { width: 220px; }
    .site-navigation { padding: 0 12px; }
    .nav-list a { padding: 15px 10px; font-size: .8rem; }
    .submenu-toggle { margin-left: -7px; min-width: 24px; }
    .site-main-wrap { padding: 0 28px 40px; }
    .content-grid { grid-template-columns: minmax(0, 1fr) 200px; gap: 28px; }
    .sidebar { padding-left: 20px; }
    .welcome-panel { gap: 24px; }
    .highlight-grid { grid-template-columns: 1fr; }
    .story-card-featured, .story-card-featured:first-child { flex-direction: row-reverse; align-items: stretch; }
    .story-card-featured .story-image { width: 130px; align-self: center; padding-right: 12px; }
}
@media (max-width: 780px) {
    .site-shell { width: calc(100% - 24px); margin: 12px auto; }
    .header-main { flex-wrap: wrap; gap: 20px; padding: 22px 20px; }
    .custom-logo { width: 320px; max-height: 90px; }
    .header-tools { width: 100%; gap: 12px; }
    .header-tools .search-form { flex: 1; width: auto; }
    .site-navigation { padding: 0 12px; }
    .navigation-ready .menu-toggle { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 13px 8px; border: 0; background: transparent; color: var(--navy); font-weight: 600; }
    .nav-list { display: block; padding: 6px 0 14px; }
    .navigation-ready .site-navigation:not(.is-open) .nav-list { display: none; }
    .nav-list > li { border-top: 1px solid var(--line); }
    .nav-list a { flex: 1; padding: 13px 12px; font-size: .95rem; }
    .nav-list > li > a { border-bottom: 0; }
    .nav-list > .current-menu-item > a, .nav-list > .current-menu-ancestor > a { background: #eaf3f7; }
    .submenu-toggle { min-width: 48px; margin: 0; }
    .nav-list .sub-menu, .nav-list .sub-menu .sub-menu { position: static; width: 100%; margin-left: 12px; border: 0; border-left: 2px solid #d5e5ed; box-shadow: none; padding: 0; }
    body:not(.navigation-ready) .nav-list .sub-menu { display: block; }
    .site-main-wrap { padding: 0 22px 32px; }
    .welcome-panel { grid-template-columns: 1fr; padding: 30px 0; gap: 24px; margin-bottom: 30px; }
    .welcome-panel h1 { font-size: 2rem; }
    .welcome-visual { max-width: 430px; width: 100%; justify-self: center; padding: 10px 24px; }
    .welcome-visual img { max-height: 210px; object-fit: contain; }
    .content-grid { grid-template-columns: 1fr; gap: 36px; }
    .sidebar { border-left: 0; border-top: 1px solid var(--line); padding: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .sidebar-section + .sidebar-section { border-top: 0; padding-top: 0; margin-top: 0; }
    .section-heading { align-items: baseline; }
    .section-heading h2 { font-size: 1.4rem; }
    .story-card { gap: 16px; }
    .story-image { width: 110px; }
    .story-card .story-title { font-size: 1.15rem; }
    .story-card-featured .story-title { font-size: 1.1rem; }
    .breadcrumbs { padding: 20px 0 24px; }
    .entry-content table { display: block; overflow-x: auto; }
    .site-footer { gap: 16px; flex-wrap: wrap; padding: 20px 4px; }
    .site-footer p { width: 100%; }
}
@media (max-width: 420px) {
    .header-main { padding: 18px 16px; }
    .site-main-wrap { padding-left: 16px; padding-right: 16px; }
    .contact-link { gap: 8px; padding: 10px 12px; }
    .welcome-panel h1 { font-size: 1.8rem; }
    .sidebar { grid-template-columns: 1fr; }
    .story-card { display: block; }
    .story-card > .story-image { float: right; width: 90px; margin: 0 0 12px 16px; }
    .story-card::after { content: ''; display: table; clear: both; }
    .story-card-featured .story-image { display: none; }
    .section-heading { flex-wrap: wrap; gap: 8px; }
    .catalogue-filter { padding: 14px; }
    .entry-content .alignleft, .entry-content .alignright { float: none; margin: 16px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
    body { background: white; color: black; }
    .site-shell { width: 100%; margin: 0; }
    .site-main-wrap { padding: 0; }
    .site-navigation, .header-tools, .sidebar, .catalogue-filter, .site-footer, .pagination, .post-navigation { display: none !important; }
    .content-grid { display: block; }
    .catalogue-list [hidden] { display: list-item !important; }
}
