/*
Theme Name: TMB · Transmeba Carga
Theme URI: https://www.transmebacarga.com
Author: Juan Pablo Salazar Uribe
Description: Tema de bloques a la medida para Transmeba Carga S.A.S. Colores y tipografías de marca, patrones editables para cada sección y formularios propios de cotización, empleo y línea ética.
Version: 1.0.5
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tmb
*/

/* ---------- Base ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }
h1, h2, .tmb-display { font-stretch: 85%; }
h3, h4 { font-stretch: 90%; }
:where(a) { text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--wp--preset--color--rojo); outline-offset: 2px; }
img { height: auto; }

/* Etiqueta pequeña sobre los títulos */
.tmb-eyebrow {
	font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--wp--preset--color--rojo-texto); margin: 0;
}
.tmb-eyebrow--dark, .has-negro-background-color .tmb-eyebrow { color: var(--wp--preset--color--rojo-claro); }
.tmb-eyebrow--line::before {
	content: ""; display: inline-block; width: 28px; height: 3px; background: var(--wp--preset--color--rojo);
	vertical-align: middle; margin-right: 10px; transform: translateY(-2px);
}

/* ---------- Barra superior y encabezado ---------- */
.tmb-topbar { font-size: 14px; }
.tmb-topbar a { color: inherit; text-decoration: none; }
.tmb-topbar a:hover { color: #fff; text-decoration: underline; }
.tmb-topbar p { margin: 0; }
.tmb-basc { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.tmb-header { border-bottom: 1px solid var(--wp--preset--color--borde); position: relative; z-index: 20; }
.tmb-header .wp-block-navigation { font-weight: 500; font-size: 16px; }
.tmb-header .wp-block-navigation a { text-decoration: none; }
.tmb-header .wp-block-navigation .current-menu-item > a,
.tmb-header .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--rojo-texto); }
.tmb-header .wp-block-navigation a:hover { color: var(--wp--preset--color--rojo-texto); }
.wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 18px; font-size: 20px; }

/* ---------- Botones ---------- */
.wp-element-button, .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1.5px solid currentColor; background: transparent; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(255,255,255,0.08); }
.tmb-btn-wa .wp-block-button__link::before {
	content: ""; width: 20px; height: 20px; flex-shrink: 0; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-12.4 7.4L3 20.5l1.6-5.4A8.4 8.4 0 1 1 21 11.5z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-12.4 7.4L3 20.5l1.6-5.4A8.4 8.4 0 1 1 21 11.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-button__link:hover { filter: brightness(0.92); }

/* ---------- Franja de datos ---------- */
.tmb-dato { border-left: 3px solid var(--wp--preset--color--rojo); padding-left: 18px; }
.tmb-dato p { margin: 0; }
.tmb-dato .tmb-dato__num { font-family: var(--wp--preset--font-family--archivo); font-stretch: 85%; font-weight: 800; font-size: 40px; line-height: 1; }
.tmb-dato .tmb-dato__txt { font-size: 15px; color: var(--wp--preset--color--gris-texto); margin-top: 4px; }

/* ---------- Tarjetas de servicio ---------- */
.tmb-card { border: 1px solid var(--wp--preset--color--borde); border-radius: 6px; overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; }
.tmb-card > .wp-block-image { margin: 0; }
.tmb-card > .wp-block-image img { width: 100%; height: 230px; object-fit: cover; display: block; }
.tmb-card__body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.tmb-card__body > * { margin: 0 !important; }
.tmb-card__body .tmb-card__text { flex-grow: 1; color: var(--wp--preset--color--gris-texto); }
.tmb-card__link a { font-weight: 600; text-decoration: none; color: var(--wp--preset--color--rojo-texto); }
.tmb-card__link a:hover { text-decoration: underline; }
.tmb-icon { width: 36px; height: 36px; color: var(--wp--preset--color--rojo); }

/* ---------- Fotos ---------- */
.tmb-photo img { border-radius: 6px; width: 100%; object-fit: cover; display: block; }
.tmb-photo--hero img { aspect-ratio: 4 / 3; }
.tmb-photo--flota img { aspect-ratio: 11 / 10; }

/* ---------- Listas con viñeta roja ---------- */
.tmb-list { list-style: none; padding-left: 0; }
.tmb-list li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.tmb-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; background: var(--wp--preset--color--rojo); }

