/**
 * Techcentera theme — base styles.
 * Mobile-first, CSS custom properties, no framework. The primary colour and
 * container width are overridden at runtime by the dynamic CSS generator.
 */

:root {
	--tc-primary: #2b59ff;
	--tc-ink: #12141d;
	--tc-muted: #5c6272;
	--tc-line: #e7e9f0;
	--tc-bg: #ffffff;
	--tc-bg-alt: #f6f7fb;
	--tc-container: 1200px;
	--tc-radius: 10px;
	--tc-gap: 24px;
	--tc-space: clamp(40px, 6vw, 80px);
}

/* Reset-ish -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--tc-ink);
	background: var(--tc-bg);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin: 0 0 .5em; }

/* Layout ----------------------------------------------------------------- */
.tc-container { width: 100%; max-width: var(--tc-container); margin: 0 auto; padding: 0 20px; }
.tc-content { padding: var(--tc-space) 0; }
.tc-layout { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
	.tc-layout--right { grid-template-columns: minmax(0,1fr) 320px; }
	.tc-layout--left { grid-template-columns: 320px minmax(0,1fr); }
	.tc-layout--left .tc-main { order: 2; }
	.tc-layout--none { grid-template-columns: 1fr; }
}

/* Header ------------------------------------------------------------------ */
.tc-header { background: var(--tc-bg); border-bottom: 1px solid var(--tc-line); }
.tc-header--sticky { position: sticky; top: 0; z-index: 999; }
.tc-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.tc-branding { display: flex; flex-direction: column; }
.tc-logo-text { font-size: 1.4rem; font-weight: 800; color: var(--tc-ink); letter-spacing: -.02em; }
.tc-logo-text:hover { text-decoration: none; }
.tc-site-description { margin: 0; font-size: .8rem; color: var(--tc-muted); }

.tc-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.tc-menu a { display: block; padding: 10px 14px; color: var(--tc-ink); font-weight: 500; border-radius: 6px; }
.tc-menu a:hover { color: var(--tc-primary); text-decoration: none; background: var(--tc-bg-alt); }
.tc-menu .sub-menu { display: none; position: absolute; background: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.1); border-radius: 8px; padding: 8px; min-width: 200px; z-index: 50; }
.tc-menu li { position: relative; }
.tc-menu li:hover > .sub-menu { display: block; }

/* Mobile nav toggle */
.tc-nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--tc-line); background: #fff; border-radius: 8px; cursor: pointer; position: relative; }
.tc-nav-toggle__bar, .tc-nav-toggle__bar::before, .tc-nav-toggle__bar::after { content: ""; position: absolute; left: 11px; right: 11px; height: 2px; background: var(--tc-ink); transition: transform .25s ease; }
.tc-nav-toggle__bar { top: 21px; }
.tc-nav-toggle__bar::before { top: -7px; }
.tc-nav-toggle__bar::after { top: 7px; }

@media (max-width: 899px) {
	.tc-nav-toggle { display: block; }
	.tc-header__nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: #fff; border-bottom: 1px solid var(--tc-line); padding: 12px 20px; z-index: 998; }
	.tc-header { position: relative; }
	.tc-header.tc-nav-open .tc-header__nav { display: block; }
	.tc-menu { flex-direction: column; gap: 2px; }
	.tc-menu .sub-menu { position: static; box-shadow: none; padding-left: 16px; display: block; min-width: 0; }
}

/* Posts ------------------------------------------------------------------ */
.tc-blog--style02 { display: grid; gap: 30px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tc-post { margin: 0 0 40px; }
.tc-blog--style02 .tc-post { margin: 0; background: var(--tc-bg); border: 1px solid var(--tc-line); border-radius: var(--tc-radius); overflow: hidden; }
.tc-blog--style02 .tc-post__body { padding: 20px; }
.tc-entry-thumb img { width: 100%; border-radius: var(--tc-radius); }
.tc-blog--style02 .tc-entry-thumb img { border-radius: 0; }
.tc-entry-title { font-size: clamp(1.3rem, 2.4vw, 1.9rem); margin: 14px 0 8px; }
.tc-entry-title a { color: var(--tc-ink); }
.tc-entry-title a:hover { color: var(--tc-primary); text-decoration: none; }
.tc-entry-meta { font-size: .85rem; color: var(--tc-muted); display: flex; gap: 14px; margin-bottom: 10px; }
.tc-entry-meta a { color: var(--tc-muted); }
.tc-entry-excerpt { color: var(--tc-muted); }
.tc-read-more { display: inline-block; margin-top: 10px; font-weight: 600; }

/* Single ----------------------------------------------------------------- */
.tc-single__header { margin-bottom: 20px; }
.tc-entry-content { margin-top: 24px; }
.tc-entry-content > * { margin-bottom: 1.2em; }
.tc-single__footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--tc-line); font-size: .9rem; color: var(--tc-muted); display: flex; gap: 20px; flex-wrap: wrap; }

