/*
 * Maddos Modern UI
 * Loaded after the legacy stylesheet so existing theme options can still
 * override colors and typography through inline CSS.
 */

:root {
	--maddos-primary: #17324d;
	--maddos-primary-strong: #0f2438;
	--maddos-accent: #2bb3a3;
	--maddos-bg: #f4f7fb;
	--maddos-surface: #ffffff;
	--maddos-surface-soft: #f8fafc;
	--maddos-text: #172033;
	--maddos-muted: #64748b;
	--maddos-border: #dde5ee;
	--maddos-radius: 16px;
	--maddos-radius-small: 10px;
	--maddos-shadow: 0 12px 34px rgba(15, 35, 55, .09);
	--maddos-shadow-hover: 0 18px 42px rgba(15, 35, 55, .14);
}

html {
	scroll-behavior: smooth;
}

body {
	min-height: 100vh;
	background: var(--maddos-bg);
	background-image: none;
	color: var(--maddos-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.65;
	overflow-wrap: break-word;
}

body.admin-bar .maddos-site-header {
	top: 32px;
}

a,
a:visited {
	color: #176b87;
	text-decoration-thickness: .08em;
	text-underline-offset: .16em;
}

a:hover,
a:focus {
	color: #0c5069;
}

:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--maddos-accent) 70%, white);
	outline-offset: 3px;
}

img {
	max-width: 100%;
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
}

.maddos-infobar {
	margin: 0;
	padding: 8px 0;
	border: 0;
	background: var(--maddos-primary-strong);
	color: #eaf4fa;
	font-size: 14px;
	line-height: 1.5;
}

.maddos-infobar a,
.maddos-infobar a:visited {
	color: #fff;
}

.maddos-site-header {
	position: relative;
	z-index: 50;
	padding: 20px 0 18px;
}

.maddos-header-container {
	position: relative;
}

.maddos-header,
.maddos-footer,
.maddos-category-container,
.maddos-link-container,
.maddos-page-content,
.maddos-widget,
.maddos-grid-container {
	border: 1px solid var(--maddos-border);
	border-radius: var(--maddos-radius);
	background: var(--maddos-surface);
	box-shadow: var(--maddos-shadow);
}

.maddos-header {
	overflow: visible;
}

.maddos-menu {
	position: relative;
	margin: 0;
	padding: 0 10px;
	border-radius: calc(var(--maddos-radius) - 1px) calc(var(--maddos-radius) - 1px) 0 0;
	background: var(--maddos-primary);
}

.maddos-menu .navbar-collapse {
	padding: 0;
}

.nav,
.nav > li > a,
.nav > li > a:hover,
.nav > li > a:focus,
.nav > .active > a,
.nav > .active > a:hover,
.nav > .active > a:focus,
.nav > .open > a,
.nav > .open > a:hover,
.nav > .open > a:focus,
.dropdown-menu,
.dropdown-menu > li > a,
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
	border: 0;
	background: transparent;
	color: #f6fbff;
	font-size: 15px;
}

.nav > li > a {
	padding: 14px 15px;
	border-radius: 9px;
	font-weight: 650;
	line-height: 1.35;
	transition: background-color .18s ease, color .18s ease;
}

.nav > li > a:hover,
.nav > li > a:focus,
.nav > .active > a,
.nav > .open > a {
	background: rgba(255, 255, 255, .12);
	color: #fff;
}

.dropdown-menu {
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 12px;
	background: var(--maddos-primary-strong);
	box-shadow: 0 16px 32px rgba(0, 0, 0, .22);
}

.dropdown-menu > li > a {
	padding: 10px 12px;
	border-radius: 8px;
	white-space: nowrap;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
	background: rgba(255, 255, 255, .12);
}

.navbar-toggle {
	margin-left: auto;
}

.icon-bar {
	background: #fff;
}

.maddos-brand-row {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 120px;
	padding: 26px 30px;
}

.maddos-brand {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.maddos-header-image {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
}

.maddos-header-image img {
	width: 100%;
	max-height: 260px;
	object-fit: cover;
}

.maddos-header-content {
	padding: 0;
	background: transparent;
}

.maddos-header-overlay {
	position: absolute;
	inset: auto auto 18px 18px;
	max-width: min(720px, calc(100% - 36px));
	padding: 14px 18px;
	border: 1px solid rgba(255,255,255,.28);
	border-radius: 12px;
	background: rgba(255,255,255,.88);
	backdrop-filter: blur(8px);
}

#maddos-site-title,
#maddos-site-title a {
	margin: 0;
	color: var(--maddos-primary-strong);
	font-family: inherit;
	font-size: clamp(30px, 5vw, 52px);
	font-weight: 800;
	letter-spacing: -.035em;
	line-height: 1.03;
	text-decoration: none;
}

