/*
Theme Name: Veracruz Select
Theme URI: https://proveraexport.example/veracruz-select
Author: ProveraExport
Author URI: https://proveraexport.example
Description: Tema responsivo de Veracruz Select, el directorio B2B de ProveraExport. Diseñado para funcionar junto al plugin «Veracruz Select — Directorio B2B (por ProveraExport)»: aporta cabecera, pie e identidad visual (verde-teal y ámbar, tipografías Sora e Inter) mientras el plugin gestiona el directorio, los perfiles, el registro por rol, el acceso COMCE/membresía y los formularios. Compatible con móvil, tableta y portátil.
Version: 2.4.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: b2b-conecta
Tags: business, directory, custom-colors, custom-logo, custom-menu, featured-images, translation-ready, responsive
*/

/* ============================================================
   Tokens — heredan del plugin de Veracruz Select cuando está activo,
   con respaldo propio (verde-teal / ámbar) si no lo está.
   ============================================================ */
:root {
	--b2bc-primary: var(--exportia-primario, #0e6e5c);
	--b2bc-accent:  var(--exportia-acento, #e8a33d);
	--b2bc-text:    var(--exportia-texto, #16241f);
	--b2bc-bg:      var(--exportia-fondo, #f6f7f4);
	--b2bc-display: var(--exportia-fuente-titulos, 'Sora', system-ui, sans-serif);
	--b2bc-body:    var(--exportia-fuente-texto, 'Inter', system-ui, sans-serif);
	--b2bc-border:  var(--exportia-borde, #e3e6e0);
	--b2bc-surface: var(--exportia-suave, #ffffff);
	--b2bc-radius:  14px;
	--b2bc-shadow:  0 6px 24px rgba(14, 110, 92, .10);
	--b2bc-wrap:    1140px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	font-family: var(--b2bc-body);
	color: var(--b2bc-text);
	background: var(--b2bc-bg);
	line-height: 1.6;
}
a { color: var(--b2bc-primary); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--b2bc-display); line-height: 1.15; }

.wrap { max-width: var(--b2bc-wrap); margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 1000; }

/* ---------- Botones del chrome ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
	padding: .65rem 1.2rem; border-radius: 999px; border: 1.5px solid transparent;
	font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--b2bc-primary); color: #fff; }
.btn--primary:hover { box-shadow: 0 6px 18px rgba(14,110,92,.35); }
.btn--ghost { background: transparent; border-color: var(--b2bc-primary); color: var(--b2bc-primary); }
.btn--ghost:hover { background: rgba(14,110,92,.07); }
.btn--accent { background: var(--b2bc-accent); color: #1a1a1a; }
.btn--sm { padding: .45rem .9rem; font-size: .9rem; }

/* ---------- Cabecera ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--b2bc-border);
}
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.site-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--b2bc-text); font-family: var(--b2bc-display); font-weight: 700; font-size: 1.25rem; }
.site-brand img { max-height: 42px; width: auto; }
.site-brand__mark {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 10px; background: var(--b2bc-primary);
	color: #fff; font-weight: 800;
}
.site-brand__mark span:last-child { color: var(--b2bc-accent); }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; color: var(--b2bc-text); font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--b2bc-primary); border-bottom-color: var(--b2bc-primary); }
.header-actions { display: flex; align-items: center; gap: .6rem; }

/* ---------- Menú móvil ---------- */
.nav-toggle {
	display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
	border: 1px solid var(--b2bc-border); border-radius: 10px; background: #fff; cursor: pointer;
	align-items: center; justify-content: center; margin-left: auto;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--b2bc-text); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; border-top: 1px solid var(--b2bc-border); background: #fff; }
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: .5rem 1rem 1rem; }
.mobile-nav li { border-bottom: 1px solid var(--b2bc-border); }
.mobile-nav a { display: block; padding: .9rem .25rem; text-decoration: none; color: var(--b2bc-text); font-weight: 500; }
.mobile-nav .mobile-actions { display: flex; gap: .6rem; padding-top: 1rem; }
.mobile-nav .mobile-actions .btn { flex: 1; }

/* ---------- Contenido de páginas (shortcodes del plugin) ---------- */
.site-main { min-height: 50vh; }
.page-full { padding: 0 0 3rem; }
.page-narrow { max-width: 980px; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
.page-narrow .entry-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 1.5rem; }
.entry-content > * { margin-top: 0; }

/* ---------- Pie ---------- */
.site-footer { background: #0c1f1a; color: rgba(255,255,255,.82); margin-top: 0; }
.site-footer a { color: rgba(255,255,255,.82); text-decoration: none; }
.site-footer a:hover { color: var(--b2bc-accent); }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; padding: 3.5rem 1rem 2.5rem; }
.site-footer h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-brand__name { font-family: var(--b2bc-display); font-weight: 700; font-size: 1.3rem; color: #fff; margin: 0 0 .6rem; }
.footer-brand__name span { color: var(--b2bc-accent); }
.footer-brand p { font-size: .92rem; max-width: 32ch; }
.footer-social { display: flex; gap: .8rem; margin-top: 1rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); display: inline-flex; align-items: center; justify-content: center; }
.footer-social a:hover { border-color: var(--b2bc-accent); }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.25rem 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

/* ---------- Búsqueda ---------- */
.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] { flex: 1; padding: .7rem .85rem; border: 1.5px solid var(--b2bc-border); border-radius: 10px; font: inherit; }

/* ---------- Lista por defecto / 404 ---------- */
.post-card { background: #fff; border: 1px solid var(--b2bc-border); border-radius: var(--b2bc-radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.post-card a { text-decoration: none; }
.aviso-plugin { background: #fff7e6; border: 1px solid #f3d28a; color: #6b4e12; padding: 1rem 1.25rem; border-radius: 10px; margin: 1.5rem auto; max-width: var(--b2bc-wrap); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.main-nav, .header-actions { display: none; }
	.nav-toggle { display: flex; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
	.site-footer__grid { grid-template-columns: 1fr; }
	.site-footer__bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	.btn { transition: none; }
	.btn:hover { transform: none; }
}

/* ====================================================================
   v2.4.0 — Conmutador de idioma en el menú + Google Translate
   ==================================================================== */

/* Conmutador ES · EN · FR dentro del menú */
.menu-item--idiomas { display: flex; align-items: center; }
.b2bc-idiomas {
	display: inline-flex;
	align-items: center;
	gap: .1rem;
	border: 1px solid var(--b2bc-border, #d7e0db);
	border-radius: 999px;
	padding: .12rem;
	background: var(--b2bc-surface, #fff);
}
.b2bc-idioma {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.9rem;
	padding: .18rem .45rem;
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .03em;
	line-height: 1;
	text-decoration: none;
	color: var(--b2bc-text, #28332e);
	border-radius: 999px;
	border-bottom: 0;
}
.b2bc-idioma:hover { background: rgba(14,110,92,.1); color: var(--b2bc-primary, #0e6e5c); border-bottom: 0; }
.b2bc-idioma.is-actual { background: var(--b2bc-primary, #0e6e5c); color: #fff; }

/* En el menú móvil, el conmutador se separa un poco */
.mobile-nav .menu-item--idiomas { margin-top: .5rem; }

/* Widget de Google Translate (traducción del contenido dinámico) */
.b2bc-gtranslate {
	display: flex;
	align-items: center;
	gap: .5rem;
	flex-wrap: wrap;
	margin: 0 auto;
	padding: .35rem 1rem;
	font-size: .85rem;
}
.b2bc-gtranslate__lbl { color: var(--b2bc-text, #28332e); font-weight: 600; opacity: .85; }
/* El widget de Google añade un banner superior; lo neutralizamos visualmente */
.goog-te-banner-frame { box-shadow: none !important; }
body { top: 0 !important; }
.b2bc-gtranslate .goog-te-gadget { font-size: 0; color: transparent; }
.b2bc-gtranslate .goog-te-gadget .goog-te-combo {
	font-size: .85rem;
	padding: .25rem .5rem;
	border: 1px solid var(--b2bc-border, #d7e0db);
	border-radius: 8px;
	margin: 0;
	color: var(--b2bc-text, #28332e);
	background: var(--b2bc-surface, #fff);
}

/* ====================================================================
   v2.4.1 — Conmutador de idioma fijo en el encabezado (siempre visible)
   ==================================================================== */
.header-lang { display: flex; align-items: center; }
.header-lang .b2bc-idiomas { background: var(--b2bc-surface, #fff); }

/* En pantallas pequeñas el menú y las acciones se ocultan, pero el botón de
   idioma permanece visible en la barra del encabezado, junto al menú móvil. */
@media (max-width: 860px) {
	.header-lang { margin-left: auto; margin-right: .25rem; }
}
@media (max-width: 360px) {
	.header-lang .b2bc-idioma { min-width: 1.7rem; padding: .16rem .35rem; font-size: .72rem; }
}