/* Sidebar ---------------------------------------------------------------- */
.tc-sidebar .widget { margin-bottom: 34px; }
.tc-sidebar .widget-title { font-size: 1.05rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--tc-primary); display: inline-block; }

/* Footer ------------------------------------------------------------------ */
.tc-footer { background: var(--tc-ink); color: #c9cde0; margin-top: var(--tc-space); }
.tc-footer a { color: #fff; }
.tc-footer-widgets { padding: 60px 0 30px; }
.tc-footer-cols { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 700px) {
	.tc-footer-cols--2 { grid-template-columns: repeat(2, 1fr); }
	.tc-footer-cols--3 { grid-template-columns: repeat(3, 1fr); }
	.tc-footer-cols--4 { grid-template-columns: repeat(4, 1fr); }
}
.tc-footer .widget-title { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.tc-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: .875rem; }

/* Buttons + misc --------------------------------------------------------- */
.tc-btn { display: inline-block; padding: 12px 26px; background: var(--tc-primary); color: #fff; border-radius: 8px; font-weight: 600; }
.tc-btn:hover { text-decoration: none; filter: brightness(1.07); }

.tc-archive-header { padding: 40px 0 0; text-align: center; }
.tc-archive-title { font-size: clamp(1.6rem, 3vw, 2.4rem); }

/* 404 / no results */
.tc-error { text-align: center; padding: var(--tc-space) 20px; }
.tc-error__code { font-size: clamp(4rem, 14vw, 9rem); margin: 0; color: var(--tc-primary); line-height: 1; }
.tc-error__search { max-width: 420px; margin: 24px auto 0; }

/* Comments --------------------------------------------------------------- */
.tc-comments { margin-top: 50px; }
.tc-comment-list { list-style: none; margin: 0; padding: 0; }
.tc-comment-body { padding: 20px 0; border-bottom: 1px solid var(--tc-line); }
.tc-comment-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tc-comment-author { display: flex; align-items: center; gap: 12px; }
.tc-comment-author img { border-radius: 50%; }
.tc-comment-list .children { list-style: none; margin-left: 40px; }

/* Pagination ------------------------------------------------------------- */
.pagination, .navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.page-numbers { display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--tc-line); border-radius: 8px; color: var(--tc-ink); }
.page-numbers.current { background: var(--tc-primary); color: #fff; border-color: var(--tc-primary); }
.page-numbers:hover { text-decoration: none; border-color: var(--tc-primary); }

/* =========================================================================
 * Option-driven features (Theme Options)
 * ====================================================================== */

/* Boxed layout ----------------------------------------------------------- */
/* Purely a width constraint — it forces no background and no shadow, so the
   page keeps whatever background the theme/Elementor already gives it. */
body.tc-layout-boxed .tc-site {
	max-width: calc(var(--tc-container, 1200px) + 80px);
	margin: 0 auto;
}

/* Logo width ------------------------------------------------------------- */
.tc-branding img, .custom-logo { width: var(--tc-logo-width, 150px); height: auto; }

/* Top bar ---------------------------------------------------------------- */
.tc-topbar { background: var(--tc-topbar-bg, #12141d); color: var(--tc-topbar-color, #fff); font-size: 14px; }
.tc-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 42px; }
.tc-topbar a { color: inherit; }
.tc-topbar__text { opacity: .9; }

/* Social icons ----------------------------------------------------------- */
.tc-social { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tc-social__link {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%;
	color: inherit; transition: background .2s ease, transform .2s ease;
}
.tc-social__link:hover { background: rgba(127, 127, 127, .18); transform: translateY(-2px); text-decoration: none; }

/* Header layouts --------------------------------------------------------- */
.tc-header { background: var(--tc-header-bg, #fff); color: var(--tc-header-color, #12141d); }
.tc-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
body.tc-header-right .tc-header__inner { flex-direction: row-reverse; }
body.tc-header-center .tc-header__inner { flex-direction: column; gap: 12px; text-align: center; }
body.tc-header-center .tc-header__nav { width: 100%; display: flex; justify-content: center; }
body.tc-header-minimal .tc-header__inner { gap: 16px; }

/* Transparent header ----------------------------------------------------- */
body.tc-has-transparent .tc-header {
	position: absolute; inset-inline: 0; top: 0; z-index: 50;
	background: transparent; border-bottom: 0;
}
body.tc-has-transparent .tc-header--scrolled { background: var(--tc-header-bg, #fff); }

/* Sticky header ---------------------------------------------------------- */
.tc-header--sticky { position: sticky; top: 0; z-index: 100; transition: box-shadow .25s ease, background .25s ease; }
.tc-header--sticky.tc-header--scrolled { box-shadow: 0 6px 24px rgba(18, 20, 29, .10); }

/* Elementor-built header ------------------------------------------------- */
/* The Elementor document brings its own background, padding and container, so
   the theme's header chrome must get out of the way. */
.tc-header--elementor { background: transparent; border: 0; padding: 0; }
.tc-header--elementor .elementor { width: 100%; }

/* Elementor-built footer ------------------------------------------------- */
.tc-footer--elementor { background: transparent; border: 0; padding: 0; }
.tc-footer--elementor .elementor { width: 100%; }

/* Sticky Header layout (a separate Elementor template) -------------------- */
.tc-sticky-header {
	position: fixed; inset-inline: 0; top: 0; z-index: 120;
	transform: translateY(-100%);
	transition: transform .35s cubic-bezier(.2, .7, .2, 1);
	will-change: transform;
	box-shadow: 0 6px 24px rgba(18, 20, 29, .10);
}
.tc-sticky-header.is-visible { transform: translateY(0); }
/* Hidden from AT and pointer events until it actually slides in. */
.tc-sticky-header[aria-hidden="true"] { pointer-events: none; }
.tc-sticky-header.is-visible { pointer-events: auto; }
/* The WP admin bar must not sit under it. */
.admin-bar .tc-sticky-header { top: 32px; }
@media screen and (max-width: 782px) {
	.admin-bar .tc-sticky-header { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
	.tc-sticky-header { transition: none; }
}

/* Footer ----------------------------------------------------------------- */
.tc-footer-widgets { background: var(--tc-footer-bg, #12141d); color: var(--tc-footer-color, #b9bfd0); padding: 56px 0; }
.tc-footer-widgets a { color: inherit; }
.tc-footer-bottom { background: var(--tc-footer-bg, #12141d); color: var(--tc-footer-color, #b9bfd0); padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.tc-footer-bottom .tc-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tc-footer-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }

/* WooCommerce cart icon -------------------------------------------------- */
.tc-cart { position: relative; display: inline-flex; align-items: center; color: inherit; }
.tc-cart__count {
	position: absolute; top: -6px; inset-inline-end: -8px; min-width: 18px; height: 18px;
	display: grid; place-items: center; padding: 0 4px;
	background: var(--tc-primary); color: #fff; border-radius: 100px;
	font-size: 11px; font-weight: 700; line-height: 1;
}

/* Back to top ------------------------------------------------------------ */
.tc-to-top {
	position: fixed; inset-inline-end: 24px; bottom: 24px; z-index: 90;
	display: grid; place-items: center; width: 46px; height: 46px;
	border: 0; border-radius: 50%; cursor: pointer;
	background: var(--tc-primary); color: #fff;
	box-shadow: 0 8px 24px rgba(18, 20, 29, .22);
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.tc-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.tc-to-top:hover { background: var(--tc-link-hover, #1c3fd6); }
.tc-to-top:focus-visible { outline: 2px solid var(--tc-primary); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.tc-to-top, .tc-social__link, .tc-header--sticky { transition: none; }
}
