/*
Theme Name:        TST Framework
Theme URI:         https://tstsignal.com
Description:       A lightweight, performance-first WordPress starter theme built for Elementor. Minimal codebase, zero bloat, optimized for Core Web Vitals. Built for Traffic Signal Technology Factory (TST).
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
Author:            Mohammed Aman Ullah
Author URI:        https://www.linkedin.com/in/amannurweb
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       tst-framework
Tags:              blog, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template, custom-logo, elementor
*/

/* =============================================================================
   TST Framework — Base Styles
   Philosophy: Reset essentials, define nothing Elementor will override.
   ============================================================================= */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #1a1a1a;
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

/* Remove default margins */
h1, h2, h3, h4, h5, h6,
p, ul, ol, figure, blockquote,
dl, dd, fieldset {
	margin: 0;
	padding: 0;
}

/* Lists */
ul, ol {
	list-style: none;
}

/* Media */
img, video, svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Links */
a {
	color: inherit;
	text-decoration: none;
}

/* Buttons & inputs */
button, input, select, textarea {
	font: inherit;
}

/* Tables */
table {
	border-collapse: collapse;
	border-spacing: 0;
	width: 100%;
}

/* =============================================================================
   Layout Wrappers
   ============================================================================= */

.tst-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.tst-main {
	flex: 1;
}

/* Site header / footer — invisible by default; Elementor Theme Builder takes over */
.tst-header,
.tst-footer {
	position: relative;
}

/* =============================================================================
   Elementor Canvas / Full-Width
   ============================================================================= */

/* Full width page — no header/footer (Elementor canvas) */
.elementor-template-canvas .tst-header,
.elementor-template-canvas .tst-footer {
	display: none;
}

/* =============================================================================
   Minimal Content Area (fallback when no Elementor template applied)
   ============================================================================= */

.tst-content-area {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 24px;
}

.tst-entry-title {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 20px;
}

.tst-entry-content {
	max-width: 72ch;
}

.tst-entry-content > * + * {
	margin-top: 1em;
}

.tst-entry-content h2 { font-size: 1.5rem; font-weight: 700; }
.tst-entry-content h3 { font-size: 1.25rem; font-weight: 600; }
.tst-entry-content a  { color: #e8241a; text-decoration: underline; }
.tst-entry-content ul,
.tst-entry-content ol { padding-left: 1.5rem; }
.tst-entry-content ul { list-style: disc; }
.tst-entry-content ol { list-style: decimal; }

/* =============================================================================
   Skip Link (Accessibility)
   ============================================================================= */

.skip-link {
	position: absolute;
	top: -100%;
	left: 6px;
	padding: 8px 16px;
	background: #f5a800;
	color: #000;
	font-weight: 600;
	border-radius: 0 0 4px 4px;
	z-index: 9999;
	transition: top 0.2s;
}

.skip-link:focus {
	top: 0;
}

/* =============================================================================
   404 / Search / Archive — Minimal Fallback
   ============================================================================= */

.tst-not-found,
.tst-search-results,
.tst-archive {
	padding: 64px 24px;
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
}

.tst-not-found .tst-404-code {
	font-size: 6rem;
	font-weight: 800;
	line-height: 1;
	color: #e8241a;
	display: block;
}

/* Post grid */
.tst-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 24px;
}

.tst-post-card {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.tst-post-card:hover {
	box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.tst-post-card-body {
	padding: 20px;
}

.tst-post-card-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 8px;
}

.tst-post-card-excerpt {
	font-size: 0.9rem;
	color: #666;
	line-height: 1.6;
}

/* =============================================================================
   WooCommerce Minimal Reset
   ============================================================================= */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	text-align: left;
}

/* =============================================================================
   Print
   ============================================================================= */

@media print {
	.tst-header,
	.tst-footer {
		display: none;
	}
}
