/*
 * SoftDiscover's styles on top of Vela (options are in skin.json): what Vela's
 * options do not cover, to look like v2 (Kadence).
 */

/* Kadence's global palette and content width: the site's Kadence blocks
   (rows, forms, tabs, buttons) refer to these variables. :root:root wins over
   the default palette Kadence Blocks prints after this file. */
:root:root {
	--global-palette1: #74a402;
	--global-palette2: #f8a300;
	--global-palette3: #232424;
	--global-palette4: #484949;
	--global-palette5: #6f7171;
	--global-palette6: #919292;
	--global-palette7: #f4ebe1;
	--global-palette8: #f8f6f3;
	--global-palette9: #fff;
	--global-palette-btn-bg: var(--global-palette1);
	--global-palette-btn-bg-hover: var(--global-palette2);
	--global-palette-btn: var(--global-palette9);
	--global-palette-btn-hover: var(--global-palette9);
	--global-content-width: 1290px;
	--global-content-edge-padding: 1.5rem;
	--global-font-size-small: clamp(0.8rem, 0.73rem + 0.217vw, 0.9rem);
	--global-font-size-medium: clamp(1.1rem, 0.995rem + 0.326vw, 1.25rem);
	--global-font-size-large: clamp(1.75rem, 1.576rem + 0.543vw, 2rem);
	--global-font-size-larger: clamp(2rem, 1.6rem + 1vw, 2.5rem);
	--global-font-size-xxlarge: clamp(2.25rem, 1.728rem + 1.63vw, 3rem);
	/* WordPress's preset sizes as Kadence sets them (v2). */
	--wp--preset--font-size--small: var(--global-font-size-small);
	--wp--preset--font-size--medium: var(--global-font-size-medium);
	--wp--preset--font-size--large: var(--global-font-size-large);
	--wp--preset--font-size--x-large: 42px;
}

/* Pages are full width, as in v2: their Kadence rows hold the content width. */
.page.no-sidebar .site-content.container {
	max-width: none;
	padding: 0;
}

.page.no-sidebar .entry {
	max-width: none;
}

/* Headings as v2 set them: capitalised, roomier lines. */
h1,
h2,
h3,
h4,
h5,
h6 {
	text-transform: capitalize;
}

h1 {
	line-height: 1.5;
}

/* Phones: v2's heading sizes (Kadence's mobile sizes). */
@media (max-width: 767px) {
	:root h1 {
		font-size: 32px;
	}

	:root h2 {
		font-size: 26px;
	}

	:root h3 {
		font-size: 24px;
	}
}

h2,
h3,
h4 {
	line-height: 1.5;
}

/* h4-h6 sizes as v2 (Vela's options cover h1-h3 only); post grid titles use h6. */
h4 {
	font-size: 24px;
}

h5 {
	font-size: 22px;
}

h6 {
	font-size: 19px;
	line-height: 1.5;
}

@media (max-width: 767px) {
	h4 {
		font-size: 22px;
	}

	h5 {
		font-size: 20px;
	}

	h6 {
		font-size: 17px;
	}
}

/* Archives: no title (v2 shows none); the first post spans both columns with
   its title and excerpt on a dark band over the image. */
.archive .page-header {
	display: none;
}

.archive .entries--grid .entry:first-child {
	position: relative;
	grid-column: 1 / -1;
	overflow: hidden;
	border-radius: 8px;
}

.archive .entries--grid .entry:first-child .entry__thumbnail {
	margin: 0;
}

.archive .entries--grid .entry:first-child .entry__thumbnail img {
	border-radius: 0;
}

.archive .entries--grid .entry:first-child :is(.entry__header, .entry__summary) {
	position: absolute;
	right: 0;
	left: 0;
	padding: 0 20px;
	background: rgba(35, 36, 36, 0.75);
	color: #fff;
}

.archive .entries--grid .entry:first-child .entry__title a {
	color: #fff;
}

.archive .entries--grid .entry:first-child .entry__header {
	bottom: 70px;
	padding-top: 16px;
}

.archive .entries--grid .entry:first-child .entry__summary {
	bottom: 0;
	height: 70px;
	font-size: 0.875rem;
}

/* Post header (template-parts/post-hero.php): v2's image on a green band with
   the title in a white box over its lower left corner. */