#maddos-site-desc {
	margin: 8px 0 0;
	color: var(--maddos-muted);
	font-size: clamp(15px, 2vw, 19px);
	line-height: 1.45;
}

.maddos-custom-logo img {
	max-height: 74px;
	width: auto;
	margin-bottom: 12px;
}

.maddos-search {
	display: block;
	position: static;
	flex: 0 1 330px;
}

.searchform {
	display: flex;
	align-items: center;
	width: 100%;
	border: 1px solid var(--maddos-border);
	border-radius: 999px;
	background: var(--maddos-surface-soft);
	box-shadow: inset 0 1px 2px rgba(15, 35, 55, .04);
	overflow: hidden;
}

.maddos-search input[type="text"],
.maddos-search input[type="search"],
.searchform input[type="search"],
.widget_search input {
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 11px 8px 11px 16px;
	border: 0;
	outline: 0;
	background: transparent;
	background-image: none;
	color: var(--maddos-text);
	font-size: 15px;
}

.searchform button {
	align-self: stretch;
	min-width: 48px;
	border: 0;
	background: transparent;
	color: var(--maddos-primary);
	font-size: 23px;
	cursor: pointer;
}

.searchform:focus-within {
	border-color: var(--maddos-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--maddos-accent) 18%, transparent);
}

.maddos-headline {
	margin: 0;
	padding: 12px 24px;
	border: 0;
	border-top: 1px solid var(--maddos-border);
	background: var(--maddos-surface-soft);
	color: var(--maddos-muted);
	font-size: 14px;
	text-align: center;
}

.maddos-header-widgets {
	padding: 0 24px 24px;
}

.maddos-page,
.maddos-directory-container,
.maddos-archive-grid,
.maddos-archive-list,
body > .container {
	margin-top: 14px;
	margin-bottom: 14px;
}

body.home .maddos-directory-container,
body.front-page .maddos-directory-container {
	margin-top: 26px;
}

.maddos-directory > .row,
.maddos-archive-grid > .row {
	align-items: stretch;
}

.maddos-column {
	display: flex;
	flex-direction: column;
}

.maddos-category-container,
.maddos-link-container,
.maddos-widget {
	position: relative;
	margin: 12px 0;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.maddos-category-container:hover,
.maddos-widget:hover {
	transform: translateY(-2px);
	border-color: #cbd8e4;
	box-shadow: var(--maddos-shadow-hover);
}

.maddos-category-header,
.maddos-link-header,
.maddos-widget-title,
.maddos-category-header a,
.maddos-link-header a,
.maddos-widget-title a {
	background: var(--maddos-primary);
	color: #fff;
	font-family: inherit;
	line-height: 1.3;
}

.maddos-category-header,
.maddos-link-header {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 54px;
	padding: 12px 16px;
	border: 0;
	border-bottom: 3px solid var(--maddos-accent);
	text-align: left;
}

.maddos-category-header-title,
.maddos-post-header,
.maddos-archive,
.maddos-search-results {
	margin: 0;
	padding: 0;
	color: #fff;
	font-size: 18px;
	font-weight: 750;
	letter-spacing: -.015em;
	line-height: 1.3;
	text-transform: none;
}

.maddos-post-header {
	flex: 1 1 auto;
}

.maddos-post-header a,
.maddos-post-header a:visited {
	color: #fff;
	text-decoration: none;
}

.maddos-category-icon,
.maddos-title-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 0;
	font-size: 20px;
}

.maddos-category-icon img,
.maddos-title-icon img {
	width: 24px;
	height: 24px;
	margin: 0;
	object-fit: contain;
}

.maddos-category-wrapper {
	position: relative;
	background: var(--maddos-surface);
	color: var(--maddos-muted);
	scrollbar-width: thin;
	scrollbar-color: #c5d1dd transparent;
}

.maddos-category-wrapper ol,
.maddos-category-wrapper ul,
.maddos-widget ul {
	margin: 0;
	padding: 8px 14px 12px 42px;
}

.maddos-category-wrapper ol li,
.maddos-widget li {
	position: relative;
	margin: 0;
	padding: 8px 34px 8px 3px;
	border-bottom: 1px solid #edf1f5;
	line-height: 1.42;
}

.maddos-category-wrapper ol li:last-child,
.maddos-widget li:last-child {
	border-bottom: 0;
}

