/*
Theme Name: Teckform
Theme URI: https://github.com/mousaormoses/teckformtheme
Author: Moses Aziz
Author URI: https://github.com/mousaormoses
Description: A lightweight starter theme built for Elementor. Minimal markup and styles so Elementor layouts render edge to edge.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.8
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: teckform
Tags: one-column, custom-logo, custom-menu, featured-images, full-width-template, translation-ready, rtl-language-support, theme-options
*/

/*
 * Colors and fonts. Text, heading and accent colors and both fonts follow Elementor's
 * Global Colors and Global Fonts (Site Settings), so they're set once for the whole site.
 * They're defined on body because Elementor declares its globals there.
 * Dark mode overrides them (Appearance > Customize > Dark Mode).
 */
body {
	--teckform-bg: #fff;
	--teckform-text: var(--e-global-color-text, #1f2937);
	--teckform-heading: var(--e-global-color-primary, #111827);
	--teckform-muted: #6b7280;
	--teckform-surface: #fff;
	--teckform-border: #e5e7eb;
	--teckform-accent: var(--e-global-color-accent, #2563eb);
	--teckform-on-accent: #fff;
	--teckform-font: var(--e-global-typography-text-font-family, system-ui), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--teckform-heading-font: var(--e-global-typography-primary-font-family, system-ui), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Text on accent-colored buttons: the dark accent is light, so its text goes dark. */
html[data-teckform-theme="dark"] body {
	--teckform-on-accent: #0f172a;
}

/* Base */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--teckform-font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--teckform-text);
	background: var(--teckform-bg);
	transition: background-color 0.3s ease, color 0.3s ease;
}

/* :where() keeps these at zero specificity so any widget's own heading styles win. */
:where(h1, h2, h3, h4, h5, h6) {
	color: var(--teckform-heading);
	font-family: var(--teckform-heading-font);
	line-height: 1.25;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--teckform-accent);
}

/* Layout */
.site-container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
}

.site-header,
.site-footer {
	padding: 20px 0;
}

.site-header .site-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.site-title {
	margin: 0;
	font-size: 1.5rem;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-description {
	margin: 0;
	font-size: 0.875rem;
	color: var(--teckform-muted);
}

.main-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation a {
	color: inherit;
	text-decoration: none;
}

.site-main {
	padding: 40px 0;
}

.site-footer {
	font-size: 0.875rem;
	color: var(--teckform-muted);
	border-top: 1px solid var(--teckform-border);
}

.site-footer .site-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* Dark mode toggle (widget and built-in footer) */
.teckform-dark-toggle {
	display: inline-flex;
	align-items: center;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.teckform-dark-toggle svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.teckform-dark-toggle__icon {
	display: none;
	align-items: center;
	justify-content: center;
}

/* The switch shows the current mode; the icon button shows the mode it switches to. */
html:not([data-teckform-theme="dark"]) .teckform-dark-toggle--switch .teckform-dark-toggle__icon--light,
html[data-teckform-theme="dark"] .teckform-dark-toggle--switch .teckform-dark-toggle__icon--dark,
html:not([data-teckform-theme="dark"]) .teckform-dark-toggle--icon .teckform-dark-toggle__icon--dark,
html[data-teckform-theme="dark"] .teckform-dark-toggle--icon .teckform-dark-toggle__icon--light {
	display: inline-flex;
}

.teckform-dark-toggle__track {
	position: relative;
	display: block;
	width: 3.25em;
	height: 1.75em;
	border-radius: 999px;
	background: var(--teckform-toggle-track, #cbd5e1);
	transition: background-color 0.3s ease;
}

.teckform-dark-toggle__thumb {
	position: absolute;
	top: 0.25em;
	inset-inline-start: 0.25em;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.25em;
	height: 1.25em;
	border-radius: 50%;
	background: var(--teckform-toggle-thumb, #fff);
	color: var(--teckform-toggle-icon, #f59e0b);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.3s ease;
}

.teckform-dark-toggle__thumb .teckform-dark-toggle__icon {
	font-size: 0.8em;
}

html[data-teckform-theme="dark"] .teckform-dark-toggle__track {
	background: var(--teckform-toggle-track-dark, #2563eb);
}

html[data-teckform-theme="dark"] .teckform-dark-toggle__thumb {
	color: var(--teckform-toggle-icon-dark, #1e293b);
	transform: translateX(1.5em);
}

html[dir="rtl"][data-teckform-theme="dark"] .teckform-dark-toggle__thumb {
	transform: translateX(-1.5em);
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-meta {
	margin-top: -0.5em;
	color: var(--teckform-muted);
}

.entry-details {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0 0 24px;
	padding: 0;
	color: var(--teckform-muted);
	list-style: none;
}

.entry-image {
	margin: 0 0 32px;
}

.entry-image img {
	display: block;
	width: 100%;
	border-radius: 16px;
}

/* Header & Footer templates (Header & Footer menu in the dashboard) */
.teckform-header {
	position: relative;
	z-index: 999;
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.teckform-header--sticky {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
}

.teckform-header--transparent {
	position: absolute;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
}

.teckform-header--transparent.teckform-header--sticky {
	position: fixed;
}

.teckform-header.is-scrolled {
	background-color: var(--teckform-header-scrolled-bg, transparent);
}

.teckform-header--sticky.teckform-header--shadow.is-scrolled {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.teckform-header--hide-on-scroll {
	transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.teckform-header--hide-on-scroll.is-hidden {
	transform: translateY(-100%);
}

/* On small screens the admin bar scrolls away, so a sticky header sits at the very top. */
@media (max-width: 600px) {
	.admin-bar .teckform-header--sticky {
		top: 0;
	}
}

/* Sticky on some devices only: below the breakpoint the header scrolls away with the page. */
@media (max-width: 1024px) {
	.teckform-header--sticky-desktop {
		position: relative;
		top: auto;
	}

	.teckform-header--sticky-desktop.teckform-header--transparent {
		position: absolute;
		top: var(--wp-admin--admin-bar--height, 0px);
	}
}

@media (max-width: 767px) {
	.teckform-header--sticky-desktop-tablet {
		position: relative;
		top: auto;
	}

	.teckform-header--sticky-desktop-tablet.teckform-header--transparent {
		position: absolute;
		top: var(--wp-admin--admin-bar--height, 0px);
	}
}

/* Back to top */
.teckform-back-to-top {
	position: fixed;
	bottom: calc(24px + var(--teckform-to-top-lift, 0px));
	inset-inline-end: 24px;
	z-index: 998;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #2563eb;
	color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
}

.teckform-back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.teckform-back-to-top svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

/* Let Elementor pages control their own width and spacing */
.elementor-page .site-main {
	padding: 0;
}

.elementor-page .site-main > .site-container {
	max-width: none;
	padding: 0;
}

/* WordPress core classes */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption-text {
	font-size: 0.875rem;
	color: #6b7280;
}
