/* Minimal site stylesheet to replace Minima defaults */
html, body { height: 100%; }
body { font-family: 'Poppins', sans-serif; font-size:16px; margin:0; display:flex; flex-direction:column; }
/* Limit only the main content area, not every w3-container (header/footer use w3-container) */
.w3-main { max-width: 1100px; margin-left: auto; margin-right: auto; padding-top: 90px; padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
a { color: var(--nmf-red); }
h1, h2, h3, h4, h5 { font-family: 'Poppins', sans-serif; }
.lede { font-size:1.05rem; line-height:1.6rem; }
/* Small helper so w3-card spacing looks consistent */
.w3-card-4 { overflow: hidden; background-color: #fff;}
/* Keep footer at bottom on short pages */
footer { margin-top: auto; }

/* Site-wide styles moved from index.html */
.h-100, html, body {height:100%;}
body,h1,h2,h3,h4,h5 {font-family: "Poppins", sans-serif}
body {font-size:16px;display:flex;flex-direction:column;}
.w3-half img{margin-bottom:-6px;margin-top:16px;opacity:0.9}
.w3-half img:hover{opacity:1}
.lede {font-size:1.1rem;line-height:1.6rem}
#main {flex:1}
/* Ensure anchor targets are not hidden behind the fixed header */
[id] { scroll-margin-top: 90px; }

/* Portrait images: keep a uniform height and crop with object-fit */
.portrait-img { width:100%; max-width:220px; height:220px; object-fit:cover; border-radius:4px; }

/* Post meta: place date left and author right on a single row */
.post-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; font-size: 1.2rem; }
.post-meta .date { color: inherit; font-size: 1.2rem; font-weight: 700; }
.post-meta .author { color: inherit; text-align: right; font-size: 1.2rem; font-weight: 700; }

/* Back button (used in post layout) */
.back-button { display: inline-flex; align-items: center; gap: 8px; }
.back-button svg { width: 18px; height: 18px; vertical-align: middle; fill: currentColor; }
.back-button .label { line-height: 1; }

/* Sidebar related adjustments so content isn't hidden on wide screens */
@media (min-width: 993px) {
	/* Use inner gutters on wide screens so the centered container keeps its alignment */
	.w3-main { padding-left: 40px; padding-right: 40px; background-color: #ffffffb8;}
}

/* Header logo (placed to the left of the site title) */
/* Slightly smaller to match original visual weight after wrapping in a link */
.site-logo { height:32px; vertical-align:middle; margin-right:12px; }

/* Site-brand wrapper for logo + title */
.site-brand { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
.site-brand span { margin-left: 6px; }

/* Header subtitle (right side on wide screens; stacked below brand on small screens) */
.site-subtitle {
	float: right;
	font-size: 0.95rem;
	margin-top: 8px;
	line-height: 1.05;
	max-width: 220px; /* encourage a two-line layout on wide screens */
	text-align: right;
	white-space: normal;
}
.site-subtitle .desktop-break { display: inline; }

@media (max-width: 600px) {
	/* On small screens stack the subtitle below the site brand and keep it on one line */
	.site-brand { display: inline-flex; align-items: center; }
	.site-subtitle {
		float: none;
		display: block;
		text-align: left;
		margin-top: 6px;
		max-width: none;
		font-size: 0.95rem;
		white-space: nowrap; /* keep it on a single line as requested */
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.site-subtitle .desktop-break { display: none; }
}

/* Abel Symposium golden theme */
.abel-theme {
	background-color: #fff9e6;
	color: #3b2b0d;
}
.abel-theme .w3-red {
	/* override red accents with a warm gold for the Abel pages */
	background-color: #b8860b !important;
	color: #fff !important;
}
.abel-theme a { color: #6b3f00; }
.abel-theme .w3-button.w3-red { background-color: #c79a00; color: #fff; border-color: #b8860b; }
.abel-theme .news-header { background-color: #8a5b02 !important; color: #fff; }
.abel-theme .news-media-overlay { background: rgba(11,7,0,0.35); }

/* Golden card adjustments for Abel Symposium tiles in the listing */
.news-grid .w3-card-4.abel-theme {
	border: 3px solid #c79a00;
	box-shadow: 0 8px 24px rgba(199,154,0,0.08);
}
.news-grid .w3-card-4.abel-theme .news-media-overlay {
	background: linear-gradient(180deg, rgba(11,7,0,0.18) 0%, rgba(11,7,0,0.45) 100%);
}

/* Small logo for posts */
.abel-post-logo { height:56px; float:right; margin-left:12px; margin-top:6px; }

/* Ensure post headers on abel-theme pages use tasteful padding */
.abel-theme .post-meta .date, .abel-theme .post-meta .author { color: #3b2b0d; }


/* Color variables and button utilities (site red palette) */
:root{
	--nmf-red: #b71c1c;       /* primary brand red */
	--nmf-red-dark: #8a0f12;  /* hover / active */
	--nmf-on-red: #ffffff;    /* text on red */
	--nmf-secondary-bg: #ffffff;
	--nmf-secondary-border: #dddddd;
	--nmf-focus: rgba(183,28,28,0.18);
}

/* Skip link: hidden visually but visible on keyboard focus */
.skip-link { position: absolute; left: -999px; top: auto; background: #fff; color: #000; padding: 8px 10px; border-radius: 4px; z-index: 1200; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.skip-link:focus { left: 8px; top: 8px; }

/* Membership table card: subtle background, padding and rounded corners for emphasis */
.membership-table {
	width: 100%;
	max-width: 480px;
	border-collapse: collapse;
	background: transparent;
}
.membership-table caption {
	text-align: left;
	font-weight: 700;
	color: var(--nmf-red-dark);
	margin-bottom: 8px;
	caption-side: top;
	padding-bottom: 6px;
}
.membership-table td, .membership-table th {
	padding: 8px;
}

/* Themed header and alternating row colors (zebra stripes) using brand red tints */
.membership-table thead th {
	background: var(--nmf-red);
	color: var(--nmf-on-red);
	font-weight: 700;
	border-bottom: 2px solid rgba(0,0,0,0.06);
}
.membership-table tbody tr:nth-child(odd) td {
	background: rgba(183,28,28,0.03); /* light red tint */
}
.membership-table tbody tr:nth-child(even) td {
	background: rgba(183,28,28,0.01); /* even lighter tint */
}
.membership-table tbody tr:hover td {
	background: rgba(183,28,28,0.06); /* subtle hover highlight */
}

/* Tables inside news posts (scoped to nyheter_template.html via .nyheter-article) */
.nyheter-article .post-content { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nyheter-article .post-content table {
	border-collapse: collapse;
	width: auto;
	max-width: 100%;
	margin: 16px auto;
	box-shadow: 0 6px 18px rgba(0,0,0,0.04);
	border-radius: 10px;
	overflow: hidden; /* clip header/footer backgrounds */
}
.nyheter-article .post-content table th,
.nyheter-article .post-content table td {
	padding: 10px 14px;
	text-align: left;
	border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nyheter-article .post-content table thead th {
	background: var(--nmf-red);
	color: var(--nmf-on-red);
	font-weight: 700;
}
.nyheter-article .post-content table tbody tr:nth-child(odd) td {
	background: rgba(183,28,28,0.03);
}
.nyheter-article .post-content table tbody tr:nth-child(even) td {
	background: rgba(183,28,28,0.01);
}
.nyheter-article .post-content table tbody tr:hover td {
	background: rgba(183,28,28,0.06);
}

@media (max-width: 640px) {
	.nyheter-article .post-content table th,
	.nyheter-article .post-content table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
	.membership-table-container { padding: 10px; border-radius: 8px; }
	.membership-table { max-width: 100%; }
}

/* Hero call-to-action buttons: centered and more visible */
.hero-cta { text-align: center; margin-top: 18px; }
.hero-cta .w3-button { padding: 12px 22px; font-weight: 700; font-size: 1rem; box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.hero-cta .w3-button.w3-white { background: var(--nmf-secondary-bg); border: 1px solid var(--nmf-secondary-border); }
.hero-cta .w3-button.w3-red { background: var(--nmf-red); color: var(--nmf-on-red); }
.hero-cta .w3-button + .w3-button { margin-left: 12px; }

/* Explicit named button classes for clearer intent */
.btn-primary { background: var(--nmf-red); color: var(--nmf-on-red); border: 1px solid transparent; }
.btn-primary:hover, .btn-primary:focus { background: var(--nmf-red-dark); }
.btn-secondary { background: var(--nmf-secondary-bg); color: var(--nmf-red); border: 1px solid var(--nmf-secondary-border); }
.btn-secondary:hover, .btn-secondary:focus { background: #f7f7f7; }
.w3-button:focus { outline: none; box-shadow: 0 0 0 6px var(--nmf-focus); }

/* News grid: fixed-height post cards with three regions (top, content, footer)
	 - top (image or red header): 140px
	 - content (excerpt): 140px
	 - footer (buttons): 80px
	 Total card height: 360px */
.news-grid .w3-col { display: flex; }
.news-grid .w3-card-4 { display: flex; flex-direction: column; width: 100%; height: 360px; }
/* ensure padding is included in card sizing */
.news-grid .w3-card-4 { box-sizing: border-box; }

/* Top area: either image (.news-media) or header */
.news-grid .w3-card-4 > header,
.news-grid .w3-card-4 > .news-media { flex: 0 0 140px; height: 140px; overflow: hidden; box-sizing: border-box; }
.news-grid .w3-card-4 > header { padding: 8px 14px; display:flex; flex-direction:column; justify-content:flex-end; box-sizing: border-box; }
.news-grid .w3-card-4 > header h3 { margin: 0; font-size: 1.05rem; line-height:1.2; }
.news-grid .w3-card-4 > header small { margin: 6px 0 0 0; color:#ffecec; font-size:0.9rem; }
.news-grid .news-media { position: relative; box-sizing: border-box; }
.news-grid .news-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-grid .news-media-overlay { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); color: #fff; padding: 10px; box-sizing: border-box; }
.news-grid .news-media-overlay h3 { margin: 0; font-size: 1.05rem; }
.news-grid .news-media-overlay small { color: #ffecec; }

/* Make the red header used for posts without images match the image area's shape
	and text placement (bottom-aligned title/date). */
.news-grid .w3-card-4 > header.news-header { padding: 0 !important; background-color: var(--nmf-red); }
.news-grid .w3-card-4 > header.news-header h3 { color: var(--nmf-on-red) !important; margin: 0; padding: 10px 14px 2px; font-size: 1.05rem; line-height: 1.2; }
.news-grid .w3-card-4 > header.news-header h3 a { color: inherit; text-decoration: none; }
.news-grid .w3-card-4 > header.news-header small { display: block; color: #ffecec; padding: 0 14px 10px; margin: 0; font-size: 0.9rem; }

/* Content area */
.news-grid .w3-card-4 > .w3-container { flex: 0 0 140px; height: 140px; overflow: hidden; box-sizing: border-box; }
.news-grid .w3-card-4 > .w3-container p { margin: 0; }

/* Footer area: make semi-transparent so content behind remains readable */
.news-grid .w3-card-4 .w3-light-grey {
	flex: 0 0 80px;
	height: 80px;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	padding: 8px 16px;
	justify-content: flex-end;
	/* translucent white to improve readability over images */
	background: rgba(255, 255, 255, 0.85);
	/* subtle top border to separate from content */
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	/* optional backdrop blur for supported browsers */
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.news-grid .w3-card-4 .w3-light-grey .w3-button { margin: 0; }

/* On small screens allow cards to auto height for readability */
@media (max-width: 600px) {
	.news-grid .w3-card-4 { height: auto; }
	.news-grid .w3-card-4 > header,
	.news-grid .w3-card-4 > .news-media,
	.news-grid .w3-card-4 > .w3-container,
	.news-grid .w3-card-4 .w3-light-grey { height: auto; flex: none; }
}

/* Ensure abel-theme cards in the grid use the darker gold header instead of site red */
.news-grid .w3-card-4.abel-theme > header.news-header { background-color: #8a5b02 !important; }
.news-grid .w3-card-4.abel-theme > header.news-header h3,
.news-grid .w3-card-4.abel-theme > header.news-header small { color: #fff !important; }