/* ---------- Seguridad (rejilla de controles) ---------- */
.tmb-controles { gap: 1px !important; background: #3A3430; border: 1px solid #3A3430; border-radius: 6px; overflow: hidden; }
.tmb-controles > .wp-block-group { background: var(--wp--preset--color--negro); padding: 26px; margin: 0 !important; }
.tmb-controles p { margin: 0; }
.tmb-controles p::before {
	content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 12px; vertical-align: -3px;
	background: var(--wp--preset--color--rojo-claro);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tmb-chips a { color: #fff; border: 1px solid #5A524C; padding: 10px 16px; border-radius: 4px; text-decoration: none; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; font-size: 15px; }
.tmb-chips a:hover { border-color: #fff; }
.tmb-chips p { margin: 0; }
.tmb-sellos img { height: 88px; width: auto; background: #fff; border-radius: 6px; padding: 8px; box-sizing: border-box; }
.tmb-sellos .wp-block-image { margin: 0; }

/* ---------- Clientes ---------- */
.tmb-clientes > .wp-block-image { margin: 0; border: 1px solid var(--wp--preset--color--borde); border-radius: 6px; height: 96px; display: flex; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; background: #fff; }
.tmb-clientes > .wp-block-image img { max-height: 64px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: 0.85; transition: filter .2s, opacity .2s; }
.tmb-clientes > .wp-block-image:hover img { filter: none; opacity: 1; }

/* ---------- Formularios ---------- */
.tmb-form { background: #fff; color: var(--wp--preset--color--negro); border-radius: 6px; padding: 32px; display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; }
.tmb-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tmb-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.tmb-form input[type=text], .tmb-form input[type=email], .tmb-form input[type=tel], .tmb-form select, .tmb-form textarea {
	font: inherit; font-weight: 400; font-size: 16px; padding: 12px; border: 1px solid #8F877F; border-radius: 4px; min-height: 48px; box-sizing: border-box; background: #fff; color: inherit; width: 100%;
}
.tmb-form textarea { min-height: 110px; resize: vertical; }
.tmb-form .tmb-check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: #4A4440; }
.tmb-form .tmb-check input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.tmb-form .tmb-check a { color: inherit; }
.tmb-form button { font: inherit; font-weight: 600; background: var(--wp--preset--color--negro); color: #fff; border: 0; border-radius: 4px; padding: 14px 24px; min-height: 48px; cursor: pointer; align-self: flex-start; }
.tmb-form button:hover { background: #000; }
.tmb-form .tmb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tmb-form .tmb-req { color: var(--wp--preset--color--rojo-texto); }
.tmb-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.tmb-form legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; width: 100%; }
.tmb-form fieldset label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.tmb-aviso { padding: 16px 20px; border-radius: 4px; font-weight: 500; }
.tmb-aviso--ok { background: #E8F3EC; color: #1E5631; border: 1px solid #A9D3B6; }
.tmb-aviso--error { background: #FBEAE8; color: #8A1C14; border: 1px solid #F0B7B0; }

/* ---------- Pie ---------- */
.tmb-footer a { color: inherit; text-decoration: none; }
.tmb-footer a:hover { color: #fff; text-decoration: underline; }
.tmb-footer p { margin: 0; }
.tmb-footer .tmb-footer__title { color: #fff; font-weight: 600; margin-bottom: 4px; }

/* ---------- Botón flotante de WhatsApp ---------- */
.tmb-wa-float {
	position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 58px; height: 58px; border-radius: 50%;
	background: var(--wp--preset--color--rojo); color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 18px rgba(0,0,0,0.25); text-decoration: none;
}
.tmb-wa-float:hover { filter: brightness(0.92); color: #fff; }
.tmb-wa-float svg { width: 28px; height: 28px; }

/* ---------- Encabezado de páginas internas ---------- */
.tmb-page-hero h1 { margin: 0; }

/* ---------- Móvil ---------- */
@media (max-width: 781px) {
	.tmb-topbar .tmb-topbar__right { display: none; }
	.tmb-topbar p { font-size: 13px; }
	.tmb-header .wp-block-site-logo img { width: 120px !important; }
	.tmb-form { padding: 22px; }
	.tmb-card > .wp-block-image img { height: 200px; }
}
@media (max-width: 600px) {
	.tmb-header__cta { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- v1.0.1 ---------- */
.tmb-controles { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)) !important; }
.tmb-footer .wp-block-separator { width: 100%; max-width: none; border: 0; height: 1px; }
.tmb-form .tmb-label { display: block; }
@media (max-width: 600px) { .tmb-header .tmb-header__cta { display: none !important; } }
.tmb-clientes { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; }
.tmb-footer hr.wp-block-separator { width: 100% !important; }

/* v1.0.4 – galerías de flota */
.wp-block-gallery.is-cropped .wp-block-image img { border-radius: 6px; }
.wp-block-post-content > .alignfull { margin-block-start: 0 !important; }
