/* ============================================================
   TestCoches - Global: header, ticker y footer (toda la web)
   Solo estilos de componentes propios; no toca el resto
   de la página (los artículos siguen con su CSS actual).
   ============================================================ */

:root {
	--tc-antracita: #1a1a1a;
	--tc-rojo: #dc1616;
	--tc-rojo-oscuro: #b01111;
	--tc-ink: #18181b;
	--tc-muted: #6d6d72;
	--tc-line: #e7e7e4;
	--tc-surface: #f7f7f5;
	--tc-radius: 10px;
	--tc-display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--tc-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--tc-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.07);
}

.tc-header, .tc-ticker, .tc-footer {
	font-family: var(--tc-body);
	font-size: 16px; line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
}
.tc-header *, .tc-ticker *, .tc-footer * { box-sizing: border-box; }
.tc-header img, .tc-footer img { max-width: 100%; height: auto; display: block; }
.tc-header a, .tc-ticker a, .tc-footer a { color: inherit; text-decoration: none; }
.tc-header :focus-visible, .tc-ticker :focus-visible, .tc-footer :focus-visible {
	outline: 3px solid var(--tc-rojo); outline-offset: 2px; border-radius: 2px;
}

.tc-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.tc-skip {
	position: absolute; left: -9999px; top: 0;
	background: var(--tc-rojo); color: #fff; padding: 10px 16px; z-index: 200;
}
.tc-skip:focus { left: 0; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px;
	clip-path: inset(50%); overflow: hidden;
}

/* ---------------- Header sticky ---------------- */
.tc-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(26,26,26,.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff;
	box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.tc-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; min-height: 64px;
}

.tc-logo img { width: 176px; height: auto; }

