/*
 * Tech Assistant Pro — final theme visibility fixes.
 * Loaded after components.css and before WooCommerce CSS.
 * Theme state is controlled by html[data-tech-theme].
 */

/* =========================================================
   LIGHT THEME
   ========================================================= */

html[data-tech-theme="light"] {
	--bg-main: #f1f5f9;
	--bg-card: #ffffff;
	--bg-card-hover: #e2e8f0;
	--text-main: #0f172a;
	--text-muted: #475569;
	--border-color: rgba(15, 23, 42, 0.12);
	color-scheme: light;
}

html[data-tech-theme="dark"] {
	color-scheme: dark;
}

html[data-tech-theme="light"] body {
	background-color: var(--bg-main);
	color: var(--text-main);
}

html[data-tech-theme="light"] .site-header {
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

html[data-tech-theme="light"] .site-title a {
	background: linear-gradient(135deg, #0f172a 40%, #0891b2 100%);
}

/* ---------------------------------------------------------
   Page / section headings
   --------------------------------------------------------- */

html[data-tech-theme="light"] .section-title,
html[data-tech-theme="light"] .entry-title,
html[data-tech-theme="light"] .page-title,
html[data-tech-theme="light"] .archive-title,
html[data-tech-theme="light"] .archive-header h1,
html[data-tech-theme="light"] .entry-header h1,
html[data-tech-theme="light"] .entry-content h1,
html[data-tech-theme="light"] .entry-content h2,
html[data-tech-theme="light"] .entry-content h3,
html[data-tech-theme="light"] .entry-content h4,
html[data-tech-theme="light"] .entry-content h5,
html[data-tech-theme="light"] .entry-content h6 {
	color: #0f172a;
	background: none;
	-webkit-text-fill-color: #0f172a;
	text-shadow: none;
}

/* ---------------------------------------------------------
   Service cards
   --------------------------------------------------------- */

html[data-tech-theme="light"] .service-title,
html[data-tech-theme="light"] .service-back-title {
	color: #0f172a;
	background: transparent;
	-webkit-text-fill-color: #0f172a;
	text-shadow: none;
}

html[data-tech-theme="light"] .service-description,
html[data-tech-theme="light"] .flip-hint {
	color: #475569;
	-webkit-text-fill-color: #475569;
}

html[data-tech-theme="light"] .flip-card-front,
html[data-tech-theme="light"] .flip-card-back {
	color: #0f172a;
}

/* ---------------------------------------------------------
   General content
   --------------------------------------------------------- */

html[data-tech-theme="light"] .entry-content,
html[data-tech-theme="light"] .entry-summary,
html[data-tech-theme="light"] .archive-description {
	color: #475569;
}

html[data-tech-theme="light"] .entry-content p,
html[data-tech-theme="light"] .entry-content li,
html[data-tech-theme="light"] .entry-summary p {
	color: #475569;
}

html[data-tech-theme="light"] .entry-content a,
html[data-tech-theme="light"] .entry-summary a {
	color: #0891b2;
}

/* ---------------------------------------------------------
   Contact card
   --------------------------------------------------------- */

html[data-tech-theme="light"] .contact-card {
	color: #0f172a;
}

html[data-tech-theme="light"] .contact-card h1,
html[data-tech-theme="light"] .contact-card h2,
html[data-tech-theme="light"] .contact-card h3 {
	color: #0f172a;
	-webkit-text-fill-color: #0f172a;
}

html[data-tech-theme="light"] .contact-card p {
	color: #475569;
	-webkit-text-fill-color: #475569;
}

html[data-tech-theme="light"] .contact-card .contact-eyebrow,
html[data-tech-theme="light"] .contact-card .contact-phone {
	color: #0891b2;
	-webkit-text-fill-color: #0891b2;
}

/* =========================================================
   WORDPRESS PAGE HEADERS
   ========================================================= */

.entry-header,
.archive-header,
.page-content .entry-header {
	display: block;
	visibility: visible;
	opacity: 1;
}

/* =========================================================
   MOBILE HEADER / MENU SAFETY
   ========================================================= */

@media (max-width: 700px) {

	.site-header-actions {
		min-width: 0;
		max-width: 100%;
	}

	.main-navigation {
		position: relative;
		min-width: 0;
		max-width: none;
		flex: 0 0 auto;
		width: auto;
	}

	.menu-toggle {
		display: inline-flex;
		width: auto;
		min-width: 0;
		max-width: none;
	}

	.header-social-icons {
		flex: 0 0 auto;
		min-width: 0;
		max-width: 100%;
	}

	/*
	 * header.php uses:
	 * container => false
	 *
	 * Therefore #primary-menu is a direct child of
	 * .main-navigation.
	 */
	.main-navigation > #primary-menu {
		display: none;
		position: absolute;
		top: calc(100% + 10px);
		left: 0;
		z-index: 1000;
	}

	.main-navigation > #primary-menu.is-open {
		display: flex;
	}
}

/* =========================================================
   MOBILE BACKGROUND PERFORMANCE
   ========================================================= */

@media (max-width: 700px) and (pointer: coarse) {

	body {
		background-attachment: scroll;
	}
}

/* =========================================================
   THEME SWITCH — NO PAGE FLASH
   ========================================================= */

/*
 * Theme colors are applied immediately through
 * html[data-tech-theme].
 *
 * We intentionally do not disable all CSS transitions globally.
 * Interactive controls and cards can keep their normal animations.
 */

html[data-tech-theme] body {
	transition: background-color 0s, color 0s;
}