/*
Theme Name: Todo Cristal Auto
Theme URI: https://todocristal.es
Author: movilidApp
Author URI: https://movilidapp.com
Description: Tema a medida para Todo Cristal Auto. Reproduce el diseño de la web anterior (Joomla, plantilla sj_plus) con código actual y adaptado a móviles.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: todocristal
*/

:root {
	--tc-azul: #014983;
	--tc-azul-texto: #023d6e;
	--tc-rojo: #bd2a33;
	--tc-fondo: #f8f7ff;
	--tc-caja: #f0f0f0;
	--tc-borde: #dddddd;
	--tc-ancho: 1170px;
	--tc-hueco: 30px;
	--tc-fuente: "Droid Sans", "Noto Sans", "Open Sans", "Segoe UI", Arial, Helvetica, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--tc-fondo);
	color: var(--tc-azul-texto);
	font-family: var(--tc-fuente);
	font-size: 16px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}

a { color: #bd2a34; }
a:hover { color: var(--tc-azul); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 { color: var(--tc-azul-texto); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.tc-contenedor { width: 100%; max-width: var(--tc-ancho); margin: 0 auto; padding: 0 15px; }
@media (min-width: 1200px) { .tc-contenedor { padding: 0; } }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; background: #fff; padding: 8px 12px; clip: auto; width: auto; height: auto; }

/* ---------- Cabecera ---------- */
.tc-cabecera { background: #fff url(img/header-pattern.png) repeat; }
.tc-cabecera .tc-contenedor { display: flex; align-items: center; gap: 20px; min-height: 136px; padding-top: 10px; padding-bottom: 10px; }
.tc-logo { flex: 0 0 auto; }
.tc-logo img { display: block; width: 390px; max-width: 100%; height: auto; }
.tc-datos { flex: 1 1 auto; }
.tc-direccion { margin: 0 0 6px; padding-left: 12px; border-left: 4px solid var(--tc-rojo); color: var(--tc-azul); font-weight: 700; font-style: italic; font-size: 1.05rem; line-height: 1.35; }
.tc-telefono { margin: 0; font-size: 1.35rem; font-weight: 600; }
.tc-telefono a { color: var(--tc-rojo); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.tc-telefono svg { width: 26px; height: 26px; fill: var(--tc-rojo); }
.tc-lema-movil { display: none; color: var(--tc-rojo); font-size: 1rem; margin: 8px 0 0; }
.tc-llamamos { flex: 0 0 260px; }
.tc-llamamos img { display: block; width: 100%; height: auto; transition: transform .15s ease; }
.tc-llamamos a:hover img { transform: scale(1.02); }

/* ---------- Menú ---------- */
.tc-menu-barra { box-shadow: 1px 1px 4px rgba(0, 0, 0, .4); background: #fff; position: relative; z-index: 20; }
.tc-menu-barra .tc-contenedor { background: var(--tc-azul); padding: 0; }
.tc-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.tc-menu li { border-right: 1px solid #fff; }
.tc-menu a { display: block; padding: 0 25px; line-height: 54px; color: #fff; font-weight: 700; text-decoration: none; transition: background .15s ease; }
.tc-menu a:hover, .tc-menu a:focus { background: rgba(255, 255, 255, .12); color: #fff; }
.tc-menu .current-menu-item > a, .tc-menu .current_page_item > a, .tc-menu .current-menu-ancestor > a { background: var(--tc-rojo); }
.tc-menu-boton { display: none; width: 100%; background: var(--tc-azul); color: #fff; border: 0; padding: 0 15px; height: 50px; font: 700 1rem var(--tc-fuente); text-align: left; cursor: pointer; }
.tc-menu-boton span { display: inline-block; width: 22px; height: 2px; background: #fff; position: relative; vertical-align: middle; margin-right: 10px; }
.tc-menu-boton span::before, .tc-menu-boton span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: #fff; }
.tc-menu-boton span::before { top: -7px; }
.tc-menu-boton span::after { top: 7px; }

/* ---------- Contenido ---------- */
.tc-principal { padding: 30px 0 30px; }
.tc-caja {
	background: var(--tc-caja);
	border: 1px solid var(--tc-borde);
	box-shadow: 0 0 3px rgba(0, 0, 0, .12);
	padding: 15px;
}
.tc-caja > :last-child { margin-bottom: 0; }
.tc-titulo-pagina { font-size: 1.5rem; }

/* Rejilla heredada de la web anterior (row-fluid / spanN) */
.row-fluid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 30px; }
.row-fluid > [class*="span"] { min-width: 0; }
.row-fluid > .span1 { grid-column: span 1; }
.row-fluid > .span2 { grid-column: span 2; }
.row-fluid > .span3 { grid-column: span 3; }
.row-fluid > .span4 { grid-column: span 4; }
.row-fluid > .span5 { grid-column: span 5; }
.row-fluid > .span6 { grid-column: span 6; }
.row-fluid > .span7 { grid-column: span 7; }
.row-fluid > .span8 { grid-column: span 8; }
.row-fluid > .span9 { grid-column: span 9; }
.row-fluid > .span10 { grid-column: span 10; }
.row-fluid > .span11 { grid-column: span 11; }
.row-fluid > .span12 { grid-column: span 12; }
.visible-desktop { display: block; }
.hidden-desktop { display: none; }

ul.tc-lista-check { list-style: none; padding: 0; margin: 0 0 1em; }
ul.tc-lista-check li { position: relative; padding-left: 28px; margin-bottom: .6em; }
ul.tc-lista-check li::before { content: ""; position: absolute; left: 2px; top: .25em; width: 7px; height: 13px; border: solid #3aa04a; border-width: 0 3px 3px 0; transform: rotate(45deg); }

.tc-mapa { position: relative; width: 100%; padding-top: 75%; overflow: hidden; background: #e5e3df; }
.tc-mapa iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Portada ---------- */
.tc-home-top { display: grid; grid-template-columns: 770fr 370fr; gap: var(--tc-hueco); margin-bottom: var(--tc-hueco); }
.tc-home-top p { margin: 0; }
.tc-slider-col { box-shadow: 0 0 3px rgba(0, 0, 0, .13); background: #fff; padding: 5px; align-self: start; }
.tc-side img { display: block; width: 100%; height: auto; }

.tc-slider { position: relative; overflow: hidden; aspect-ratio: 750 / 400; background: #000; }
.tc-slider .tc-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.tc-slider .tc-slide.activa { opacity: 1; }
.tc-slider img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-slider button { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .35); color: #fff; cursor: pointer; font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.tc-slider button:hover { background: rgba(0, 0, 0, .6); }
.tc-slider .tc-ant { left: 12px; }
.tc-slider .tc-sig { right: 12px; }
.tc-slider .tc-puntos { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.tc-slider .tc-puntos button { position: static; transform: none; width: 11px; height: 11px; border-width: 1px; padding: 0; }
.tc-slider .tc-puntos button.activa { background: #fff; }

.tc-cajas { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tc-hueco); margin-bottom: var(--tc-hueco); }
.tc-cajita { background: var(--tc-rojo); color: #fff; box-shadow: 1px 1px 4px rgba(0, 0, 0, .4); display: flex; align-items: center; gap: 22px; padding: 10px 16px 10px 10px; min-height: 111px; }
.tc-cajita p { margin: 0; }
.tc-cajita .tc-icono { flex: 0 0 90px; }
.tc-cajita .tc-icono img { display: block; width: 90px; height: auto; }
.tc-cajita h2 { font-size: 1.6rem; margin: 0 0 6px; color: #fff; }
.tc-cajita h2 a { color: #fff; text-decoration: none; }
.tc-cajita h2 a:hover { text-decoration: underline; }
.tc-cajita .tc-texto { font-size: .95rem; line-height: 1.3; }

.tc-destacado { background: var(--tc-azul); color: #fff; padding: 1px 0 20px; }
.tc-destacado h1, .tc-destacado h2, .tc-destacado h3 { color: #fff; }
.tc-destacado h2.tc-centro { text-align: center; margin: 30px 20px 30px; }
.tc-destacado img { display: block; width: 100%; height: auto; }
.tc-destacado .row-fluid { margin-top: 10px; }
.tc-destacado .tc-llamanos { text-align: center; }
.tc-destacado .tc-llamanos h1 { font-size: 2rem; }
.tc-destacado a { color: #fff; }
.tc-destacado small { font-size: .82rem; }

/* ---------- Formularios ---------- */
.mv-form label { color: var(--tc-azul-texto); font-size: .92rem; }
.mv-form .mv-boton, .tc-boton {
	background: var(--tc-rojo); color: #fff; border: 0; border-radius: 2px; padding: 8px 22px; font: 700 1rem var(--tc-fuente); cursor: pointer;
}
.mv-form .mv-boton:hover, .tc-boton:hover { background: #9e1f28; }
.mv-form-titulo { font-size: 1rem; }

/* ---------- Pie ---------- */
.tc-pie { background: #141414 url(img/footer-pattern.png) repeat; color: #999; padding: 22px 0; font-size: .85rem; }
.tc-pie .tc-contenedor { display: grid; grid-template-columns: 4fr 6fr 2fr; gap: 20px; align-items: start; }
.tc-pie a { color: #c0c0c0; }
.tc-pie a:hover { color: #fff; }
.tc-pie .tc-pie-legal a { margin-right: 14px; }
.tc-pie .tc-creditos { display: block; margin-top: 4px; }
.tc-pie .tc-creditos a { text-decoration: none; }
.tc-pie .tc-pie-contacto { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.tc-pie .tc-pie-contacto span { display: inline-flex; align-items: center; gap: 8px; }
.tc-pie svg { width: 18px; height: 18px; fill: #999; }
.tc-pie .tc-pie-licencias { text-align: right; }
.tc-marca-movilid { color: #666699; }
.tc-marca-app { color: #ff6600; }

/* Volver arriba */
.tc-arriba { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--tc-rojo); color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 50; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.tc-arriba.visible { opacity: .9; pointer-events: auto; }
.tc-arriba:hover { color: #fff; opacity: 1; }
.tc-arriba svg { width: 18px; height: 18px; fill: #fff; }

/* Aviso de cookies */
.tc-cookies { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; background: rgba(0, 0, 0, .92); color: #fff; text-align: center; padding: 12px 15px 14px; font-size: .85rem; box-shadow: 0 -2px 8px rgba(0,0,0,.4); }
.tc-cookies strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.tc-cookies a { color: #4aa3ff; }
.tc-cookies button { margin-top: 8px; background: #0a6fd6; color: #fff; border: 0; padding: 6px 34px; border-radius: 2px; cursor: pointer; font: inherit; }
.tc-cookies[hidden] { display: none; }

/* Página en ventana emergente (Te llamamos gratis, Licencias) */
body.tc-emergente { background: var(--tc-fondo); }
body.tc-emergente .tc-principal { padding: 15px; }
body.tc-emergente .tc-caja { max-width: 760px; margin: 0 auto; }

/* ---------- Móvil y tableta ---------- */
@media (max-width: 979px) {
	.tc-cabecera .tc-contenedor { flex-wrap: wrap; justify-content: center; text-align: center; min-height: 0; }
	.tc-logo img { width: 300px; }
	.tc-datos { flex-basis: 100%; }
	.tc-direccion { display: inline-block; text-align: left; }
	.tc-lema-movil { display: block; }
	.tc-llamamos { display: none; }
	.tc-menu-boton { display: block; }
	.tc-menu { display: none; flex-direction: column; }
	.tc-menu.abierto { display: flex; }
	.tc-menu li { border-right: 0; border-top: 1px solid rgba(255,255,255,.25); }
	.tc-menu a { line-height: 46px; }
	.tc-home-top, .tc-cajas { grid-template-columns: 1fr; }
	.tc-side { display: none; }
	.tc-cajita .tc-icono { display: none; }
	.row-fluid { display: block; }
	.visible-desktop { display: none; }
	.hidden-desktop { display: block; }
	.tc-pie .tc-contenedor { grid-template-columns: 1fr; text-align: center; }
	.tc-pie .tc-pie-contacto { justify-content: center; }
	.tc-pie .tc-pie-licencias { text-align: center; }
	.tc-destacado { padding: 1px 15px 20px; }
	.tc-destacado img { margin: 0 -15px; width: calc(100% + 30px); max-width: none; }
}