.tc-nav__list {
	display: flex; flex-wrap: wrap; gap: 2px;
	list-style: none; margin: 0; padding: 0;
	font-family: var(--tc-display);
	font-size: 19px; font-weight: 600;
	text-transform: uppercase; letter-spacing: 0.05em;
}
.tc-nav__list a {
	display: block; padding: 19px 13px;
	color: #e4e4e4;
	border-bottom: 3px solid transparent;
	transition: border-color .15s ease, color .15s ease;
}
.tc-nav__list a:hover { color: #fff; border-bottom-color: var(--tc-rojo); }

/* Submenú (Útiles) */
.tc-nav__list li { position: relative; }
.tc-nav__list .sub-menu {
	display: none; position: absolute; left: 0; top: 100%;
	min-width: 250px; background: var(--tc-antracita);
	list-style: none; margin: 0; padding: 8px 0; z-index: 50;
	border-top: 3px solid var(--tc-rojo);
	border-radius: 0 0 var(--tc-radius) var(--tc-radius);
	box-shadow: var(--tc-shadow);
}
.tc-nav__list li:hover > .sub-menu,
.tc-nav__list li:focus-within > .sub-menu { display: block; }
.tc-nav__list .sub-menu a { border: 0; font-size: 17px; padding: 9px 16px; }
.tc-nav__list .sub-menu a:hover { color: var(--tc-rojo); }

/* Botón móvil */
.tc-nav-toggle {
	display: none; background: none; border: 0; cursor: pointer; padding: 12px;
}
.tc-nav-toggle__bar {
	display: block; width: 24px; height: 2px; background: #fff;
	margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.tc-nav-toggle[aria-expanded="true"] .tc-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tc-nav-toggle[aria-expanded="true"] .tc-nav-toggle__bar:nth-child(2) { opacity: 0; }
.tc-nav-toggle[aria-expanded="true"] .tc-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Ticker ---------------- */
.tc-ticker { background: #101010; }
.tc-ticker__inner {
	display: flex; align-items: center; gap: 14px;
	overflow-x: auto; scrollbar-width: none;
}
.tc-ticker__inner::-webkit-scrollbar { display: none; }

.tc-ticker__label {
	flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
	font-family: var(--tc-display); font-weight: 700; font-size: 14px;
	text-transform: uppercase; letter-spacing: 0.1em;
	color: #fff; background: var(--tc-rojo);
	padding: 4px 10px; margin: 8px 0; border-radius: 4px;
}
.tc-ticker__label::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%;
	background: #fff; animation: tc-pulse 2s ease-in-out infinite;
}
@keyframes tc-pulse { 50% { opacity: .35; } }

.tc-ticker__list {
	display: flex; gap: 2px; list-style: none; margin: 0; padding: 0;
	white-space: nowrap;
}
.tc-ticker__list a {
	display: block; padding: 11px 11px;
	color: #b9b9b9; font-size: 14px; font-weight: 500;
	transition: color .15s ease;
}
.tc-ticker__list a:hover { color: #fff; }

/* ---------------- Footer ---------------- */
.tc-footer { background: var(--tc-antracita); color: #c9c9c9; margin-top: 44px; }

.tc-footer__grid {
	display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr;
	gap: 32px; padding: 48px 20px 32px;
}
.tc-footer__about img { margin-bottom: 14px; }
.tc-footer__about p { font-size: 14px; margin: 0; line-height: 1.6; }

.tc-footer__list { list-style: none; margin: 0; padding: 0; }
.tc-footer__list a, .tc-footer__social a, .tc-footer__col > a {
	display: inline-block; padding: 4px 0; font-size: 14px;
	transition: color .15s ease;
}
.tc-footer__list a:hover, .tc-footer__social a:hover, .tc-footer__col > a:hover { color: #fff; }

.tc-footer__contact-label {
	font-family: var(--tc-display); font-weight: 700; font-size: 17px;
	text-transform: uppercase; color: #fff; margin: 0 0 6px;
}
.tc-footer__social {
	list-style: none; margin: 12px 0 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 14px;
}

.tc-footer__legal {
	border-top: 1px solid #2a2a2a;
	padding-top: 18px; padding-bottom: 22px;
}
.tc-footer__legal p { margin: 0; font-size: 13px; color: #8a8a8a; }


/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
	.tc-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
	.tc-nav-toggle { display: block; }
	.tc-nav { display: none; width: 100%; }
	.tc-nav.is-open { display: block; }
	.tc-header__inner { flex-wrap: wrap; }
	.tc-nav__list { flex-direction: column; padding-bottom: 12px; }
	.tc-nav__list a { padding: 12px 4px; border-bottom: 0; }
	.tc-nav__list .sub-menu {
		display: block; position: static; border-top: 0;
		padding-left: 16px; box-shadow: none; border-radius: 0;
	}
	.tc-footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.tc-header *, .tc-ticker *, .tc-footer *,
	.tc-header *::before, .tc-ticker *::before {
		transition: none !important; animation: none !important;
	}
}

/* ============================================================
   Blindaje frente al CSS global de Elementor en paginas
   aun no migradas (mayor especificidad + carga tardia)
   ============================================================ */
.tc-header .tc-nav__list a {
	font-family: var(--tc-display) !important;
	font-size: 19px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.05em !important;
	text-transform: uppercase !important;
	color: #e4e4e4 !important;
	text-decoration: none !important;
}
.tc-header .tc-nav__list a:hover { color: #fff !important; }
.tc-header .tc-nav__list .sub-menu a { font-size: 17px !important; }
.tc-ticker .tc-ticker__list a {
	font-family: var(--tc-body) !important;
	font-size: 14px !important; font-weight: 500 !important;
	color: #b9b9b9 !important; text-decoration: none !important;
}
.tc-ticker .tc-ticker__list a:hover { color: #fff !important; }
.tc-footer a { text-decoration: none !important; }
.tc-header .tc-logo img { width: 176px !important; height: auto !important; }

/* ============================================================
   Fiabilidad táctil del ticker y el menú en móvil
   ============================================================ */
.tc-ticker { position: relative; z-index: 2; }
.tc-ticker__list a {
	position: relative; z-index: 1;
	touch-action: manipulation;
	-webkit-tap-highlight-color: rgba(220, 22, 22, 0.25);
}
.tc-nav__list a { touch-action: manipulation; }

/* En pantallas táctiles el submenú no depende del hover
   (en móvil ya se muestra desplegado en el menú) */
@media (hover: none) and (min-width: 761px) {
	.tc-nav__list li:hover > .sub-menu { display: none; }
	.tc-nav__list li:focus-within > .sub-menu { display: block; }
}

/* Header compacto y pista visual de scroll en el ticker (móvil) */
@media (max-width: 760px) {
	.tc-header__inner { min-height: 56px; }
	.tc-header .tc-logo img { width: 148px !important; }
	.tc-ticker__inner {
		-webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
	        mask-image: linear-gradient(90deg, #000 90%, transparent);
	}
}

/* ============================================================
   Refinado de header, ticker y menú móvil
   Antracita protagonista, rojo como acento
   ============================================================ */

/* Estado activo de la sección actual en el menú */
.tc-header .tc-nav__list .current-menu-item > a,
.tc-header .tc-nav__list .current-menu-ancestor > a,
.tc-header .tc-nav__list .current_page_item > a {
	color: #fff !important;
	border-bottom-color: var(--tc-rojo);
}

/* Ticker: separadores y hover con subrayado de marca */
.tc-ticker__list li { display: flex; align-items: center; }
.tc-ticker__list li + li::before {
	content: ""; width: 3px; height: 3px; border-radius: 50%;
	background: #3d3d3d; margin: 0 9px 0 7px; flex-shrink: 0;
}
.tc-ticker .tc-ticker__list a:hover {
	color: #fff !important;
	text-decoration: underline !important;
	text-decoration-color: var(--tc-rojo) !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 5px !important;
}

/* ---------------- Menú móvil rediseñado ---------------- */
@media (max-width: 760px) {
	.tc-header { position: sticky; }

	.tc-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		width: auto;
		background: var(--tc-antracita);
		border-top: 3px solid var(--tc-rojo);
		box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
		max-height: calc(100vh - 110px);
		overflow-y: auto;
		z-index: 90;
	}
	.tc-nav.is-open { animation: tc-menu-in 0.18s ease-out; }
	@keyframes tc-menu-in {
		from { opacity: 0; transform: translateY(-8px); }
		to   { opacity: 1; transform: translateY(0); }
	}

	.tc-nav__list { padding: 6px 0 10px; }
	.tc-nav__list li { border-bottom: 1px solid #262626; }
	.tc-nav__list li:last-child { border-bottom: 0; }

	.tc-header .tc-nav__list a {
		display: flex; align-items: center;
		padding: 15px 20px !important;
		font-size: 23px !important;
		border-bottom: 0 !important;
	}
	.tc-header .tc-nav__list a::before {
		content: ""; width: 4px; height: 18px;
		background: var(--tc-rojo); border-radius: 2px;
		margin-right: 12px; opacity: 0;
		transition: opacity .15s ease;
	}
	.tc-header .tc-nav__list .current-menu-item > a::before,
	.tc-header .tc-nav__list a:active::before { opacity: 1; }

	/* Submenú (Útiles) anidado con fondo más profundo */
	.tc-nav__list .sub-menu {
		background: #141414;
		padding: 4px 0 8px;
		border-left: 3px solid var(--tc-rojo);
		margin: 0 0 6px 20px;
	}
	.tc-nav__list .sub-menu li { border-bottom: 0; }
	.tc-header .tc-nav__list .sub-menu a {
		font-size: 18px !important;
		padding: 10px 16px !important;
		color: #c9c9c9 !important;
	}
	.tc-header .tc-nav__list .sub-menu a::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tc-nav.is-open { animation: none; }
}