.post-hero {
	background: #0a8935;
}

.post-hero__inner {
	position: relative;
	max-width: 1290px;
	margin-inline: auto;
}

.post-hero__image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 635px;
	object-fit: cover;
}

.post-hero__header {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 1095px;
	max-width: 100%;
	padding: 10px 19px 0 20px;
	border-radius: 0 180px 0 0;
	background: #fff;
}

.post-hero__categories {
	display: flex;
	gap: 4px;
}

.post-hero__categories a {
	padding: 4px;
	border-radius: 4px;
	background: var(--global-palette1);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

.post-hero__title {
	margin: 10px 0;
	font-size: 42px;
	line-height: 1.4;
}

.post-hero__meta {
	padding-bottom: 10px;
	color: var(--global-palette5);
	font-size: 14px;
}

.post-hero__meta > * + *::before {
	content: " • ";
}

.single-post .post-hero + .site-content {
	padding-top: 24px;
}

/* Phones: the box below the image instead of over it. */
@media (max-width: 767px) {
	.post-hero__header {
		position: static;
		border-radius: 0;
	}

	.post-hero__title {
		font-size: 32px;
	}
}

/* Share buttons (template-parts/share-links.php): v2's round brand icons. */
.share-links {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 24px;
}

.share-links__item svg {
	width: 16px;
	height: 16px;
}

.share-links__item {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: #fff;
	transition: opacity 0.2s ease-in-out;
}

.share-links__item:hover {
	opacity: 0.75;
	color: #fff;
}

.share-links__item--facebook { background: #3b5998; }
.share-links__item--email { background: #6f7171; }
.share-links__item--whatsapp { background: #25d366; }
.share-links__item--linkedin { background: #0077b5; }
.share-links__item--pinterest { background: #cb2027; }
.share-links__item--reddit { background: #ff4500; }
.share-links__item--x { background: #000; }

/* Code blocks as v2 (Kadence's pre): warm background, padded, Courier. */
.entry__content pre {
	padding: 22.5px;
	overflow: auto;
	background: var(--global-palette7);
	font-family: "Courier 10 Pitch", courier, monospace;
	font-size: 15px;
	line-height: 24px;
}

/* Post navigation and Similar Posts as v2: dark titles, no underline, the
   related posts on a light panel. */
.post-navigation a,
.related-posts a {
	color: var(--global-palette3);
	text-decoration: none;
}

.post-navigation a:hover,
.related-posts a:hover {
	color: var(--global-palette1);
}

.related-posts {
	padding: 24px;
	background: var(--global-palette8);
}

/* v2's home overrides (softdiscover-main/_home.scss): no reading time in the
   hero posts; tab post lists keep the title clear of its date line. */
.home .sd_home_block1 :is(.kt-reading-time, .kt-reading-time-label, .kt-reading-time-postfix) {
	display: none;
}

.home .sd_home_block1 .kadence-post-image img {
	object-fit: fill;
}

.sc_tab_content .kt-blocks-post-grid-item-inner {
	padding-left: 0 !important;
}

.sc_tab_content header .entry-title {
	display: inline-block;
	padding-left: 25px;
}

.sc_tab_content header .kt-blocks-post-top-meta .kt-reading-time {
	display: none;
}

/* v2's page frame: 24px gutters; the light page background shows only around
   the 404 panel (v2's posts, pages and archives sit on white). */
.container {
	padding-inline: 24px;
}

body:not(.page) {
	background: var(--global-palette8);
}

.site {
	background: #fff;
}

.error404 .site {
	background: transparent;
}

/* Header as v2: main menu 15px with 1px tracking, its links padded instead of
   spaced (skin.json: menu_gap 0), the active one underlined under its text. */
.site-header__row .primary-navigation {
	font-size: 15px;
	letter-spacing: 1px;
}

.site-header__row .primary-navigation .menu > li > a {
	padding: 1.5px 22.5px;
	line-height: 24px;
}

.menu-active-color-underline .site-header__row .primary-navigation .current-menu-item > a {
	background: linear-gradient(currentcolor, currentcolor) center bottom / calc(100% - 45px) 2px no-repeat;
	text-decoration: none;
}

.site-header__row .primary-navigation.secondary-navigation .menu > li > a {
	padding: 9.6px 12px;
	line-height: inherit;
}

/* The menu row: v2's menu (1217px) fits only without the empty zones' gaps,
   and sits 11.5px right of centre. */
.site-header__row--bottom .site-header__row-inner {
	column-gap: 0;
}

.site-header__row--bottom .primary-navigation {
	transform: translateX(11.5px);
}

/* v2's header lines: the dark one on top of the menu row, a light one under
   it (not Vela's border); the logo at v2's 200px; the right zone stops 20px
   short. */
.site-header {
	border-bottom: 0;
}

.site-header__row--main {
	box-shadow: none;
}

.site-header__row--bottom {
	box-shadow: inset 0 1px #353535, inset 0 -1px #ccc;
}

.site-header .custom-logo {
	width: 200px;
	max-height: none;
}

.site-header__row--main .site-header__zone--right {
	padding-inline-end: 20px;
}

/* v2's spacing in the right zone: the search icon close to the menu, 30px
   before the button. */
.site-header__row--main .header-search {
	margin-inline-end: -10px;
}

.site-header__row--main .header-button {
	margin-inline-start: 14px;
}

/* v2's magnifier (Kadence's search icon, 16px) instead of Vela's drawn one.
   Two classes: Vela's search part loads after this file with one. */
.header-search .header-search__toggle::before {
	width: 16px;
	height: 16px;
	border: 0;
	border-radius: 0;
	background: currentcolor;
	box-shadow: none;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 28'%3E%3Cpath d='M18 13c0-3.859-3.141-7-7-7s-7 3.141-7 7 3.141 7 7 7 7-3.141 7-7zM26 26c0 1.094-0.906 2-2 2-0.531 0-1.047-0.219-1.406-0.594l-5.359-5.344c-1.828 1.266-4.016 1.937-6.234 1.937-6.078 0-11-4.922-11-11s4.922-11 11-11 11 4.922 11 11c0 2.219-0.672 4.406-1.937 6.234l5.359 5.359c0.359 0.359 0.578 0.875 0.578 1.406z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* v2's search: the icon opens a full-screen green layer with one large
   field in the middle (functions.php's script focuses it and closes it on Escape); the
   icon itself becomes the close button in the top right corner. */
.site-header:has(.header-search[open]) {
	z-index: 1000;
}

html:has(.header-search[open]) {
	overflow: hidden;
}

.header-search[open] .header-search__form {
	display: grid;
	position: fixed;
	z-index: 1000;
	inset: 0;
	width: auto;
	padding: 34px;
	border-radius: 0;
	background: #74a402;
	box-shadow: none;
	place-items: center;
	animation: sd-search-in 0.2s ease-in-out;
}

@keyframes sd-search-in {
	from { opacity: 0; }
}

.header-search[open] .search-form {
	display: flex;
	position: relative;
	width: min(800px, 100%);
}

.header-search[open] .search-form__field {
	flex: 1;
	min-height: 66px;
	padding: 16px 80px 16px 16px;
	border: 1px solid #fff;
	border-radius: 3px;
	background: transparent;
	box-shadow: 5px 5px 0 #fff;
	color: #fff;
	font-size: 20px;
	line-height: 32px;
}

.header-search[open] .search-form__field::placeholder {
	color: #fff;
	opacity: 0.5;
}

.header-search[open] .search-form__field:focus {
	outline: 0;
}

.header-search[open] .search-form__submit {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 70px;
	padding: 0;
	border: 0;
	background: #fff;
	color: transparent;
	font-size: 0;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 28'%3E%3Cpath d='M18 13c0-3.859-3.141-7-7-7s-7 3.141-7 7 3.141 7 7 7 7-3.141 7-7zM26 26c0 1.094-0.906 2-2 2-0.531 0-1.047-0.219-1.406-0.594l-5.359-5.344c-1.828 1.266-4.016 1.937-6.234 1.937-6.078 0-11-4.922-11-11s4.922-11 11-11 11 4.922 11 11c0 2.219-0.672 4.406-1.937 6.234l5.359 5.359c0.359 0.359 0.578 0.875 0.578 1.406z'/%3E%3C/svg%3E") center / 17px no-repeat;
}

.header-search[open] .header-search__toggle {
	position: fixed;
	z-index: 1001;
	top: 0;
	right: 26px;
	width: 31px;
	height: 53px;
	border-radius: 0;
	color: #fff;
}

.header-search[open] .header-search__toggle::before {
	width: 24px;
	height: 24px;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.3 6.7 10.6 12l-5.3 5.3a1 1 0 0 0 1.4 1.4l5.3-5.3 5.3 5.3a1 1 0 0 0 1.4-1.4L13.4 12l5.3-5.3a1 1 0 0 0-1.4-1.4L12 10.6 6.7 5.3a1 1 0 0 0-1.4 1.4z'/%3E%3C/svg%3E");
}

/* The Products caret: small and close to its label, as v2's. */
.site-header__row .primary-navigation.secondary-navigation .menu > li.menu-item-has-children > a {
	padding-inline-end: 28px;
}

.site-header__row .secondary-navigation .submenu-toggle {
	margin-inline-start: -22px;
	padding: 0 16px 0 0;
}

.site-header__row .secondary-navigation .submenu-toggle__icon {
	width: 6px;
	height: 6px;
	border-width: 0 1.5px 1.5px 0;
}

.site-header .header-button {
	padding: 8px 20px;
	font-size: 16px;
	line-height: 22.4px;
}

/* Footer as v2: an empty 80px row above the menu row (30px above the menu,
   60px below), 15px menu links padded instead of spaced, the current page
   green, a 17px copyright. */
.site-footer__row--middle .site-footer__row-inner {
	padding-block: 110px 60px;
}

.site-footer .menu {
	row-gap: 0;
	margin: 0;
	font-size: 15px;
	text-align: center;
}

.site-footer .menu a {
	display: block;
	padding: 4.5px 22.5px;
	line-height: 15px;
}

.site-footer .menu .current-menu-item > a {
	color: var(--vela-footer-menu-hover-color);
}

.site-info {
	font-size: 17px;
	line-height: 27.2px;
}

/* Categories and search (category.php, search.php,
   template-parts/archive-cards.php), ported from v2's _category.scss and
   _search.scss: a hero for the first post, cards for the rest. */
/* v2: an 80px margin around both; categories also pad 40px above, 60px below. */
.category .site-content {
	padding-block: 120px 140px;
}

.search .site-content {
	padding-block: 80px;
}

.error404 .site-content {
	padding-block: 80px;
}

/* Phones: v2's margin there is 32px. */
@media (max-width: 767px) {
	.category .site-content {
		padding-block: 72px 92px;
	}

	.search .site-content,
	.error404 .site-content {
		padding-block: 32px;
	}
}

.sd-archive,
.sd-search-header {
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 20px;
}

.sd-search-header {
	text-align: center;
}

.sd-search-header .sd-search-header__title {
	margin: 0 0 10px;
	padding: 10px 20px;
	background: #000;
	color: #fff;
	font-size: 2.2rem;
}

.sd-archive__featured {
	margin-bottom: 50px;
}

.sd-archive__featured-link {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
}

.sd-archive__featured-image {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.3s ease;
}

.sd-archive__featured-link:hover .sd-archive__featured-image {
	transform: scale(1.05);
}

.sd-archive__featured-content {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 20px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
}

.sd-archive__featured-title {
	margin: 0 0 10px;
	color: #fff;
	font-size: 1.8rem;
}

.sd-archive__featured-excerpt {
	margin: 0;
	font-size: 1rem;
}

.sd-archive__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 25px;
}

.sd-archive__card {
	overflow: hidden;
	border: 1px solid #eee;
	border-radius: 8px;
	background: #fff;
	transition: box-shadow 0.3s ease;
}

.sd-archive__card:hover {
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sd-archive__card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.sd-archive__card-image img {
	display: block;
	width: 100%;
	height: auto;
}

.sd-archive__card-content {
	padding: 15px;
}

.sd-archive__card-title {
	margin: 0 0 10px;
	color: #333;
	font-size: 1.2rem;
	font-weight: 600;
}

.sd-archive__card-excerpt {
	margin: 0;
	color: #555;
	font-size: 0.95rem;
}

.sd-archive__pagination {
	margin-top: 40px;
	text-align: center;
}

.sd-archive__pagination .pagination {
	max-width: none;
	margin: 0;
}

.sd-archive__pagination .nav-links {
	display: block;
}

.sd-archive__pagination .page-numbers {
	display: inline-block;
	margin: 0 5px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #333;
	text-decoration: none;
	transition: background 0.3s ease;
}

.sd-archive__pagination .page-numbers.current,
.sd-archive__pagination .page-numbers:hover {
	border-color: #000;
	background: #000;
	color: #fff;
}

.sd-archive__none {
	color: #999;
	font-size: 1.2rem;
	text-align: center;
}

/* Page not found (404.php) as v2: a white panel, the search icon inside the
   field. */

.sd-404 {
	padding: 32px;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 15px 25px -10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 767px) {
	.sd-404 {
		margin-inline: -16px;
		padding: 24px;
	}
}

.sd-404__title {
	margin: 0 0 42.5px;
}

.sd-404__search {
	position: relative;
}

.sd-404 .sd-404__field {
	width: 100%;
	max-width: none;
	padding: 6.8px 60px 6.8px 8.5px;
	border: 1px solid #cbd5e0;
	border-radius: 3px;
	color: var(--global-palette5);
}

.sd-404__submit {
	opacity: 0.6;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 50px;
	padding: 0;
	background: transparent;
	color: var(--global-palette5);
}

/* Sponsorships (sfdc-core): label, mention box, submit form, PayPal button. */
.sfdc-sponsored-label,
.sfdc-sponsored-mention {
	padding: 12px 16px;
	border-left: 4px solid #74a402;
	background: #f4f8ec;
	font-size: 15px;
}

.sfdc-sponsored-mention__label {
	display: inline-block;
	margin-bottom: 4px;
	color: #4a6a00;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sfdc-submit label {
	display: block;
	font-weight: 500;
}

.sfdc-submit input:not([type="hidden"]),
.sfdc-submit select,
.sfdc-submit textarea {
	width: 100%;
	max-width: 560px;
	margin-top: 4px;
}

.sfdc-submit__hp {
	position: absolute;
	left: -9999px;
}

.sfdc-submit__notice,
.sfdc-submit__error {
	padding: 12px 16px;
	background: #f4f8ec;
}

.sfdc-submit__error {
	background: #fdecea;
}

.sfdc-paypal {
	margin: 0 0 12px;
}

/* Method, disclosure and updated date on posts with product links (sfdc-core MethodBox). */
.sfdc-method-box {
	margin: 0 0 24px;
	padding: 12px 16px;
	border-left: 4px solid #74a402;
	background: #f7f7f7;
	font-size: 15px;
}

.sfdc-method-box p {
	margin: 0 0 6px;
}

.sfdc-method-box p:last-child {
	margin-bottom: 0;
}

.sfdc-method-box__updated {
	color: #555;
	font-size: 13px;
}

/* Product entries and summary table (sfdc-core list-entry blocks). */
.sfdc-entry {
	margin: 0 0 40px;
	padding-top: 16px;
	border-top: 1px solid #e5e5e5;
}

.sfdc-entry__labels {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
}

.sfdc-entry__rank,
.sfdc-entry__label,
.sfdc-entry__badge {
	padding: 2px 8px;
	border-radius: 3px;
}

.sfdc-entry__rank {
	background: #74a402;
	color: #fff;
}

.sfdc-entry__label {
	background: #333;
	color: #fff;
}

.sfdc-entry__badge {
	background: #eef5dd;
	color: #3d5a00;
}

.sfdc-entry.is-ours {
	padding: 16px;
	border: 1px dashed #999;
}

.sfdc-entry__meta {
	color: #555;
	font-size: 14px;
}

.sfdc-entry__proscons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin: 0 0 16px;
}

.sfdc-entry__pc-title {
	margin: 0 0 4px;
	font-weight: 600;
}

.sfdc-entry__proscons ul {
	margin: 0;
	padding-left: 20px;
}

.sfdc-entry-table {
	margin: 0 0 32px;
	overflow-x: auto;
}

.sfdc-entry-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.sfdc-entry-table th,
.sfdc-entry-table td {
	padding: 6px 8px;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
}

.sfdc-entry-table__group th {
	background: #f7f7f7;
}