.maddos-category-wrapper ol li::marker {
	color: #9aabba;
	font-size: .85em;
	font-variant-numeric: tabular-nums;
}

.maddos-category-wrapper ol li:hover {
	background: #f6fafc;
}

.maddos-category-wrapper a,
.maddos-widget a {
	font-weight: 570;
	text-decoration: none;
}

.maddos-category-wrapper a:hover,
.maddos-widget a:hover {
	text-decoration: underline;
}

.maddos-taxonomy-description {
	padding: 13px 16px;
	border-bottom: 1px solid var(--maddos-border);
	background: var(--maddos-surface-soft);
	color: var(--maddos-muted);
	font-size: 14px;
}

.maddos-review {
	display: none;
	position: absolute;
	top: 50%;
	right: 8px;
	align-items: center;
	transform: translateY(-50%);
}

.maddos-category-wrapper li.is-active .maddos-review,
.maddos-category-wrapper li:focus-within .maddos-review {
	display: inline-flex;
}

.maddos-image-hover {
	display: none !important;
	position: absolute;
	z-index: 20;
	top: calc(100% + 6px);
	left: 20px;
	width: 240px;
	max-width: min(70vw, 240px);
	height: auto;
	border: 6px solid #fff;
	border-radius: 12px;
	box-shadow: 0 18px 42px rgba(15, 35, 55, .25);
}

.maddos-category-wrapper li.is-active .maddos-image-hover {
	display: block !important;
}

.maddos-site-review-icon,
.maddos-mobile-friendly-icon,
.maddos-new-icon,
.maddos-sticky-icon {
	vertical-align: -.12em;
	opacity: .82;
}

.maddos-open-close-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	margin-left: auto;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: rgba(255,255,255,.12);
	color: #fff;
	cursor: pointer;
	transform: none;
	transition: background-color .18s ease, transform .18s ease;
}

.maddos-open-close-button:hover {
	background: rgba(255,255,255,.22);
}

.maddos-open-close-button::before,
.maddos-open-close-button::after {
	width: 13px;
	height: 2px;
	left: 10px;
	top: 16px;
	border-radius: 2px;
	background: #fff;
}

.maddos-open-close-button::after {
	transform: rotate(90deg);
}

.maddos-open-close-button.open {
	transform: rotate(45deg);
}

.maddos-link-content,
.maddos-page-content {
	padding: clamp(20px, 4vw, 38px);
	color: var(--maddos-text);
}

.maddos-link-content > :first-child,
.maddos-page-content > :first-child {
	margin-top: 0;
}

.maddos-link-content > :last-child,
.maddos-page-content > :last-child {
	margin-bottom: 0;
}

.maddos-link-header-back {
	flex: 0 0 auto;
	float: none;
	margin-left: auto;
	padding: 0;
	font-size: 13px;
	text-transform: none;
}

.maddos-link-header-back a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	border-radius: 8px;
	color: #fff;
	text-decoration: none;
}

.maddos-link-header-back a:hover {
	background: rgba(255,255,255,.12);
	text-decoration: none;
}

.maddos-post-title,
.maddos-post-title a {
	margin: 0;
	color: var(--maddos-text);
	font-family: inherit;
	font-size: clamp(24px, 4vw, 40px);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.12;
}

.maddos-post-grid-entry {
	display: flex;
	flex-direction: column;
	margin-bottom: 24px;
}

.maddos-post-grid-header {
	min-height: 58px;
	padding: 0 4px 10px;
	text-align: left;
}

.maddos-post-grid-header h2 a {
	display: block;
	overflow: visible;
	font-size: 18px;
	white-space: normal;
}

.maddos-grid-container {
	display: flex;
	flex: 1;
	flex-direction: column;
	margin: 0;
	overflow: hidden;
}

.maddos-grid-thumbnail {
	aspect-ratio: 16 / 10;
	width: 100%;
	object-fit: cover;
}

.maddos-grid-container p {
	height: auto;
	margin: 0;
	padding: 16px;
	color: var(--maddos-muted);
	font-size: 14px;
	line-height: 1.55;
	text-align: left;
}

.maddos-single-left .maddos-link-thumbnail img,
.maddos-url-link-image img {
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(15, 35, 55, .12);
}

.maddos-single-left .maddos-post-linktext {
	padding: 12px 16px;
	border: 0;
	border-radius: 10px;
	background: var(--maddos-primary);
	color: #fff;
	font-size: 18px;
	font-weight: 750;
	text-align: center;
	text-transform: none;
}

.maddos-single-left .maddos-post-linktext:hover {
	background: var(--maddos-primary-strong);
	color: #fff;
}

.maddos-tags .btn-default {
	border-color: var(--maddos-border);
	background: var(--maddos-surface-soft);
	color: var(--maddos-primary);
}

.maddos-tags .btn-default:hover {
	border-color: var(--maddos-primary);
	background: var(--maddos-primary);
	color: #fff;
}

.maddos-comments-container {
	padding: 0 clamp(20px, 4vw, 38px) 32px;
}

.maddos-comments {
	border-color: var(--maddos-border);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="number"],
textarea,
select {
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--maddos-border);
	border-radius: 9px;
	background: #fff;
	color: var(--maddos-text);
}

textarea {
	width: 100%;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
	padding: 10px 16px;
	border: 0;
	border-radius: 9px;
	background: var(--maddos-primary);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.maddos-nav {
	margin: 16px auto;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--maddos-primary);
}

.maddos-widget-title {
	min-height: 0;
	margin: 0;
	padding: 13px 16px;
	border: 0;
	border-bottom: 3px solid var(--maddos-accent);
	font-size: 17px;
	font-weight: 750;
	text-align: left;
}

.textwidget,
.tagcloud {
	padding: 16px;
}

.maddos-legend {
	align-items: center;
	margin: 14px 0 26px;
	padding: 10px 12px;
	border: 1px solid var(--maddos-border);
	border-radius: 10px;
	background: rgba(255,255,255,.65);
	color: var(--maddos-muted);
	font-size: 13px;
}

.maddos-site-footer {
	margin: 28px 0 0;
}

.maddos-footer {
	overflow: hidden;
}

.maddos-footer-widgets {
	padding: 18px 22px 8px;
}

.maddos-site-footer .maddos-menu {
	border-radius: 0 0 calc(var(--maddos-radius) - 1px) calc(var(--maddos-radius) - 1px);
}

.maddos-site-footer .nav {
	justify-content: center;
}

.maddos-copyright {
	margin: 18px 0 0;
	padding: 14px 0;
	border: 0;
	border-top: 3px solid var(--maddos-accent);
	background: var(--maddos-primary-strong);
	color: #b8c7d4;
	font-size: 14px;
}

.alignwide {
	width: min(120%, 1320px);
	max-width: 100vw;
	margin-left: 50%;
	transform: translateX(-50%);
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: 50%;
	transform: translateX(-50%);
}

@media (max-width: 991px) {
	.maddos-image-hover {
		display: none !important;
	}

	.maddos-review {
		display: inline-flex !important;
	}

	.maddos-brand-row {
		align-items: flex-start;
		flex-direction: column;
	}

	.maddos-search {
		width: 100%;
		flex-basis: auto;
	}

	.maddos-single-left {
		margin-bottom: 24px;
		padding-bottom: 24px;
		border-bottom: 1px solid var(--maddos-border);
	}
}

@media (max-width: 767px) {
	body.admin-bar .maddos-site-header {
		top: 46px;
	}

	.maddos-site-header {
		padding-top: 10px;
	}

	.maddos-menu {
		min-height: 54px;
		padding: 5px 8px;
	}

	.navbar-collapse {
		padding-bottom: 8px !important;
	}

	.nav {
		gap: 3px;
	}

	.nav > li > a {
		padding: 11px 12px;
	}

	.dropdown-menu {
		margin: 3px 0 4px 12px;
		border-color: rgba(255,255,255,.1);
		box-shadow: none;
	}

	.dropdown-menu > li > a {
		white-space: normal;
	}

	.maddos-brand-row {
		min-height: 0;
		padding: 22px;
	}

	.maddos-header-overlay {
		position: relative;
		inset: auto;
		max-width: none;
		margin-top: 12px;
		background: var(--maddos-surface-soft);
	}

	#maddos-site-title,
	#maddos-site-title a {
		font-size: clamp(28px, 10vw, 42px);
	}

	.maddos-search {
		display: block;
	}

	.maddos-category-header,
	.maddos-link-header {
		flex-wrap: wrap;
		padding: 12px 14px;
	}

	.maddos-link-header-back {
		width: 100%;
		margin: 2px 0 0;
	}

	.maddos-category-container,
	.maddos-link-container,
	.maddos-widget {
		border-radius: 13px;
	}

	.maddos-category-wrapper ol {
		padding-left: 38px;
	}

	.maddos-legend > div {
		width: 100%;
		margin-top: 5px;
	}

	.maddos-site-footer .nav {
		align-items: stretch;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}
